22 #include "NamespaceHeader.H" 53 friend std::ostream&
operator<< (std::ostream& os,
61 #define STENCIL_MAX_DOF 3 62 #define CHECK_DOF if (m_dof<=0) MayDay::Abort("StencilTensorValue dot defined"); 71 if (a_dof>0)
for (
int i=0;i<m_dof*m_dof;i++) m_val[i]=0.;
75 if (a_dof <= 0)
MayDay::Abort(
"StencilTensorValue::define dof <= 0");
76 if (m_dof==-1)
for (
int i=0;i<a_dof*a_dof;i++) m_val[i]=0.;
84 if (m_dof==-1) m_dof = p.
m_dof;
86 for (
int i=0;i<m_dof*m_dof;i++) m_val[i] = p.
m_val[i];
104 for (
int i=0;i<m_dof*m_dof;i++) m_val[i] *= a_alpha;
107 friend std::ostream&
operator<< (std::ostream& os,
147 #include "NamespaceFooter.H" void setBlock(short a_bid)
Definition: Stencil.H:51
Real m_val[STENCIL_MAX_DOF *STENCIL_MAX_DOF]
Definition: Stencil.H:111
std::pair< IndexML, StencilTensorValue > StencilNode
Definition: Stencil.H:139
void scale(Real a_alpha)
Definition: Stencil.H:102
one dimensional dynamic array
Definition: Vector.H:53
short level() const
Definition: Stencil.H:46
void setLevel(short a_lev)
Definition: Stencil.H:50
void addValue(Real a_val)
Definition: Stencil.H:95
bool operator>(const IndexML &p) const
#define CHECK_DOF
Definition: Stencil.H:62
std::map< IndexML, StencilTensorValue > StencilTensor
Definition: Stencil.H:137
IndexML()
Definition: Stencil.H:29
void StencilProject(IndexML jiv, Vector< StencilNode > &a_new, StencilTensor &a_sten)
bool operator==(const IndexML &p) const
short m_blockID
Definition: Stencil.H:58
bool operator<(const IndexML &p) const
const Real * getVals() const
Definition: Stencil.H:90
short m_lev
Definition: Stencil.H:57
IntVect iv() const
Definition: Stencil.H:47
StencilTensorValue(int a_dof=-1)
Definition: Stencil.H:68
bool isDefined() const
Definition: Stencil.H:82
void setIV(IntVect a_iv)
Definition: Stencil.H:49
short block() const
Definition: Stencil.H:48
IntVect m_iv
Definition: Stencil.H:56
double Real
Definition: REAL.H:33
#define STENCIL_MAX_DOF
Definition: Stencil.H:61
int m_dof
Definition: Stencil.H:110
IndexML(IntVect a_iv, short a_lev)
Definition: Stencil.H:35
IndexML(const IndexML &a_ml)
Definition: Stencil.H:32
void define(IntVect a_iv, short a_lev, short a_blockid=0)
Definition: Stencil.H:38
void addValue(int a_idof, int a_jdof, Real a_val)
Definition: Stencil.H:91
void define(int a_dof)
Definition: Stencil.H:73
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
bool operator!=(const IndexML &p) const
Real value(int a_idof, int a_jdof) const
Definition: Stencil.H:89
void setValue(int a_idof, int a_jdof, Real a_val)
Definition: Stencil.H:92
void setValue(Real a_val)
Definition: Stencil.H:96
void define(StencilTensorValue &a_sv)
Definition: Stencil.H:79
friend std::ostream & operator<<(std::ostream &os, const IndexML &iv)
static void Abort(const char *const a_msg=m_nullString)
Print out message to cerr and exit via abort() (if serial) or MPI_Abort() (if parallel).