15 grid_function.ProjectCoefficient(coef, dof_list);
24 grid_function.ProjectCoefficient(coef, dof_list, *component);
26 grid_function.ProjectCoefficient(coef, dof_list);
39 [
this, &grid_function](
auto&& concrete_coef) {
40 grid_function.ProjectCoefficient(*concrete_coef);
49 grid_function.ProjectCoefficient(coef);
56 grid_function.ProjectCoefficient(coef);
64 grid_function.ProjectBdrCoefficient(coef,
const_cast<mfem::Array<int>&
>(markers));
72 grid_function.ProjectBdrCoefficient(coef,
const_cast<mfem::Array<int>&
>(markers));
88 if (state.
space().GetVDim() == 1) {
89 mfem::ConstantCoefficient
zero(0.0);
92 mfem::Vector
zero(state.
space().GetVDim());
94 mfem::VectorConstantCoefficient zerovec(
zero);
101 return state.
gridFunction().ComputeL2Error(exact_solution);
106 return state.
gridFunction().ComputeL2Error(exact_solution);
Class for encapsulating the critical MFEM components of a primal finite element field.
void projectOnBoundary(mfem::Coefficient &coef, const mfem::Array< int > &markers)
Project a coefficient on a specific set of marked boundaries.
std::unique_ptr< mfem::ParGridFunction > grid_func_
An optional container for a grid function (L-vector) view of the finite element state.
void setFromGridFunction(const mfem::ParGridFunction &grid_function)
Initialize the true vector in the FiniteElementState based on an input grid function.
void fillGridFunction(mfem::ParGridFunction &grid_function) const
Fill a user-provided grid function based on the underlying true vector.
mfem::ParGridFunction & gridFunction() const
Construct a grid function from the finite element state true vector.
void project(mfem::VectorCoefficient &coef, mfem::Array< int > &dof_list)
Project a vector coefficient onto a set of dofs.
mfem::ParFiniteElementSpace & space()
Returns a non-owning reference to the internal FESpace.
std::unique_ptr< mfem::ParFiniteElementSpace > space_
Handle to the mfem::ParFiniteElementSpace, which is owned by MFEMSidreDataCollection.
This file contains the declaration of structure that manages the MFEM objects that make up the state ...
This file contains the all the necessary functions and macros required for logging as well as a helpe...
Accelerator functionality.
double computeL2Error(const FiniteElementState &state, mfem::VectorCoefficient &exact_solution)
Find the L2 norm of the error of a vector-valued finite element state with respect to an exact soluti...
constexpr SERAC_HOST_DEVICE auto norm(const isotropic_tensor< T, m, m > &I)
compute the Frobenius norm (sqrt(tr(dot(transpose(I), I)))) of an isotropic tensor
constexpr decltype(auto) visit(Visitor visitor, Variant &&v)
Applies a functor to the active variant element.
A sentinel struct for eliding no-op tensor operations.