![]() |
SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
|
#include <MeshManager.h>
Public Member Functions | |
MeshManager (const MPI_Comm &comm) | |
Constructor for MeshManager. | |
template<typename TriangulationType > | |
void | generate_mesh (TriangulationType &tria, const std::string &grid_generator_function, const std::string &grid_generator_arguments, const unsigned int n_refinements, const bool use_tetrahedral_mesh) |
Generate mesh using deal.II grid generator. | |
void | load_source_mesh (parallel::fullydistributed::Triangulation< dim, spacedim > &source_mesh, const std::string &source_file="") |
Load source mesh from file into distributed triangulation. | |
void | load_target_mesh (Triangulation< dim, spacedim > &target_mesh) |
Load target mesh from file into serial triangulation. | |
void | load_mesh_at_level (parallel::fullydistributed::Triangulation< dim, spacedim > &source_mesh, DoFHandler< dim, spacedim > &dof_handler_source, const std::string &mesh_file) |
Load mesh at specific refinement level. | |
void | save_meshes (const parallel::fullydistributed::Triangulation< dim, spacedim > &source_mesh, const Triangulation< dim, spacedim > &target_mesh) |
Save source and target meshes to files. | |
template<typename TriangulationType > | |
bool | write_mesh (const TriangulationType &mesh, const std::string &filepath, const std::vector< std::string > &formats, const std::vector< double > *cell_data=nullptr, const std::string &data_name="cell_data") |
Write mesh to file in specified formats with optional cell data. | |
Static Public Member Functions | |
static std::vector< std::string > | get_mesh_hierarchy_files (const std::string &dir="output/data_multilevel/source_multilevel") |
Get sorted list of mesh hierarchy files. | |
Private Attributes | |
MPI_Comm | mpi_communicator |
const unsigned int | n_mpi_processes |
const unsigned int | this_mpi_process |
ConditionalOStream | pcout |
const std::string | mesh_directory = "output/data_mesh" |
Definition at line 24 of file MeshManager.h.
MeshManager< dim, spacedim >::MeshManager | ( | const MPI_Comm & | comm | ) |
Constructor for MeshManager.
comm | MPI communicator |
Definition at line 8 of file MeshManager.templates.h.
void MeshManager< dim, spacedim >::generate_mesh | ( | TriangulationType & | tria, |
const std::string & | grid_generator_function, | ||
const std::string & | grid_generator_arguments, | ||
const unsigned int | n_refinements, | ||
const bool | use_tetrahedral_mesh | ||
) |
Generate mesh using deal.II grid generator.
tria | Triangulation to generate |
grid_generator_function | Name of grid generator function |
grid_generator_arguments | Arguments for grid generator |
n_refinements | Number of global refinements |
use_tetrahedral_mesh | Whether to convert to tetrahedral mesh |
Definition at line 17 of file MeshManager.templates.h.
void MeshManager< dim, spacedim >::load_source_mesh | ( | parallel::fullydistributed::Triangulation< dim, spacedim > & | source_mesh, |
const std::string & | source_file = "" |
||
) |
Load source mesh from file into distributed triangulation.
source_mesh | Distributed triangulation to load into |
source_file | Optional path to source mesh file. If not provided, defaults to mesh_directory/source.[vtk|msh] |
Definition at line 81 of file MeshManager.templates.h.
void MeshManager< dim, spacedim >::load_target_mesh | ( | Triangulation< dim, spacedim > & | target_mesh | ) |
Load target mesh from file into serial triangulation.
target_mesh | Serial triangulation to load into |
Definition at line 158 of file MeshManager.templates.h.
void MeshManager< dim, spacedim >::load_mesh_at_level | ( | parallel::fullydistributed::Triangulation< dim, spacedim > & | source_mesh, |
DoFHandler< dim, spacedim > & | dof_handler_source, | ||
const std::string & | mesh_file | ||
) |
Load mesh at specific refinement level.
source_mesh | Distributed triangulation to load into |
dof_handler_source | DoF handler for the mesh |
mesh_file | Path to mesh file |
Definition at line 202 of file MeshManager.templates.h.
void MeshManager< dim, spacedim >::save_meshes | ( | const parallel::fullydistributed::Triangulation< dim, spacedim > & | source_mesh, |
const Triangulation< dim, spacedim > & | target_mesh | ||
) |
Save source and target meshes to files.
source_mesh | Distributed source triangulation |
target_mesh | Serial target triangulation |
Definition at line 276 of file MeshManager.templates.h.
bool MeshManager< dim, spacedim >::write_mesh | ( | const TriangulationType & | mesh, |
const std::string & | filepath, | ||
const std::vector< std::string > & | formats, | ||
const std::vector< double > * | cell_data = nullptr , |
||
const std::string & | data_name = "cell_data" |
||
) |
Write mesh to file in specified formats with optional cell data.
mesh | Triangulation to write |
filepath | Base path for output files (without extension) |
formats | Vector of output formats ("vtk", "msh", "vtu") |
cell_data | Optional vector of cell data to include |
data_name | Name for the cell data field |
Definition at line 292 of file MeshManager.templates.h.
|
static |
Get sorted list of mesh hierarchy files.
dir | Directory containing hierarchy files |
Definition at line 377 of file MeshManager.templates.h.
|
private |
Definition at line 104 of file MeshManager.h.
|
private |
Definition at line 105 of file MeshManager.h.
|
private |
Definition at line 106 of file MeshManager.h.
|
private |
Definition at line 107 of file MeshManager.h.
|
private |
Definition at line 110 of file MeshManager.h.