MFEM
v4.6.0
Finite element discretization library
|
Vector coefficient defined as the linear combination of two vectors. More...
#include <coefficient.hpp>
Public Member Functions | |
VectorSumCoefficient (int dim) | |
VectorSumCoefficient (VectorCoefficient &A, VectorCoefficient &B, double alpha_=1.0, double beta_=1.0) | |
VectorSumCoefficient (VectorCoefficient &A_, VectorCoefficient &B_, Coefficient &alpha_, Coefficient &beta_) | |
void | SetTime (double t) |
Set the time for internally stored coefficients. More... | |
void | SetACoef (VectorCoefficient &A_) |
Reset the first vector coefficient. More... | |
VectorCoefficient * | GetACoef () const |
Return the first vector coefficient. More... | |
void | SetBCoef (VectorCoefficient &B_) |
Reset the second vector coefficient. More... | |
VectorCoefficient * | GetBCoef () const |
Return the second vector coefficient. More... | |
void | SetAlphaCoef (Coefficient &A_) |
Reset the factor in front of the first vector coefficient. More... | |
Coefficient * | GetAlphaCoef () const |
Return the factor in front of the first vector coefficient. More... | |
void | SetBetaCoef (Coefficient &B_) |
Reset the factor in front of the second vector coefficient. More... | |
Coefficient * | GetBetaCoef () const |
Return the factor in front of the second vector coefficient. More... | |
void | SetA (const Vector &A_) |
Reset the first vector as a constant. More... | |
const Vector & | GetA () const |
Return the first vector constant. More... | |
void | SetB (const Vector &B_) |
Reset the second vector as a constant. More... | |
const Vector & | GetB () const |
Return the second vector constant. More... | |
void | SetAlpha (double alpha_) |
Reset the factor in front of the first vector coefficient as a constant. More... | |
double | GetAlpha () const |
Return the factor in front of the first vector coefficient. More... | |
void | SetBeta (double beta_) |
Reset the factor in front of the second vector coefficient as a constant. More... | |
double | GetBeta () const |
Return the factor in front of the second vector coefficient. More... | |
virtual void | Eval (Vector &V, ElementTransformation &T, const IntegrationPoint &ip) |
Evaluate the coefficient at ip. More... | |
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 () |
Additional Inherited Members | |
Protected Attributes inherited from mfem::VectorCoefficient | |
int | vdim |
double | time |
Vector coefficient defined as the linear combination of two vectors.
Definition at line 1765 of file coefficient.hpp.
mfem::VectorSumCoefficient::VectorSumCoefficient | ( | int | dim | ) |
Constructor with no coefficients. To be used with the various "Set" methods
Definition at line 1044 of file coefficient.cpp.
mfem::VectorSumCoefficient::VectorSumCoefficient | ( | VectorCoefficient & | A, |
VectorCoefficient & | B, | ||
double | alpha_ = 1.0 , |
||
double | beta_ = 1.0 |
||
) |
Constructor with two vector coefficients. Result is alpha_ * A + beta_ * B
Definition at line 1054 of file coefficient.cpp.
mfem::VectorSumCoefficient::VectorSumCoefficient | ( | VectorCoefficient & | A_, |
VectorCoefficient & | B_, | ||
Coefficient & | alpha_, | ||
Coefficient & | beta_ | ||
) |
Constructor with scalar coefficients. Result is alpha_ * A_ + beta_ * B_
Definition at line 1068 of file coefficient.cpp.
|
virtual |
Evaluate the coefficient at ip.
Implements mfem::VectorCoefficient.
Definition at line 1094 of file coefficient.cpp.
virtual void mfem::VectorCoefficient::Eval |
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in V.
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.
Definition at line 265 of file coefficient.cpp.
|
inline |
Return the first vector constant.
Definition at line 1823 of file coefficient.hpp.
|
inline |
Return the first vector coefficient.
Definition at line 1803 of file coefficient.hpp.
|
inline |
Return the factor in front of the first vector coefficient.
Definition at line 1833 of file coefficient.hpp.
|
inline |
Return the factor in front of the first vector coefficient.
Definition at line 1813 of file coefficient.hpp.
|
inline |
Return the second vector constant.
Definition at line 1828 of file coefficient.hpp.
|
inline |
Return the second vector coefficient.
Definition at line 1808 of file coefficient.hpp.
|
inline |
Return the factor in front of the second vector coefficient.
Definition at line 1838 of file coefficient.hpp.
|
inline |
Return the factor in front of the second vector coefficient.
Definition at line 1818 of file coefficient.hpp.
|
inline |
Reset the first vector as a constant.
Definition at line 1821 of file coefficient.hpp.
|
inline |
Reset the first vector coefficient.
Definition at line 1801 of file coefficient.hpp.
|
inline |
Reset the factor in front of the first vector coefficient as a constant.
Definition at line 1831 of file coefficient.hpp.
|
inline |
Reset the factor in front of the first vector coefficient.
Definition at line 1811 of file coefficient.hpp.
|
inline |
Reset the second vector as a constant.
Definition at line 1826 of file coefficient.hpp.
|
inline |
Reset the second vector coefficient.
Definition at line 1806 of file coefficient.hpp.
|
inline |
Reset the factor in front of the second vector coefficient as a constant.
Definition at line 1836 of file coefficient.hpp.
|
inline |
Reset the factor in front of the second vector coefficient.
Definition at line 1816 of file coefficient.hpp.
|
virtual |
Set the time for internally stored coefficients.
Reimplemented from mfem::VectorCoefficient.
Definition at line 1085 of file coefficient.cpp.