![]() |
MFEM v4.10.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) | |
| DeltaCoefficient (real_t x, real_t s) | |
| Construct a delta function scaled by s and centered at (x,0.0,0.0) | |
| DeltaCoefficient (real_t x, real_t y, real_t s) | |
| Construct a delta function scaled by s and centered at (x,y,0.0) | |
| DeltaCoefficient (real_t x, real_t y, real_t z, real_t s) | |
| Construct a delta function scaled by s and centered at (x,y,z) | |
| void | SetTime (real_t t) override |
| Set the time for internally stored coefficients. | |
| void | SetDeltaCenter (const Vector ¢er) |
| Set the center location of the delta function. | |
| void | SetScale (real_t s_) |
| Set the scale value multiplying the delta function. | |
| void | SetFunction (real_t(*f)(real_t)) |
| Set a time-dependent function that multiplies the Scale(). | |
| void | SetTol (real_t 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) | |
| void | SetWeight (Coefficient *w) |
| Set a weight Coefficient that multiplies the DeltaCoefficient. | |
| const real_t * | Center () |
| real_t | 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. | |
| real_t | Tol () |
| Return the tolerance used to identify the mesh vertices. | |
| Coefficient * | Weight () |
| See SetWeight() for description of the weight Coefficient. | |
| void | GetDeltaCenter (Vector ¢er) |
| Write the center of the delta function into center. | |
| virtual real_t | EvalDelta (ElementTransformation &T, const IntegrationPoint &ip) |
| The value of the function assuming we are evaluating at the delta center. | |
| real_t | Eval (ElementTransformation &T, const IntegrationPoint &ip) override |
| A DeltaFunction cannot be evaluated. Calling this method will cause an MFEM error, terminating the application. | |
| virtual | ~DeltaCoefficient () |
Public Member Functions inherited from mfem::Coefficient | |
| Coefficient () | |
| real_t | GetTime () |
| Get the time for time dependent coefficients. | |
| int | GetVDim () |
| Returns dimension of the vector. | |
| 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 () |
Protected Attributes | |
| real_t | center [3] |
| real_t | scale |
| real_t | tol |
| Coefficient * | weight |
| int | sdim |
| real_t(* | tdf )(real_t) |
Protected Attributes inherited from mfem::Coefficient | |
| real_t | 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 462 of file coefficient.hpp.
|
inline |
Construct a unit delta function centered at (0.0,0.0,0.0)
Definition at line 473 of file coefficient.hpp.
Construct a delta function scaled by s and centered at (x,0.0,0.0)
Definition at line 480 of file coefficient.hpp.
Construct a delta function scaled by s and centered at (x,y,0.0)
Definition at line 487 of file coefficient.hpp.
Construct a delta function scaled by s and centered at (x,y,z)
Definition at line 494 of file coefficient.hpp.
|
inlinevirtual |
Definition at line 549 of file coefficient.hpp.
|
inline |
Return a pointer to a c-array representing the center of the delta function.
Definition at line 527 of file coefficient.hpp.
|
inlineoverridevirtual |
A DeltaFunction cannot be evaluated. Calling this method will cause an MFEM error, terminating the application.
Implements mfem::Coefficient.
Definition at line 547 of file coefficient.hpp.
|
virtual |
The value of the function assuming we are evaluating at the delta center.
Definition at line 298 of file coefficient.cpp.
| void mfem::DeltaCoefficient::GetDeltaCenter | ( | Vector & | center | ) |
Write the center of the delta function into center.
Definition at line 292 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 532 of file coefficient.hpp.
| void mfem::DeltaCoefficient::SetDeltaCenter | ( | const Vector & | center | ) |
Set the center location of the delta function.
Definition at line 284 of file coefficient.cpp.
Set a time-dependent function that multiplies the Scale().
Definition at line 510 of file coefficient.hpp.
|
inline |
Set the scale value multiplying the delta function.
Definition at line 507 of file coefficient.hpp.
|
overridevirtual |
Set the time for internally stored coefficients.
Reimplemented from mfem::Coefficient.
Definition at line 278 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 515 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 523 of file coefficient.hpp.
|
inline |
Return the tolerance used to identify the mesh vertices.
Definition at line 535 of file coefficient.hpp.
|
inline |
See SetWeight() for description of the weight Coefficient.
Definition at line 538 of file coefficient.hpp.
|
protected |
Definition at line 465 of file coefficient.hpp.
|
protected |
Definition at line 465 of file coefficient.hpp.
|
protected |
Definition at line 467 of file coefficient.hpp.
Definition at line 468 of file coefficient.hpp.
|
protected |
Definition at line 465 of file coefficient.hpp.
|
protected |
Definition at line 466 of file coefficient.hpp.