MFEM v4.7.0
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.  
PWConstCoefficient (Vector &c)  
Construct the constant coefficient using a vector of constants.  
void  UpdateConstants (Vector &c) 
Update the constants with vector c.  
real_t &  operator() (int i) 
Return a reference to the ith constant.  
void  operator= (real_t c) 
Set the constants for all attributes to constant c.  
int  GetNConst () 
Returns the number of constants representing different attributes.  
virtual real_t  Eval (ElementTransformation &T, const IntegrationPoint &ip) 
Evaluate the coefficient.  
Public Member Functions inherited from mfem::Coefficient  
Coefficient ()  
virtual void  SetTime (real_t t) 
Set the time for time dependent coefficients.  
real_t  GetTime () 
Get the time for time dependent coefficients.  
real_t  Eval (ElementTransformation &T, const IntegrationPoint &ip, real_t t) 
Evaluate the coefficient in the element described by T at the point ip at time t.  
virtual void  Project (QuadratureFunction &qf) 
Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points.  
virtual  ~Coefficient () 
Additional Inherited Members  
Protected Attributes inherited from mfem::Coefficient  
real_t  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.