Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
MFNavierStokesVANSPreconditionGMG< dim > Class Template Reference

#include <fluid_dynamics_vans_matrix_free.h>

Inheritance diagram for MFNavierStokesVANSPreconditionGMG< dim >:
[legend]

Public Types

using VectorType = typename MFNavierStokesPreconditionGMG<dim>::VectorType
using MGVectorType
using MGNumber = typename MFNavierStokesPreconditionGMG<dim>::MGNumber
using GCTransferType = MGTransferGlobalCoarsening<dim, MGVectorType>
using LSTransferType = MGTransferMatrixFree<dim, MGNumber>
Public Types inherited from MFNavierStokesPreconditionGMG< dim >
using VectorType
using MGVectorType
using MGNumber = typename MFNavierStokesPreconditionGMGBase<dim>::MGNumber
using GCTransferType = MGTransferGlobalCoarsening<dim, MGVectorType>

Public Member Functions

 MFNavierStokesVANSPreconditionGMG (const CFDDEMSimulationParameters< dim > &param, const DoFHandler< dim > &dof_handler, const DoFHandler< dim > &dof_handler_fe_q_iso_q1)
void create_level_operator (const unsigned int level) override
template<typename PropertiesIndex>
void initialize (const std::shared_ptr< SimulationControl > &simulation_control, FlowControl< dim > &flow_control, const VectorType &present_solution, const VectorType &time_derivative_previous_solutions, const VectorType &time_derivative_void_fraction, const ParticleProjector< dim, PropertiesIndex > &particle_projector)
Public Member Functions inherited from MFNavierStokesPreconditionGMG< dim >
 MFNavierStokesPreconditionGMG (const SimulationParameters< dim > &simulation_parameters, const DoFHandler< dim > &dof_handler, const DoFHandler< dim > &dof_handler_fe_q_iso_q1)
void initialize (const std::shared_ptr< SimulationControl > &simulation_control, FlowControl< dim > &flow_control, const VectorType &present_solution, const VectorType &time_derivative_previous_solutions)
void initialize_auxiliary_physics (const DoFHandler< dim > &temperature_dof_handler, const VectorType &temperature_present_solution)
Public Member Functions inherited from MFNavierStokesPreconditionGMGBase< dim >
 MFNavierStokesPreconditionGMGBase (const SimulationParameters< dim > &simulation_parameters, const DoFHandler< dim > &dof_handler, const DoFHandler< dim > &dof_handler_fe_q_iso_q1)
virtual ~MFNavierStokesPreconditionGMGBase ()=default
void reinit (const std::shared_ptr< Mapping< dim > > &mapping, const std::shared_ptr< Quadrature< dim > > &cell_quadrature, const std::shared_ptr< Function< dim > > &forcing_function, const std::shared_ptr< SimulationControl > &simulation_control, const std::shared_ptr< PhysicalPropertiesManager > &physical_properties_manager, const std::shared_ptr< FESystem< dim > > &fe)
void initialize ()
void vmult (VectorType &dst, const VectorType &src) const
void print_relevant_info () const
const MGLevelObject< std::shared_ptr< OperatorType > > & get_mg_operators () const
const MGLevelObject< std::shared_ptr< PreconditionBase< MGVectorType > > > & get_mg_smoother_preconditioners () const

Private Attributes

const CFDDEMSimulationParameters< dim > & cfd_dem_simulation_parameters
MGLevelObject< DoFHandler< dim > > void_fraction_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_void_fraction
std::shared_ptr< GCTransferType > mg_transfer_gc_void_fraction
MGLevelObject< DoFHandler< dim > > pf_force_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_pf_force
std::shared_ptr< GCTransferType > mg_transfer_gc_pf_force
MGLevelObject< DoFHandler< dim > > pf_drag_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_pf_drag
std::shared_ptr< GCTransferType > mg_transfer_gc_pf_drag
MGLevelObject< DoFHandler< dim > > particle_velocity_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_particle_velocity
std::shared_ptr< GCTransferType > mg_transfer_gc_particle_velocity
MGLevelObject< DoFHandler< dim > > momentum_transfer_coefficient_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_momentum_transfer_coefficient
std::shared_ptr< GCTransferType > mg_transfer_gc_momentum_transfer_coefficient
std::shared_ptr< LSTransferType > mg_transfer_ls_void_fraction
std::shared_ptr< LSTransferType > mg_transfer_ls_pf_force
std::shared_ptr< LSTransferType > mg_transfer_ls_pf_drag
std::shared_ptr< LSTransferType > mg_transfer_ls_particle_velocity
std::shared_ptr< LSTransferType > mg_transfer_ls_momentum_transfer_coefficient

