![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <solid_base.h>
Public Member Functions | |
| SolidBase (std::shared_ptr< Parameters::NitscheObject< spacedim > > ¶m, const std::shared_ptr< parallel::DistributedTriangulationBase< spacedim > > &fluid_tria, const std::shared_ptr< Mapping< spacedim > > &fluid_mapping) | |
| void | initial_setup () |
| void | setup_triangulation (const bool restart) |
| void | setup_displacement () |
| void | setup_particles_handler () |
| void | setup_particles () |
| void | load_triangulation (const std::string &filename_tria) |
| void | load_particles (const std::string &filename_part) |
| std::shared_ptr< Particles::ParticleHandler< spacedim > > & | get_solid_particle_handler () |
| std::shared_ptr< parallel::DistributedTriangulationBase< dim, spacedim > > | get_solid_triangulation () |
| DoFHandler< dim, spacedim > & | get_solid_dof_handler () |
| DoFHandler< dim, spacedim > & | get_displacement_dof_handler () |
| GlobalVectorType & | get_displacement_vector () |
| Function< spacedim > * | get_solid_velocity () |
| Function< spacedim > * | get_solid_temperature () |
| void | integrate_velocity (double time_step, double initial_time) |
| void | move_solid_triangulation (double time_step, double initial_time) |
| void | move_solid_triangulation_with_displacement () |
| void | print_particle_positions () |
| void | rotate_grid (const double angle, const Tensor< 1, spacedim > &axis) |
| void | translate_grid (const Tensor< 1, spacedim > &translate) |
| void | update_temperature_time (double time) |
| void | read_checkpoint (const std::string &prefix_name) |
| void | write_checkpoint (const std::string &prefix_name) |
Private Attributes | |
| IndexSet | locally_owned_dofs |
| IndexSet | locally_relevant_dofs |
| MPI_Comm | mpi_communicator |
| const unsigned int | n_mpi_processes |
| const unsigned int | this_mpi_process |
| std::shared_ptr< parallel::DistributedTriangulationBase< dim, spacedim > > | solid_tria |
| std::shared_ptr< parallel::DistributedTriangulationBase< spacedim > > | fluid_tria |
| DoFHandler< dim, spacedim > | solid_dh |
| std::shared_ptr< Particles::ParticleHandler< spacedim > > | solid_particle_handler |
| std::shared_ptr< FiniteElement< dim, spacedim > > | fe |
| std::shared_ptr< Mapping< dim, spacedim > > | solid_mapping |
| std::shared_ptr< Mapping< spacedim > > | fluid_mapping |
| std::shared_ptr< Quadrature< dim > > | quadrature |
| DoFHandler< dim, spacedim > | displacement_dh |
| std::shared_ptr< FESystem< dim, spacedim > > | displacement_fe |
| GlobalVectorType | displacement |
| GlobalVectorType | displacement_relevant |
| std::shared_ptr< Parameters::NitscheObject< spacedim > > & | param |
| Function< spacedim > * | velocity |
| Function< spacedim > * | temperature |
| unsigned int | initial_number_of_particles |
A base class that generates a particle handler for the solid
| dim | An integer that denotes the dimension of the space in which the flow is solved |
| spacedim | An integer that denotes the dimension of the space occupied by the embedded solid |
Definition at line 37 of file solid_base.h.
| SolidBase< dim, spacedim >::SolidBase | ( | std::shared_ptr< Parameters::NitscheObject< spacedim > > & | param, |
| const std::shared_ptr< parallel::DistributedTriangulationBase< spacedim > > & | fluid_tria, | ||
| const std::shared_ptr< Mapping< spacedim > > & | fluid_mapping ) |
Definition at line 38 of file solid_base.cc.
References displacement_dh, fluid_mapping, fluid_tria, mpi_communicator, n_mpi_processes, param, solid_dh, temperature, this_mpi_process, and velocity.
| DoFHandler< dim, spacedim > & SolidBase< dim, spacedim >::get_displacement_dof_handler | ( | ) |
Definition at line 399 of file solid_base.cc.
References displacement_dh.
| GlobalVectorType & SolidBase< dim, spacedim >::get_displacement_vector | ( | ) |
Definition at line 407 of file solid_base.cc.
References displacement, and displacement_relevant.
| DoFHandler< dim, spacedim > & SolidBase< dim, spacedim >::get_solid_dof_handler | ( | ) |
Definition at line 392 of file solid_base.cc.
References solid_dh.
| std::shared_ptr< Particles::ParticleHandler< spacedim > > & SolidBase< dim, spacedim >::get_solid_particle_handler | ( | ) |
Definition at line 415 of file solid_base.cc.
References solid_particle_handler.
| Function< spacedim > * SolidBase< dim, spacedim >::get_solid_temperature | ( | ) |
Definition at line 435 of file solid_base.cc.
References temperature.
| std::shared_ptr< parallel::DistributedTriangulationBase< dim, spacedim > > SolidBase< dim, spacedim >::get_solid_triangulation | ( | ) |
Definition at line 422 of file solid_base.cc.
References solid_tria.
| Function< spacedim > * SolidBase< dim, spacedim >::get_solid_velocity | ( | ) |
Definition at line 429 of file solid_base.cc.
References velocity.
| void SolidBase< dim, spacedim >::initial_setup | ( | ) |
Manages solid triangulation and particles setup.
Definition at line 97 of file solid_base.cc.
References setup_displacement(), setup_particles(), and setup_triangulation().
| void SolidBase< dim, spacedim >::integrate_velocity | ( | double | time_step, |
| double | initial_time ) |
Updates particle positions in solid_particle_handler by integrating velocity using an explicit Runge-Kutta 4 method.
| time_step | The time_step value for this iteration |
| initial_time | The initial time (time t) of the timestep. This is used to set the time of the velocity function. |
Definition at line 449 of file solid_base.cc.
References initial_number_of_particles, param, solid_particle_handler, this_mpi_process, and velocity.
| void SolidBase< dim, spacedim >::load_particles | ( | const std::string & | filename_part | ) |
Loads a particle handler in the fluid triangulation domain that holds the particles of the solid according to a specific quadrature, and sets up dofs.
Definition at line 369 of file solid_base.cc.
References check_file_exists(), initial_number_of_particles, setup_particles_handler(), and solid_particle_handler.
| void SolidBase< dim, spacedim >::load_triangulation | ( | const std::string & | filename_tria | ) |
Loads a solid triangulation from a restart file.
Definition at line 254 of file solid_base.cc.
References fe, solid_dh, and solid_tria.
| void SolidBase< dim, spacedim >::move_solid_triangulation | ( | double | time_step, |
| double | initial_time ) |
Moves the vertices of the solid triangulation. This function uses an Runge-Kutta 4 explicit time integrator to displace the vertices of the solid triangulation and stores the displacement in an array in order to allow correct checkpointing of the triangulation. See https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods for more details.
| time_step | The time_step value for this iteration |
| initial_time | The initial time (time t) of the timestep. This is used to set the time of the velocity function. |
Definition at line 555 of file solid_base.cc.
References displacement, displacement_dh, displacement_fe, solid_tria, and velocity.
| void SolidBase< dim, spacedim >::move_solid_triangulation_with_displacement | ( | ) |
Moves the dofs of the solid_triangulation by using the displacement vector. This is only use to move the solid triangulation at the correct location when the simulation is restarted.
Definition at line 637 of file solid_base.cc.
References displacement_dh, displacement_fe, and displacement_relevant.
| void SolidBase< dim, spacedim >::print_particle_positions | ( | ) |
prints the positions of the particles
Definition at line 671 of file solid_base.cc.
References solid_particle_handler.
| void SolidBase< dim, spacedim >::read_checkpoint | ( | const std::string & | prefix_name | ) |
read solid base triangulation checkpoint
Definition at line 732 of file solid_base.cc.
References check_file_exists(), displacement, displacement_dh, displacement_relevant, fe, initial_number_of_particles, move_solid_triangulation_with_displacement(), param, setup_displacement(), setup_particles_handler(), setup_triangulation(), solid_dh, solid_particle_handler, and solid_tria.
| void SolidBase< dim, spacedim >::rotate_grid | ( | const double | angle, |
| const Tensor< 1, spacedim > & | axis ) |
Rotates the grid by a given angle around an axis.
| angle | The angle (in rad) with which the grid is rotated |
| axis | The axis over which the grid is rotated. |
Definition at line 235 of file solid_base.cc.
References solid_tria.
| void SolidBase< dim, spacedim >::setup_displacement | ( | ) |
Sets-up particles with particle handler, in the fluid triangulation domain that holds the particles of the solid according to a specific quadrature.
Definition at line 803 of file solid_base.cc.
References displacement, displacement_dh, displacement_fe, displacement_relevant, locally_owned_dofs, locally_relevant_dofs, and mpi_communicator.
| void SolidBase< dim, spacedim >::setup_particles | ( | ) |
Sets-up particles with particle handler, in the fluid triangulation domain that holds the particles of the solid according to a specific quadrature.
Definition at line 289 of file solid_base.cc.
References fe, fluid_tria, initial_number_of_particles, mpi_communicator, quadrature, setup_particles_handler(), solid_dh, solid_mapping, solid_particle_handler, and solid_tria.
| void SolidBase< dim, spacedim >::setup_particles_handler | ( | ) |
Creates a particle handler in the fluid triangulation domain.
Definition at line 276 of file solid_base.cc.
References fluid_mapping, fluid_tria, and solid_particle_handler.
| void SolidBase< dim, spacedim >::setup_triangulation | ( | const bool | restart | ) |
Generates a solid triangulation from a dealii or gmsh mesh.
Definition at line 110 of file solid_base.cc.
References check_file_exists(), Parameters::Mesh< dim, spacedim >::dealii, fe, Parameters::Mesh< dim, spacedim >::gmsh, param, rotate_grid(), solid_dh, solid_tria, and translate_grid().
| void SolidBase< dim, spacedim >::translate_grid | ( | const Tensor< 1, spacedim > & | translate | ) |
Translate the grid. In spacedim=2, the third component is ignore.
| translate | The vector with which the solid is translated. |
Definition at line 247 of file solid_base.cc.
References solid_tria.
| void SolidBase< dim, spacedim >::update_temperature_time | ( | double | time | ) |
Updates the time in the function used to describe the solid temperature.
Definition at line 442 of file solid_base.cc.
References temperature.
| void SolidBase< dim, spacedim >::write_checkpoint | ( | const std::string & | prefix_name | ) |
write solid base triangulation checkpoint
Definition at line 695 of file solid_base.cc.
References displacement, displacement_dh, displacement_relevant, solid_particle_handler, and solid_tria.
|
private |
Definition at line 234 of file solid_base.h.
|
private |
Definition at line 232 of file solid_base.h.
|
private |
Definition at line 233 of file solid_base.h.
|
private |
Definition at line 235 of file solid_base.h.
|
private |
Definition at line 225 of file solid_base.h.
|
private |
Definition at line 228 of file solid_base.h.
|
private |
Definition at line 221 of file solid_base.h.
|
private |
Definition at line 243 of file solid_base.h.
|
private |
Definition at line 212 of file solid_base.h.
|
private |
Definition at line 213 of file solid_base.h.
|
private |
Definition at line 215 of file solid_base.h.
|
private |
Definition at line 216 of file solid_base.h.
|
private |
Definition at line 238 of file solid_base.h.
|
private |
Definition at line 229 of file solid_base.h.
|
private |
Definition at line 222 of file solid_base.h.
|
private |
Definition at line 227 of file solid_base.h.
|
private |
Definition at line 223 of file solid_base.h.
|
private |
Definition at line 220 of file solid_base.h.
|
private |
Definition at line 241 of file solid_base.h.
|
private |
Definition at line 217 of file solid_base.h.
|
private |
Definition at line 240 of file solid_base.h.