MFEM  v4.5.2
Finite element discretization library
Public Member Functions | Protected Attributes | List of all members
mfem::VectorDeltaCoefficient Class Reference

Vector coefficient defined by a scalar DeltaCoefficient and a constant vector direction. More...

#include <coefficient.hpp>

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

Public Member Functions

 VectorDeltaCoefficient (int vdim_)
 Construct with a vector of dimension vdim_. More...
 
 VectorDeltaCoefficient (const Vector &dir_)
 Construct with a Vector object representing the direction and a unit delta function centered at (0.0,0.0,0.0) More...
 
 VectorDeltaCoefficient (const Vector &dir_, double x, double s)
 Construct with a Vector object representing the direction and a delta function scaled by s and centered at (x,0.0,0.0) More...
 
 VectorDeltaCoefficient (const Vector &dir_, double x, double y, double s)
 Construct with a Vector object representing the direction and a delta function scaled by s and centered at (x,y,0.0) More...
 
 VectorDeltaCoefficient (const Vector &dir_, double x, double y, double z, double s)
 Construct with a Vector object representing the direction and 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 SetDeltaCoefficient (const DeltaCoefficient &d_)
 Replace the associated DeltaCoefficient with a new DeltaCoefficient. More...
 
DeltaCoefficientGetDeltaCoefficient ()
 Return the associated scalar DeltaCoefficient. More...
 
void SetScale (double s)
 
void SetDirection (const Vector &d_)
 
void SetDeltaCenter (const Vector &center)
 
void GetDeltaCenter (Vector &center)
 
