MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::VectorFuncAutoDiff< vector_size, state_size, param_size > Class Template Reference

#include <admfem.hpp>

Public Member Functions

 VectorFuncAutoDiff (std::function< void(mfem::Vector &, ad::ADVectorType &, ad::ADVectorType &)> F_)
 
void Jacobian (mfem::Vector &vparam, mfem::Vector &vstate, mfem::DenseMatrix &jac)
 
 VectorFuncAutoDiff (std::function< void(mfem::Vector &, ad::ADVectorType &, ad::ADVectorType &)> F_)
 
void Jacobian (mfem::Vector &vparam, mfem::Vector &uu, mfem::DenseMatrix &jac)
 

Detailed Description

template<int vector_size = 1, int state_size = 1, int param_size = 0>
class mfem::VectorFuncAutoDiff< vector_size, state_size, param_size >

The class provides an evaluation of the Jacobian of a templated vector function provided in the constructor. The Jacobian is evaluated with the help of automatic differentiation (AD). The template parameters specify the size of the return vector (vector_size), the size of the input vector (state_size), and the size of the parameters supplied to the function.

Definition at line 454 of file admfem.hpp.

Constructor & Destructor Documentation

◆ VectorFuncAutoDiff() [1/2]

template<int vector_size = 1, int state_size = 1, int param_size = 0>
mfem::VectorFuncAutoDiff< vector_size, state_size, param_size >::VectorFuncAutoDiff ( std::function< void(mfem::Vector &, ad::ADVectorType &, ad::ADVectorType &)> F_)
inline

F_ is user implemented function to be differentiated by VectorFuncAutoDiff. The signature of the function is: F_(mfem::Vector& parameters, ad::ADVectorType& state_vector, ad::ADVectorType& result). The parameters vector should have size param_size. The state_vector should have size state_size, and the result vector should have size vector_size. All size parameters are teplate parameters in VectorFuncAutoDiff.

Definition at line 61 of file admfem.hpp.

◆ VectorFuncAutoDiff() [2/2]

template<int vector_size = 1, int state_size = 1, int param_size = 0>
mfem::VectorFuncAutoDiff< vector_size, state_size, param_size >::VectorFuncAutoDiff ( std::function< void(mfem::Vector &, ad::ADVectorType &, ad::ADVectorType &)> F_)
inline

F_ is user implemented function to be differentiated by VectorFuncAutoDiff. The signature of the function is: F_(mfem::Vector& parameters, ad::ADVectroType& state_vector, ad::ADVectorType& result). The parameters vector should have size param_size. The state_vector should have size state_size, and the result vector should have size vector_size. All size parameters are teplate parameters in VectorFuncAutoDiff.

Definition at line 464 of file admfem.hpp.

Member Function Documentation

◆ Jacobian() [1/2]

template<int vector_size = 1, int state_size = 1, int param_size = 0>
void mfem::VectorFuncAutoDiff< vector_size, state_size, param_size >::Jacobian ( mfem::Vector & vparam,
mfem::Vector & uu,
mfem::DenseMatrix & jac )
inline

Evaluates the Jacobian of the vector function F_ for a set of parameters (vparam) and state vector uu. The Jacobian (jac) has dimensions [vector_size x state_size].

Definition at line 473 of file admfem.hpp.

◆ Jacobian() [2/2]

template<int vector_size = 1, int state_size = 1, int param_size = 0>
void mfem::VectorFuncAutoDiff< vector_size, state_size, param_size >::Jacobian ( mfem::Vector & vparam,
mfem::Vector & vstate,
mfem::DenseMatrix & jac )
inline

Evaluates the Jacobian of the vector function F_ for a set of parameters (vparam) and state vector vstate. The Jacobian (jac) has dimensions [vector_size x state_size].

Definition at line 70 of file admfem.hpp.


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