v0.10.0
Classes | Typedefs | Functions
EigenMatrix Namespace Reference

Classes

struct  d2MCoefficients
 
struct  d2MImpl
 
struct  Fdd4MImpl
 
struct  ReconstructMatImpl
 
struct  FirstMatrixDirectiveImpl
 
struct  SecondMatrixDirectiveImpl
 
struct  GetMatImpl
 
struct  GetDiffMatImpl
 
struct  GetDiffDiffMatImpl
 
struct  EigenMatrixImp
 

Typedefs

template<typename T , int Dim>
using Val = const FTensor::Tensor1< T, Dim >
 
template<typename T , int Dim>
using Vec = const FTensor::Tensor2< T, Dim, Dim >
 
template<typename T >
using Fun = boost::function< T(const T)>
 

Functions

template<typename T , int Dim>
FTensor::Tensor2_symmetric< double, Dim > getMatImpl (Val< T, Dim > &t_val, Vec< T, Dim > &t_vec, Fun< double > f)
 
template<typename T , int Dim>
FTensor::Ddg< double, Dim, Dim > getDiffMatImpl (Val< T, Dim > &t_val, Vec< T, Dim > &t_vec, Fun< double > f, Fun< double > d_f, const int nb)
 
template<typename T , typename S , int Dim>
FTensor::Ddg< double, Dim, Dim > getDiffDiffMatImpl (Val< T, Dim > &t_val, Vec< T, Dim > &t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, S &t_S, const int nb)
 
FTensor::Tensor2_symmetric< double, 3 > getMat (Val< double, 3 > &t_val, Vec< double, 3 > &t_vec, Fun< double > f)
 Get the Mat object. More...
 
FTensor::Tensor2_symmetric< double, 3 > getMat (Val< FTensor::PackPtr< double *, 1 >, 3 > &t_val, Vec< FTensor::PackPtr< double *, 1 >, 3 > &t_vec, Fun< double > f)
 Get the Mat object. More...
 
FTensor::Ddg< double, 3, 3 > getDiffMat (Val< double, 3 > &t_val, Vec< double, 3 > &t_vec, Fun< double > f, Fun< double > d_f, const int nb)
 Get the Diff Mat object. More...
 
FTensor::Ddg< double, 3, 3 > getDiffMat (Val< FTensor::PackPtr< double *, 1 >, 3 > &t_val, Vec< FTensor::PackPtr< double *, 1 >, 3 > &t_vec, Fun< double > f, Fun< double > d_f, const int nb)
 Get the Diff Mat object. More...
 
FTensor::Ddg< double, 3, 3 > getDiffDiffMat (Val< double, 3 > &t_val, Vec< double, 3 > &t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, FTensor::Tensor2< double, 3, 3 > &t_S, const int nb)
 Get the Diff Diff Mat object. More...
 
FTensor::Ddg< double, 3, 3 > getDiffDiffMat (Val< FTensor::PackPtr< double *, 1 >, 3 > &t_val, Vec< FTensor::PackPtr< double *, 1 >, 3 > &t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, FTensor::Tensor2< double, 3, 3 > &t_S, const int nb)
 Get the Diff Mat object. More...
 
FTensor::Ddg< double, 3, 3 > getDiffDiffMat (Val< double, 3 > &t_val, Vec< double, 3 > &t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, FTensor::Tensor2_symmetric< double, 3 > &t_S, const int nb)
 Get the Diff Diff Mat object. More...
 
FTensor::Tensor2_symmetric< double, 2 > getMat (Val< double, 2 > &t_val, Vec< double, 2 > &t_vec, Fun< double > f)
 Get the Mat object. More...
 
FTensor::Ddg< double, 2, 2 > getDiffMat (Val< double, 2 > &t_val, Vec< double, 2 > &t_vec, Fun< double > f, Fun< double > d_f, const int nb)
 Get the Diff Mat object. More...
 
FTensor::Ddg< double, 2, 2 > getDiffDiffMat (Val< double, 2 > &t_val, Vec< double, 2 > &t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, FTensor::Tensor2< double, 2, 2 > &t_S, const int nb)
 Get the Diff Diff Mat object. More...
 
FTensor::Ddg< double, 2, 2 > getDiffDiffMat (Val< double, 2 > &t_val, Vec< double, 2 > &t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, FTensor::Tensor2_symmetric< double, 2 > &t_S, const int nb)
 Get the Diff Diff Mat object. More...
 

Typedef Documentation

◆ Fun

