![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <particle_projector.h>
Public Member Functions | |
| ParticleFieldQCM (parallel::DistributedTriangulationBase< dim > *triangulation, const unsigned int fe_degree, const bool simplex, const bool neumann_boundaries, const bool conservative_projection) | |
| void | setup_dofs () |
Public Attributes | |
| std::shared_ptr< DoFHandler< dim > > | dof_handler |
| LinearAlgebra::distributed::Vector< double > | particle_field_solution |
| std::shared_ptr< FESystem< dim > > | fe |
| IndexSet | locally_owned_dofs |
| IndexSet | locally_relevant_dofs |
| TrilinosWrappers::SparseMatrix | system_matrix |
| LinearAlgebra::distributed::Vector< double > | system_rhs |
| AffineConstraints< double > | particle_field_constraints |
| std::shared_ptr< TrilinosWrappers::PreconditionILU > | ilu_preconditioner |
| const bool | neumann_boundaries |
| const bool | conservative_projection |
| bool | matrix_requires_assembly |
| bool | multigrid_level_dofs_required = false |
ParticleFieldQCM calculator. This class stores the required information for the calculation of a field or a particle-fluid interaction onto a mesh. This class does not solve any equation, but compartmentalize the necessary information for the projection of the particle field or interaction onto a mesh. Multiple instances of this function can be called to establish new projections.In the case of a particle-fluid interaction, there is no particle field to project and, consequently, the property_start_index parameter is given an invalid default value (-1).
| dim | An integer that denotes the number of spatial dimensions. |
| n_components | The number of components in the field. This number should be either 1 (a scalar) or dim (a Tensor<1,dim>) |
| property_start_index | An integer that indicates at which particle property the field starts. If the propery_start_index is negative, then there is no property start and this project is not used to project a particle field. |
Definition at line 153 of file particle_projector.h.
|
inline |
Constructor.
| triangulation | The triangulation on which the particles reside |
| fe_degree | The finite element degree used to interpolate the field |
| simplex | A flag to indicate if the simulations are being done with simplex elements. |
| neumann_boundaries | A flag to indicate what to do with cells that do not contain particles. If the neumann_boundaries is set to true, then cells without particles do not have a mass matrix assembled. This corresponds to setting a neumann boundary at the cells which do not contain particles. |
| conservative_projection | A flag to indicate if the projection of the field must be conservative. When a projection is conservative, the integral of the field over the triangulation will be strictly equal to the field summed over all particles. This is useful when projecting a quantity such as the force acting on the particles. When conservative is put to false, the projection is meant to be a smooth representation of the particle information and does not conserve it. |
Definition at line 174 of file particle_projector.h.
References conservative_projection, dof_handler, fe, matrix_requires_assembly, and neumann_boundaries.
| void ParticleFieldQCM< dim, n_components, component_start >::setup_dofs | ( | ) |
Setup the degrees of freedom. This function allocates the necessary memory.
Definition at line 34 of file particle_projector.cc.
References dof_handler, fe, locally_owned_dofs, locally_relevant_dofs, matrix_requires_assembly, multigrid_level_dofs_required, particle_field_constraints, particle_field_solution, system_matrix, and system_rhs.
| const bool ParticleFieldQCM< dim, n_components, property_start_index >::conservative_projection |
Boolean that indicates if the projection is conservative. If the projection is conservative, the integral over the domain of the field will recover the sum of the field over all particles.
Definition at line 238 of file particle_projector.h.
| std::shared_ptr<DoFHandler<dim> > ParticleFieldQCM< dim, n_components, property_start_index >::dof_handler |
DoFHandler that manages the particle field. It is stored as a shared pointer so that it can be provided to the multiphysics interface.
Definition at line 198 of file particle_projector.h.
| std::shared_ptr<FESystem<dim> > ParticleFieldQCM< dim, n_components, property_start_index >::fe |
Finite element for the particle field.
Definition at line 204 of file particle_projector.h.
| std::shared_ptr<TrilinosWrappers::PreconditionILU> ParticleFieldQCM< dim, n_components, property_start_index >::ilu_preconditioner |
Preconditioner used when solving the L2 projection. This preconditioner is stored within the class since there are situations where the matrix is kept for multiple iterations. Consequently, there is no point in reassembling the preconditioner for these iterations.
Definition at line 227 of file particle_projector.h.
| IndexSet ParticleFieldQCM< dim, n_components, property_start_index >::locally_owned_dofs |
Index set for the locally owned degree of freedoms.
Definition at line 207 of file particle_projector.h.
| IndexSet ParticleFieldQCM< dim, n_components, property_start_index >::locally_relevant_dofs |
Index set for the locally relevant degree of freedoms.
Definition at line 210 of file particle_projector.h.
| bool ParticleFieldQCM< dim, n_components, property_start_index >::matrix_requires_assembly |
When a projection does not have neumann_boundaries, the matrix for the system is constant in time. Consequently, there is no point in assembling the matrix and initializing the preconditioner. This flag monitors if the matrix has already been assembled. It is reset every time setup_dofs() is called for the projector.
Definition at line 245 of file particle_projector.h.
| bool ParticleFieldQCM< dim, n_components, property_start_index >::multigrid_level_dofs_required = false |
When set to true, setup_dofs() will additionally call distribute_mg_dofs() on the underlying DoFHandler. This is required by local-smoothing multigrid (LSMG) so that the field can be interpolated to every triangulation level.
Definition at line 251 of file particle_projector.h.
| const bool ParticleFieldQCM< dim, n_components, property_start_index >::neumann_boundaries |
Boolean that indicates if Neumann boundary conditions are used during the projection In this case, instead of assuming a value of zero if there are no particles, the mass matrix is cancelled in region without particles which results in a no flux zone.
Definition at line 233 of file particle_projector.h.
| AffineConstraints<double> ParticleFieldQCM< dim, n_components, property_start_index >::particle_field_constraints |
Constraints used for the boundary conditions of the particle field.
Definition at line 221 of file particle_projector.h.
| LinearAlgebra::distributed::Vector<double> ParticleFieldQCM< dim, n_components, property_start_index >::particle_field_solution |
deal.II vector for the particle field solution.
Definition at line 201 of file particle_projector.h.
| TrilinosWrappers::SparseMatrix ParticleFieldQCM< dim, n_components, property_start_index >::system_matrix |
System matrix used to assemble the smoothed L2 projection of the void fraction
Definition at line 214 of file particle_projector.h.
| LinearAlgebra::distributed::Vector<double> ParticleFieldQCM< dim, n_components, property_start_index >::system_rhs |
Right-hand side used to assemble the smoothed L2 projection of the void fraction
Definition at line 218 of file particle_projector.h.