3 #include <funcy/examples/volumetric_penalty_functions.h> 4 #include <funcy/funcy.h> 19 template < linalg::Matrix M,
int n = linalg::dim< M >() >
22 using namespace linalg;
33 template < linalg::Matrix M,
int n = linalg::dim< M >() >
36 using namespace linalg;
37 auto S = LeftCauchyGreenStrainTensor( F );
38 return finalize( c * (
mi1< decltype( S ), n >( S ) - n ) );
47 template <
class InflationPenalty,
class CompressionPenalty,
linalg::Matrix M,
48 int n = linalg::dim< M >() >
51 using namespace linalg;
53 volumetric_penalty< InflationPenalty, CompressionPenalty >( d0, d1, F ) );
62 template <
class InflationPenalty,
class CompressionPenalty,
linalg::Matrix M,
63 int n = linalg::dim< M >() >
66 using namespace linalg;
67 auto S = LeftCauchyGreenStrainTensor< M >( F );
68 return finalize( c * (
mi1< decltype( S ), n >( S ) - n ) +
69 volumetric_penalty< InflationPenalty, CompressionPenalty >( d0, d1, F ) );
auto compressible_neo_hooke(double c, double d0, double d1, const M &F)
Generate a compressible neo-Hookean material law , where is the first principal matrix invariant...
Definition: neo_hooke.h:49
auto modified_compressible_neo_hooke(double c, double d0, double d1, const M &F)
Generate a compressible neo-Hookean material law , where is the modified first principal matrix inva...
Definition: neo_hooke.h:64
auto mi1(const Arg &x)
Isochoric (volume-preserving), first modified principal invariant , where is the first and is the t...
Definition: principal_invariants.h:200
auto strain_tensor(const Mat &A)
Generate the right Cauchy-Green strain tensor .
Definition: strain_tensor.h:122
concept Matrix
clang-format off
Definition: concepts.h:63
auto incompressible_neo_hooke(double c, const M &F)
Generate an "incompressible" neo-Hookean material law , where is the first principal matrix invarian...
Definition: neo_hooke.h:20
Main namespace of the funcy library.
auto finalize(F &&f) requires(static_check
Finish function definition.
Definition: finalize.h:248
auto modified_incompressible_neo_hooke(double c, const M &F)
Generate an "incompressible" neo-Hookean material law , where is the modified first principal matrix...
Definition: neo_hooke.h:34
auto i1(Arg &&x)
Generate first principal invariant.
Definition: principal_invariants.h:151