Additional Inherited Members

Public Attributes inherited from MFNavierStokesPreconditionGMGBase< dim >
TimerOutput mg_setup_timer
TimerOutput mg_vmult_timer
Protected Types inherited from MFNavierStokesPreconditionGMGBase< dim >
using Number = double
using MGNumber = double
using VectorType = LinearAlgebra::distributed::Vector<Number>
using MGVectorType = LinearAlgebra::distributed::Vector<MGNumber>
using TrilinosVectorType = LinearAlgebra::distributed::Vector<double>
using LSTransferType = MGTransferMatrixFreeWrapper<dim, MGNumber>
using GCTransferType = MGTransferGlobalCoarsening<dim, MGVectorType>
using OperatorType = NavierStokesOperatorBase<dim, MGNumber>
using SmootherPreconditionerType = PreconditionBase<MGVectorType>
using SmootherType
using ChebyshevSmootherType
using PreconditionerTypeLS
using PreconditionerTypeGC
using CoarseGridSolverApply
Protected Member Functions inherited from MFNavierStokesPreconditionGMGBase< dim >
void setup_AMG ()
void setup_ILU ()
Protected Attributes inherited from MFNavierStokesPreconditionGMGBase< dim >
unsigned int minlevel
unsigned int maxlevel
unsigned int intlevel
std::vector< std::shared_ptr< const Triangulation< dim > > > coarse_grid_triangulations
MGLevelObject< DoFHandler< dim > > dof_handlers
MGLevelObject< std::shared_ptr< MappingQCache< dim > > > mappings
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers
MGLevelObject< std::shared_ptr< OperatorType > > mg_operators
std::shared_ptr< mg::Matrix< MGVectorType > > mg_matrix
std::shared_ptr< mg::Matrix< MGVectorType > > mg_interface_matrix_in
MGLevelObject< MatrixFreeOperators::MGInterfaceOperator< OperatorType > > ls_mg_operators
MGLevelObject< MatrixFreeOperators::MGInterfaceOperator< OperatorType > > ls_mg_interface_in
MGLevelObject< std::shared_ptr< PreconditionBase< MGVectorType > > > mg_smoother_preconditioners
std::shared_ptr< MGSmootherBase< MGVectorType > > mg_smoother
MGLevelObject< MGConstrainedDoFs > mg_constrained_dofs
std::shared_ptr< LSTransferType > mg_transfer_ls
std::shared_ptr< GCTransferType > mg_transfer_gc
std::shared_ptr< PreconditionAdapter< MGVectorType, TrilinosVectorType > > coarse_grid_precondition
std::shared_ptr< SolverControl > coarse_grid_solver_control
std::shared_ptr< SolverControl > direct_solver_control
std::shared_ptr< SolverGMRES< TrilinosVectorType > > coarse_grid_solver
std::shared_ptr< MGCoarseGridBase< MGVectorType > > mg_coarse
std::shared_ptr< SolverControl > coarse_grid_solver_control_intermediate
std::shared_ptr< MGCoarseGridBase< MGVectorType > > mg_coarse_intermediate
std::shared_ptr< SolverGMRES< MGVectorType > > coarse_grid_solver_intermediate
std::shared_ptr< Multigrid< MGVectorType > > mg_intermediate
std::shared_ptr< PreconditionMG< dim, MGVectorType, GCTransferType > > gc_multigrid_preconditioner_intermediate
std::shared_ptr< PreconditionMG< dim, MGVectorType, LSTransferType > > ls_multigrid_preconditioner_intermediate
std::shared_ptr< Multigrid< MGVectorType > > mg
std::shared_ptr< PreconditionMG< dim, MGVectorType, LSTransferType > > ls_multigrid_preconditioner
std::shared_ptr< PreconditionMG< dim, MGVectorType, GCTransferType > > gc_multigrid_preconditioner
ConditionalOStream pcout
SimulationParameters< dim > simulation_parameters
const DoFHandler< dim > & dof_handler
DoFHandler< dim > dof_handler_fe_q_iso_q1
std::vector< unsigned int > coarse_grid_iterations
MGLevelObject< DoFHandler< dim > > temperature_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_temperature
std::shared_ptr< GCTransferType > mg_transfer_gc_temperature
bool use_manifold_for_normal

