![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <core/manifolds.h>#include <core/parameters.h>#include <core/periodic_boundary.h>#include <deal.II/distributed/tria_base.h>Go to the source code of this file.
Functions | |
| template<int dim, int spacedim = dim> | |
| void | attach_grid_to_triangulation (Triangulation< dim, spacedim > &triangulation, const Parameters::Mesh< dim, spacedim > &mesh_parameters) |
| template<int dim, int spacedim = dim> | |
| void | setup_periodic_boundary_conditions (parallel::DistributedTriangulationBase< dim, spacedim > &triangulation, const Parameters::PeriodicBoundaries &periodic_boundaries) |
| template<int dim, int spacedim = dim> | |
| void | read_mesh_and_manifolds (parallel::DistributedTriangulationBase< dim, spacedim > &triangulation, const Parameters::Mesh< dim, spacedim > &mesh_parameters, const Parameters::Manifolds &manifolds_parameters, bool restart, const Parameters::PeriodicBoundaries &periodic_boundaries) |
| template<int dim, int spacedim = dim> | |
| void | read_mesh_and_manifolds_for_stator_and_rotor (parallel::DistributedTriangulationBase< dim, spacedim > &triangulation, const Parameters::Mesh< dim, spacedim > &mesh_parameters, const Parameters::Manifolds &manifolds_parameters, bool restart, const Parameters::PeriodicBoundaries &periodic_boundaries, const Parameters::Mortar< dim > &mortar_parameters) |
| template<int dim, int spacedim = dim> | |
| void | refine_triangulation_at_boundaries (const std::vector< int > &boundary_ids, const unsigned int n_refinement, parallel::DistributedTriangulationBase< dim, spacedim > &triangulation) |
| template<int dim, int spacedim = dim> | |
| void | build_refinement_box_triangulation (const Parameters::Mesh< dim, spacedim > &box_mesh_parameters, Triangulation< dim, spacedim > &box_triangulation) |
| template<int dim, int spacedim = dim> | |
| void | apply_mesh_transformation (const Parameters::Mesh< dim, spacedim > &mesh_parameters, Triangulation< dim, spacedim > &triangulation) |
| void apply_mesh_transformation | ( | const Parameters::Mesh< dim, spacedim > & | mesh_parameters, |
| Triangulation< dim, spacedim > & | triangulation ) |
Apply scaling, rotation and translation to the mesh in the listed order.
| dim | An integer that denotes the dimensionality of the geometry. |
| spacedim | An integer that denotes the dimension of the space occupied by the embedded geometry. |
| [in] | mesh_parameters | Parameters of the mesh. |
| [in,out] | triangulation | Triangulation object on which the mesh transformations are applied. |
Definition at line 728 of file grids.cc.
References Parameters::Mesh< dim, spacedim >::rotation_angle, Parameters::Mesh< dim, spacedim >::rotation_axis, Parameters::Mesh< dim, spacedim >::scale, and Parameters::Mesh< dim, spacedim >::translation.
| void attach_grid_to_triangulation | ( | Triangulation< dim, spacedim > & | triangulation, |
| const Parameters::Mesh< dim, spacedim > & | mesh_parameters ) |
Attaches a grid to a triangulation using mesh parameters.
| [in,out] | triangulation | The triangulation to which a grid is attached |
| [in] | mesh_parameters | The mesh parameters used to decide what type of mesh or primitive is used |
Definition at line 96 of file grids.cc.
References apply_mesh_transformation(), check_file_exists(), Parameters::Mesh< dim, spacedim >::dealii, Parameters::Mesh< dim, spacedim >::file_name, Parameters::Mesh< dim, spacedim >::gmsh, Parameters::Mesh< dim, spacedim >::grid_arguments, Parameters::Mesh< dim, spacedim >::grid_type, Parameters::Mesh< dim, spacedim >::initial_refinement, Parameters::Mesh< dim, spacedim >::lethe, GridBirminghamFluidizedBed< dim, spacedim >::make_grid(), GridCubeMerged< dim, spacedim >::make_grid(), GridFicheraOven< dim, spacedim >::make_grid(), GridImpingingJetMixer< dim, spacedim >::make_grid(), GridPeriodicHills< dim, spacedim >::make_grid(), GridUniformChannelWithMeshedCylinder< dim, spacedim >::make_grid(), GridUniformChannelWithMeshedSquarePrism< dim, spacedim >::make_grid(), Parameters::Mesh< dim, spacedim >::scale, Parameters::Mesh< dim, spacedim >::simplex, Parameters::Mesh< dim, spacedim >::type, and warn_if_scaling_curved_manifolds().
| void build_refinement_box_triangulation | ( | const Parameters::Mesh< dim, spacedim > & | box_mesh_parameters, |
| Triangulation< dim, spacedim > & | box_triangulation ) |
Build the triangulation which delimits a mesh refinement box.
The box is described by a full set of mesh parameters, so any mesh type supported by attach_grid_to_triangulation() can be used to delimit a refinement region. The initial refinement of the box mesh is applied here, so the resulting triangulation is ready to be used to flag cells.
| [in] | box_mesh_parameters | The mesh parameters describing the box |
| [in,out] | box_triangulation | The triangulation which will hold the box mesh |
Definition at line 712 of file grids.cc.
References attach_grid_to_triangulation(), Parameters::Mesh< dim, spacedim >::initial_refinement, and Parameters::Mesh< dim, spacedim >::simplex.
| void read_mesh_and_manifolds | ( | parallel::DistributedTriangulationBase< dim, spacedim > & | triangulation, |
| const Parameters::Mesh< dim, spacedim > & | mesh_parameters, | ||
| const Parameters::Manifolds & | manifolds_parameters, | ||
| bool | restart, | ||
| const Parameters::PeriodicBoundaries & | periodic_boundaries ) |
Completely sets up a mesh and its manifolds.
This function reads and constructs a mesh according to the given mesh parameters, sets up manifolds on boundaries, and applies boundary conditions. It is intended for distributed triangulations.
| dim | The topological dimension of the mesh. |
| spacedim | The embedding space dimension (default = dim). |
| [in,out] | triangulation | The triangulation to which the grid will be attached. |
| [in] | mesh_parameters | Parameters defining the mesh or primitive to use. |
| [in] | manifolds_parameters | Information about the manifolds attached to boundaries. |
| [in] | restart | Flag indicating whether this is a restart. |
| [in] | periodic_boundaries | The periodic boundary pairs and their direction of periodicity, used to set up the periodicity of the domain. |
Definition at line 447 of file grids.cc.
References apply_initial_refinement(), attach_grid_to_triangulation(), attach_manifolds_to_triangulation(), Parameters::Mesh< dim, spacedim >::gmsh, Parameters::Manifolds::ids, setup_periodic_boundary_conditions(), and Parameters::Mesh< dim, spacedim >::type.
| void read_mesh_and_manifolds_for_stator_and_rotor | ( | parallel::DistributedTriangulationBase< dim, spacedim > & | triangulation, |
| const Parameters::Mesh< dim, spacedim > & | mesh_parameters, | ||
| const Parameters::Manifolds & | manifolds_parameters, | ||
| bool | restart, | ||
| const Parameters::PeriodicBoundaries & | periodic_boundaries, | ||
| const Parameters::Mortar< dim > & | mortar_parameters ) |
Completely sets up a mesh and its manifolds for rotor-stator domains.
The triangulation initially contains the stator triangulation, which is later replaced by the merged rotor-stator triangulation.
| dim | The topological dimension of the mesh. |
| spacedim | The embedding space dimension (default = dim). |
| [in,out] | triangulation | The triangulation to which the grid will be attached. |
| [in] | mesh_parameters | Parameters defining the mesh or primitive to use. |
| [in] | manifolds_parameters | Information about the manifolds attached to boundaries. |
| [in] | restart | Flag indicating whether this is a restart. |
| [in] | periodic_boundaries | The periodic boundary pairs and their direction of periodicity, used to set up the periodicity of the domain. |
| [in] | mortar_parameters | Parameters controlling the mortar method, including rotor mesh info. |
Definition at line 501 of file grids.cc.
References apply_initial_refinement(), attach_grid_to_triangulation(), attach_manifolds_to_triangulation(), Parameters::Mesh< dim, spacedim >::dealii, Parameters::Mesh< dim, spacedim >::gmsh, Parameters::Manifolds::ids, Parameters::Mortar< dim >::interface_type, Parameters::Mortar< dim >::linear, Parameters::Mortar< dim >::rotor_boundary_id, Parameters::Mortar< dim >::rotor_mesh, setup_periodic_boundary_conditions(), Parameters::Mortar< dim >::stator_boundary_id, and Parameters::Mesh< dim, spacedim >::type.
| void refine_triangulation_at_boundaries | ( | const std::vector< int > & | boundary_ids, |
| const unsigned int | n_refinement, | ||
| parallel::DistributedTriangulationBase< dim, spacedim > & | triangulation ) |
Refine a mesh around specific boundary ids.
| [in] | n_refinement | The number of times the boundary should be refined |
| [in] | boundary_ids | The boundary ids for which the cells should be refined |
| [in,out] | triangulation | The triangulation on which refinement must be carried out |
| void setup_periodic_boundary_conditions | ( | parallel::DistributedTriangulationBase< dim, spacedim > & | triangulation, |
| const Parameters::PeriodicBoundaries & | periodic_boundaries ) |
Modifies the triangulation to set up its periodic boundary conditions.
The periodic boundary information is the part of the boundary conditions that is shared by the CFD and the DEM solvers, so this function is used by both.
| [in,out] | triangulation | The triangulation to which a grid is attached |
| [in] | periodic_boundaries | The periodic boundary pairs and their direction of periodicity. This is used to set up the periodicity of the domain |