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

Delta function coefficient. More...

#include <coefficient.hpp>

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

Public Member Functions

 DeltaCoefficient ()
 
 DeltaCoefficient (double x, double s)
 
 DeltaCoefficient (double x, double y, double s)
 
 DeltaCoefficient (double x, double y, double z, double s)
 
void SetDeltaCenter (const Vector &center)
 
void SetScale (double _s)
 
void SetFunction (double(*f)(double))
 Set a time-dependent function that multiplies the Scale(). More...
 
void SetTol (double _tol)
 Set the tolerance used during projection onto GridFunction to identifying the Mesh vertex where the Center() of the delta function lies. More...
 
void SetWeight (Coefficient *w)
 Set a weight Coefficient that multiplies the DeltaCoefficient. More...
 
const double * Center ()
 
double Scale ()
 Return the scale set by SetScale() multiplied by the time-dependent function specified by SetFunction(), if set. More...
 
double Tol ()
 See SetTol() for description of the tolerance parameter. More...
 
CoefficientWeight ()
 See SetWeight() for description of the weight Coefficient. More...
 
void GetDeltaCenter (Vector &center)
 
double EvalDelta (ElementTransformation &T, const IntegrationPoint &ip)
 Return the Scale() multiplied by the weight Coefficient, if any. More...
 
virtual double Eval (ElementTransformation &T, const IntegrationPoint &ip)
 A DeltaFunction cannot be evaluated. Calling this method will cause an MFEM error, terminating the application. More...
 
virtual ~DeltaCoefficient ()
 
- 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 ()
 

Protected Attributes

double center [3]
 
double scale
 
double tol
 
Coefficientweight
 
int sdim
 
double(* tdf )(double)
 
- Protected Attributes inherited from mfem::Coefficient
double time
 

Detailed Description

Delta function coefficient.

Definition at line 191 of file coefficient.hpp.

Constructor & Destructor Documentation

mfem::DeltaCoefficient::DeltaCoefficient ( )
inline

Definition at line 200 of file coefficient.hpp.

mfem::DeltaCoefficient::DeltaCoefficient ( double  x,
double  s 
)
inline

Definition at line 205 of file coefficient.hpp.

mfem::DeltaCoefficient::DeltaCoefficient ( double  x,
double  y,
double  s 
)
inline

Definition at line 210 of file coefficient.hpp.

mfem::DeltaCoefficient::DeltaCoefficient ( double  x,
double  y,
double  z,
double  s 
)
inline

Definition at line 215 of file coefficient.hpp.

virtual mfem::DeltaCoefficient::~DeltaCoefficient ( )
inlinevirtual

Definition at line 250 of file coefficient.hpp.

Member Function Documentation

const double* mfem::DeltaCoefficient::Center ( )
inline

Definition at line 235 of file coefficient.hpp.

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

A DeltaFunction cannot be evaluated. Calling this method will cause an MFEM error, terminating the application.

Implements mfem::Coefficient.

Definition at line 248 of file coefficient.hpp.

double mfem::DeltaCoefficient::EvalDelta ( ElementTransformation T,
const IntegrationPoint ip 
)

Return the Scale() multiplied by the weight Coefficient, if any.

Definition at line 83 of file coefficient.cpp.

void mfem::DeltaCoefficient::GetDeltaCenter ( Vector center)

Definition at line 77 of file coefficient.cpp.

double mfem::DeltaCoefficient::Scale ( )
inline

Return the scale set by SetScale() multiplied by the time-dependent function specified by SetFunction(), if set.

Definition at line 238 of file coefficient.hpp.

void mfem::DeltaCoefficient::SetDeltaCenter ( const Vector center)

Definition at line 69 of file coefficient.cpp.

void mfem::DeltaCoefficient::SetFunction ( double(*)(double)  f)
inline

Set a time-dependent function that multiplies the Scale().

Definition at line 223 of file coefficient.hpp.

void mfem::DeltaCoefficient::SetScale ( double  _s)
inline

Definition at line 221 of file coefficient.hpp.

void mfem::DeltaCoefficient::SetTol ( double  _tol)
inline

Set the tolerance used during projection onto GridFunction to identifying the Mesh vertex where the Center() of the delta function lies.

Definition at line 227 of file coefficient.hpp.

void mfem::DeltaCoefficient::SetWeight ( Coefficient w)
inline

Set a weight Coefficient that multiplies the DeltaCoefficient.

The weight Coefficient multiplies the value returned by EvalDelta() but not the value returned by Scale(). The weight Coefficient is also used as the L2-weight function when projecting the DeltaCoefficient onto a GridFunction, so that the weighted integral of the projection is exactly equal to the Scale().

Definition at line 234 of file coefficient.hpp.

double mfem::DeltaCoefficient::Tol ( )
inline

See SetTol() for description of the tolerance parameter.

Definition at line 240 of file coefficient.hpp.

Coefficient* mfem::DeltaCoefficient::Weight ( )
inline

See SetWeight() for description of the weight Coefficient.

Definition at line 242 of file coefficient.hpp.

Member Data Documentation

double mfem::DeltaCoefficient::center[3]
protected

Definition at line 194 of file coefficient.hpp.

double mfem::DeltaCoefficient::scale
protected

Definition at line 194 of file coefficient.hpp.

int mfem::DeltaCoefficient::sdim
protected

Definition at line 196 of file coefficient.hpp.

double(* mfem::DeltaCoefficient::tdf)(double)
protected

Definition at line 197 of file coefficient.hpp.

double mfem::DeltaCoefficient::tol
protected

Definition at line 194 of file coefficient.hpp.

Coefficient* mfem::DeltaCoefficient::weight
protected

Definition at line 195 of file coefficient.hpp.


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