Detailed Description

template<int dim>
class MFNavierStokesVANSPreconditionGMG< dim >

A geometric multigrid preconditioner implementation for incompressible VANS equations.

Template Parameters
dimAn integer that denotes the dimension of the space in which the flow is solved

Definition at line 21 of file fluid_dynamics_vans_matrix_free.h.

Member Typedef Documentation

◆ GCTransferType

template<int dim>
using MFNavierStokesVANSPreconditionGMG< dim >::GCTransferType = MGTransferGlobalCoarsening<dim, MGVectorType>

Definition at line 33 of file fluid_dynamics_vans_matrix_free.h.

◆ LSTransferType

template<int dim>
using MFNavierStokesVANSPreconditionGMG< dim >::LSTransferType = MGTransferMatrixFree<dim, MGNumber>

Local-smoothing transfer used for the auxiliary (particle-projected) fields. The auxiliary fields live on a single triangulation that has multigrid level DoFs distributed, so a plain MGTransferMatrixFree is sufficient – they do not need to support hp-coarsening.

Definition at line 40 of file fluid_dynamics_vans_matrix_free.h.

◆ MGNumber

template<int dim>
using MFNavierStokesVANSPreconditionGMG< dim >::MGNumber = typename MFNavierStokesPreconditionGMG<dim>::MGNumber

Definition at line 29 of file fluid_dynamics_vans_matrix_free.h.

◆ MGVectorType

template<int dim>
using MFNavierStokesVANSPreconditionGMG< dim >::MGVectorType
Initial value:
typename MFNavierStokesPreconditionGMGBase< dim >::MGVectorType MGVectorType

Definition at line 27 of file fluid_dynamics_vans_matrix_free.h.

◆ VectorType

Useful aliases to improve readability.

Definition at line 26 of file fluid_dynamics_vans_matrix_free.h.

Constructor & Destructor Documentation

◆ MFNavierStokesVANSPreconditionGMG()

template<int dim>
MFNavierStokesVANSPreconditionGMG< dim >::MFNavierStokesVANSPreconditionGMG ( const CFDDEMSimulationParameters< dim > & param,
const DoFHandler< dim > & dof_handler,
const DoFHandler< dim > & dof_handler_fe_q_iso_q1 )

Constructor.

Parameters
[in]paramComplete set of parameters for the CFD-DEM or VANS simulations.
[in]dof_handlerDoFHandler used to solve the VANS equation.
[in]dof_handler_fe_q_iso_q1DoFHandler with degree=1 to be used in hp multigrid.

Definition at line 20 of file fluid_dynamics_vans_matrix_free.cc.

References cfd_dem_simulation_parameters, MFNavierStokesPreconditionGMGBase< dim >::dof_handler, MFNavierStokesPreconditionGMGBase< dim >::dof_handler_fe_q_iso_q1, and MFNavierStokesPreconditionGMG< dim >::MFNavierStokesPreconditionGMG().

Member Function Documentation

◆ create_level_operator()

template<int dim>
void MFNavierStokesVANSPreconditionGMG< dim >::create_level_operator ( const unsigned int level)
overridevirtual

Creates the operator on a given level.

Parameters
[in]levelLevel on which the operator is created..

Reimplemented from MFNavierStokesPreconditionGMG< dim >.

Definition at line 32 of file fluid_dynamics_vans_matrix_free.cc.

References cfd_dem_simulation_parameters, and MFNavierStokesPreconditionGMGBase< dim >::mg_operators.

◆ initialize()

template<int dim>
template<typename PropertiesIndex>
void MFNavierStokesVANSPreconditionGMG< dim >::initialize ( const std::shared_ptr< SimulationControl > & simulation_control,
FlowControl< dim > & flow_control,
const VectorType & present_solution,
const VectorType & time_derivative_previous_solutions,
const VectorType & time_derivative_void_fraction,
const ParticleProjector< dim, PropertiesIndex > & particle_projector )

Initializes the preconditioner.

