Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
mesh_utils.hpp
Go to the documentation of this file.
1 // Copyright (c) Lawrence Livermore National Security, LLC and
2 // other Serac Project Developers. See the top-level LICENSE file for
3 // details.
4 //
5 // SPDX-License-Identifier: (BSD-3-Clause)
6 
14 #pragma once
15 
16 #include <memory>
17 #include <variant>
18 
20 
24 namespace serac {
25 namespace mesh {
26 
30 struct InputOptions {
36  static void defineInputFileSchema(axom::inlet::Container& container);
37 
42  std::variant<FileInputOptions, BoxInputOptions, NBallInputOptions> extra_options;
43 
49 
55 };
56 
65 std::unique_ptr<mfem::ParMesh> buildParallelMesh(const InputOptions& options, const MPI_Comm comm = MPI_COMM_WORLD);
66 
67 } // namespace mesh
68 } // namespace serac
69 
75 template <>
76 struct FromInlet<serac::mesh::InputOptions> {
78  serac::mesh::InputOptions operator()(const axom::inlet::Container& base);
79 };
This file contains helper functions for importing and managing various mesh objects.
std::unique_ptr< mfem::ParMesh > buildParallelMesh(const InputOptions &options, const MPI_Comm comm)
Constructs an MFEM parallel mesh from a set of input options.
Definition: mesh_utils.cpp:429
Accelerator functionality.
Definition: serac.cpp:36
Container for the mesh input options.
Definition: mesh_utils.hpp:30
int ser_ref_levels
The number of serial refinement levels.
Definition: mesh_utils.hpp:48
static void defineInputFileSchema(axom::inlet::Container &container)
Input file parameters for mesh generation.
Definition: mesh_utils.cpp:400
std::variant< FileInputOptions, BoxInputOptions, NBallInputOptions > extra_options
The mesh input options (either file or generated)
Definition: mesh_utils.hpp:42
int par_ref_levels
The number of parallel refinement levels.
Definition: mesh_utils.hpp:54