WarpX
Loading...
Searching...
No Matches
LinearFunction< T, Ops > Class Template Referenceabstract

This is a base class for defining a linear function class to use with WarpX implicit solvers. More...

#include <LinearFunction.H>

Inheritance diagram for LinearFunction< T, Ops >:
JacobianFunctionMF< T, Ops >

Public Types

using RT = typename T::value_type
 

Public Member Functions

 LinearFunction ()=default
 default constructor
 
virtual ~LinearFunction ()=default
 default destructore
 
 LinearFunction (const LinearFunction &)=default
 
LinearFunctionoperator= (const LinearFunction &)=default
 
 LinearFunction (LinearFunction &&) noexcept=default
 
LinearFunctionoperator= (LinearFunction &&) noexcept=default
 
virtual void apply (T &a_dF, const T &a_dU)=0
 apply the linear function on a given vector of type T
 
virtual void precond (T &a_U, const T &a_X)=0
 apply the preconditioner on a given vector of type T
 
virtual void updatePreCondMat (const T &a_X)=0
 update preconditioner
 
void create (T &a_Z, const T &a_U)
 create a new vector given a defined vector
 
virtual T makeVecLHS () const =0
 make LHS vector
 
virtual T makeVecRHS () const =0
 make RHS vector
 
void assign (T &a_Z, const T &a_U)
 vector copy operation
 
void increment (T &a_Z, const T &a_U, RT a_scale)
 vector scaled-increment operation
 
void scale (T &a_U, RT a_scale)
 vector scaled operation
 
void linComb (T &a_U, RT a, const T &X, RT b, const T &Y)
 compute linear combination
 
void setToZero (T &a_U)
 set vector to zero
 
void setVal (T &a_U, RT a_val)
 set vector to a scalar value
 
RT dotProduct (const T &a_X, const T &a_Y)
 compute dot product of two vectors
 
RT norm2 (const T &a_U)
 compute 2-norm of a vector
 
virtual void define (const T &, Ops *, const PreconditionerType &)=0
 define the linear function object
 
virtual PreconditionerType pcType () const =0
 returns the preconditioner type
 

Detailed Description

template<class T, class Ops>
class LinearFunction< T, Ops >

This is a base class for defining a linear function class to use with WarpX implicit solvers.

Member Typedef Documentation

◆ RT

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

Constructor & Destructor Documentation

◆ LinearFunction() [1/3]

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

default constructor

◆ ~LinearFunction()

template<class T, class Ops>
virtual LinearFunction< T, Ops >::~LinearFunction ( )
virtualdefault

default destructore

◆ LinearFunction() [2/3]

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

◆ LinearFunction() [3/3]

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

Member Function Documentation

◆ apply()

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

apply the linear function on a given vector of type T

Implemented in JacobianFunctionMF< T, Ops >, and JacobianFunctionMF< Vec, Ops >.

◆ assign()

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

vector copy operation

◆ create()

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

create a new vector given a defined vector

◆ define()

template<class T, class Ops>
virtual void LinearFunction< T, Ops >::define ( const T & ,
Ops * ,
const PreconditionerType &  )
pure virtual

define the linear function object

Implemented in JacobianFunctionMF< T, Ops >, and JacobianFunctionMF< Vec, Ops >.

◆ dotProduct()

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

compute dot product of two vectors

◆ increment()

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

vector scaled-increment operation

◆ linComb()

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

compute linear combination

◆ makeVecLHS()

template<class T, class Ops>
virtual T LinearFunction< T, Ops >::makeVecLHS ( ) const
pure virtual

make LHS vector

Implemented in JacobianFunctionMF< T, Ops >, and JacobianFunctionMF< Vec, Ops >.

◆ makeVecRHS()

template<class T, class Ops>
virtual T LinearFunction< T, Ops >::makeVecRHS ( ) const
pure virtual

make RHS vector

Implemented in JacobianFunctionMF< T, Ops >, and JacobianFunctionMF< Vec, Ops >.

◆ norm2()

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

compute 2-norm of a vector

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ pcType()

template<class T, class Ops>
virtual PreconditionerType LinearFunction< T, Ops >::pcType ( ) const
pure virtual

returns the preconditioner type

Implemented in JacobianFunctionMF< T, Ops >, and JacobianFunctionMF< Vec, Ops >.

◆ precond()

template<class T, class Ops>
virtual void LinearFunction< T, Ops >::precond ( T & a_U,
const T & a_X )
pure virtual

apply the preconditioner on a given vector of type T

Implemented in JacobianFunctionMF< T, Ops >, and JacobianFunctionMF< Vec, Ops >.

◆ scale()

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

vector scaled operation

◆ setToZero()

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

set vector to zero

◆ setVal()

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

set vector to a scalar value

◆ updatePreCondMat()

template<class T, class Ops>
virtual void LinearFunction< T, Ops >::updatePreCondMat ( const T & a_X)
pure virtual

update preconditioner

Implemented in JacobianFunctionMF< T, Ops >, and JacobianFunctionMF< Vec, Ops >.


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