https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMFileMesh.C
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#include "MFEMFileMesh.h"
13
15
18{
20 params.addRequiredParam<MeshFileName>("file", "The name of the mesh file to read.");
21 params.addClassDescription("Reads an mfem::ParMesh from a file.");
22 return params;
23}
24
25MFEMFileMesh::MFEMFileMesh(const InputParameters & parameters) : MFEMMesh(parameters) {}
26
28
29mfem::Mesh
31{
32 return mfem::Mesh(getParam<MeshFileName>("file"));
33}
34
35std::unique_ptr<MooseMesh>
37{
38 return _app.getFactory().copyConstruct(*this);
39}
40
41#endif
registerMooseObject("MooseApp", MFEMFileMesh)
std::unique_ptr< T > copyConstruct(const T &object)
Copy constructs the object object.
Definition Factory.h:358
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Reads an mfem::ParMesh from a file.
std::unique_ptr< MooseMesh > safeClone() const override
A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer.
MFEMFileMesh(const InputParameters &parameters)
static InputParameters validParams()
virtual ~MFEMFileMesh()
mfem::Mesh buildSerialMFEMMesh() override
Build and return the serial mfem::Mesh for this object.
Abstract MooseMesh base for all MFEM-backed mesh types (MFEMFileMesh, MFEMMeshGeneratorMesh).
Definition MFEMMesh.h:24
static InputParameters validParams()
Definition MFEMMesh.C:19
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition MooseApp.h:407
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375