Chombo + EB  3.2
Public Member Functions | List of all members
ChomboSundialsAdaptor Class Referenceabstract

Virtual base class contract to interact with SUNDIALS. More...

#include <ChomboSundialsAdaptor.H>

Inheritance diagram for ChomboSundialsAdaptor:
Inheritance graph
[legend]

Public Member Functions

 ChomboSundialsAdaptor ()
 
virtual ~ChomboSundialsAdaptor ()
 
virtual void linearSum (ChomboSundialsAdaptor &x, ChomboSundialsAdaptor &y, Real a, Real b)=0
 
virtual void setConst (Real c)=0
 
virtual void prod (ChomboSundialsAdaptor &ax, ChomboSundialsAdaptor &ay)=0
 
virtual void div (ChomboSundialsAdaptor &ax, ChomboSundialsAdaptor &ay)=0
 
virtual void scale (ChomboSundialsAdaptor &ax, Real c)=0
 
virtual void abs (ChomboSundialsAdaptor &ax)=0
 
virtual void inv (ChomboSundialsAdaptor &ax)=0
 
virtual void addConst (ChomboSundialsAdaptor &ax, Real b)=0
 
virtual Real dotProd (ChomboSundialsAdaptor &ax)=0
 
virtual Real maxNorm ()=0
 
virtual Real wRMSNorm (ChomboSundialsAdaptor &aw)=0
 
virtual Real wRMSNormMask (ChomboSundialsAdaptor &aw, ChomboSundialsAdaptor &aid)=0
 
virtual Real min ()=0
 
virtual Real l1Norm ()=0
 
virtual Real wL2Norm (ChomboSundialsAdaptor &aw)=0
 
virtual void compare (ChomboSundialsAdaptor &ax, Real b)=0
 
virtual bool invTest (ChomboSundialsAdaptor &ax)=0
 
virtual bool constrMask (ChomboSundialsAdaptor &ac, ChomboSundialsAdaptor &am)=0
 
virtual Real minQuotient (ChomboSundialsAdaptor &adenom)=0
 
virtual unsigned long getLength ()=0
 
virtual void exchange ()=0
 
virtual bool copyTo (ChomboSundialsAdaptor &a)=0
 
virtual void print ()=0
 
virtual void printFile (FILE *outfile)=0
 
virtual ChomboSundialsAdaptornewAdaptor ()=0
 

Detailed Description

Virtual base class contract to interact with SUNDIALS.

Declares virtual functions needed to satisfy the SUNDIALS NVector functions. Derived classes need to implement these, with care taken to "linearize" Chombo data, e.g. avoid counting duplicate values, include all components, or ghost cells, etc. in NVector operations. Note that many operations can also take "this" object as an argument; in that case they should do an in-place update of the object's data.

Constructor & Destructor Documentation

◆ ChomboSundialsAdaptor()

ChomboSundialsAdaptor::ChomboSundialsAdaptor ( )
inline

Constructor.

◆ ~ChomboSundialsAdaptor()

virtual ChomboSundialsAdaptor::~ChomboSundialsAdaptor ( )
inlinevirtual

Member Function Documentation

◆ linearSum()

virtual void ChomboSundialsAdaptor::linearSum ( ChomboSundialsAdaptor x,
ChomboSundialsAdaptor y,
Real  a,
Real  b 
)
pure virtual

SUNDIALS operation - calculates a*x+b*y and puts in this instance's data

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ setConst()

virtual void ChomboSundialsAdaptor::setConst ( Real  c)
pure virtual

SUNDIALS operation - sets this instance's data to c

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ prod()

virtual void ChomboSundialsAdaptor::prod ( ChomboSundialsAdaptor ax,
ChomboSundialsAdaptor ay 
)
pure virtual

SUNDIALS operation - sets this instance's data to x*y

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ div()

virtual void ChomboSundialsAdaptor::div ( ChomboSundialsAdaptor ax,
ChomboSundialsAdaptor ay 
)
pure virtual

SUNDIALS operation - sets this instance's data to x/y

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ scale()

virtual void ChomboSundialsAdaptor::scale ( ChomboSundialsAdaptor ax,
Real  c 
)
pure virtual