Parameters
[in]simulation_controlSimulation control object which is used to obtain information on the time step.
[in]flow_controlFlow controller which is used to provide volume forcing in the flow.
[in]present_solutionCurrent solution for the VANS equation.
[in]time_derivative_previous_solutionsPre-calculated time derivative.
[in]particle_projectorManage for the void fraction. This is used to obtain the void fraction on the levels of the grid.
Template Parameters
PropertiesIndexIndex of the properties used within the ParticleHandler. Only the projected fields of the particle projector are used here, so this class itself does not depend on the properties index.

Definition at line 42 of file fluid_dynamics_vans_matrix_free.cc.

References ParticleFieldQCM< dim, n_components, property_start_index >::dof_handler, ParticleProjector< dim, PropertiesIndex >::dof_handler, MFNavierStokesPreconditionGMGBase< dim >::dof_handlers, ParticleProjector< dim, PropertiesIndex >::fluid_drag_on_particles, fluid_dynamics, ParticleProjector< dim, PropertiesIndex >::fluid_force_on_particles_two_way_coupling, Parameters::LinearSolver::gcmg, Parameters::LinearSolver::h, MFNavierStokesPreconditionGMGBase< dim >::initialize(), Parameters::LinearSolver::lsmg, MFNavierStokesPreconditionGMGBase< dim >::maxlevel, MFNavierStokesPreconditionGMGBase< dim >::mg_operators, mg_transfer_gc_momentum_transfer_coefficient, mg_transfer_gc_particle_velocity, mg_transfer_gc_pf_drag, mg_transfer_gc_pf_force, mg_transfer_gc_void_fraction, mg_transfer_ls_momentum_transfer_coefficient, mg_transfer_ls_particle_velocity, mg_transfer_ls_pf_drag, mg_transfer_ls_pf_force, mg_transfer_ls_void_fraction, MFNavierStokesPreconditionGMGBase< dim >::minlevel, ParticleProjector< dim, PropertiesIndex >::momentum_transfer_coefficient, momentum_transfer_coefficient_dof_handlers, ParticleFieldQCM< dim, n_components, property_start_index >::particle_field_solution, ParticleProjector< dim, PropertiesIndex >::particle_velocity, particle_velocity_dof_handlers, pf_drag_dof_handlers, pf_force_dof_handlers, MFNavierStokesPreconditionGMGBase< dim >::simulation_parameters, transfers_momentum_transfer_coefficient, transfers_particle_velocity, transfers_pf_drag, transfers_pf_force, transfers_void_fraction, void_fraction_dof_handlers, and ParticleProjector< dim, PropertiesIndex >::void_fraction_solution.

Member Data Documentation

◆ cfd_dem_simulation_parameters

template<int dim>
const CFDDEMSimulationParameters<dim>& MFNavierStokesVANSPreconditionGMG< dim >::cfd_dem_simulation_parameters
private

Reference to the simulation parameters.

Definition at line 89 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_gc_momentum_transfer_coefficient

template<int dim>
std::shared_ptr<GCTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_gc_momentum_transfer_coefficient
private

Transfer operator for global coarsening for the particle-fluid drag.

Definition at line 146 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_gc_particle_velocity

template<int dim>
std::shared_ptr<GCTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_gc_particle_velocity
private

Transfer operator for global coarsening for the particle velocity.

Definition at line 134 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_gc_pf_drag

template<int dim>
std::shared_ptr<GCTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_gc_pf_drag
private

Transfer operator for global coarsening for the particle-fluid drag.

Definition at line 122 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_gc_pf_force

template<int dim>
std::shared_ptr<GCTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_gc_pf_force
private

Transfer operator for global coarsening for the particle-fluid forces.

Definition at line 111 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_gc_void_fraction

template<int dim>
std::shared_ptr<GCTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_gc_void_fraction
private

Transfer operator for global coarsening for the void fraction.

Definition at line 100 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_ls_momentum_transfer_coefficient

template<int dim>
std::shared_ptr<LSTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_ls_momentum_transfer_coefficient
private

Definition at line 156 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_ls_particle_velocity

template<int dim>
std::shared_ptr<LSTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_ls_particle_velocity
private

Definition at line 155 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_ls_pf_drag

template<int dim>
std::shared_ptr<LSTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_ls_pf_drag
private

Definition at line 154 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_ls_pf_force

template<int dim>
std::shared_ptr<LSTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_ls_pf_force
private

Definition at line 153 of file fluid_dynamics_vans_matrix_free.h.