template<typename T >
using EigenMatrix::Fun = typedef boost::function<T(const T)>

Definition at line 71 of file MatrixFunction.hpp.

◆ Val

template<typename T , int Dim>
using EigenMatrix::Val = typedef const FTensor::Tensor1<T, Dim>

Definition at line 69 of file MatrixFunction.hpp.

◆ Vec

template<typename T , int Dim>
using EigenMatrix::Vec = typedef const FTensor::Tensor2<T, Dim, Dim>

Function Documentation

◆ getDiffDiffMat() [1/5]

FTensor::Ddg< double, 2, 2 > EigenMatrix::getDiffDiffMat ( Val< double, 2 > &  t_val,
Vec< double, 2 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
Fun< double >  dd_f,
FTensor::Tensor2< double, 2, 2 > &  t_S,
const int  nb 
)

Get the Diff Diff Mat object.

\[ LS_{klmn} = S_{ij} \frac{\partial^2 B_{ij}}{\partial A_{kl} \partial A_{mn} } \]

Note
Eiegn vetore are in rows.
Parameters
t_valeiegn values
t_veceigen vectors
ffunction
d_fdirective of function
dd_fsecond directive of function
t_SS tensor
nbnumber of nonzero eigen values
Returns
FTensor::Ddg<double, 3, 3>

Definition at line 117 of file MatrixFunction.cpp.

121  {
122  return getDiffDiffMatImpl<double, FTensor::Tensor2<double, 2, 2>, 2>(
123  t_val, t_vec, f, d_f, dd_f, t_S, nb);
124 }
auto dd_f
Definition: HenckyOps.hpp:21
auto d_f
Definition: HenckyOps.hpp:20

◆ getDiffDiffMat() [2/5]

FTensor::Ddg< double, 2, 2 > EigenMatrix::getDiffDiffMat ( Val< double, 2 > &  t_val,
Vec< double, 2 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
Fun< double >  dd_f,
FTensor::Tensor2_symmetric< double, 2 > &  t_S,
const int  nb 
)

Get the Diff Diff Mat object.

\[ LS_{klmn} = S_{ij} \frac{\partial^2 B_{ij}}{\partial A_{kl} \partial A_{mn} } \]

Note
Eiegn vetore are in rows.
Parameters
t_valeiegn values
t_veceigen vectors
ffunction
d_fdirective of function
dd_fsecond directive of function
t_SS tensor
nbnumber of nonzero eigen values
Returns
FTensor::Ddg<double, 3, 3>

Definition at line 127 of file MatrixFunction.cpp.

129  {
130  return getDiffDiffMatImpl<double, FTensor::Tensor2_symmetric<double, 2>, 2>(
131  t_val, t_vec, f, d_f, dd_f, t_S, nb);
132 }

◆ getDiffDiffMat() [3/5]

FTensor::Ddg< double, 3, 3 > EigenMatrix::getDiffDiffMat ( Val< double, 3 > &  t_val,
Vec< double, 3 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
Fun< double >  dd_f,
FTensor::Tensor2< double, 3, 3 > &  t_S,
const int  nb 
)

Get the Diff Diff Mat object.

\[ LS_{klmn} = S_{ij} \frac{\partial^2 B_{ij}}{\partial A_{kl} \partial A_{mn} } \]

Note
Eiegn vetore are in rows.
Parameters
t_valeiegn values
t_veceigen vectors
ffunction
d_fdirective of function
dd_fsecond directive of function
t_SS tensor
nbnumber of nonzero eigen values
Returns
FTensor::Ddg<double, 3, 3>
Examples
EshelbianOperators.cpp, and matrix_function.cpp.

Definition at line 78 of file MatrixFunction.cpp.

82  {
83  return getDiffDiffMatImpl<double, FTensor::Tensor2<double, 3, 3>, 3>(
84  t_val, t_vec, f, d_f, dd_f, t_S, nb);
85 }

◆ getDiffDiffMat() [4/5]

FTensor::Ddg< double, 3, 3 > EigenMatrix::getDiffDiffMat ( Val< double, 3 > &  t_val,
Vec< double, 3 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
Fun< double >  dd_f,
FTensor::Tensor2_symmetric< double, 3 > &  t_S,
const int  nb 
)

Get the Diff Diff Mat object.

\[ LS_{klmn} = S_{ij} \frac{\partial^2 B_{ij}}{\partial A_{kl} \partial A_{mn} } \]

