MFEM  v4.5.2
Finite element discretization library
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
mfem::InvariantsEvaluator2D< scalar_t, scalar_ops > Class Template Reference

Auxiliary class for evaluating the 2x2 matrix invariants and their first and second derivatives. More...

#include <invariants.hpp>

Collaboration diagram for mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >:
[legend]

Public Member Functions

 InvariantsEvaluator2D (const scalar_t *Jac=NULL)
 The Jacobian should use column-major storage. More...
 
 ~InvariantsEvaluator2D ()
 
void SetJacobian (const scalar_t *Jac)
 The Jacobian should use column-major storage. More...
 
void SetDerivativeMatrix (int height, const scalar_t *Deriv)
 The Deriv matrix is dof x 2, using column-major storage. More...
 
scalar_t Get_I1 ()
 
scalar_t Get_I1b ()
 
scalar_t Get_I2 ()
 
scalar_t Get_I2b ()
 
const scalar_t * Get_dI1 ()
 
const scalar_t * Get_dI1b ()
 
const scalar_t * Get_dI2 ()
 
const scalar_t * Get_dI2b ()
 
void Assemble_ddI1 (scalar_t w, scalar_t *A)
 
void Assemble_ddI1b (scalar_t w, scalar_t *A)
 
void Assemble_ddI2 (scalar_t w, scalar_t *A)
 
void Assemble_ddI2b (scalar_t w, scalar_t *A)
 
void Assemble_TProd (scalar_t w, const scalar_t *X, const scalar_t *Y, scalar_t *A)
 
void Assemble_TProd (scalar_t w, const scalar_t *X, scalar_t *A)
 

Protected Types

enum  EvalMasks {
  HAVE_I1 = 1, HAVE_I1b = 2, HAVE_I2b = 4, HAVE_dI1 = 8,
  HAVE_dI1b = 16, HAVE_dI2 = 32, HAVE_dI2b = 64, HAVE_DaJ = 128,
  HAVE_DJt = 256
}
 

Protected Member Functions

bool dont (int have_mask) const
 
void Eval_I1 ()
 
void Eval_I1b ()
 
void Eval_I2b ()
 
void Eval_dI1 ()
 
void Eval_dI1b ()
 
void Eval_dI2 ()
 
void Eval_dI2b ()
 
void Eval_DaJ ()
 
void Eval_DJt ()
 
void Eval_DZt (const scalar_t *Z, scalar_t **DZt_ptr)
 

Protected Attributes

const scalar_t * J
 
scalar_t I1
 
scalar_t I1b
 
scalar_t I2b
 
scalar_t dI1 [4]
 
scalar_t dI1b [4]
 
scalar_t dI2 [4]
 
scalar_t dI2b [4]
 
int D_height
 
int alloc_height
 
const scalar_t * D
 
scalar_t * DaJ
 
scalar_t * DJt
 
scalar_t * DXt
 
scalar_t * DYt
 
int eval_state
 

Detailed Description

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
class mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >

Auxiliary class for evaluating the 2x2 matrix invariants and their first and second derivatives.

The type scalar_t must support the standard operations:

=, +=, -=, +, -, *, /, unary -, int*scalar_t, int/scalar_t, scalar_t/int

The type scalar_ops must define the static method:

scalar_t sign(const scalar_t &);

Definition at line 49 of file invariants.hpp.

Member Enumeration Documentation

◆ EvalMasks

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
enum mfem::InvariantsEvaluator2D::EvalMasks
protected
Enumerator
HAVE_I1 
HAVE_I1b 
HAVE_I2b 
HAVE_dI1 
HAVE_dI1b 
HAVE_dI2 
HAVE_dI2b 
HAVE_DaJ 
HAVE_DJt 

Definition at line 65 of file invariants.hpp.

Constructor & Destructor Documentation

◆ InvariantsEvaluator2D()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::InvariantsEvaluator2D ( const scalar_t *  Jac = NULL)
inline

The Jacobian should use column-major storage.

Definition at line 168 of file invariants.hpp.

◆ ~InvariantsEvaluator2D()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::~InvariantsEvaluator2D ( )
inline

Definition at line 172 of file invariants.hpp.

Member Function Documentation

◆ Assemble_ddI1()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Assemble_ddI1 ( scalar_t  w,
scalar_t *  A 
)
inline

Definition at line 226 of file invariants.hpp.

◆ Assemble_ddI1b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Assemble_ddI1b ( scalar_t  w,
scalar_t *  A 
)
inline

Definition at line 257 of file invariants.hpp.

◆ Assemble_ddI2()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Assemble_ddI2 ( scalar_t  w,
scalar_t *  A 
)
inline

Definition at line 335 of file invariants.hpp.

◆ Assemble_ddI2b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Assemble_ddI2b ( scalar_t  w,
scalar_t *  A 
)
inline

Definition at line 384 of file invariants.hpp.

