13#include "libmesh/elem.h"
14#include "libmesh/boundary_info.h"
15#include "libmesh/mesh_base.h"
16#include "libmesh/parallel.h"
17#include "libmesh/parallel_algebra.h"
18#include "libmesh/cell_tet4.h"
19#include "libmesh/face_tri3.h"
32 "input",
"The input mesh that needs to be converted to tetrahedral elements.");
35 "This ElementsToTetrahedronsConverter object is designed to convert all the elements in a 3D "
36 "mesh consisting only linear elements into TET4 elements.");
43 _input_name(getParam<MeshGeneratorName>(
"input")),
44 _input(getMeshByName(_input_name))
48std::unique_ptr<MeshBase>
52 if (!
_input->preparation().has_cached_elem_data)
56 paramError(
"input",
"Input is mesh not serialized, which is required");
57 if (*(
_input->elem_dimensions().begin()) != 3 || *(
_input->elem_dimensions().rbegin()) != 3)
58 paramError(
"input",
"Only 3D meshes are supported.");
registerMooseObject("MooseApp", ElementsToTetrahedronsConverter)
This ElementsToTetrahedronsConverter object is designed to convert all the elements in a 3D mesh cons...
std::unique_ptr< MeshBase > & _input
Reference to input mesh pointer.
ElementsToTetrahedronsConverter(const InputParameters ¶meters)
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
static InputParameters validParams()
MeshGenerators are objects that can modify or add to an existing mesh.
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
void convert3DMeshToAllTet4(MeshBase &mesh, const std::vector< std::pair< dof_id_type, bool > > &elems_to_process, std::vector< dof_id_type > &converted_elems_ids_to_track, const subdomain_id_type block_id_to_remove, const bool delete_block_to_remove)
Convert all the elements in a 3D mesh, consisting of only linear elements, into TET4 elements.