Note
Eiegn vetore are in rows.
Parameters
t_valeiegn values
t_veceigen vectors
ffunction
d_fdirective of function
dd_fsecond directive of function
t_SS tensor
nbnumber of nonzero eigen values
Returns
FTensor::Ddg<double, 3, 3>

Definition at line 98 of file MatrixFunction.cpp.

100  {
101  return getDiffDiffMatImpl<double, FTensor::Tensor2_symmetric<double, 3>, 3>(
102  t_val, t_vec, f, d_f, dd_f, t_S, nb);
103 }

◆ getDiffDiffMat() [5/5]

FTensor::Ddg< double, 3, 3 > EigenMatrix::getDiffDiffMat ( Val< FTensor::PackPtr< double *, 1 >, 3 > &  t_val,
Vec< FTensor::PackPtr< double *, 1 >, 3 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
Fun< double >  dd_f,
FTensor::Tensor2< double, 3, 3 > &  t_S,
const int  nb 
)

Get the Diff Mat object.

\[ P_{ijkl} = \frac{\partial B_{ij}}{\partial A_{kl}} \]

Note
Eiegn vetore are in rows.
Parameters
t_valeigen values
t_veceigen vector
ffunction
d_fdirective of function
nbnumber of nonequal eigen valuse
Returns
FTensor::Ddg<double, 3, 3>

Definition at line 88 of file MatrixFunction.cpp.

91  {
92  return getDiffDiffMatImpl<FTensor::PackPtr<double *, 1>,
94  t_val, t_vec, f, d_f, dd_f, t_S, nb);
95 }

◆ getDiffDiffMatImpl()

template<typename T , typename S , int Dim>
FTensor::Ddg<double, Dim, Dim> EigenMatrix::getDiffDiffMatImpl ( Val< T, Dim > &  t_val,
Vec< T, Dim > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
Fun< double >  dd_f,
S &  t_S,
const int  nb 
)

Definition at line 35 of file MatrixFunction.cpp.

36  {
37  switch (nb) {
38  case 1:
39  return EigenMatrixImp<T, T, 1, Dim>(t_val, t_vec)
40  .getDiffDiffMat(f, d_f, dd_f, t_S);
41  case 2:
42  return EigenMatrixImp<T, T, 2, Dim>(t_val, t_vec)
43  .getDiffDiffMat(f, d_f, dd_f, t_S);
44  case 3:
45  break;
46  default:
47  THROW_MESSAGE("third parameter should be 1,2 or 3");
48  }
49  return EigenMatrixImp<T, T, 3, Dim>(t_val, t_vec)
50  .getDiffDiffMat(f, d_f, dd_f, t_S);
51 };
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:628

◆ getDiffMat() [1/3]

FTensor::Ddg< double, 2, 2 > EigenMatrix::getDiffMat ( Val< double, 2 > &  t_val,
Vec< double, 2 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
const int  nb 
)

Get the Diff Mat object.

\[ P_{ijkl} = \frac{\partial B_{ij}}{\partial A_{kl}} \]

Note
Eiegn vetore are in rows.
Parameters
t_valeigen values
t_veceigen vector
ffunction
d_fdirective of function
nbnumber of nonequal eigen valuse
Returns
FTensor::Ddg<double, 3, 3>

Definition at line 111 of file MatrixFunction.cpp.

113  {
114  return getDiffMatImpl<double, 2>(t_val, t_vec, f, d_f, nb);
115 }

◆ getDiffMat() [2/3]

FTensor::Ddg< double, 3, 3 > EigenMatrix::getDiffMat ( Val< double, 3 > &  t_val,
Vec< double, 3 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
const int  nb 
)

Get the Diff Mat object.

\[ P_{ijkl} = \frac{\partial B_{ij}}{\partial A_{kl}} \]

Note
Eiegn vetore are in rows.
Parameters
t_valeigen values
t_veceigen vector
ffunction
d_fdirective of function
nbnumber of nonequal eigen valuse
Returns
FTensor::Ddg<double, 3, 3>
Examples
EshelbianOperators.cpp, and matrix_function.cpp.

Definition at line 64 of file MatrixFunction.cpp.

66  {
67  return getDiffMatImpl<double, 3>(t_val, t_vec, f, d_f, nb);
68 }

◆ getDiffMat() [3/3]

FTensor::Ddg< double, 3, 3 > EigenMatrix::getDiffMat ( Val< FTensor::PackPtr< double *, 1 >, 3 > &  t_val,
Vec< FTensor::PackPtr< double *, 1 >, 3 > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
const int  nb 
)