SUNDIALS operation - sets this instance's data to c*x

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ abs()

virtual void ChomboSundialsAdaptor::abs ( ChomboSundialsAdaptor ax)
pure virtual

SUNDIALS operation - sets this instance's data to abs(x)

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ inv()

virtual void ChomboSundialsAdaptor::inv ( ChomboSundialsAdaptor ax)
pure virtual

SUNDIALS operation - sets this instance's data to 1/x

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ addConst()

virtual void ChomboSundialsAdaptor::addConst ( ChomboSundialsAdaptor ax,
Real  b 
)
pure virtual

SUNDIALS operation - sets this instance's data to x+b

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ dotProd()

virtual Real ChomboSundialsAdaptor::dotProd ( ChomboSundialsAdaptor ax)
pure virtual

SUNDIALS operation - returns dot product sum(data^T * x)

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ maxNorm()

virtual Real ChomboSundialsAdaptor::maxNorm ( )
pure virtual

SUNDIALS operation - returns all data max norm

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ wRMSNorm()

virtual Real ChomboSundialsAdaptor::wRMSNorm ( ChomboSundialsAdaptor aw)
pure virtual

SUNDIALS operation - returns all data weighted RMS (root mean square) norm

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ wRMSNormMask()

virtual Real ChomboSundialsAdaptor::wRMSNormMask ( ChomboSundialsAdaptor aw,
ChomboSundialsAdaptor aid 
)
pure virtual

SUNDIALS - does not have to be implemented, but here for completeness

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ min()

virtual Real ChomboSundialsAdaptor::min ( )
pure virtual

SUNDIALS operation - returns all data min

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ l1Norm()

virtual Real ChomboSundialsAdaptor::l1Norm ( )
pure virtual

SUNDIALS operation - returns all data L1 norm (sum abs values)

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ wL2Norm()

virtual Real ChomboSundialsAdaptor::wL2Norm ( ChomboSundialsAdaptor aw)
pure virtual

SUNDIALS - does not have to be implemented, but here for completeness

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ compare()

virtual void ChomboSundialsAdaptor::compare ( ChomboSundialsAdaptor ax,
Real  b 
)
pure virtual

SUNDIALS - does not have to be implemented, but here for completeness

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ invTest()

virtual bool ChomboSundialsAdaptor::invTest ( ChomboSundialsAdaptor ax)
pure virtual

SUNDIALS - does not have to be implemented, but here for completeness

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ constrMask()

virtual bool ChomboSundialsAdaptor::constrMask ( ChomboSundialsAdaptor ac,
ChomboSundialsAdaptor am 
)
pure virtual

SUNDIALS - does not have to be implemented, but here for completeness

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ minQuotient()

virtual Real ChomboSundialsAdaptor::minQuotient ( ChomboSundialsAdaptor adenom)
pure virtual

SUNDIALS - does not have to be implemented, but here for completeness

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ getLength()

virtual unsigned long ChomboSundialsAdaptor::getLength ( )
pure virtual

SUNDIALS operation - returns the total number of cells in the nvector NOTE: careful for covered AMR cells, ghost cells, etc. And should probably be multiplied by the number of components

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ exchange()

virtual void ChomboSundialsAdaptor::exchange ( )
pure virtual

Placeholder for MPI. Does not have to be implemented, here for futures

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ copyTo()

virtual bool ChomboSundialsAdaptor::copyTo ( ChomboSundialsAdaptor a)
pure virtual

Placeholder for MPI. Does not have to be implemented, but here for futures

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ print()

virtual void ChomboSundialsAdaptor::print ( )
pure virtual

SUNDIALS - does not have to be implemented, but here for futures

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ printFile()

virtual void ChomboSundialsAdaptor::printFile ( FILE *  outfile)
pure virtual

SUNDIALS - does not have to be implemented, but here for futures

Implemented in AmrAdaptor, and SimpleAdaptor.

Referenced by ~ChomboSundialsAdaptor().

◆ newAdaptor()

virtual ChomboSundialsAdaptor* ChomboSundialsAdaptor::newAdaptor ( )
pure virtual

Factory

Implemented in SimpleAdaptor, and AmrAdaptor.

Referenced by ~ChomboSundialsAdaptor().


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