https://mooseframework.inl.gov
MFEMNodalProjector.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #ifdef MOOSE_MFEM_ENABLED
11 
12 #pragma once
13 
14 #include "libmesh/ignore_warnings.h"
15 #include "mfem.hpp"
16 #include "libmesh/restore_warnings.h"
17 
23 {
24 public:
25  MFEMNodalProjector() = default;
27  void extractNodePositions(const mfem::ParFiniteElementSpace & fespace,
28  mfem::Vector & node_positions,
29  mfem::Ordering::Type & node_ordering);
31  void projectNodalValues(const mfem::Vector & nodal_vals,
32  const mfem::Ordering::Type & nodal_val_ordering,
33  mfem::ParGridFunction & gridfunction);
34 };
35 
36 #endif
void projectNodalValues(const mfem::Vector &nodal_vals, const mfem::Ordering::Type &nodal_val_ordering, mfem::ParGridFunction &gridfunction)
Project a vector of values provided at projection points (nodes) to set GridFunction DoFs...
Auxiliary class to extract locations of nodes in MFEM GridFunctions and project values defined at the...
MFEMNodalProjector()=default
void extractNodePositions(const mfem::ParFiniteElementSpace &fespace, mfem::Vector &node_positions, mfem::Ordering::Type &node_ordering)
Extract node positions from MFEM FESpace at which projection will take place.