MFEM
v4.4.0
Finite element discretization library
|
Delta function coefficient optionally multiplied by a weight coefficient and a scaled time dependent C-function. More...
#include <coefficient.hpp>
Public Member Functions | |
DeltaCoefficient () | |
Construct a unit delta function centered at (0.0,0.0,0.0) More... | |
DeltaCoefficient (double x, double s) | |
Construct a delta function scaled by s and centered at (x,0.0,0.0) More... | |
DeltaCoefficient (double x, double y, double s) | |
Construct a delta function scaled by s and centered at (x,y,0.0) More... | |
DeltaCoefficient (double x, double y, double z, double s) | |
Construct a delta function scaled by s and centered at (x,y,z) More... | |
void | SetTime (double t) |
Set the time for internally stored coefficients. More... | |
void | SetDeltaCenter (const Vector ¢er) |
Set the center location of the delta function. More... | |
void | SetScale (double s_) |
Set the scale value multiplying the delta function. More... | |
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 identify the Mesh vertex where the Center() of the delta function lies. (default 1e-12) More... | |
void | SetWeight (Coefficient *w) |
Set a weight Coefficient that multiplies the DeltaCoefficient. More... | |
const double * | Center () |
double | Scale () |
Return the scale factor times the optional time dependent function. Returns \( s T(t) \) with \( T(t) = 1 \) when not set by the user. More... | |
double | Tol () |
Return the tolerance used to identify the mesh vertices. More... | |
Coefficient * | Weight () |
See SetWeight() for description of the weight Coefficient. More... | |
void | GetDeltaCenter (Vector ¢er) |
Write the center of the delta function into center. More... | |
virtual double | EvalDelta (ElementTransformation &T, const IntegrationPoint &ip) |
The value of the function assuming we are evaluating at the delta center. 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 () | |
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 | ~Coefficient () |
Protected Attributes | |
double | center [3] |
double | scale |
double | tol |
Coefficient * | weight |
int | sdim |
double(* | tdf )(double) |
Protected Attributes inherited from mfem::Coefficient | |
double | time |
Delta function coefficient optionally multiplied by a weight coefficient and a scaled time dependent C-function.
\( F(x,t) = w(x,t) s T(t) d(x - xc) \)
where w is the optional weight coefficient, s is a scale factor T is an optional time-dependent function and d is a delta function.
WARNING this cannot be used as a normal coefficient. The usual Eval method is disabled.
Definition at line 318 of file coefficient.hpp.
|
inline |
Construct a unit delta function centered at (0.0,0.0,0.0)
Definition at line 329 of file coefficient.hpp.
|
inline |
Construct a delta function scaled by s and centered at (x,0.0,0.0)
Definition at line 336 of file coefficient.hpp.
|
inline |
Construct a delta function scaled by s and centered at (x,y,0.0)
Definition at line 343 of file coefficient.hpp.
|
inline |
Construct a delta function scaled by s and centered at (x,y,z)
Definition at line 350 of file coefficient.hpp.
|
inlinevirtual |
Definition at line 405 of file coefficient.hpp.
|
inline |
Return a pointer to a c-array representing the center of the delta function.
Definition at line 383 of file coefficient.hpp.
|
inlinevirtual |
A DeltaFunction cannot be evaluated. Calling this method will cause an MFEM error, terminating the application.
Implements mfem::Coefficient.
Definition at line 403 of file coefficient.hpp.
|
virtual |
The value of the function assuming we are evaluating at the delta center.
Definition at line 179 of file coefficient.cpp.
void mfem::DeltaCoefficient::GetDeltaCenter | ( | Vector & | center | ) |
Write the center of the delta function into center.
Definition at line 173 of file coefficient.cpp.
|
inline |
Return the scale factor times the optional time dependent function. Returns \( s T(t) \) with \( T(t) = 1 \) when not set by the user.
Definition at line 388 of file coefficient.hpp.
void mfem::DeltaCoefficient::SetDeltaCenter | ( | const Vector & | center | ) |
Set the center location of the delta function.
Definition at line 165 of file coefficient.cpp.
|
inline |
Set a time-dependent function that multiplies the Scale().
Definition at line 366 of file coefficient.hpp.
|
inline |
Set the scale value multiplying the delta function.
Definition at line 363 of file coefficient.hpp.
|
virtual |
Set the time for internally stored coefficients.
Reimplemented from mfem::Coefficient.
Definition at line 159 of file coefficient.cpp.
|
inline |
Set the tolerance used during projection onto GridFunction to identify the Mesh vertex where the Center() of the delta function lies. (default 1e-12)
Definition at line 371 of file coefficient.hpp.
|
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 379 of file coefficient.hpp.
|
inline |
Return the tolerance used to identify the mesh vertices.
Definition at line 391 of file coefficient.hpp.
|
inline |
See SetWeight() for description of the weight Coefficient.
Definition at line 394 of file coefficient.hpp.
|
protected |
Definition at line 321 of file coefficient.hpp.
|
protected |
Definition at line 321 of file coefficient.hpp.
|
protected |
Definition at line 323 of file coefficient.hpp.
|
protected |
Definition at line 324 of file coefficient.hpp.
|
protected |
Definition at line 321 of file coefficient.hpp.
|
protected |
Definition at line 322 of file coefficient.hpp.