21 #ifndef RFFGEN_NEO_HOOKE_HH
22 #define RFFGEN_NEO_HOOKE_HH
24 #include "../../LinearAlgebra/invariants.hh"
25 #include "../../LinearAlgebra/strainTensor.hh"
26 #include "../../LinearAlgebra/unitMatrix.hh"
27 #include "../../finalize.hh"
28 #include "../volumetricPenaltyFunctions.hh"
29 #include "../../generate.hh"
43 template <
class Matrix ,
int offset = LinearAlgebra::dimension<Matrix>() >
46 using namespace LinearAlgebra;
47 using Inv =
typename InvariantTraits<Invariant::PRINCIPAL>::template ShiftedFirstInvariant<Matrix,offset>;
48 auto S = LeftCauchyGreenStrainTensor<Matrix>(F);
49 auto f = c*Inv(S()) << S;
57 template <
class Matrix ,
int offset = LinearAlgebra::dimension<Matrix>() >
60 using namespace LinearAlgebra;
61 using Inv =
typename InvariantTraits<Invariant::MODIFIED>::template ShiftedFirstInvariant<Matrix,offset>;
62 auto S = LeftCauchyGreenStrainTensor<Matrix>(F);
63 return c * Inv(S()) << S;
69 namespace NeoHookeDetail
71 template <
class InflationPenalty,
class CompressionPenalty,
class Matrix, LinearAlgebra::Invariant I = LinearAlgebra::Invariant::PRINCIPAL ,
int offset = LinearAlgebra::dimension<Matrix>() >
72 auto compressibleNeoHookeImpl(
double c,
double d0,
double d1,
const Matrix& F)
74 using namespace LinearAlgebra;
75 using Inv =
typename InvariantTraits<I>::template ShiftedFirstInvariant<Matrix,offset>;
76 auto S = LeftCauchyGreenStrainTensor<Matrix>(F);
77 return ( c*Inv(F) << S ) + volumetricPenalty<InflationPenalty,CompressionPenalty>(d0,d1,F);
90 template <
class InflationPenalty,
class CompressionPenalty,
class Matrix ,
int offset = LinearAlgebra::dimension<Matrix>() >
93 return NeoHookeDetail::compressibleNeoHookeImpl<InflationPenalty,CompressionPenalty,Matrix,LinearAlgebra::Invariant::PRINCIPAL,offset>(c,d0,d1,F);
101 template <
class InflationPenalty,
class CompressionPenalty,
class Matrix ,
int offset = LinearAlgebra::dimension<Matrix>() >
104 return NeoHookeDetail::compressibleNeoHookeImpl<InflationPenalty,CompressionPenalty,Matrix,LinearAlgebra::Invariant::MODIFIED,offset>(c,d0,d1,F);
108 #endif // RFFGEN_NEO_HOOKE_HH
auto compressibleNeoHooke(double c, double d0, double d1, const Matrix &F)
Generate a compressible neo-Hookean material law , where is the first principal matrix invariant...
Definition: neoHooke.hh:91
auto modifiedIncompressibleNeoHooke(double c, const Matrix &F)
Generate an "incompressible" neo-Hookean material law , where is the modified first principal matrix...
Definition: neoHooke.hh:58
Detail::FinalizeImpl< F, arithmeticArgument, Checks::hasVariable< F >() > Finalize
Finish function definition.
Definition: finalize.hh:297
auto incompressibleNeoHooke(double c, const Matrix &F)
Generate an "incompressible" neo-Hookean material law , where is the first principal matrix invarian...
Definition: neoHooke.hh:44
auto modifiedCompressibleNeoHooke(double c, double d0, double d1, const Matrix &F)
Generate a compressible neo-Hookean material law , where is the modified first principal matrix inva...
Definition: neoHooke.hh:102