![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <fluid_dynamics_matrix_free.h>
Public Member Functions | |
| FluidDynamicsMatrixFree (SimulationParameters< dim > &nsparam, const FluidDynamicsFormulation fluid_dynamics_formulation=FluidDynamicsFormulation::standard) | |
| ~FluidDynamicsMatrixFree () | |
| virtual void | solve () |
| Public Member Functions inherited from PhysicsSolver< LinearAlgebra::distributed::Vector< double > > | |
| PhysicsSolver (const Parameters::NonLinearSolver non_linear_solver_parameters) | |
| virtual | ~PhysicsSolver () |
| void | solve_governing_system () |
| virtual void | apply_constraints () |
| virtual double | get_current_residual () |
| virtual bool | allow_skip_linear_solve_when_residual_is_below_tolerance () const |
| unsigned int | get_current_newton_iteration () const |
Protected Member Functions | |
| virtual void | setup_dofs_fd () override |
| void | multi_stage_preresolution (unsigned int stage, Parameters::SimulationControl::TimeSteppingMethod method) override |
| virtual void | multi_stage_postresolution (unsigned int stage, Parameters::SimulationControl::TimeSteppingMethod method, double time_step) override |
| virtual void | update_multi_stage_solution (double time_step) override |
| void | update_forcing_and_boundary_conditions () override |
| virtual void | set_initial_condition_fd (Parameters::FluidDynamicsInitialConditionType initial_condition_type, bool restart=false) override |
| virtual void | assemble_system_matrix () override |
| virtual void | assemble_system_rhs () override |
| virtual void | update_mortar_configuration () override |
| void | reinit_mortar_operators_mf () |
| virtual void | update_multiphysics_time_average_solution () override |
| virtual void | update_solutions_for_multiphysics () override |
| virtual void | update_solutions_for_fluid_dynamics () override |
| void | calculate_time_derivative_previous_solutions () |
| void | setup_preconditioner () override |
| void | solve_linear_system () override |
| void | print_mg_setup_times () |
| Protected Member Functions inherited from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet > | |
| NavierStokesBase (SimulationParameters< dim > &nsparam, const FluidDynamicsFormulation fluid_dynamics_formulation=FluidDynamicsFormulation::standard) | |
| virtual | ~NavierStokesBase ()=default |
| virtual LinearAlgebra::distributed::Vector< double > & | get_evaluation_point () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_local_evaluation_point () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_newton_update () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_present_solution () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_system_rhs () override |
| virtual AffineConstraints< double > & | get_nonzero_constraints () override |
| virtual void | output_newton_update_norms () override |
| double | get_residual_rescale_metric () const override |
| void | finish_simulation () |
| virtual void | postprocess (bool first_iteration) |
| virtual void | setup_dofs () |
| virtual void | set_initial_condition (const Parameters::FluidDynamicsInitialConditionType initial_condition_type, const bool restart=false) |
| virtual void | finish_time_step () |
| virtual void | percolate_time_vectors_fd () |
| void | finish_simulation_fd () |
| virtual void | postprocess_fd (bool first_iteration) |
| void | postprocessing_forces (const LinearAlgebra::distributed::Vector< double > &evaluation_point) |
| void | postprocessing_torques (const LinearAlgebra::distributed::Vector< double > &evaluation_point) |
| virtual void | dynamic_flow_control () |
| virtual void | set_specified_fluid_dynamics_solution () |
| virtual void | iterate () |
| virtual void | enable_dynamic_zero_constraints_fd () |
| void | box_refine_mesh (const bool restart) |
| virtual void | refine_mesh () |
| void | refine_mesh_adaptive () |
| void | refine_mesh_uniform () |
| void | transfer_solution (SolutionTransfer< dim, LinearAlgebra::distributed::Vector< double > > &solution_transfer, std::vector< SolutionTransfer< dim, LinearAlgebra::distributed::Vector< double > > > &previous_solutions_transfer) |
| virtual void | read_checkpoint () |
| bool | average_velocities_are_enabled () const |
| void | restore_average_velocities_after_checkpoint () |
| virtual void | set_solution_from_checkpoint (const std::string &checkpoint_file_prefix) |
| void | set_nodal_values () |
| void | define_non_zero_constraints () |
| void | define_zero_constraints () |
| void | reinit_mortar_operators () |
| std::shared_ptr< Mapping< dim > > | get_mapping () |
| void | rotate_rotor_mapping (const bool is_first) |
| void | connect_mortar_weight_signals () |
| void | update_boundary_conditions () |
| bool | check_existance_of_bc (BoundaryConditions::FluidDynamicsBoundaryType bc) |
| void | make_solid_domain (const DoFHandler< dim > &dof_handler, const bool non_zero_constraints, AffineConstraints< double > &constraints) |
| bool | cell_in_constraining_domain (const typename DoFHandler< dim >::active_cell_iterator &cell, const Point< dim > &plane_point, const Tensor< 1, dim > &plane_normal_vector) |
| void | get_cell_temperature_values (const typename DoFHandler< dim >::active_cell_iterator &cell, const DoFHandler< dim > *dof_handler_ht, const GlobalVectorType &temperature_solution, std::vector< double > &local_temperature_values) |
| void | get_cell_filtered_phase_indicator_values (const typename DoFHandler< dim >::active_cell_iterator &cell, const DoFHandler< dim > *dof_handler_cls, const GlobalVectorType &filtered_phase_indicator_solution, std::vector< double > &local_filtered_phase_indicator_values) |
| void | identify_cell_and_constrain_velocity (const std::vector< types::global_dof_index > &local_dof_indices, const std::vector< double > &local_temperature_values, StasisConstraintWithTemperature &stasis_constraint_struct) |
| void | constrain_stasis_with_temperature (const DoFHandler< dim > *dof_handler_ht) |
| void | constrain_stasis_with_temperature_cls (const DoFHandler< dim > *dof_handler_cls, const DoFHandler< dim > *dof_handler_ht) |
| virtual std::vector< OutputStructTableHandler > | gather_tables () |
| virtual void | write_checkpoint () |
| virtual std::vector< OutputStruct< dim, LinearAlgebra::distributed::Vector< double > > > | gather_output_hook () |
| void | gather_output_results (const LinearAlgebra::distributed::Vector< double > &solution, std::vector< OutputStruct< dim, LinearAlgebra::distributed::Vector< double > > > &solution_output_structs) |
| void | write_output_results (const LinearAlgebra::distributed::Vector< double > &solution) |
| void | write_output_forces () |
| void | write_output_torques () |
| void | rescale_pressure_dofs_in_newton_update () |
| LinearAlgebra::distributed::Vector< double > | init_temporary_vector () |
| void | verify_consistency_of_boundary_conditions () |
Protected Attributes | |
| std::shared_ptr< NavierStokesOperatorBase< dim, double > > | system_operator |
| std::shared_ptr< MFNavierStokesPreconditionGMGBase< dim > > | gmg_preconditioner |
| std::shared_ptr< TrilinosWrappers::PreconditionILU > | ilu_preconditioner |
| VectorType | time_derivative_previous_solutions |
| DoFHandler< dim > | dof_handler_fe_q_iso_q1 |
| TrilinosWrappers::MPI::Vector | multiphysics_average_velocities |
| std::shared_ptr< TrilinosWrappers::MPI::Vector > | multiphysics_present_solution |
| std::shared_ptr< std::vector< TrilinosWrappers::MPI::Vector > > | multiphysics_previous_solutions |
| VectorType | temperature_present_solution |
| std::shared_ptr< PhysicalPropertiesManager > | physical_properties_manager |
| Protected Attributes inherited from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet > | |
| 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 > > | triangulation |
| std::shared_ptr< DoFHandler< dim > > | dof_handler |
| std::shared_ptr< FESystem< dim > > | fe |
| TimerOutput | computing_timer |
| SimulationParameters< dim > | simulation_parameters |
| PVDHandler | pvdhandler |
| PVDHandler | pvdhandler_boundary |
| Function< dim > * | exact_solution |
| std::shared_ptr< Function< dim > > | forcing_function |
| FlowControl< dim > | flow_control |
| AffineConstraints< double > | zero_constraints |
| AffineConstraints< double > | nonzero_constraints |
| bool | use_manifold_for_normal |
| LinearAlgebra::distributed::Vector< double > | evaluation_point |
| LinearAlgebra::distributed::Vector< double > | local_evaluation_point |
| LinearAlgebra::distributed::Vector< double > | newton_update |
| std::shared_ptr< LinearAlgebra::distributed::Vector< double > > | present_solution |
| LinearAlgebra::distributed::Vector< double > | system_rhs |
| std::shared_ptr< std::vector< LinearAlgebra::distributed::Vector< double > > > | previous_solutions |
| SDIRKVectors | sdirk_vectors |
| const unsigned int | velocity_fem_degree |
| const unsigned int | pressure_fem_degree |
| unsigned int | number_quadrature_points |
| std::shared_ptr< Mapping< dim > > | mapping |
| std::shared_ptr< Quadrature< dim > > | cell_quadrature |
| std::shared_ptr< Quadrature< dim - 1 > > | face_quadrature |
| std::shared_ptr< MortarManagerBase< dim > > | mortar_manager |
| std::shared_ptr< CouplingOperator< dim, double > > | mortar_coupling_operator |
| std::shared_ptr< NavierStokesCouplingEvaluationSIPG< dim, double > > | mortar_coupling_evaluator |
| std::shared_ptr< MappingQCache< dim > > | mapping_cache |
| std::vector< std::shared_ptr< NavierStokesAssemblerBase< dim > > > | assemblers |
| std::shared_ptr< MultiphysicsInterface< dim > > | multiphysics |
| std::shared_ptr< SimulationControl > | simulation_control |
| TableHandler | enstrophy_table |
| TableHandler | pressure_power_table |
| TableHandler | viscous_dissipation_table |
| TableHandler | kinetic_energy_table |
| TableHandler | apparent_viscosity_table |
| TableHandler | pressure_drop_table |
| TableHandler | flow_rate_table |
| std::shared_ptr< AverageVelocities< dim, LinearAlgebra::distributed::Vector< double >, IndexSet > > | average_velocities |
| LinearAlgebra::distributed::Vector< double > | average_solution |
| MeshController | mesh_controller |
| ConvergenceTable | error_table |
| std::vector< std::map< types::boundary_id, Tensor< 1, dim > > > | forces_on_boundaries |
| std::map< types::boundary_id, TableHandler > | forces_tables |
| std::map< types::boundary_id, TableHandler > | torques_tables |
| std::shared_ptr< FEValues< dim > > | fe_values_temperature |
| std::shared_ptr< FEValues< dim > > | fe_values_cls |
| std::vector< StasisConstraintWithTemperature > | stasis_constraint_structs |
| AffineConstraints< double > | dynamic_zero_constraints |
Private Types | |
| using | VectorType = LinearAlgebra::distributed::Vector<double> |
Private Member Functions | |
| void | assemble_L2_projection () |
| void | solve_system_GMRES (const double absolute_residual, const double relative_residual) |
| void | solve_system_BiCGStab (const double absolute_residual, const double relative_residual) |
| void | solve_system_direct (const double absolute_residual, const double relative_residual) |
| virtual void | create_GMG () |
| virtual void | initialize_GMG () |
| void | setup_GMG () |
| void | setup_ILU () |
Additional Inherited Members | |
| Public Attributes inherited from PhysicsSolver< LinearAlgebra::distributed::Vector< double > > | |
| ConditionalOStream | pcout |
| Parameters::SimulationControl::TimeSteppingMethod | time_stepping_method |
A solver for the incompressible Navier-Stokes equations implemented in a matrix-free fashion.
A matrix-free stabilized solver for the incompressible Navier-Stokes equations implemented in a matrix-free fashion with a sum-factorization approach. It uses a continuous Galerkin discretization and solves the fully-coupled discretized problem in a monolithic way using multigrid preconditioners.
| dim | An integer that denotes the dimension of the space in which the flow is solved. |
Definition at line 410 of file fluid_dynamics_matrix_free.h.
|
private |
Definition at line 415 of file fluid_dynamics_matrix_free.h.
| FluidDynamicsMatrixFree< dim >::FluidDynamicsMatrixFree | ( | SimulationParameters< dim > & | nsparam, |
| const FluidDynamicsFormulation | fluid_dynamics_formulation = FluidDynamicsFormulation::standard ) |
Constructor that sets the finite element degree and system operator according to simulation parameters.
| [in] | nsparam | Relevant parameters for the solver. |
| [in] | fluid_dynamics_formulation | The formulation of the fluid dynamics equations. Whether the solver solves the volume-averaged Navier-Stokes (VANS) equations or the standard Navier-Stokes equations. |
Definition at line 2799 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::fe, SimulationParameters< dim >::fem_parameters, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::forcing_function, multiphysics_present_solution, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::NavierStokesBase(), physical_properties_manager, Parameters::FEM::pressure_degree, Parameters::Stabilization::pressure_scaling_factor, Parameters::Stabilization::pspg_supg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, SimulationParameters< dim >::stabilization, system_operator, and Parameters::FEM::velocity_degree.
| FluidDynamicsMatrixFree< dim >::~FluidDynamicsMatrixFree | ( | ) |
Destructor.
Definition at line 2852 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dof_handler.
|
private |
Assemble a L2 projection matrix for the velocity and the pressure, which can be used to set the initial condition for the Navier-Stokes problem. Currently not implemented for this solver.
Definition at line 3879 of file fluid_dynamics_matrix_free.cc.
|
overrideprotectedvirtual |
Assemble the matrix associated with the solver. Only required for compilation and it is not used for the matrix free solver.
Implements PhysicsSolver< LinearAlgebra::distributed::Vector< double > >.
Definition at line 3455 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer.
|
overrideprotectedvirtual |
Assemble the system right hand side associated with the solver.
Implements PhysicsSolver< LinearAlgebra::distributed::Vector< double > >.
Reimplemented in FluidDynamicsVANSMatrixFree< dim, PropertiesIndex >.
Definition at line 3463 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::evaluation_point, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::get_mapping(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::system_rhs.
|
protected |
Calculate and store time derivatives of previous solutions according to time-stepping scheme to use them in the operator.
Definition at line 3543 of file fluid_dynamics_matrix_free.cc.
References SDIRKStageData::a_ij, number_of_previous_solutions(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::previous_solutions, sdirk_table(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::sdirk_vectors, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, time_derivative_previous_solutions, and time_stepping_is_sdirk().
|
privatevirtual |
Create the geometric multigrid preconditioner.
Reimplemented in FluidDynamicsVANSMatrixFree< dim, PropertiesIndex >.
Definition at line 3581 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::cell_quadrature, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dof_handler, dof_handler_fe_q_iso_q1, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::fe, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::forcing_function, gmg_preconditioner, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mapping, physical_properties_manager, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters.
|
privatevirtual |
Intialize the geometric multigrid preconditioner.
Reimplemented in FluidDynamicsVANSMatrixFree< dim, PropertiesIndex >.
Definition at line 3598 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::flow_control, gmg_preconditioner, heat_transfer, MFNavierStokesPreconditionGMG< dim >::initialize(), MFNavierStokesPreconditionGMG< dim >::initialize_auxiliary_physics(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, and time_derivative_previous_solutions.
|
overrideprotectedvirtual |
Calculate \( k_i \) from \( u*_i : k_i = \frac{u*_i - u_n}{time_step*a_ii} - \sum{j=1}^{i-1} a_ij * k_j \) Update \( \sum_{i=1}^{N_{stages}} b_i * k_i \).
| stage | An unsigned integer which gives the index of the current stage |
| method | SDIRK methods for now (BDF methods are single stage) |
| time_step | Current time step value |
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 2899 of file fluid_dynamics_matrix_free.cc.
References SDIRKStageData::a_ij, SDIRKStageData::b_i, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::local_evaluation_point, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::previous_solutions, sdirk_table(), and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::sdirk_vectors.
|
overrideprotectedvirtual |
Update the sum_over_previous_stages variable to use it in the solver.
| stage | An unsigned integer which gives the index of the current stage |
| method | SDIRK method for now (BDF methods are single stage) |
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 2859 of file fluid_dynamics_matrix_free.cc.
References SDIRKStageData::a_ij, calculate_time_derivative_previous_solutions(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::flow_control, sdirk_table(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::sdirk_vectors, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, and time_derivative_previous_solutions.
|
protected |
Prints the setup times for the geometric multigrid preconditioner.
Definition at line 3653 of file fluid_dynamics_matrix_free.cc.
References announce_string(), Parameters::extra_verbose, fluid_dynamics, gmg_preconditioner, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, and system_operator.
|
protected |
Initialize mortar coupling manager, operator, and evaluator for the matrix-free solver.
Definition at line 3259 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::cell_quadrature, Parameters::Mortar< dim >::circular, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dof_handler, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::get_mapping(), Parameters::Mortar< dim >::linear, physical_properties_manager, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::zero_constraints.
|
overrideprotectedvirtual |
restarted from a checkpoint, the initial solution setting is bypassed and the checkpoint is instead read.
| [in] | initial_condition_type | The type of initial condition to be set. |
| [in] | restart | A boolean that indicates if the simulation is being restarted. If set to true, the initial conditions are never set, but are instead overriden by the read_checkpoint functionality. |
Implements NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 3308 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::finish_time_step(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mpi_communicator, Parameters::nodal, Parameters::Timer::none, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, physical_properties_manager, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::PhysicsSolver(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, Parameters::ramp, read_checkpoint(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::set_nodal_values(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::solve_governing_system(), Parameters::SimulationControl::steady, and Parameters::viscous.
|
overrideprotectedvirtual |
Setup the degrees of freedom, system constraints, system operator and solution vectors.
Implements NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 3058 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::average_velocities, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::cell_quadrature, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::define_non_zero_constraints(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::define_zero_constraints(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dof_handler, dof_handler_fe_q_iso_q1, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::evaluation_point, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::fe, fluid_dynamics, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::forcing_function, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::get_mapping(), gmg_preconditioner, ilu_preconditioner, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::local_evaluation_point, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::locally_owned_dofs, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::locally_relevant_dofs, Parameters::LinearSolver::lsmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mpi_communicator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, multiphysics_average_velocities, multiphysics_present_solution, multiphysics_previous_solutions, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::newton_update, BoundaryConditions::partial_slip, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, physical_properties_manager, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::previous_solutions, reinit_mortar_operators_mf(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::rotate_rotor_mapping(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::sdirk_vectors, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::system_rhs, time_derivative_previous_solutions, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::triangulation, update_solutions_for_multiphysics(), and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::zero_constraints.
|
private |
Setup the geometric multigrid preconditioner.
Definition at line 3616 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, create_GMG(), gmg_preconditioner, and initialize_GMG().
|
private |
Setup the implicit LU preconditioner and call the solve function of the linear solver. Attention: an actual matrix needs to be constructed using the matrix-free operator.
Definition at line 3628 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, fluid_dynamics, ilu_preconditioner, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, and system_operator.
|
overrideprotectedvirtual |
Set up appropriate preconditioner.
Implements PhysicsSolver< LinearAlgebra::distributed::Vector< double > >.
Definition at line 3808 of file fluid_dynamics_matrix_free.cc.
References Parameters::LinearSolver::amg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, fluid_dynamics, Parameters::LinearSolver::gcmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::get_mapping(), Parameters::LinearSolver::ilu, Parameters::LinearSolver::lsmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, setup_GMG(), setup_ILU(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, and system_operator.
|
virtual |
Solve the problem defined by simulation parameters by iterating through time or through the mesh refinements.
Reimplemented in CFDDEMMatrixFree< dim, PropertiesIndex >, and FluidDynamicsVANSMatrixFree< dim, PropertiesIndex >.
Definition at line 2956 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::box_refine_mesh(), calculate_time_derivative_previous_solutions(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::connect_mortar_weight_signals(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dynamic_flow_control(), Parameters::Timer::end, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::finish_simulation(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::finish_time_step(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::flow_control, heat_transfer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::iterate(), Parameters::Timer::iteration, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mapping_cache, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::postprocess(), print_mg_setup_times(), read_mesh_and_manifolds(), read_mesh_and_manifolds_for_stator_and_rotor(), NavierStokesBase< dim, VectorType, DofsType >::refine_mesh(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::rotate_rotor_mapping(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::set_initial_condition(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::setup_dofs(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, temperature_present_solution, time_derivative_previous_solutions, time_stepping_is_bdf(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::triangulation, update_forcing_and_boundary_conditions(), update_mortar_configuration(), update_multiphysics_time_average_solution(), update_solutions_for_fluid_dynamics(), and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::velocity_fem_degree.
|
overrideprotectedvirtual |
Solve the linear system of equations using the method specified in the simulation parameters.
Implements PhysicsSolver< LinearAlgebra::distributed::Vector< double > >.
Definition at line 3852 of file fluid_dynamics_matrix_free.cc.
References Parameters::LinearSolver::bicgstab, Parameters::LinearSolver::direct, fluid_dynamics, Parameters::LinearSolver::gmres, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::rescale_pressure_dofs_in_newton_update(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, solve_system_BiCGStab(), solve_system_direct(), and solve_system_GMRES().
|
private |
BiCGStab solver with preconditioning.
| [in] | absolute_residual | Used to define the linear solver tolerance. |
| [in] | relative_residual | Used to define the linear solver tolerance. |
Definition at line 4020 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, fluid_dynamics, Parameters::LinearSolver::gcmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::get_residual_rescale_metric(), gmg_preconditioner, Parameters::LinearSolver::ilu, ilu_preconditioner, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::locally_owned_dofs, Parameters::LinearSolver::lsmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mpi_communicator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::newton_update, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, Parameters::quiet, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::system_rhs, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::zero_constraints.
|
private |
Direct solver using TrilinosWrappers::SolverDirect.
| [in] | absolute_residual | Used to define the linear solver tolerance. |
| [in] | relative_residual | Used to define the linear solver tolerance. |
Definition at line 4159 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, fluid_dynamics, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::get_residual_rescale_metric(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::newton_update, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::system_rhs, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::zero_constraints.
|
private |
GMRES solver with preconditioning.
| [in] | absolute_residual | Used to define the linear solver tolerance. |
| [in] | relative_residual | Used to define the linear solver tolerance. |
Definition at line 3886 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, fluid_dynamics, Parameters::LinearSolver::gcmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::get_residual_rescale_metric(), gmg_preconditioner, Parameters::LinearSolver::ilu, ilu_preconditioner, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::locally_owned_dofs, Parameters::LinearSolver::lsmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mpi_communicator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::newton_update, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, Parameters::quiet, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, system_operator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::system_rhs, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::zero_constraints.
|
overrideprotectedvirtual |
Set the time of the forcing function and of the time-dependent boundary conditions to the current time and re-impose the non-zero constraints. The forcing term is precomputed by the matrix-free operator, so it is also recomputed here for a time-dependent forcing function to be accounted for.
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 2943 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::forcing_function, system_operator, and NavierStokesBase< dim, VectorType, DofsType >::update_forcing_and_boundary_conditions().
|
overrideprotectedvirtual |
Update mortar configuration.
When the rotor domain is rotated, the mortar cells need to be reinitialized according to the new rotor-stator interface configuration.
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 3221 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::define_non_zero_constraints(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::define_zero_constraints(), gmg_preconditioner, ilu_preconditioner, Parameters::MeshAdaptation::none, reinit_mortar_operators_mf(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::rotate_rotor_mapping(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters.
|
overrideprotectedvirtual |
\( u_{n+1} = u_n + time_step * \sum_{i=1}^{N_{stages}} b_i * k_i \)
| time_step | The current time step to build the solution at the next time step |
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 2932 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::local_evaluation_point, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::previous_solutions, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::sdirk_vectors.
|
overrideprotectedvirtual |
Update the average velocity field solution in the multiphyscics interface.
Implements NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 3514 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::average_velocities, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, convert_vector_dealii_to_trilinos(), fluid_dynamics, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::locally_owned_dofs, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mpi_communicator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, multiphysics_average_velocities, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters.
|
overrideprotectedvirtual |
Provide present multiphysics solutions from the multiphysics interface to the fluid dynamics.
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 3768 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, convert_vector_trilinos_to_dealii(), heat_transfer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, and temperature_present_solution.
|
overrideprotectedvirtual |
Provide present and previous flow solutions to the multiphysics interface. These solutions can be accessed through the multiphysics interface by the different physics.
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 3709 of file fluid_dynamics_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, convert_vector_dealii_to_trilinos(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dof_handler, fluid_dynamics, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::locally_owned_dofs, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mapping, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mpi_communicator, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, multiphysics_present_solution, multiphysics_previous_solutions, number_of_previous_solutions(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::previous_solutions, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control.
|
protected |
Describes the layout of DoFs for FE_Q_iso_Q1 elements.
Definition at line 692 of file fluid_dynamics_matrix_free.h.
|
protected |
Geometric multigrid preconditioner.
Definition at line 673 of file fluid_dynamics_matrix_free.h.
|
protected |
Implicit LU preconditioner.
Definition at line 679 of file fluid_dynamics_matrix_free.h.
|
protected |
Trilinos vector storing the average velocities that are provided to other physics.
Definition at line 699 of file fluid_dynamics_matrix_free.h.
|
protected |
Trilinos vector storing the present solution that is provided to other physics.
Definition at line 705 of file fluid_dynamics_matrix_free.h.
|
protected |
Vector storing trilinos vectors containing the previous solutions that are provided to other physics.
Definition at line 713 of file fluid_dynamics_matrix_free.h.
|
protected |
Pointer to the physical properties object.
Definition at line 725 of file fluid_dynamics_matrix_free.h.
|
protected |
Matrix-free operator in used for all the matrix-vector multiplications calls (vmult).
Definition at line 667 of file fluid_dynamics_matrix_free.h.
|
protected |
Vector storing the present temperature solution from the heat transfer solver.
Definition at line 719 of file fluid_dynamics_matrix_free.h.
|
protected |
Vector to store the time derivatives of the previous solutions at the end of each time step for time-dependent simulations.
Definition at line 686 of file fluid_dynamics_matrix_free.h.