24 #include "serac/serac_config.hpp"
71 template <
typename FunctionSpace>
75 std::tie(
space_,
coll_) = serac::generateParFiniteElementSpace<FunctionSpace>(&
mesh);
78 HypreParVector new_vector(
space_.get());
81 auto* parallel_vec = new_vector.StealParVector();
82 WrapHypreParVector(parallel_vec);
85 HypreParVector::operator=(0.0);
95 HypreParVector::operator=(rhs);
157 const mfem::ParFiniteElementSpace&
space()
const {
return *
space_; }
184 std::reference_wrapper<mfem::ParMesh>
mesh_;
190 std::unique_ptr<mfem::FiniteElementCollection>
coll_;
195 std::unique_ptr<mfem::ParFiniteElementSpace>
space_;
Class for encapsulating the data associated with a vector derived from a MFEM finite element space....
std::string name_
The name of the finite element vector.
std::unique_ptr< mfem::FiniteElementCollection > coll_
Handle to the FiniteElementCollection, which is owned by MFEMSidreDataCollection.
FiniteElementVector(const FiniteElementVector &rhs)
Copy constructor.
MPI_Comm comm() const
Returns the MPI communicator for the state.
mfem::ParFiniteElementSpace & space()
Returns a non-owning reference to the internal FESpace.
virtual ~FiniteElementVector()
Destroy the Finite Element Vector object.
const mfem::ParMesh & mesh() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
const mfem::ParFiniteElementSpace & space() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
FiniteElementVector & operator=(const FiniteElementVector &rhs)
Copy assignment.
std::reference_wrapper< mfem::ParMesh > mesh_
A reference to the mesh object on which the field is defined.
std::unique_ptr< mfem::ParFiniteElementSpace > space_
Handle to the mfem::ParFiniteElementSpace, which is owned by MFEMSidreDataCollection.
FiniteElementVector(mfem::ParMesh &mesh, [[maybe_unused]] FunctionSpace f, const std::string &name="")
Construct a new Finite Element Vector object given a templated function space.
std::string name() const
Returns the name of the FEState (field)
FiniteElementVector(const mfem::ParFiniteElementSpace &space, const std::string &name="")
Minimal constructor for a FiniteElementVector given a finite element space.
mfem::ParMesh & mesh()
Returns a non-owning reference to the internal mesh object.
Implementation of the quadrature-function-based functional enabling rapid development of FEM formulat...
Accelerator functionality.
double innerProduct(const FiniteElementVector &v1, const FiniteElementVector &v2)
Find the inner prodcut between two finite element vectors across all dofs.
SERAC_HOST_DEVICE auto max(dual< gradient_type > a, double b)
Implementation of max for dual numbers.
SERAC_HOST_DEVICE auto min(dual< gradient_type > a, double b)
Implementation of min for dual numbers.
double avg(const FiniteElementVector &fe_vector)
Find the average value of a finite element vector across all dofs.
ElementType
The type of a finite element basis function.
@ H1
Nodal scalar-valued basis functions.
@ HDIV
Raviart-Thomas (continuous normal) vector-valued basis functions.
@ HCURL
Nedelec (continuous tangent) vector-valued basis functions.
a small POD class for tracking function space metadata
Discontinuous elements of order p.
Arbitrary-rank tensor class.
This file contains the declaration of a two-element variant type.