Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
mesh_utils.hpp
Go to the documentation of this file.
1 // Copyright (c) Lawrence Livermore National Security, LLC and
2 // other Smith 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 
21 namespace smith {
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 smith
66 
72 template <>
73 struct FromInlet<smith::mesh::InputOptions> {
75  smith::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:435
Accelerator functionality.
Definition: smith.cpp:36
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
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
static void defineInputFileSchema(axom::inlet::Container &container)
Input file parameters for mesh generation.
Definition: mesh_utils.cpp:406