queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::FunctionBase Class Referenceabstract

Abstract base class for function objects. More...

#include <FunctionBase.h>

Inheritance diagram for QUESO::FunctionBase:
QUESO::LibMeshFunction

Public Member Functions

virtual void add (double scale, const FunctionBase &rhs)=0
 Execute this += scale * rhs. More...
 
virtual void pointwise_mult (const FunctionBase &f1, const FunctionBase &f2)=0
 Pointwise multiply f1 and f2 and store the result in *this. More...
 
virtual void scale (double scale)=0
 Execute this *= scale. More...
 
virtual void zero ()=0
 Set this to zero everywhere. More...
 
virtual double L2_norm () const =0
 Return the L2-norm of this. More...
 
virtual SharedPtr
< FunctionBase >::Type 
zero_clone () const =0
 Create a zero function copy of this and return pointer to it. More...
 
virtual void save_function (const std::string &filename, double time) const =0
 Save the current function to an Exodus file called filename. time is the time to attach to the function and is usually the iteration number. More...
 
Constructor/Destructor methods
 FunctionBase ()
 Constructor. More...
 
virtual ~FunctionBase ()
 Destructor. More...
 

Detailed Description

Abstract base class for function objects.

One needs to sublclass this abstract class to implement their own functions using a backend not supported by QUESO. If QUESO is linked against libMesh (and libMesh was compiled with SLEPc), you may use LibMeshFunction.

Definition at line 47 of file FunctionBase.h.

Constructor & Destructor Documentation

QUESO::FunctionBase::FunctionBase ( )

Constructor.

Definition at line 30 of file FunctionBase.C.

31 {
32 }
QUESO::FunctionBase::~FunctionBase ( )
virtual

Destructor.

Definition at line 34 of file FunctionBase.C.

35 {
36 }

Member Function Documentation

virtual void QUESO::FunctionBase::add ( double  scale,
const FunctionBase rhs 
)
pure virtual

Execute this += scale * rhs.

Implemented in QUESO::LibMeshFunction.

virtual double QUESO::FunctionBase::L2_norm ( ) const
pure virtual

Return the L2-norm of this.

Implemented in QUESO::LibMeshFunction.

virtual void QUESO::FunctionBase::pointwise_mult ( const FunctionBase f1,
const FunctionBase f2 
)
pure virtual

Pointwise multiply f1 and f2 and store the result in *this.

Implemented in QUESO::LibMeshFunction.

virtual void QUESO::FunctionBase::save_function ( const std::string &  filename,
double  time 
) const
pure virtual

Save the current function to an Exodus file called filename. time is the time to attach to the function and is usually the iteration number.

Implemented in QUESO::LibMeshFunction.

virtual void QUESO::FunctionBase::scale ( double  scale)
pure virtual

Execute this *= scale.

Implemented in QUESO::LibMeshFunction.

virtual void QUESO::FunctionBase::zero ( )
pure virtual

Set this to zero everywhere.

Implemented in QUESO::LibMeshFunction.

virtual SharedPtr<FunctionBase>::Type QUESO::FunctionBase::zero_clone ( ) const
pure virtual

Create a zero function copy of this and return pointer to it.

Create a new instance of FunctionBase representing the function that is identically zero (by copying this) everywhere and return a boost shared pointer to it

Implemented in QUESO::LibMeshFunction.


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

Generated on Tue Jun 5 2018 19:49:07 for queso-0.57.1 by  doxygen 1.8.5