MFEM
v4.5.2
Finite element discretization library

A piecewise constant coefficient with the constants keyed off the element attribute numbers. More...
#include <coefficient.hpp>
Public Member Functions  
PWConstCoefficient (int NumOfSubD=0)  
Constructs a piecewise constant coefficient in NumOfSubD subdomains. More...  
PWConstCoefficient (Vector &c)  
Construct the constant coefficient using a vector of constants. More...  
void  UpdateConstants (Vector &c) 
Update the constants with vector c. More...  
double &  operator() (int i) 
Return a reference to the ith constant. More...  
void  operator= (double c) 
Set the constants for all attributes to constant c. More...  
int  GetNConst () 
Returns the number of constants representing different attributes. More...  
virtual double  Eval (ElementTransformation &T, const IntegrationPoint &ip) 
Evaluate the coefficient. More...  
Public Member Functions inherited from mfem::Coefficient  
Coefficient ()  
virtual void  SetTime (double t) 
Set the time for time dependent coefficients. More...  
double  GetTime () 
Get the time for time dependent coefficients. More...  
double  Eval (ElementTransformation &T, const IntegrationPoint &ip, double t) 
Evaluate the coefficient in the element described by T at the point ip at time t. More...  
virtual void  Project (QuadratureFunction &qf) 
Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. More...  
virtual  ~Coefficient () 
Additional Inherited Members  
Protected Attributes inherited from mfem::Coefficient  
double  time 
A piecewise constant coefficient with the constants keyed off the element attribute numbers.
Definition at line 103 of file coefficient.hpp.

inlineexplicit 
Constructs a piecewise constant coefficient in NumOfSubD subdomains.
Definition at line 111 of file coefficient.hpp.

inline 
Construct the constant coefficient using a vector of constants.
c should be a vector defined by attributes, so for region with attribute i c[i1] is the coefficient in that region
Definition at line 117 of file coefficient.hpp.

virtual 
Evaluate the coefficient.
Implements mfem::Coefficient.
Definition at line 76 of file coefficient.cpp.

inline 
Returns the number of constants representing different attributes.
Definition at line 130 of file coefficient.hpp.

inline 
Return a reference to the ith constant.
Definition at line 124 of file coefficient.hpp.

inline 
Set the constants for all attributes to constant c.
Definition at line 127 of file coefficient.hpp.

inline 
Update the constants with vector c.
Definition at line 121 of file coefficient.hpp.