10 #ifdef MOOSE_MFEM_ENABLED 13 #include "libmesh/int_range.h" 20 return libMesh::Point(vec(0), vec.Size() > 1 ? vec(1) : 0., vec.Size() > 2 ? vec(2) : 0.);
25 const unsigned int num_dims,
26 const mfem::Ordering::Type ordering)
28 const unsigned int num_points = points.size();
29 mfem::Vector mfem_points(num_points * num_dims);
32 mfem_points(
MFEMIndex(i_dim, i_point, num_dims, num_points, ordering)) =
33 points[i_point](i_dim);
libMesh::Point libMeshPointFromMFEMVector(const mfem::Vector &vec)
Convert an MFEM position vector to a libMesh::Point.
mfem::Vector libMeshPointsToMFEMVector(const std::vector< libMesh::Point > &points, const unsigned int num_dims, const mfem::Ordering::Type ordering)
Convert a vector of libMesh::Point objects to an mfem::Vector containing all points, given an ordering.
std::size_t MFEMIndex(const std::size_t i_dim, const std::size_t i_point, const std::size_t num_dims, const std::size_t num_points, const mfem::Ordering::Type ordering)
Convert an index of a vector of libMesh::Points to an MFEM vector index, given an MFEM ordering...
IntRange< T > make_range(T beg, T end)
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).