WarpX
Public Types | Public Member Functions | Private Attributes | List of all members
JacobianFunctionMF< T, Ops > Class Template Reference

This is a linear function class for computing the action of a Jacobian on a vector using a matrix-free finite-difference method. This class has all of the required functions to be used as the linear operator template parameter in AMReX_GMRES. More...

#include <JacobianFunctionMF.H>

Public Types

using RT = typename T::value_type
 

Public Member Functions

 JacobianFunctionMF ()=default
 
 ~JacobianFunctionMF ()=default
 
 JacobianFunctionMF (const JacobianFunctionMF &)=default
 
JacobianFunctionMFoperator= (const JacobianFunctionMF &)=default
 
 JacobianFunctionMF (JacobianFunctionMF &&) noexcept=default
 
JacobianFunctionMFoperator= (JacobianFunctionMF &&) noexcept=default
 
void apply (T &a_dF, const T &a_dU)
 
void precond (T &a_U, const T &a_X)
 
void updatePreCondMat (const T &a_X)
 
void create (T &a_Z, const T &a_U)
 
makeVecLHS () const
 
makeVecRHS () const
 
void assign (T &a_Z, const T &a_U)
 
void increment (T &a_Z, const T &a_U, RT a_scale)
 
void scale (T &a_U, RT a_scale)
 
void linComb (T &a_U, RT a, const T &X, RT b, const T &Y)
 
void setToZero (T &a_U)
 
void setVal (T &a_U, RT a_val)
 
RT dotProduct (const T &a_X, const T &a_Y)
 
RT norm2 (const T &a_U)
 
bool isDefined () const
 
void setBaseSolution (const T &a_U)
 
void setBaseRHS (const T &a_R)
 
void setJFNKEps (RT a_eps)
 
void setIsLinear (bool a_isLinear)
 
void curTime (RT a_time)
 
void curTimeStep (RT a_dt)
 
void define (const T &, Ops *)
 

Private Attributes

bool m_is_defined = false
 
bool m_is_linear = false
 
bool m_usePreCond = false
 
RT m_epsJFNK = RT(1.0e-6)
 
RT m_normY0
 
RT m_cur_time
 
RT m_dt
 
std::string m_pc_type
 
m_Z
 
m_Y0
 
m_R0
 
m_R
 
Ops * m_ops
 

Detailed Description

template<class T, class Ops>
class JacobianFunctionMF< T, Ops >

This is a linear function class for computing the action of a Jacobian on a vector using a matrix-free finite-difference method. This class has all of the required functions to be used as the linear operator template parameter in AMReX_GMRES.

Member Typedef Documentation

◆ RT

template<class T , class Ops >
using JacobianFunctionMF< T, Ops >::RT = typename T::value_type

Constructor & Destructor Documentation

◆ JacobianFunctionMF() [1/3]

template<class T , class Ops >
JacobianFunctionMF< T, Ops >::JacobianFunctionMF ( )
default

◆ ~JacobianFunctionMF()

template<class T , class Ops >
JacobianFunctionMF< T, Ops >::~JacobianFunctionMF ( )
default

◆ JacobianFunctionMF() [2/3]

template<class T , class Ops >
JacobianFunctionMF< T, Ops >::JacobianFunctionMF ( const JacobianFunctionMF< T, Ops > &  )
default

◆ JacobianFunctionMF() [3/3]

template<class T , class Ops >
JacobianFunctionMF< T, Ops >::JacobianFunctionMF ( JacobianFunctionMF< T, Ops > &&  )
defaultnoexcept

Member Function Documentation

◆ apply()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::apply ( T &  a_dF,
const T &  a_dU 
)

◆ assign()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::assign ( T &  a_Z,
const T &  a_U 
)
inline

◆ create()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::create ( T &  a_Z,
const T &  a_U 
)
inline

◆ curTime()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::curTime ( RT  a_time)
inline

◆ curTimeStep()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::curTimeStep ( RT  a_dt)
inline

