https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMMeshGenerator.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 "MFEMMeshGenerator.h"
13#include "MFEMMeshCarrier.h"
14
17{
19 // Private flag checked by SetupMeshAction to auto-select MFEMMeshGeneratorMesh
20 // when no [Mesh] type is specified by the user.
21 params.addPrivateParam<bool>("_mfem_mesh_generator", true);
22 return params;
23}
24
26{
27}
28
29std::unique_ptr<MeshBase>
31{
32 auto carrier = std::make_unique<MFEMMeshCarrier>(comm());
33 carrier->setMFEMMesh(generateMFEMMesh());
34 return carrier;
35}
36
37#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
virtual std::unique_ptr< mfem::Mesh > generateMFEMMesh()=0
Implement this to produce the mfem::Mesh for this generator.
static InputParameters validParams()
MFEMMeshGenerator(const InputParameters &parameters)
std::unique_ptr< MeshBase > generate() final override
Sealed. Calls generateMFEMMesh() and wraps the result in an MFEMMeshCarrier.
MeshGenerators are objects that can modify or add to an existing mesh.
static InputParameters validParams()
const Parallel::Communicator & comm() const