|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Class for encapsulating the critical MFEM components of a primal finite element field. More...
#include <finite_element_state.hpp>

Public Member Functions | |
| FiniteElementState (const FiniteElementState &rhs) | |
| Copy constructor. More... | |
| FiniteElementState (FiniteElementState &&rhs) | |
| Move construct a new Finite Element State object. More... | |
| FiniteElementState & | operator= (const FiniteElementState &rhs) |
| Copy assignment. More... | |
| FiniteElementState & | operator= (FiniteElementState &&rhs) |
| Move assignment. More... | |
| FiniteElementState & | operator= (const mfem::HypreParVector &rhs) |
| Copy assignment with HypreParVector. More... | |
| FiniteElementState & | operator= (const mfem::Vector &rhs) |
| Copy assignment with mfem::Vector. More... | |
| FiniteElementState & | operator= (double rhs) |
| Copy assignment with double. More... | |
| void | fillGridFunction (mfem::ParGridFunction &grid_function) const |
| Fill a user-provided grid function based on the underlying true vector. More... | |
| void | setFromGridFunction (const mfem::ParGridFunction &grid_function) |
| Initialize the true vector in the FiniteElementState based on an input grid function. More... | |
| void | project (mfem::VectorCoefficient &coef, mfem::Array< int > &dof_list) |
| Project a vector coefficient onto a set of dofs. More... | |
| void | project (mfem::Coefficient &coef, mfem::Array< int > &dof_list, std::optional< int > component={}) |
| Project a scalar coefficient onto a set of dofs. More... | |
| void | project (const GeneralCoefficient &coef) |
| void | project (mfem::Coefficient &coef) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | project (mfem::VectorCoefficient &coef) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | projectOnBoundary (mfem::Coefficient &coef, const mfem::Array< int > &markers) |
| Project a coefficient on a specific set of marked boundaries. More... | |
| void | projectOnBoundary (mfem::VectorCoefficient &coef, const mfem::Array< int > &markers) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | project (mfem::Coefficient &coef, const Domain &d) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | project (mfem::VectorCoefficient &coef, const Domain &d) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename FieldFunction > | |
| void | setFromFieldFunction (FieldFunction &&field_function) |
| Set state as interpolant of an analytical function. More... | |
| mfem::ParGridFunction & | gridFunction () const |
| Construct a grid function from the finite element state true vector. More... | |
| FiniteElementVector (const mfem::ParFiniteElementSpace &space, const std::string &name="") | |
| Minimal constructor for a FiniteElementVector given a finite element space. More... | |
| template<typename FunctionSpace > | |
| FiniteElementVector (mfem::ParMesh &mesh,[[maybe_unused]] FunctionSpace f, const std::string &name="") | |
| Construct a new Finite Element Vector object given a templated function space. More... | |
| FiniteElementVector (const FiniteElementVector &rhs) | |
| Copy constructor. More... | |
| FiniteElementVector (FiniteElementVector &&rhs) | |
| Move construct a new Finite Element Vector object. More... | |
Public Member Functions inherited from smith::FiniteElementVector | |
| FiniteElementVector (const mfem::ParFiniteElementSpace &space, const std::string &name="") | |
| Minimal constructor for a FiniteElementVector given a finite element space. More... | |
| template<typename FunctionSpace > | |
| FiniteElementVector (mfem::ParMesh &mesh, [[maybe_unused]] FunctionSpace f, const std::string &name="") | |
| Construct a new Finite Element Vector object given a templated function space. More... | |
| FiniteElementVector (const FiniteElementVector &rhs) | |
| Copy constructor. More... | |
| FiniteElementVector (FiniteElementVector &&rhs) | |
| Move construct a new Finite Element Vector object. More... | |
| FiniteElementVector & | operator= (const FiniteElementVector &rhs) |
| Copy assignment. More... | |
| FiniteElementVector & | operator= (FiniteElementVector &&rhs) |
| Move assignment. More... | |
| FiniteElementVector & | operator= (const mfem::HypreParVector &rhs) |
| Copy assignment from a hypre par vector. More... | |
| FiniteElementVector & | operator= (const mfem::Vector &rhs) |
| Copy assignment from a hypre par vector. More... | |
| MPI_Comm | comm () const |
| Returns the MPI communicator for the state. More... | |
| mfem::ParMesh & | mesh () |
| Returns a non-owning reference to the internal mesh object. More... | |
| const mfem::ParMesh & | mesh () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| mfem::ParFiniteElementSpace & | space () |
| Returns a non-owning reference to the internal FESpace. More... | |
| const mfem::ParFiniteElementSpace & | space () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| std::string | name () const |
| Returns the name of the FEState (field) More... | |
| FiniteElementVector & | operator= (const double value) |
| Set a finite element state to a constant value. More... | |
| virtual | ~FiniteElementVector () |
| Destroy the Finite Element Vector object. | |
Protected Attributes | |
| std::unique_ptr< mfem::ParGridFunction > | grid_func_ |
| An optional container for a grid function (L-vector) view of the finite element state. More... | |
Protected Attributes inherited from smith::FiniteElementVector | |
| std::reference_wrapper< mfem::ParMesh > | mesh_ |
| A reference to the mesh object on which the field is defined. | |
| std::unique_ptr< mfem::FiniteElementCollection > | coll_ |
| Handle to the FiniteElementCollection, which is owned by MFEMSidreDataCollection. More... | |
| std::unique_ptr< mfem::ParFiniteElementSpace > | space_ |
| Handle to the mfem::ParFiniteElementSpace, which is owned by MFEMSidreDataCollection. | |
| std::string | name_ = "" |
| The name of the finite element vector. | |
Class for encapsulating the critical MFEM components of a primal finite element field.
Namely: Mesh, FiniteElementCollection, FiniteElementState, and the true vector of the solution
Definition at line 116 of file finite_element_state.hpp.
|
inline |
Copy constructor.
| [in] | rhs | The input state used for construction |
Definition at line 126 of file finite_element_state.hpp.
|
inline |
Move construct a new Finite Element State object.
| [in] | rhs | The input vector used for construction |
Definition at line 133 of file finite_element_state.hpp.
|
inline |
Fill a user-provided grid function based on the underlying true vector.
This distributes true vector dofs to the finite element (local) dofs by multiplying the true dofs by the prolongation operator.
Definition at line 204 of file finite_element_state.hpp.
|
inline |
Copy constructor.
| [in] | rhs | The input vector used for construction |
Definition at line 93 of file finite_element_vector.hpp.
| smith::FiniteElementVector::FiniteElementVector |
Minimal constructor for a FiniteElementVector given a finite element space.
| [in] | space | The space to use for the finite element state. This space is deep copied into the new FE state |
| [in] | name | The name of the field |
Definition at line 61 of file finite_element_vector.cpp.
| smith::FiniteElementVector::FiniteElementVector |
Move construct a new Finite Element Vector object.
| [in] | rhs | The input vector used for construction |
Definition at line 103 of file finite_element_vector.cpp.
|
inline |
Construct a new Finite Element Vector object given a templated function space.
| FunctionSpace | what kind of interpolating functions to use |
| mesh | The mesh used to construct the finite element state |
| f | metadata describing the kind of function space to define |
| name | The name of the new finite element state field |
Definition at line 72 of file finite_element_vector.hpp.
| mfem::ParGridFunction & smith::FiniteElementState::gridFunction | ( | ) | const |
Construct a grid function from the finite element state true vector.
Definition at line 94 of file finite_element_state.cpp.
|
inline |
Copy assignment.
| rhs | The right hand side input state |
Definition at line 141 of file finite_element_state.hpp.
|
inline |
Copy assignment with HypreParVector.
| rhs | The right hand side input HypreParVector |
Definition at line 165 of file finite_element_state.hpp.
|
inline |
Copy assignment with mfem::Vector.
| rhs | The right hand side input State |
Definition at line 177 of file finite_element_state.hpp.
|
inline |
Copy assignment with double.
| rhs | The right hand side input double |
Definition at line 189 of file finite_element_state.hpp.
|
inline |
Move assignment.
| rhs | The right hand side input State |
Definition at line 153 of file finite_element_state.hpp.
| void smith::FiniteElementState::project | ( | const GeneralCoefficient & | coef | ) |
Projects a coefficient (vector or scalar) onto the field
| [in] | coef | The coefficient to project |
Definition at line 34 of file finite_element_state.cpp.
| void smith::FiniteElementState::project | ( | mfem::Coefficient & | coef, |
| mfem::Array< int > & | dof_list, | ||
| std::optional< int > | component = {} |
||
| ) |
Project a scalar coefficient onto a set of dofs.
| coef | The vector coefficient to project |
| dof_list | A list of true degrees of freedom to set. Note this is the scalar dof (not vdof) numbering. |
| component | The component to set |
Definition at line 21 of file finite_element_state.cpp.
| void smith::FiniteElementState::project | ( | mfem::VectorCoefficient & | coef, |
| mfem::Array< int > & | dof_list | ||
| ) |
Project a vector coefficient onto a set of dofs.
| coef | The vector coefficient to project |
| dof_list | A list of true degrees of freedom to set. Note this is the scalar dof (not vdof) numbering. |
Definition at line 14 of file finite_element_state.cpp.
| void smith::FiniteElementState::projectOnBoundary | ( | mfem::Coefficient & | coef, |
| const mfem::Array< int > & | markers | ||
| ) |
Project a coefficient on a specific set of marked boundaries.
| coef | The coefficient to project |
| markers | A marker array of the boundaries to set |
Definition at line 62 of file finite_element_state.cpp.
|
inline |
Set state as interpolant of an analytical function.
In other words, this sets the dofs by direct evaluation of the analytical field at the nodal points.
| FieldFunction | A callable type |
| field_function | A function that should have the signature: tensor<double, field_dim> field_function(tensor<double, spatial_dim> X) |
template params: spatial_dim: number of components in the mesh coordinates field_dim: number of components of the FiniteElementState field
args: X: coordinates of the material point
returns: the value of the field at X.
If the field is scalar-valued, then alternatively the signature may be: double field_function(tensor<double, spatial_dim> X)
Definition at line 299 of file finite_element_state.hpp.
|
inline |
Initialize the true vector in the FiniteElementState based on an input grid function.
This distributes the grid function dofs to the true vector dofs by multiplying by the restriction operator.
| grid_function | The grid function used to initialize the underlying true vector. |
Definition at line 216 of file finite_element_state.hpp.
|
mutableprotected |
An optional container for a grid function (L-vector) view of the finite element state.
If a user requests it, it is constructed and potentially reused during subsequent calls. It is not updated unless specifically requested via the gridFunction method.
Definition at line 324 of file finite_element_state.hpp.