◆ mg_transfer_ls_void_fraction

template<int dim>
std::shared_ptr<LSTransferType> MFNavierStokesVANSPreconditionGMG< dim >::mg_transfer_ls_void_fraction
private

Local-smoothing transfer operators for every auxiliary field. These are only built when the fluid_dynamics preconditioner is LSMG. The DoFHandler inside the ParticleProjector is reused at every level (with multigrid level DoFs distributed), so no per-level DoFHandler is stored.

Definition at line 152 of file fluid_dynamics_vans_matrix_free.h.

◆ momentum_transfer_coefficient_dof_handlers

template<int dim>
MGLevelObject<DoFHandler<dim> > MFNavierStokesVANSPreconditionGMG< dim >::momentum_transfer_coefficient_dof_handlers
private

Particle momentum transfer coefficient DoF handlers for each of the levels of the global coarsening algorithm

Definition at line 138 of file fluid_dynamics_vans_matrix_free.h.

◆ particle_velocity_dof_handlers

template<int dim>
MGLevelObject<DoFHandler<dim> > MFNavierStokesVANSPreconditionGMG< dim >::particle_velocity_dof_handlers
private

Particle velocity DoF handlers for each of the levels of the global coarsening algorithm

Definition at line 126 of file fluid_dynamics_vans_matrix_free.h.

◆ pf_drag_dof_handlers

template<int dim>
MGLevelObject<DoFHandler<dim> > MFNavierStokesVANSPreconditionGMG< dim >::pf_drag_dof_handlers
private

Particle-fluid drag DoF handlers for each of the levels of the global coarsening algorithm

Definition at line 115 of file fluid_dynamics_vans_matrix_free.h.

◆ pf_force_dof_handlers

template<int dim>
MGLevelObject<DoFHandler<dim> > MFNavierStokesVANSPreconditionGMG< dim >::pf_force_dof_handlers
private

Particle-fluid force DoF handlers for each of the levels of the global coarsening algorithm

Definition at line 104 of file fluid_dynamics_vans_matrix_free.h.

◆ transfers_momentum_transfer_coefficient

template<int dim>
MGLevelObject<MGTwoLevelTransfer<dim, MGVectorType> > MFNavierStokesVANSPreconditionGMG< dim >::transfers_momentum_transfer_coefficient
private

Particle-fluid drag transfers for each of the levels of the global coarsening algorithm

Definition at line 143 of file fluid_dynamics_vans_matrix_free.h.

◆ transfers_particle_velocity

template<int dim>
MGLevelObject<MGTwoLevelTransfer<dim, MGVectorType> > MFNavierStokesVANSPreconditionGMG< dim >::transfers_particle_velocity
private

Particle velocity for each of the levels of the global coarsening algorithm

Definition at line 131 of file fluid_dynamics_vans_matrix_free.h.

◆ transfers_pf_drag

template<int dim>
MGLevelObject<MGTwoLevelTransfer<dim, MGVectorType> > MFNavierStokesVANSPreconditionGMG< dim >::transfers_pf_drag
private

Particle-fluid drag transfers for each of the levels of the global coarsening algorithm

Definition at line 119 of file fluid_dynamics_vans_matrix_free.h.

◆ transfers_pf_force

template<int dim>
MGLevelObject<MGTwoLevelTransfer<dim, MGVectorType> > MFNavierStokesVANSPreconditionGMG< dim >::transfers_pf_force
private

Particle-fluid force transfers for each of the levels of the global coarsening algorithm

Definition at line 108 of file fluid_dynamics_vans_matrix_free.h.

◆ transfers_void_fraction

template<int dim>
MGLevelObject<MGTwoLevelTransfer<dim, MGVectorType> > MFNavierStokesVANSPreconditionGMG< dim >::transfers_void_fraction
private

Void fraction transfers for each of the levels of the global coarsening algorithm

Definition at line 97 of file fluid_dynamics_vans_matrix_free.h.

◆ void_fraction_dof_handlers

template<int dim>
MGLevelObject<DoFHandler<dim> > MFNavierStokesVANSPreconditionGMG< dim >::void_fraction_dof_handlers
private

Void Fraction DoF handlers for each of the levels of the global coarsening algorithm

Definition at line 93 of file fluid_dynamics_vans_matrix_free.h.


The documentation for this class was generated from the following files: