IBAMR  IBAMR version 0.19.
Public Member Functions | List of all members
SAMRAI::solv::PoissonSpecifications Class Reference

Light class holding specifications for cell-centered implementation of the scalar Poisson equation. More...

#include <PoissonSpecifications.h>

Public Member Functions

 PoissonSpecifications (const std::string &object_name)
 Constructor. More...
 
 PoissonSpecifications (const std::string &object_name, const PoissonSpecifications &r)
 Copy constructor. More...
 
virtual ~PoissonSpecifications ()
 Destructor (does nothing). More...
 
const PoissonSpecificationsoperator= (const PoissonSpecifications &r)
 Assignment operator. More...
 
virtual void printClassData (std::ostream &stream) const
 Print out class data. More...
 
Functions for setting and getting D
void setDPatchDataId (int id)
 Set the patch data index for variable D. More...
 
void setDConstant (double constant)
 Set the constant value variable D. More...
 
bool dIsVariable () const
 Whether D is variable (described by a patch data id). More...
 
bool dIsConstant () const
 Whether D is constant. More...
 
int getDPatchDataId () const
 Get D's patch data id. More...
 
double getDConstant () const
 Get D constant value. More...
 

Functions for setting and getting C

std::string d_object_name
 Object name. More...
 
int d_D_id
 
double d_D_constant
 
bool d_C_zero
 
int d_C_id
 
double d_C_constant
 
void setCPatchDataId (int id)
 Set the patch data index for C. More...
 
void setCConstant (double constant)
 Set C to a constant. More...
 
void setCZero ()
 Set the value of C to zero. More...
 
bool cIsVariable () const
 Whether C is variable (described by a patch data id). More...
 
bool cIsZero () const
 Whether C is zero. More...
 
bool cIsConstant () const
 Whether C is constant. More...
 
int getCPatchDataId () const
 Get C's patch data id. More...
 
double getCConstant () const
 Get C as a constant value. More...
 

Detailed Description

The scalar Poisson equation is \( \nabla ( D \nabla u ) + C u = f \), where C is a scalar field, D is the diffusion coefficient. and u and f are scalar quantities.

This class describes the things you can set: C, D.

Note that the storage and alignment of u, f, C and D depend on the implementation of the solver. For example, if the solver is cell centered, u, f and C are cell-centered while D is side-centered.

Constructor & Destructor Documentation

◆ PoissonSpecifications() [1/2]

SAMRAI::solv::PoissonSpecifications::PoissonSpecifications ( const std::string &  object_name)

Sets the specifications to their default state:

  • C is zero
  • D is uniformly 1
Parameters
object_nameName of object.

◆ PoissonSpecifications() [2/2]

SAMRAI::solv::PoissonSpecifications::PoissonSpecifications ( const std::string &  object_name,
const PoissonSpecifications r 
)

◆ ~PoissonSpecifications()

virtual SAMRAI::solv::PoissonSpecifications::~PoissonSpecifications ( )
virtual

Member Function Documentation

◆ operator=()

const PoissonSpecifications& SAMRAI::solv::PoissonSpecifications::operator= ( const PoissonSpecifications r)

Assign everything except name.

◆ printClassData()

virtual void SAMRAI::solv::PoissonSpecifications::printClassData ( std::ostream &  stream) const
virtual

◆ setDPatchDataId()

void SAMRAI::solv::PoissonSpecifications::setDPatchDataId ( int  id)

In addition, disregard any previous value specified by setDConstant().

◆ setDConstant()

void SAMRAI::solv::PoissonSpecifications::setDConstant ( double  constant)

In addition, disregard any previous patch data index specified by setDPatchDataId().

◆ dIsVariable()

bool SAMRAI::solv::PoissonSpecifications::dIsVariable ( ) const
Returns
True if D is variable, described by the patch data id given in setCPatchDataId().

◆ dIsConstant()

bool SAMRAI::solv::PoissonSpecifications::dIsConstant ( ) const
Returns
True if D is constant, as specified by setCConstant().

◆ getDPatchDataId()

int SAMRAI::solv::PoissonSpecifications::getDPatchDataId ( ) const

Error if D is not represented by a patch data id.

Returns
D's id

◆ getDConstant()

double SAMRAI::solv::PoissonSpecifications::getDConstant ( ) const

Error if D is not represented by a constant.

Returns
D's constant value

◆ setCPatchDataId()

void SAMRAI::solv::PoissonSpecifications::setCPatchDataId ( int  id)

In addition, disregard any previous values specified by setCConstant() or setCZero().

◆ setCConstant()

void SAMRAI::solv::PoissonSpecifications::setCConstant ( double  constant)

In addition, disregard any previous value specified by setCPatchDataId() or setCZero().

If you want to set C to zero, use setCZero() instead. This allows solvers to take advantage of fact C is absent.

◆ setCZero()

void SAMRAI::solv::PoissonSpecifications::setCZero ( )

In addition, disregard any previous patch data index specified by setCPatchDataId() and any previous constant specified by setCConstant().

◆ cIsVariable()

bool SAMRAI::solv::PoissonSpecifications::cIsVariable ( ) const
Returns
True if C is variable, described by the patch data id given in setCPatchDataId().

◆ cIsZero()

bool SAMRAI::solv::PoissonSpecifications::cIsZero ( ) const

As it pertains to what this function returns, C is zero only by calling setCZero(). Calling setCConstant() does not make C zero, even if you pass in the value of zero.

Returns
True if C is exactly zero, as set by setCZero().

◆ cIsConstant()

bool SAMRAI::solv::PoissonSpecifications::cIsConstant ( ) const

As it pertains to what this function returns, C is constant only by calling setCConstant(). Calling setCZero() does not make C a constant.

Returns
True if C is constant, as specified by setCConstant().

◆ getCPatchDataId()

int SAMRAI::solv::PoissonSpecifications::getCPatchDataId ( ) const

Error if C is not represented by a patch data id.

Returns
C's patch data id

◆ getCConstant()

double SAMRAI::solv::PoissonSpecifications::getCConstant ( ) const

Error if C is not represented by a constant.

Returns
C's constant value

Member Data Documentation

◆ d_object_name

std::string SAMRAI::solv::PoissonSpecifications::d_object_name
private

◆ d_D_id

int SAMRAI::solv::PoissonSpecifications::d_D_id
private

◆ d_D_constant

double SAMRAI::solv::PoissonSpecifications::d_D_constant
private

◆ d_C_zero

bool SAMRAI::solv::PoissonSpecifications::d_C_zero
private

◆ d_C_id

int SAMRAI::solv::PoissonSpecifications::d_C_id
private

◆ d_C_constant

double SAMRAI::solv::PoissonSpecifications::d_C_constant
private

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