#include <source/solvers/poisson/PoissonSpecifications.h>
Public Member Functions | |
PoissonSpecifications (const std::string &object_name) | |
Constructor. | |
PoissonSpecifications (const std::string &object_name, const PoissonSpecifications &r) | |
Copy constructor. | |
virtual | ~PoissonSpecifications () |
Destructor (does nothing). | |
const PoissonSpecifications & | operator= (const PoissonSpecifications &r) |
Assignment operator. | |
virtual void | printClassData (std::ostream &stream) const |
Print out class data. | |
Functions for setting and getting D | |
void | setDPatchDataId (int id) |
Set the patch data index for variable D. | |
void | setDConstant (double constant) |
Set the constant value variable D. | |
bool | dIsVariable () const |
Whether D is variable (described by a patch data id). | |
bool | dIsConstant () const |
Whether D is constant. | |
int | getDPatchDataId () const |
Get D's patch data id. | |
double | getDConstant () const |
Get D constant value. | |
Functions for setting and getting C | |
void | setCPatchDataId (int id) |
Set the patch data index for C. | |
void | setCConstant (double constant) |
Set C to a constant. | |
void | setCZero () |
Set the value of C to zero. | |
bool | cIsVariable () const |
Whether C is variable (described by a patch data id). | |
bool | cIsZero () const |
Whether C is zero. | |
bool | cIsConstant () const |
Whether C is constant. | |
int | getCPatchDataId () const |
Get C's patch data id. | |
double | getCConstant () const |
Get C as a constant value. |
The scalar Poisson equation is , 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.
SAMRAI::solv::PoissonSpecifications::PoissonSpecifications | ( | const std::string & | object_name | ) | [inline] |
Constructor.
Sets the specifications to their default state:
object_name | Name of object. |
SAMRAI::solv::PoissonSpecifications::PoissonSpecifications | ( | const std::string & | object_name, | |
const PoissonSpecifications & | r | |||
) | [inline] |
Copy constructor.
SAMRAI::solv::PoissonSpecifications::~PoissonSpecifications | ( | ) | [inline, virtual] |
Destructor (does nothing).
const PoissonSpecifications & SAMRAI::solv::PoissonSpecifications::operator= | ( | const PoissonSpecifications & | r | ) | [inline] |
Assignment operator.
Assign everything except name.
void SAMRAI::solv::PoissonSpecifications::printClassData | ( | std::ostream & | stream | ) | const [virtual] |
Print out class data.
void SAMRAI::solv::PoissonSpecifications::setDPatchDataId | ( | int | id | ) | [inline] |
Set the patch data index for variable D.
In addition, disregard any previous value specified by setDConstant().
void SAMRAI::solv::PoissonSpecifications::setDConstant | ( | double | constant | ) | [inline] |
Set the constant value variable D.
In addition, disregard any previous patch data index specified by setDPatchDataId().
bool SAMRAI::solv::PoissonSpecifications::dIsVariable | ( | ) | const [inline] |
Whether D is variable (described by a patch data id).
bool SAMRAI::solv::PoissonSpecifications::dIsConstant | ( | ) | const [inline] |
int SAMRAI::solv::PoissonSpecifications::getDPatchDataId | ( | ) | const [inline] |
Get D's patch data id.
Error if D is not represented by a patch data id.
double SAMRAI::solv::PoissonSpecifications::getDConstant | ( | ) | const [inline] |
Get D constant value.
Error if D is not represented by a constant.
void SAMRAI::solv::PoissonSpecifications::setCPatchDataId | ( | int | id | ) | [inline] |
Set the patch data index for C.
In addition, disregard any previous values specified by setCConstant() or setCZero().
void SAMRAI::solv::PoissonSpecifications::setCConstant | ( | double | constant | ) | [inline] |
Set C to a 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.
void SAMRAI::solv::PoissonSpecifications::setCZero | ( | ) | [inline] |
Set the value of C to zero.
In addition, disregard any previous patch data index specified by setCPatchDataId() and any previous constant specified by setCConstant().
bool SAMRAI::solv::PoissonSpecifications::cIsVariable | ( | ) | const [inline] |
Whether C is variable (described by a patch data id).
bool SAMRAI::solv::PoissonSpecifications::cIsZero | ( | ) | const [inline] |
Whether C is zero.
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.
bool SAMRAI::solv::PoissonSpecifications::cIsConstant | ( | ) | const [inline] |
Whether C is constant.
As it pertains to what this function returns, C is constant only by calling setCConstant(). Calling setCZero() does not make C a constant.
int SAMRAI::solv::PoissonSpecifications::getCPatchDataId | ( | ) | const [inline] |
Get C's patch data id.
Error if C is not represented by a patch data id.
double SAMRAI::solv::PoissonSpecifications::getCConstant | ( | ) | const [inline] |
Get C as a constant value.
Error if C is not represented by a constant.