MFEM  v3.3
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
mfem::PWConstCoefficient Class Reference

class for piecewise constant coefficient More...

#include <coefficient.hpp>

Inheritance diagram for mfem::PWConstCoefficient:
[legend]
Collaboration diagram for mfem::PWConstCoefficient:
[legend]

Public Member Functions

 PWConstCoefficient (int NumOfSubD=0)
 Constructs a piecewise constant coefficient in NumOfSubD subdomains. More...
 
 PWConstCoefficient (Vector &c)
 
double & operator() (int i)
 Member function to access or modify the value of the i-th constant. More...
 
void operator= (double c)
 Set domain constants equal to the same constant c. More...
 
int GetNConst ()
 Returns the number of constants. More...
 
virtual double Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient function. More...
 
- Public Member Functions inherited from mfem::Coefficient
 Coefficient ()
 
void SetTime (double t)
 
double GetTime ()
 
double Eval (ElementTransformation &T, const IntegrationPoint &ip, double t)
 
virtual ~Coefficient ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::Coefficient
double time
 

Detailed Description

class for piecewise constant coefficient

Definition at line 72 of file coefficient.hpp.

Constructor & Destructor Documentation

mfem::PWConstCoefficient::PWConstCoefficient ( int  NumOfSubD = 0)
inlineexplicit

Constructs a piecewise constant coefficient in NumOfSubD subdomains.

Definition at line 80 of file coefficient.hpp.

mfem::PWConstCoefficient::PWConstCoefficient ( Vector c)
inline

c should be a vector defined by attributes, so for region with attribute i c[i] is the coefficient in that region

Definition at line 85 of file coefficient.hpp.

Member Function Documentation

double mfem::PWConstCoefficient::Eval ( ElementTransformation T,
const IntegrationPoint ip 
)
virtual

Evaluate the coefficient function.

Implements mfem::Coefficient.

Definition at line 24 of file coefficient.cpp.

int mfem::PWConstCoefficient::GetNConst ( )
inline

Returns the number of constants.

Definition at line 95 of file coefficient.hpp.

double& mfem::PWConstCoefficient::operator() ( int  i)
inline

Member function to access or modify the value of the i-th constant.

Definition at line 89 of file coefficient.hpp.

void mfem::PWConstCoefficient::operator= ( double  c)
inline

Set domain constants equal to the same constant c.

Definition at line 92 of file coefficient.hpp.


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