Get the Diff Mat object.

\[ P_{ijkl} = \frac{\partial B_{ij}}{\partial A_{kl}} \]

Note
Eiegn vetore are in rows.
Parameters
t_valeigen values
t_veceigen vector
ffunction
d_fdirective of function
nbnumber of nonequal eigen valuse
Returns
FTensor::Ddg<double, 3, 3>

Definition at line 71 of file MatrixFunction.cpp.

73  {
74  return getDiffMatImpl<FTensor::PackPtr<double *, 1>, 3>(t_val, t_vec, f, d_f,
75  nb);
76 }

◆ getDiffMatImpl()

template<typename T , int Dim>
FTensor::Ddg<double, Dim, Dim> EigenMatrix::getDiffMatImpl ( Val< T, Dim > &  t_val,
Vec< T, Dim > &  t_vec,
Fun< double >  f,
Fun< double >  d_f,
const int  nb 
)

Definition at line 17 of file MatrixFunction.cpp.

19  {
20  switch (nb) {
21  case 1:
22  return EigenMatrixImp<T, T, 1, Dim>(t_val, t_vec).getDiffMat(f, d_f);
23  case 2:
24  return EigenMatrixImp<T, T, 2, Dim>(t_val, t_vec).getDiffMat(f, d_f);
25  case 3:
26  break;
27  default:
28  THROW_MESSAGE("third parameter should be 1,2 or 3");
29  }
30  return EigenMatrixImp<T, T, 3, Dim>(t_val, t_vec).getDiffMat(f, d_f);
31 };

◆ getMat() [1/3]

FTensor::Tensor2_symmetric< double, 2 > EigenMatrix::getMat ( Val< double, 2 > &  t_val,
Vec< double, 2 > &  t_vec,
Fun< double >  f 
)

Get the Mat object.

\[ \mathbf{B} = f(\mathbf{A}) \]

\[ B_{ij} = \sum_{a}^d f(\lambda^a) n^a_i n^a_j \]

where \(a\) is eigen value number.

Parameters
t_valeigen values
t_veceigen vector
ffunction
Returns
FTensor::Tensor2_symmetric<double, 3>

Definition at line 105 of file MatrixFunction.cpp.

107  {
108  return getMatImpl<double, 2>(t_val, t_vec, f);
109 }

◆ getMat() [2/3]

FTensor::Tensor2_symmetric< double, 3 > EigenMatrix::getMat ( Val< double, 3 > &  t_val,
Vec< double, 3 > &  t_vec,
Fun< double >  f 
)

Get the Mat object.

\[ \mathbf{B} = f(\mathbf{A}) \]

\[ B_{ij} = \sum_{a}^d f(\lambda^a) n^a_i n^a_j \]

where \(a\) is eigen value number.

Parameters
t_valeigen values
t_veceigen vector
ffunction
Returns
FTensor::Tensor2_symmetric<double, 3>
Examples
EshelbianOperators.cpp, and matrix_function.cpp.

Definition at line 53 of file MatrixFunction.cpp.

54  {
55  return getMatImpl<double, 3>(t_val, t_vec, f);
56 }

◆ getMat() [3/3]

FTensor::Tensor2_symmetric< double, 3 > EigenMatrix::getMat ( Val< FTensor::PackPtr< double *, 1 >, 3 > &  t_val,
Vec< FTensor::PackPtr< double *, 1 >, 3 > &  t_vec,
Fun< double >  f 
)

Get the Mat object.

\[ \mathbf{B} = f(\mathbf{A}) \]

\[ B_{ij} = \sum_{a}^d f(\lambda^a) n^a_i n^a_j \]

where \(a\) is eigen value number.

Parameters
t_valeigen values
t_veceigen vector
ffunction
Returns
FTensor::Tensor2_symmetric<double, 3>

Definition at line 59 of file MatrixFunction.cpp.

60  {
61  return getMatImpl<FTensor::PackPtr<double *, 1>, 3>(t_val, t_vec, f);
62 }

◆ getMatImpl()

template<typename T , int Dim>
FTensor::Tensor2_symmetric<double, Dim> EigenMatrix::getMatImpl ( Val< T, Dim > &  t_val,
Vec< T, Dim > &  t_vec,
Fun< double >  f 
)

Definition at line 12 of file MatrixFunction.cpp.

12  {
13  return EigenMatrixImp<T, T, 3, Dim>(t_val, t_vec).getMat(f);
14 }