https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMMeshCarrier.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/replicated_mesh.h"
15#include "libmesh/ignore_warnings.h"
16#include "mfem.hpp"
17#include "libmesh/restore_warnings.h"
18
26{
27public:
32
33 void setMFEMMesh(std::unique_ptr<mfem::Mesh> mesh) { _mfem_mesh = std::move(mesh); }
34
36 std::unique_ptr<mfem::Mesh> releaseMFEMMesh() { return std::move(_mfem_mesh); }
37
38private:
39 std::unique_ptr<mfem::Mesh> _mfem_mesh;
40};
41
42#endif
A thin libMesh::ReplicatedMesh subclass that carries an mfem::Mesh through the MeshGenerator pipeline...
void setMFEMMesh(std::unique_ptr< mfem::Mesh > mesh)
std::unique_ptr< mfem::Mesh > _mfem_mesh
MFEMMeshCarrier(const libMesh::Parallel::Communicator &comm)
std::unique_ptr< mfem::Mesh > releaseMFEMMesh()
Move the held mfem::Mesh out; leaves the carrier with a null pointer.
const Parallel::Communicator & comm() const
ReplicatedMesh(const Parallel::Communicator &comm_in, unsigned char dim=1)
MeshBase & mesh
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...