virtual void EvalDelta (Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
 Return the specified direction vector multiplied by the value returned by DeltaCoefficient::EvalDelta() of the associated scalar DeltaCoefficient. More...
 
virtual void Eval (Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
 A VectorDeltaFunction cannot be evaluated. Calling this method will cause an MFEM error, terminating the application. More...
 
virtual ~VectorDeltaCoefficient ()
 
virtual void Eval (Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
 Evaluate the vector coefficient in the element described by T at the point ip, storing the result in V. More...
 
virtual void Eval (DenseMatrix &M, ElementTransformation &T, const IntegrationRule &ir)
 Evaluate the vector coefficient in the element described by T at all points of ir, storing the result in M. More...
 
- Public Member Functions inherited from mfem::VectorCoefficient
 VectorCoefficient (int vd)
 Initialize the VectorCoefficient with vector dimension vd. More...
 
double GetTime ()
 Get the time for time dependent coefficients. More...
 
int GetVDim ()
 Returns dimension of the vector. More...
 
virtual void Eval (DenseMatrix &M, ElementTransformation &T, const IntegrationRule &ir)
 Evaluate the vector coefficient in the element described by T at all points of ir, storing the result in M. More...
 
virtual void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. More...
 
virtual ~VectorCoefficient ()
 

Protected Attributes

Vector dir
 
DeltaCoefficient d
 
- Protected Attributes inherited from mfem::VectorCoefficient
int vdim
 
double time
 

Detailed Description

Vector coefficient defined by a scalar DeltaCoefficient and a constant vector direction.

WARNING this cannot be used as a normal coefficient. The usual Eval method is disabled.

Definition at line 809 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ VectorDeltaCoefficient() [1/5]

mfem::VectorDeltaCoefficient::VectorDeltaCoefficient ( int  vdim_)
inline

Construct with a vector of dimension vdim_.

Definition at line 817 of file coefficient.hpp.

◆ VectorDeltaCoefficient() [2/5]

mfem::VectorDeltaCoefficient::VectorDeltaCoefficient ( const Vector dir_)
inline

Construct with a Vector object representing the direction and a unit delta function centered at (0.0,0.0,0.0)

Definition at line 822 of file coefficient.hpp.

◆ VectorDeltaCoefficient() [3/5]

mfem::VectorDeltaCoefficient::VectorDeltaCoefficient ( const Vector dir_,
double  x,
double  s 
)
inline

Construct with a Vector object representing the direction and a delta function scaled by s and centered at (x,0.0,0.0)

Definition at line 827 of file coefficient.hpp.

◆ VectorDeltaCoefficient() [4/5]

mfem::VectorDeltaCoefficient::VectorDeltaCoefficient ( const Vector dir_,
double  x,
double  y,
double  s 
)
inline

Construct with a Vector object representing the direction and a delta function scaled by s and centered at (x,y,0.0)

Definition at line 832 of file coefficient.hpp.

◆ VectorDeltaCoefficient() [5/5]

mfem::VectorDeltaCoefficient::VectorDeltaCoefficient ( const Vector dir_,
double  x,
double  y,
double  z,
double  s 
)
inline

Construct with a Vector object representing the direction and a delta function scaled by s and centered at (x,y,z)

Definition at line 837 of file coefficient.hpp.

◆ ~VectorDeltaCoefficient()

virtual mfem::VectorDeltaCoefficient::~VectorDeltaCoefficient ( )
inlinevirtual

Definition at line 870 of file coefficient.hpp.

Member Function Documentation

◆ Eval() [1/3]

virtual void mfem::VectorCoefficient::Eval

Evaluate the vector coefficient in the element described by T at the point ip, storing the result in V.

Note
When this method is called, the caller must make sure that the IntegrationPoint associated with T is the same as ip. This can be achieved by calling T.SetIntPoint(&ip).

◆ Eval() [2/3]

void mfem::VectorCoefficient::Eval

Evaluate the vector coefficient in the element described by T at all points of ir, storing the result in M.

The dimensions of M are GetVDim() by ir.GetNPoints() and they must be set by the implementation of this method.

The general implementation provided by the base class (using the Eval method for one IntegrationPoint at a time) can be overloaded for more efficient implementation.

Note
The IntegrationPoint associated with T is not used, and this method will generally modify this IntegrationPoint associated with T.

Definition at line 222 of file coefficient.cpp.

◆ Eval() [3/3]

virtual void mfem::VectorDeltaCoefficient::Eval ( Vector V,
ElementTransformation T,
const IntegrationPoint ip 
)
inlinevirtual

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

Implements mfem::VectorCoefficient.

Definition at line 867 of file coefficient.hpp.

◆ EvalDelta()

void mfem::VectorDeltaCoefficient::EvalDelta ( Vector V,
ElementTransformation T,
const IntegrationPoint ip 
)
virtual

Return the specified direction vector multiplied by the value returned by DeltaCoefficient::EvalDelta() of the associated scalar DeltaCoefficient.

Definition at line 534 of file coefficient.cpp.

◆ GetDeltaCenter()

void mfem::VectorDeltaCoefficient::GetDeltaCenter ( Vector center)
inline

Definition at line 856 of file coefficient.hpp.

◆ GetDeltaCoefficient()

DeltaCoefficient& mfem::VectorDeltaCoefficient::GetDeltaCoefficient ( )
inline

Return the associated scalar DeltaCoefficient.

Definition at line 850 of file coefficient.hpp.

◆ SetDeltaCenter()

void mfem::VectorDeltaCoefficient::SetDeltaCenter ( const Vector center)
inline

Definition at line 855 of file coefficient.hpp.

◆ SetDeltaCoefficient()

void mfem::VectorDeltaCoefficient::SetDeltaCoefficient ( const DeltaCoefficient d_)
inline

Replace the associated DeltaCoefficient with a new DeltaCoefficient.

The new DeltaCoefficient cannot have a specified weight Coefficient, i.e. DeltaCoefficient::Weight() should return NULL.

Definition at line 847 of file coefficient.hpp.

◆ SetDirection()

void mfem::VectorDeltaCoefficient::SetDirection ( const Vector d_)

Definition at line 528 of file coefficient.cpp.

◆ SetScale()

void mfem::VectorDeltaCoefficient::SetScale ( double  s)
inline

Definition at line 852 of file coefficient.hpp.

◆ SetTime()

void mfem::VectorDeltaCoefficient::SetTime ( double  t)
virtual

Set the time for internally stored coefficients.

Reimplemented from mfem::VectorCoefficient.

Definition at line 522 of file coefficient.cpp.

Member Data Documentation

◆ d

DeltaCoefficient mfem::VectorDeltaCoefficient::d
protected

Definition at line 813 of file coefficient.hpp.

◆ dir

Vector mfem::VectorDeltaCoefficient::dir
protected

Definition at line 812 of file coefficient.hpp.


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