21 #ifndef RFFGEN_EXAMPLES_VOLUMETRIC_PENALTY_FUNCTIONS_HH
22 #define RFFGEN_EXAMPLES_VOLUMETRIC_PENALTY_FUNCTIONS_HH
24 #include "../LinearAlgebra/determinant.hh"
25 #include "../CMath/log.hh"
26 #include "../CMath/pow.hh"
27 #include "../generate.hh"
32 template <
class Inflation,
class Compression,
class Matrix>
36 auto f = ( d0*Inflation(
det()) + d1*Compression(
det()) ) <<
det;
42 template <
class Matrix>
45 return volumetricPenalty< CMath::Pow<2> ,
CMath::LN >(d0,d1,A);
49 template <
class Matrix>
52 return volumetricPenalty< CMath::Pow<5> ,
CMath::Pow<-5> >(d0,d1,A);
56 #endif // RFFGEN_EXAMPLES_VOLUMETRIC_PENALTY_FUNCTIONS_HH
auto det(Matrix const &A)
Convenient generation of Determinant<Matrix>(A).
Definition: determinant.hh:237
auto volumetricQuadAndLog(double d0, double d1, const Matrix &A)
Create the volumetric penalty function .
Definition: volumetricPenaltyFunctions.hh:43
Power function with rational exponent including first three derivatives.
Definition: pow.hh:43
Natural logarithm including first three derivatives.
Definition: log.hh:41
auto volumetricHartmannNeff(double d0, double d1, const Matrix &A)
Create the volumetric penalty function .
Definition: volumetricPenaltyFunctions.hh:50
auto volumetricPenalty(double d0, double d1, const Matrix &A)
Create volumetric penalty function composed of a penalty for inflation and one for compression...
Definition: volumetricPenaltyFunctions.hh:33
std::conditional_t< Checks::isConstantSizeMatrix< Matrix >(), ConstantSizeDeterminant< Matrix >, DynamicSizeDeterminant< Matrix > > Determinant
Determinant with first three derivatives.
Definition: determinant.hh:230