MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::InvariantsEvaluator3D< scalar_t, scalar_ops > Class Template Reference

Auxiliary class for evaluating the 3x3 matrix invariants and their first and second derivatives. More...

#include <invariants.hpp>

Public Member Functions

 InvariantsEvaluator3D (const scalar_t *Jac=NULL)
 The Jacobian should use column-major storage.
 
 ~InvariantsEvaluator3D ()
 
void SetJacobian (const scalar_t *Jac)
 The Jacobian should use column-major storage.
 
void SetDerivativeMatrix (int height, const scalar_t *Deriv)
 The Deriv matrix is dof x 3, using column-major storage.
 
scalar_t Get_I1 ()
 
scalar_t Get_I1b ()
 
scalar_t Get_I2 ()
 
scalar_t Get_I2b ()
 
scalar_t Get_I3 ()
 
scalar_t Get_I3b ()
 
const scalar_t * Get_dI1 ()
 
const scalar_t * Get_dI1b ()
 
const scalar_t * Get_dI2 ()
 
const scalar_t * Get_dI2b ()
 
const scalar_t * Get_dI3 ()
 
const scalar_t * Get_dI3b ()
 
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_ddI3 (scalar_t w, scalar_t *A)
 
void Assemble_ddI3b (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_B_offd = 4 , HAVE_I2 = 8 ,
  HAVE_I2b = 16 , HAVE_I3b = 1<<5 , HAVE_I3b_p = 1<<6 , HAVE_dI1 = 1<<7 ,
  HAVE_dI1b = 1<<8 , HAVE_dI2 = 1<<9 , HAVE_dI2b = 1<<10 , HAVE_dI3 = 1<<11 ,
  HAVE_dI3b = 1<<12 , HAVE_DaJ = 1<<13 , HAVE_DJt = 1<<14 , HAVE_DdI2t = 1<<15
}
 

Protected Member Functions

bool dont (int have_mask) const
 
void Eval_I1 ()
 
void Eval_I1b ()
 
void Eval_B_offd ()
 
void Eval_I2 ()
 
void Eval_I2b ()
 
void Eval_I3b ()
 
scalar_t Get_I3b_p ()
 
void Eval_dI1 ()
 
void Eval_dI1b ()
 
void Eval_dI2 ()
 
void Eval_dI2b ()
 
void Eval_dI3 ()
 
void Eval_dI3b ()
 
void Eval_DZt (const scalar_t *Z, scalar_t **DZt_ptr)
 
void Eval_DaJ ()
 
void Eval_DJt ()
 
void Eval_DdI2t ()
 

Protected Attributes

const scalar_t * J
 
scalar_t I1
 
scalar_t I1b
 
scalar_t I2
 
scalar_t I2b
 
scalar_t I3b
 
scalar_t I3b_p
 
scalar_t dI1 [9]
 
scalar_t dI1b [9]
 
scalar_t dI2 [9]
 
scalar_t dI2b [9]
 
scalar_t dI3 [9]
 
scalar_t dI3b [9]
 
scalar_t B [6]
 
int D_height
 
int alloc_height
 
const scalar_t * D
 
scalar_t * DaJ
 
scalar_t * DJt
 
scalar_t * DdI2t
 
scalar_t * DXt
 
scalar_t * DYt
 
int eval_state
 

Detailed Description

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

Auxiliary class for evaluating the 3x3 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 methods:

scalar_t sign(const scalar_t &);
scalar_t pow(const scalar_t &x, int a, int b); // x^(a/b)

Definition at line 494 of file invariants.hpp.

Member Enumeration Documentation

◆ EvalMasks

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
enum mfem::InvariantsEvaluator3D::EvalMasks
protected
Enumerator
HAVE_I1 
HAVE_I1b 
HAVE_B_offd 
HAVE_I2 
HAVE_I2b 
HAVE_I3b 
HAVE_I3b_p 
HAVE_dI1 
HAVE_dI1b 
HAVE_dI2 
HAVE_dI2b 
HAVE_dI3 
HAVE_dI3b 
HAVE_DaJ 
HAVE_DJt 
HAVE_DdI2t 

Definition at line 519 of file invariants.hpp.

Constructor & Destructor Documentation

◆ InvariantsEvaluator3D()

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

The Jacobian should use column-major storage.

Definition at line 723 of file invariants.hpp.

◆ ~InvariantsEvaluator3D()

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

Definition at line 727 of file invariants.hpp.

Member Function Documentation

◆ Assemble_ddI1()

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

Definition at line 793 of file invariants.hpp.

◆ Assemble_ddI1b()

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

Definition at line 827 of file invariants.hpp.

◆ Assemble_ddI2()

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

Definition at line 951 of file invariants.hpp.

◆ Assemble_ddI2b()

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

Definition at line 1090 of file invariants.hpp.

◆ Assemble_ddI3()

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

Definition at line 1206 of file invariants.hpp.

◆ Assemble_ddI3b()

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

Definition at line 1253 of file invariants.hpp.

◆ Assemble_TProd() [1/2]

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

Definition at line 1297 of file invariants.hpp.

◆ Assemble_TProd() [2/2]

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

