funcy  1.6.0
skin_tissue_hendriks.h
1 #pragma once
2 
3 #include <funcy/examples/volumetric_penalty_functions.h>
4 #include <funcy/funcy.h>
5 
12 namespace funcy
13 {
15  namespace detail
16  {
17  template < linalg::Matrix Mat, int n = linalg::dim< Mat >() >
18  auto generate_incompressible_skin_hendriks( double c0, double c1, const Mat& F )
19  {
20  using namespace linalg;
21  auto S = strain_tensor( F );
22  auto si1 = i1( S() ) - n;
23  auto si2 = i2( S() ) - n;
24  auto f = c0 * si1 + c1 * si1 * si2;
25  return f( S );
26  }
27  } // namespace detail
42  template < linalg::Matrix Mat, int n = linalg::dim< Mat >() >
43  auto incompressible_skin_hendriks( double c0, double c1, const Mat& F )
44  {
45  return finalize( detail::generate_incompressible_skin_hendriks< Mat, n >( c0, c1, F ) );
46  }
47 
61  template < linalg::Matrix Mat, int n = linalg::dim< Mat >() >
62  auto incompressible_skin_hendriks( const Mat& F )
63  {
64  return incompressible_skin_hendriks< Mat, n >( 9.4, 82., F );
65  }
66 
82  template < class InflationPenalty, class CompressionPenalty, linalg::Matrix Mat,
83  int n = linalg::dim< Mat >() >
84  auto compressible_skin_hendriks( double c0, double c1, double d0, double d1, const Mat& F )
85  {
86  return finalize( detail::generate_incompressible_skin_hendriks< Mat, n >( c0, c1, F ) +
87  volumetric_penalty< InflationPenalty, CompressionPenalty >( d0, d1, F ) );
88  }
89 
106  template < class InflationPenalty, class CompressionPenalty, linalg::Matrix M,
107  int n = linalg::dim< M >() >
108  auto compressible_skin_hendriks( double d0, double d1, const M& F )
109  {
110  return compressible_skin_hendriks< InflationPenalty, CompressionPenalty, M, n >(
111  9.4, 82., d0, d1, F );
112  }
113 } // namespace funcy
auto compressible_skin_hendriks(double c0, double c1, double d0, double d1, const Mat &F)
Compressible version of the model for skin tissue of .
Definition: skin_tissue_hendriks.h:84
concept Matrix
Matrix concept.
Definition: concepts.h:77
Main namespace of the funcy library.
auto finalize(F &&f) requires(static_check
Finish function definition.
Definition: finalize.h:248
auto strain_tensor(const Mat &A)
Generate the right Cauchy-Green strain tensor .
Definition: strain_tensor.h:123
auto incompressible_skin_hendriks(double c0, double c1, const Mat &F)
Model for skin tissue of .
Definition: skin_tissue_hendriks.h:43
auto i2(M &&A)
Convenient generation of second principal invariant for .
Definition: principal_invariants.h:166
auto i1(Arg &&x)
Generate first principal invariant.
Definition: principal_invariants.h:155