◆ Assemble_TProd() [1/2]

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Assemble_TProd ( scalar_t  w,
const scalar_t *  X,
const scalar_t *  Y,
scalar_t *  A 
)
inline

Definition at line 432 of file invariants.hpp.

◆ Assemble_TProd() [2/2]

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Assemble_TProd ( scalar_t  w,
const scalar_t *  X,
scalar_t *  A 
)
inline

Definition at line 460 of file invariants.hpp.

◆ dont()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
bool mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::dont ( int  have_mask) const
inlineprotected

Definition at line 81 of file invariants.hpp.

◆ Eval_DaJ()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_DaJ ( )
inlineprotected

Definition at line 141 of file invariants.hpp.

◆ Eval_dI1()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_dI1 ( )
inlineprotected

Definition at line 99 of file invariants.hpp.

◆ Eval_dI1b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_dI1b ( )
inlineprotected

Definition at line 105 of file invariants.hpp.

◆ Eval_dI2()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_dI2 ( )
inlineprotected

Definition at line 118 of file invariants.hpp.

◆ Eval_dI2b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_dI2b ( )
inlineprotected

Definition at line 130 of file invariants.hpp.

◆ Eval_DJt()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_DJt ( )
inlineprotected

Definition at line 147 of file invariants.hpp.

◆ Eval_DZt()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_DZt ( const scalar_t *  Z,
scalar_t **  DZt_ptr 
)
inlineprotected

Definition at line 152 of file invariants.hpp.

◆ Eval_I1()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_I1 ( )
inlineprotected

Definition at line 83 of file invariants.hpp.

◆ Eval_I1b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_I1b ( )
inlineprotected

Definition at line 88 of file invariants.hpp.

◆ Eval_I2b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Eval_I2b ( )
inlineprotected

Definition at line 93 of file invariants.hpp.

◆ Get_dI1()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
const scalar_t* mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_dI1 ( )
inline

Definition at line 204 of file invariants.hpp.

◆ Get_dI1b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
const scalar_t* mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_dI1b ( )
inline

Definition at line 208 of file invariants.hpp.

◆ Get_dI2()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
const scalar_t* mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_dI2 ( )
inline

Definition at line 212 of file invariants.hpp.

◆ Get_dI2b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
const scalar_t* mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_dI2b ( )
inline

Definition at line 216 of file invariants.hpp.

◆ Get_I1()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_I1 ( )
inline

Definition at line 199 of file invariants.hpp.

◆ Get_I1b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_I1b ( )
inline

Definition at line 200 of file invariants.hpp.

◆ Get_I2()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_I2 ( )
inline

Definition at line 201 of file invariants.hpp.

◆ Get_I2b()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::Get_I2b ( )
inline

Definition at line 202 of file invariants.hpp.

◆ SetDerivativeMatrix()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::SetDerivativeMatrix ( int  height,
const scalar_t *  Deriv 
)
inline

The Deriv matrix is dof x 2, using column-major storage.

Definition at line 184 of file invariants.hpp.

◆ SetJacobian()

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::SetJacobian ( const scalar_t *  Jac)
inline

The Jacobian should use column-major storage.

Definition at line 181 of file invariants.hpp.

Member Data Documentation

◆ alloc_height

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
int mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::alloc_height
protected

Definition at line 61 of file invariants.hpp.

◆ D

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
const scalar_t* mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::D
protected

Definition at line 62 of file invariants.hpp.

◆ D_height

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
int mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::D_height
protected

Definition at line 61 of file invariants.hpp.

◆ DaJ

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t* mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::DaJ
protected

Definition at line 63 of file invariants.hpp.

◆ dI1

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::dI1[4]
protected

Definition at line 59 of file invariants.hpp.

◆ dI1b

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::dI1b[4]
protected

Definition at line 59 of file invariants.hpp.

◆ dI2

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::dI2[4]
protected

Definition at line 59 of file invariants.hpp.

◆ dI2b

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::dI2b[4]
protected

Definition at line 59 of file invariants.hpp.

◆ DJt

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t * mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::DJt
protected

Definition at line 63 of file invariants.hpp.

◆ DXt

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t * mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::DXt
protected

Definition at line 63 of file invariants.hpp.

◆ DYt

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t * mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::DYt
protected

Definition at line 63 of file invariants.hpp.

◆ eval_state

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
int mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::eval_state
protected

Definition at line 79 of file invariants.hpp.

◆ I1

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::I1
protected

Definition at line 56 of file invariants.hpp.

◆ I1b

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::I1b
protected

Definition at line 56 of file invariants.hpp.

◆ I2b

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::I2b
protected

Definition at line 56 of file invariants.hpp.

◆ J

template<typename scalar_t, typename scalar_ops = ScalarOps<scalar_t>>
const scalar_t* mfem::InvariantsEvaluator2D< scalar_t, scalar_ops >::J
protected

Definition at line 53 of file invariants.hpp.


The documentation for this class was generated from the following file: