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) 2019-2024, 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 
17 
21 namespace serac {
22 namespace mesh {
23 
27 struct InputOptions {
33  static void defineInputFileSchema(axom::inlet::Container& container);
34 
39  std::variant<FileInputOptions, BoxInputOptions, NBallInputOptions> extra_options;
40 
46 
52 };
53 
62 std::unique_ptr<mfem::ParMesh> buildParallelMesh(const InputOptions& options, const MPI_Comm comm = MPI_COMM_WORLD);
63 
64 } // namespace mesh
65 } // namespace serac
66 
72 template <>
73 struct FromInlet<serac::mesh::InputOptions> {
75  serac::mesh::InputOptions operator()(const axom::inlet::Container& base);
76 };
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:423
Accelerator functionality.
Definition: serac.cpp:38
Container for the mesh input options.
Definition: mesh_utils.hpp:27
int ser_ref_levels
The number of serial refinement levels.
Definition: mesh_utils.hpp:45
static void defineInputFileSchema(axom::inlet::Container &container)
Input file parameters for mesh generation.
Definition: mesh_utils.cpp:394
std::variant< FileInputOptions, BoxInputOptions, NBallInputOptions > extra_options
The mesh input options (either file or generated)
Definition: mesh_utils.hpp:39
int par_ref_levels
The number of parallel refinement levels.
Definition: mesh_utils.hpp:51