◆ define()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::define ( const T &  a_U,
Ops *  a_ops 
)

◆ dotProduct()

template<class T , class Ops >
RT JacobianFunctionMF< T, Ops >::dotProduct ( const T &  a_X,
const T &  a_Y 
)
inline

◆ increment()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::increment ( T &  a_Z,
const T &  a_U,
RT  a_scale 
)
inline

◆ isDefined()

template<class T , class Ops >
bool JacobianFunctionMF< T, Ops >::isDefined ( ) const
inline

◆ linComb()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::linComb ( T &  a_U,
RT  a,
const T &  X,
RT  b,
const T &  Y 
)
inline

◆ makeVecLHS()

template<class T , class Ops >
auto JacobianFunctionMF< T, Ops >::makeVecLHS

◆ makeVecRHS()

template<class T , class Ops >
auto JacobianFunctionMF< T, Ops >::makeVecRHS

◆ norm2()

template<class T , class Ops >
RT JacobianFunctionMF< T, Ops >::norm2 ( const T &  a_U)
inline

◆ operator=() [1/2]

template<class T , class Ops >
JacobianFunctionMF& JacobianFunctionMF< T, Ops >::operator= ( const JacobianFunctionMF< T, Ops > &  )
default

◆ operator=() [2/2]

template<class T , class Ops >
JacobianFunctionMF& JacobianFunctionMF< T, Ops >::operator= ( JacobianFunctionMF< T, Ops > &&  )
defaultnoexcept

◆ precond()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::precond ( T &  a_U,
const T &  a_X 
)
inline

◆ scale()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::scale ( T &  a_U,
RT  a_scale 
)
inline

◆ setBaseRHS()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::setBaseRHS ( const T &  a_R)
inline

◆ setBaseSolution()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::setBaseSolution ( const T &  a_U)
inline

◆ setIsLinear()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::setIsLinear ( bool  a_isLinear)
inline

◆ setJFNKEps()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::setJFNKEps ( RT  a_eps)
inline

◆ setToZero()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::setToZero ( T &  a_U)
inline

◆ setVal()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::setVal ( T &  a_U,
RT  a_val 
)
inline

◆ updatePreCondMat()

template<class T , class Ops >
void JacobianFunctionMF< T, Ops >::updatePreCondMat ( const T &  a_X)
inline

Member Data Documentation

◆ m_cur_time

template<class T , class Ops >
RT JacobianFunctionMF< T, Ops >::m_cur_time
private

◆ m_dt

template<class T , class Ops >
RT JacobianFunctionMF< T, Ops >::m_dt
private

◆ m_epsJFNK

template<class T , class Ops >
RT JacobianFunctionMF< T, Ops >::m_epsJFNK = RT(1.0e-6)
private

◆ m_is_defined

template<class T , class Ops >
bool JacobianFunctionMF< T, Ops >::m_is_defined = false
private

◆ m_is_linear

template<class T , class Ops >
bool JacobianFunctionMF< T, Ops >::m_is_linear = false
private

◆ m_normY0

template<class T , class Ops >
RT JacobianFunctionMF< T, Ops >::m_normY0
private

◆ m_ops

template<class T , class Ops >
Ops* JacobianFunctionMF< T, Ops >::m_ops
private

◆ m_pc_type

template<class T , class Ops >
std::string JacobianFunctionMF< T, Ops >::m_pc_type
private

◆ m_R

template<class T , class Ops >
T JacobianFunctionMF< T, Ops >::m_R
private

◆ m_R0

template<class T , class Ops >
T JacobianFunctionMF< T, Ops >::m_R0
private

◆ m_usePreCond

template<class T , class Ops >
bool JacobianFunctionMF< T, Ops >::m_usePreCond = false
private

◆ m_Y0

template<class T , class Ops >
T JacobianFunctionMF< T, Ops >::m_Y0
private

◆ m_Z

template<class T , class Ops >
T JacobianFunctionMF< T, Ops >::m_Z
private

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