Definition at line 1324 of file invariants.hpp.

◆ dont()

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

Definition at line 542 of file invariants.hpp.

◆ Eval_B_offd()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Eval_B_offd ( )
inlineprotected

Definition at line 557 of file invariants.hpp.

◆ Eval_DaJ()

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

Definition at line 703 of file invariants.hpp.

◆ Eval_DdI2t()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Eval_DdI2t ( )
inlineprotected

Definition at line 714 of file invariants.hpp.

◆ Eval_dI1()

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

Definition at line 597 of file invariants.hpp.

◆ Eval_dI1b()

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

Definition at line 605 of file invariants.hpp.

◆ Eval_dI2()

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

Definition at line 618 of file invariants.hpp.

◆ Eval_dI2b()

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

Definition at line 646 of file invariants.hpp.

◆ Eval_dI3()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Eval_dI3 ( )
inlineprotected

Definition at line 662 of file invariants.hpp.

◆ Eval_dI3b()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Eval_dI3b ( )
inlineprotected

Definition at line 674 of file invariants.hpp.

◆ Eval_DJt()

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

Definition at line 709 of file invariants.hpp.

◆ Eval_DZt()

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

Definition at line 689 of file invariants.hpp.

◆ Eval_I1()

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

Definition at line 544 of file invariants.hpp.

◆ Eval_I1b()

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

Definition at line 552 of file invariants.hpp.

◆ Eval_I2()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Eval_I2 ( )
inlineprotected

Definition at line 566 of file invariants.hpp.

◆ Eval_I2b()

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

Definition at line 575 of file invariants.hpp.

◆ Eval_I3b()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
void mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Eval_I3b ( )
inlineprotected

Definition at line 581 of file invariants.hpp.

◆ Get_dI1()

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

Definition at line 763 of file invariants.hpp.

◆ Get_dI1b()

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

Definition at line 767 of file invariants.hpp.

◆ Get_dI2()

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

Definition at line 771 of file invariants.hpp.

◆ Get_dI2b()

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

Definition at line 775 of file invariants.hpp.

◆ Get_dI3()

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

Definition at line 779 of file invariants.hpp.

◆ Get_dI3b()

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

Definition at line 783 of file invariants.hpp.

◆ Get_I1()

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

Definition at line 756 of file invariants.hpp.

◆ Get_I1b()

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

Definition at line 757 of file invariants.hpp.

◆ Get_I2()

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

Definition at line 758 of file invariants.hpp.

◆ Get_I2b()

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

Definition at line 759 of file invariants.hpp.

◆ Get_I3()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Get_I3 ( )
inline

Definition at line 760 of file invariants.hpp.

◆ Get_I3b()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Get_I3b ( )
inline

Definition at line 761 of file invariants.hpp.

◆ Get_I3b_p()

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::Get_I3b_p ( )
inlineprotected

Definition at line 587 of file invariants.hpp.

◆ SetDerivativeMatrix()

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

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

Definition at line 740 of file invariants.hpp.

◆ SetJacobian()

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

The Jacobian should use column-major storage.

Definition at line 737 of file invariants.hpp.

Member Data Documentation

◆ alloc_height

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

Definition at line 515 of file invariants.hpp.

◆ B

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::B[6]
protected

Definition at line 513 of file invariants.hpp.

◆ D

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

Definition at line 516 of file invariants.hpp.

◆ D_height

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

Definition at line 515 of file invariants.hpp.

◆ DaJ

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

Definition at line 517 of file invariants.hpp.

◆ DdI2t

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t * mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::DdI2t
protected

Definition at line 517 of file invariants.hpp.

◆ dI1

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::dI1[9]
protected

Definition at line 512 of file invariants.hpp.

◆ dI1b

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::dI1b[9]
protected

Definition at line 512 of file invariants.hpp.

◆ dI2

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::dI2[9]
protected

Definition at line 512 of file invariants.hpp.

◆ dI2b

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::dI2b[9]
protected

Definition at line 512 of file invariants.hpp.

◆ dI3

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::dI3[9]
protected

Definition at line 512 of file invariants.hpp.

◆ dI3b

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::dI3b[9]
protected

Definition at line 512 of file invariants.hpp.

◆ DJt

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

Definition at line 517 of file invariants.hpp.

◆ DXt

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

Definition at line 517 of file invariants.hpp.

◆ DYt

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

Definition at line 517 of file invariants.hpp.

◆ eval_state

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

Definition at line 540 of file invariants.hpp.

◆ I1

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

Definition at line 508 of file invariants.hpp.

◆ I1b

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

Definition at line 508 of file invariants.hpp.

◆ I2

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::I2
protected

Definition at line 508 of file invariants.hpp.

◆ I2b

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

Definition at line 508 of file invariants.hpp.

◆ I3b

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::I3b
protected

Definition at line 508 of file invariants.hpp.

◆ I3b_p

template<typename scalar_t , typename scalar_ops = ScalarOps<scalar_t>>
scalar_t mfem::InvariantsEvaluator3D< scalar_t, scalar_ops >::I3b_p
protected

Definition at line 509 of file invariants.hpp.

◆ J

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

Definition at line 498 of file invariants.hpp.


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