![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <fluid_dynamics_matrix_free_operators.h>
Public Types | |
| using | FECellIntegrator = FEEvaluation<dim, -1, 0, dim + 1, number> |
| using | FEFaceIntegrator = FEFaceEvaluation<dim, -1, 0, dim + 1, number> |
| using | VectorType = LinearAlgebra::distributed::Vector<number> |
| using | value_type = number |
| using | size_type = VectorizedArray<number> |
| using | StabilizationType |
Public Member Functions | |
| NavierStokesOperatorBase () | |
| NavierStokesOperatorBase (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const AffineConstraints< number > &constraints, const Quadrature< dim > &quadrature, const std::shared_ptr< Function< dim > > &forcing_function, const std::shared_ptr< PhysicalPropertiesManager > &physical_properties_manager, const StabilizationType stabilization, const unsigned int mg_level, const std::shared_ptr< SimulationControl > &simulation_control, const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > &boundary_conditions, const bool &enable_hessians_jacobian, const bool &enable_hessians_residual, const bool &enable_mortar) | |
| void | reinit (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const AffineConstraints< number > &constraints, const Quadrature< dim > &quadrature, const std::shared_ptr< Function< dim > > &forcing_function, const std::shared_ptr< PhysicalPropertiesManager > &physical_properties_manager, const StabilizationType stabilization, const unsigned int mg_level, const std::shared_ptr< SimulationControl > &simulation_control, const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > &boundary_conditions, const bool &enable_hessians_jacobian, const bool &enable_hessians_residual, const bool &enable_mortar) |
| void | compute_element_size () |
| void | compute_solid_cell_mask () |
| virtual void | compute_forcing_term () |
| void | compute_thermal_buoyancy_term (const VectorType &temperature_solution, const DoFHandler< dim > &temperature_dof_handler) |
| types::global_dof_index | m () const |
| number | el (unsigned int, unsigned int) const |
| void | clear () |
| void | initialize_dof_vector (VectorType &vec) const |
| const std::shared_ptr< const Utilities::MPI::Partitioner > & | get_vector_partitioner () const |
| void | vmult (VectorType &dst, const VectorType &src) const |
| void | Tvmult (VectorType &dst, const VectorType &src) const |
| void | vmult_interface_down (VectorType &dst, VectorType const &src) const |
| void | vmult_interface_up (VectorType &dst, VectorType const &src) const |
| const DynamicSparsityPattern & | get_sparsity_pattern () const |
| const TrilinosWrappers::SparseMatrix & | get_system_matrix () const |
| const MatrixFree< dim, number > & | get_system_matrix_free () const |
| const AlignedVector< VectorizedArray< number > > | get_element_size () const |
| void | compute_inverse_diagonal (VectorType &diagonal) const |
| void | evaluate_prescribed_neumann_traction () |
| virtual void | evaluate_non_linear_term_and_calculate_tau (const VectorType &newton_step) |
| void | evaluate_time_derivative_previous_solutions (const VectorType &time_derivative_previous_solutions) |
| void | evaluate_velocity_ale (const Mapping< dim > &mapping, const Point< dim > center_of_rotation, const unsigned int rotation_axis_direction, const std::shared_ptr< Functions::ParsedFunction< dim > > &rotor_angular_velocity) |
| void | update_beta_force (const Tensor< 1, dim > &beta_force) |
| void | evaluate_residual (VectorType &dst, const VectorType &src) |
Public Attributes | |
| std::shared_ptr< MortarManagerBase< dim > > | mortar_manager_mf |
| std::shared_ptr< CouplingOperator< dim, double > > | mortar_coupling_operator_mf |
| std::shared_ptr< NavierStokesCouplingEvaluationSIPG< dim, double > > | mortar_coupling_evaluator_mf |
| TimerOutput | timer |
Protected Member Functions | |
| virtual void | do_cell_integral_local (FECellIntegrator &integrator) const =0 |
| void | do_cell_integral_range (const MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &range) const |
| template<bool assemble_residual> | |
| void | do_boundary_face_integral_local (FEFaceIntegrator &integrator) const |
| template<bool assemble_residual> | |
| void | do_boundary_face_integral_range (const MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &range) const |
| void | do_internal_face_integral_range (const MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &range) const |
| virtual void | local_evaluate_residual (const MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &range) const =0 |
| TimeSteppingData | initialize_time_stepping_data () const |
Protected Attributes | |
| MatrixFree< dim, number > | matrix_free |
| AffineConstraints< number > | constraints |
| DynamicSparsityPattern | dsp |
| TrilinosWrappers::SparseMatrix | system_matrix |
| AlignedVector< VectorizedArray< number > > | element_size |
| AlignedVector< VectorizedArray< number > > | solid_cell_mask |
| bool | has_solids = false |
| unsigned int | fe_degree |
| std::shared_ptr< Function< dim > > | forcing_function |
| Tensor< 1, dim, VectorizedArray< number > > | beta_force |
| StabilizationType | stabilization |
| std::shared_ptr< SimulationControl > | simulation_control |
| std::shared_ptr< PhysicalPropertiesManager > | properties_manager |
| BoundaryConditions::FluidDynamicsBoundaryConditions< dim > | boundary_conditions |
| bool | enable_hessians_jacobian |
| bool | enable_hessians_residual |
| Table< 2, Tensor< 1, dim, VectorizedArray< number > > > | forcing_terms |
| Table< 2, Tensor< 1, dim, VectorizedArray< number > > > | thermal_buoyancy_term |
| bool | enable_face_terms |
| Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > | nonlinear_previous_values |
| Table< 2, Tensor< 1, dim+1, Tensor< 1, dim, VectorizedArray< number > > > > | nonlinear_previous_gradient |
| Table< 2, Tensor< 1, dim+1, Tensor< 1, dim, VectorizedArray< number > > > > | nonlinear_previous_hessian_diagonal |
| Table< 2, Tensor< 1, dim+1, Tensor< 2, dim, VectorizedArray< number > > > > | nonlinear_previous_hessian |
| Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > | time_derivatives_previous_solutions |
| Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > | face_nonlinear_previous_values |
| Table< 2, Tensor< 1, dim, VectorizedArray< number > > > | face_target_velocity |
| Table< 2, VectorizedArray< number > > | face_target_pressure |
| Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > | prescribed_neumann_traction |
| Table< 2, VectorizedArray< number > > | stabilization_parameter |
| Table< 2, VectorizedArray< number > > | stabilization_parameter_lsic |
| Table< 2, VectorizedArray< number > > | kinematic_viscosity_vector |
| Table< 2, VectorizedArray< number > > | grad_kinematic_viscosity_shear_rate |
| Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > | kinematic_viscosity_gradient |
| Table< 2, Tensor< 1, dim+1, Tensor< 1, dim, VectorizedArray< number > > > > | previous_shear_rate |
| Table< 2, VectorizedArray< number > > | previous_shear_rate_magnitude |
| Table< 1, VectorizedArray< number > > | effective_beta_face |
| bool | enable_mortar |
| Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > | nonlinear_previous_advective_values |
| Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > | velocity_ale |
| std::vector< unsigned int > | constrained_indices |
| std::vector< std::pair< number, number > > | constrained_values |
| std::vector< unsigned int > | edge_constrained_indices |
| bool | has_edge_constrained_indices = false |
| std::vector< number > | edge_constrained_values |
| std::vector< bool > | edge_constrained_cell |
| Table< 2, bool > | bool_dof_mask |
| ConditionalOStream | pcout |
Static Private Member Functions | |
| static IndexSet | get_refinement_edges (const MatrixFree< dim, number > &matrix_free) |
A class that serves as base for all the matrix-free Navier-Stokes operators.
| dim | An integer that denotes the number of spatial dimensions. |
| number | Abstract type for number across the class (i.e., double). |
Definition at line 165 of file fluid_dynamics_matrix_free_operators.h.
| using NavierStokesOperatorBase< dim, number >::FECellIntegrator = FEEvaluation<dim, -1, 0, dim + 1, number> |
Definition at line 168 of file fluid_dynamics_matrix_free_operators.h.
| using NavierStokesOperatorBase< dim, number >::FEFaceIntegrator = FEFaceEvaluation<dim, -1, 0, dim + 1, number> |
Definition at line 169 of file fluid_dynamics_matrix_free_operators.h.
| using NavierStokesOperatorBase< dim, number >::size_type = VectorizedArray<number> |
Definition at line 172 of file fluid_dynamics_matrix_free_operators.h.
| using NavierStokesOperatorBase< dim, number >::StabilizationType |
Definition at line 173 of file fluid_dynamics_matrix_free_operators.h.
| using NavierStokesOperatorBase< dim, number >::value_type = number |
Definition at line 171 of file fluid_dynamics_matrix_free_operators.h.
| using NavierStokesOperatorBase< dim, number >::VectorType = LinearAlgebra::distributed::Vector<number> |
Definition at line 170 of file fluid_dynamics_matrix_free_operators.h.
| NavierStokesOperatorBase< dim, number >::NavierStokesOperatorBase | ( | ) |
Default constructor.
Definition at line 78 of file fluid_dynamics_matrix_free_operators.cc.
| NavierStokesOperatorBase< dim, number >::NavierStokesOperatorBase | ( | const Mapping< dim > & | mapping, |
| const DoFHandler< dim > & | dof_handler, | ||
| const AffineConstraints< number > & | constraints, | ||
| const Quadrature< dim > & | quadrature, | ||
| const std::shared_ptr< Function< dim > > & | forcing_function, | ||
| const std::shared_ptr< PhysicalPropertiesManager > & | physical_properties_manager, | ||
| const StabilizationType | stabilization, | ||
| const unsigned int | mg_level, | ||
| const std::shared_ptr< SimulationControl > & | simulation_control, | ||
| const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > & | boundary_conditions, | ||
| const bool & | enable_hessians_jacobian, | ||
| const bool & | enable_hessians_residual, | ||
| const bool & | enable_mortar ) |
Constructor that points to the reinit function.
| [in] | mapping | Describes the transformations from unit to real cell. |
| [in] | dof_handler | Describes the layout of DoFs and the type of FE. |
| [in] | constraints | Object with constraints according to DoFs. |
| [in] | quadrature | Required for local operations on cells. |
| [in] | forcing_function | Function specified in parameter file as source term. |
| [in] | properties_manager | The physical properties manager (see physical_properties_manager.h) |
| [in] | stabilization | Stabilization type specified in parameter file. |
| [in] | mg_level | Level of the operator in case of MG methods. |
| [in] | simulation_control | Required to get the time stepping method. |
| [in] | physical_properties_manager | Required to have the updated values of physical properties in case of ramp or viscous initial conditions. |
| [in] | boundary_conditions | Contains information regarding all boundary conditions. Required to weakly impose boundary conditions. |
| [in] | enable_hessians_jacobian | Flag to turn hessian terms from jacobian on or off. |
| [in] | enable_hessians_residual | Flag to turn hessian terms from residual on or off. |
| [in] | enable_mortar | Flag to turn mortar parameters on or off. |
Definition at line 84 of file fluid_dynamics_matrix_free_operators.cc.
References boundary_conditions, constraints, enable_hessians_jacobian, enable_hessians_residual, enable_mortar, forcing_function, pcout, reinit(), simulation_control, stabilization, and timer.
| void NavierStokesOperatorBase< dim, number >::clear | ( | ) |
Clear the matrix-free object.
Definition at line 480 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free.
| void NavierStokesOperatorBase< dim, number >::compute_element_size | ( | ) |
Compute the element size h of the cells required to calculate stabilization parameters.
Definition at line 352 of file fluid_dynamics_matrix_free_operators.cc.
References compute_cell_diameter(), element_size, fe_degree, and matrix_free.
|
virtual |
Precompute forcing term at the quadrature points. This is called when the operator is initialized and must be called again whenever the time of the forcing function changes, since the forcing function is otherwise only evaluated at the time at which the operator was initialized.
Reimplemented in VANSOperator< dim, number >.
Definition at line 374 of file fluid_dynamics_matrix_free_operators.cc.
References evaluate_function(), forcing_function, forcing_terms, and matrix_free.
| void NavierStokesOperatorBase< dim, number >::compute_inverse_diagonal | ( | VectorType & | diagonal | ) | const |
Compute the diagonal of the operator using an optimized MatrixFree function. Needed for preconditioners.
| [in,out] | diagonal | The vector where the computed diagonal is stored. |
Definition at line 1373 of file fluid_dynamics_matrix_free_operators.cc.
References do_boundary_face_integral_local(), do_cell_integral_local(), edge_constrained_indices, enable_face_terms, enable_mortar, matrix_free, mortar_coupling_operator_mf, and timer.
| void NavierStokesOperatorBase< dim, number >::compute_solid_cell_mask | ( | ) |
Compute a per-cell-batch mask that suppresses contributions from solid cells (material_id > 0). Each lane of solid_cell_mask is set to 1.0 for fluid cells and 0.0 for solid cells, mirroring the matrix-based behavior where solid cells are skipped during assembly.
Definition at line 324 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free, and solid_cell_mask.
| void NavierStokesOperatorBase< dim, number >::compute_thermal_buoyancy_term | ( | const VectorType & | temperature_solution, |
| const DoFHandler< dim > & | temperature_dof_handler ) |
Precompute thermal buoyancy term for heat-transfer coupling.
| [in] | temperature_solution | Present solution of the temperature as given by the multiphysics interface. |
| [in] | temperature_dof_handler | DoF Handler used for the heat transfer. |
Definition at line 402 of file fluid_dynamics_matrix_free_operators.cc.
References forcing_terms, matrix_free, properties_manager, and thermal_buoyancy_term.
|
protected |
Carry out the integration of boundary face integrals.
| assemble_residual | Flag to assemble the residual or the Jacobian. |
| [in] | integrator | FEFaceEvaluation object that allows to evaluate functions at quadrature points and perform face integrations. |
Definition at line 1488 of file fluid_dynamics_matrix_free_operators.cc.
References boundary_condition_requires_face_assembly(), boundary_conditions, effective_beta_face, enable_face_terms, face_nonlinear_previous_values, face_target_pressure, face_target_velocity, BoundaryConditions::function_weak, matrix_free, BoundaryConditions::neumann_traction, BoundaryConditions::outlet, prescribed_neumann_traction, BoundaryConditions::pressure, properties_manager, and velocity.
|
protected |
Loop over all boundary face batches within certain range and perform a face integral with access to global vectors, i.e., gathering and scattering values. This is used to weakly impose Dirichlet boundary conditions or outlet boundary conditions.
| assemble_residual | Flag to assemble the residual or the Jacobian. |
| [in] | matrix_free | Object that contains all data. |
| [in,out] | dst | Global vector where the final result is added. |
| [in] | src | Input vector with all values in all cells. |
| [in] | range | Range of the face batch. |
Definition at line 1452 of file fluid_dynamics_matrix_free_operators.cc.
References do_boundary_face_integral_local(), and matrix_free.
|
protectedpure virtual |
Interface to function that performs a cell integral in a cell batch without gathering and scattering the values. Should be overriden by derived classes.
| [in] | integrator | FEEvaluation object that allows to evaluate functions at quadrature points and perform cell integrations. |
Implemented in NavierStokesNonNewtonianStabilizedOperator< dim, number >, NavierStokesStabilizedOperator< dim, number >, and VANSOperator< dim, number >.
|
protected |
Loop over all cell batches within certain range and perform a cell integral with access to global vectors, i.e., gathering and scattering values.
| [in] | matrix_free | Object that contains all data. |
| [in,out] | dst | Global vector where the final result is added. |
| [in] | src | Input vector with all values in all cells. |
| [in] | range | Range of the cell batch. |
Definition at line 1413 of file fluid_dynamics_matrix_free_operators.cc.
References do_cell_integral_local(), and matrix_free.
|
protected |
Loop over all internal face batches within certain range and perform a face integral with access to global vectors, i.e., gathering and scattering values. This is only required for compilation and not needed for our CG implementation.
| [in] | matrix_free | Object that contains all data. |
| [in,out] | dst | Global vector where the final result is added. |
| [in] | src | Input vector with all values in all cells. |
| [in] | range | Range of the face batch. |
Definition at line 1435 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free.
| number NavierStokesOperatorBase< dim, number >::el | ( | unsigned int | , |
| unsigned int | ) const |
Access a particular element in the matrix. Only required for compilation and it is not used.
| int | |
| int |
Definition at line 472 of file fluid_dynamics_matrix_free_operators.cc.
|
virtual |
Store relevant values of the vector of the last newton step to use it in the Jacobian and pre-calculate the stabilization parameter tau.
| [in] | newton_step | Vector of the last newton step. |
Reimplemented in VANSOperator< dim, number >.
Definition at line 923 of file fluid_dynamics_matrix_free_operators.cc.
References boundary_condition_requires_face_assembly(), boundary_conditions, compute_cell_diameter(), effective_beta_face, enable_face_terms, enable_hessians_jacobian, enable_mortar, evaluate_function(), face_nonlinear_previous_values, face_target_pressure, face_target_velocity, fe_degree, BoundaryConditions::function_weak, get_element_size(), grad_kinematic_viscosity_shear_rate, kinematic_viscosity_gradient, kinematic_viscosity_vector, matrix_free, nonlinear_previous_advective_values, nonlinear_previous_gradient, nonlinear_previous_hessian, nonlinear_previous_hessian_diagonal, nonlinear_previous_values, BoundaryConditions::outlet, BoundaryConditions::pressure, previous_shear_rate, previous_shear_rate_magnitude, properties_manager, shear_rate, simulation_control, stabilization_parameter, stabilization_parameter_lsic, time_stepping_is_bdf(), time_stepping_is_sdirk(), timer, and velocity_ale.
| void NavierStokesOperatorBase< dim, number >::evaluate_prescribed_neumann_traction | ( | ) |
Store the values of the prescribed Neumann traction boundary condition to use it \((\boldsymbol{\sigma} \cdot \mathbf{n},\, \mathbf{v}) = (\mathrm{traction\_fn},\, \mathbf{v})\). in the residual assembly and Jacobian assembly of the matrix-free operator.
Definition at line 863 of file fluid_dynamics_matrix_free_operators.cc.
References boundary_conditions, enable_face_terms, evaluate_function(), matrix_free, prescribed_neumann_traction, and timer.
| void NavierStokesOperatorBase< dim, number >::evaluate_residual | ( | VectorType & | dst, |
| const VectorType & | src ) |
Evaluate right hand side using the matrix-free operator.
| [in,out] | dst | Destination vector holding the result. |
| [in] | src | Input vector for which the residual is evaluated. |
Definition at line 1350 of file fluid_dynamics_matrix_free_operators.cc.
References do_boundary_face_integral_range(), do_internal_face_integral_range(), enable_face_terms, local_evaluate_residual(), matrix_free, and timer.
| void NavierStokesOperatorBase< dim, number >::evaluate_time_derivative_previous_solutions | ( | const VectorType & | time_derivative_previous_solutions | ) |
Store the values of the vector containing the time derivatives of previous solutions to use them in the Jacobian and residual cell integrals.
| [in] | time_derivative_previous_solutions | Vector with the time derivative of previous solutions. |
Definition at line 1241 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free, time_derivatives_previous_solutions, and timer.
| void NavierStokesOperatorBase< dim, number >::evaluate_velocity_ale | ( | const Mapping< dim > & | mapping, |
| const Point< dim > | center_of_rotation, | ||
| const unsigned int | rotation_axis_direction, | ||
| const std::shared_ptr< Functions::ParsedFunction< dim > > & | rotor_angular_velocity ) |
Store the values of the vector containing the ALE velocity to use them in the Jacobian and residual cell integrals. This function is called when the mortar feature is enabled.
| [in] | mapping | Describes the transformations from unit to real cell. |
| [in] | center_of_rotation | Center of rotation of the rotor domain. |
| [in] | rotation_axis_direction | Direction of the rotation axis. |
| [in] | rotor_angular_velocity | Angular velocity of the rotor domain. |
Definition at line 1268 of file fluid_dynamics_matrix_free_operators.cc.
References LetheGridTools::angular_to_linear_velocity(), matrix_free, simulation_control, timer, and velocity_ale.
| const AlignedVector< VectorizedArray< number > > NavierStokesOperatorBase< dim, number >::get_element_size | ( | ) | const |
Get the element size object.
Definition at line 856 of file fluid_dynamics_matrix_free_operators.cc.
References element_size.
|
staticprivate |
Get the refinement edges. Only needed if the local smoothing multigrid approach is used.
| [in] | matrix_free | Object that contains all data. |
Definition at line 1683 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free.
| const DynamicSparsityPattern & NavierStokesOperatorBase< dim, number >::get_sparsity_pattern | ( | ) | const |
Return sparsity pattern used to set up the sparse matrix by get_system_matrix().
Definition at line 649 of file fluid_dynamics_matrix_free_operators.cc.
References dsp.
| const TrilinosWrappers::SparseMatrix & NavierStokesOperatorBase< dim, number >::get_system_matrix | ( | ) | const |
Calculate matrix if needed, e.g., by coarse-grid solver when a multigrid algorithm is used.
Definition at line 658 of file fluid_dynamics_matrix_free_operators.cc.
References bool_dof_mask, constrained_indices, constraints, do_boundary_face_integral_local(), do_cell_integral_local(), dsp, edge_constrained_indices, enable_face_terms, enable_mortar, get_vector_partitioner(), matrix_free, mortar_coupling_operator_mf, system_matrix, and timer.
| const MatrixFree< dim, number > & NavierStokesOperatorBase< dim, number >::get_system_matrix_free | ( | ) | const |
Get the system matrix free object.
Definition at line 849 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free.
| const std::shared_ptr< const Utilities::MPI::Partitioner > & NavierStokesOperatorBase< dim, number >::get_vector_partitioner | ( | ) | const |
Get the vector partitioner object required for local smoothing multigrid preconditioner.
Definition at line 495 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free.
| void NavierStokesOperatorBase< dim, number >::initialize_dof_vector | ( | VectorType & | vec | ) | const |
Initialize a given vector by delegating it to the MatrixFree function in charge of this task.
| [in,out] | vec | Vector to be initialized. |
Definition at line 487 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free.
|
protected |
Initialize time stepping data such as the time step size and BDF coefficients.
Definition at line 282 of file fluid_dynamics_matrix_free_operators.cc.
References TimeSteppingData::a_ii, SDIRKStageData::a_ij, TimeSteppingData::bdf_coefficients, TimeSteppingData::dt, TimeSteppingData::is_bdf, TimeSteppingData::is_sdirk, TimeSteppingData::is_transient, sdirk_table(), simulation_control, time_stepping_is_bdf(), and time_stepping_is_sdirk().
|
protectedpure virtual |
Interface to function in charge of computing the residual using a cell integral in a cell batch with gathering and scattering values. Should be overriden by derived classes.
| [in] | matrix_free | Object that contains all data. |
| [in,out] | dst | Global vector where the final result is added. |
| [in] | src | Input vector with all values in all cells. |
| [in] | range | Range of the cell batch. |
Implemented in NavierStokesNonNewtonianStabilizedOperator< dim, number >, NavierStokesStabilizedOperator< dim, number >, and VANSOperator< dim, number >.
| types::global_dof_index NavierStokesOperatorBase< dim, number >::m | ( | ) | const |
Get the total number of DoFs.
Definition at line 461 of file fluid_dynamics_matrix_free_operators.cc.
References matrix_free.
| void NavierStokesOperatorBase< dim, number >::reinit | ( | const Mapping< dim > & | mapping, |
| const DoFHandler< dim > & | dof_handler, | ||
| const AffineConstraints< number > & | constraints, | ||
| const Quadrature< dim > & | quadrature, | ||
| const std::shared_ptr< Function< dim > > & | forcing_function, | ||
| const std::shared_ptr< PhysicalPropertiesManager > & | physical_properties_manager, | ||
| const StabilizationType | stabilization, | ||
| const unsigned int | mg_level, | ||
| const std::shared_ptr< SimulationControl > & | simulation_control, | ||
| const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > & | boundary_conditions, | ||
| const bool & | enable_hessians_jacobian, | ||
| const bool & | enable_hessians_residual, | ||
| const bool & | enable_mortar ) |
Initialize the main matrix free object that contains all data and is needed to perform loops over cells, and initialize relevant member variables such as parameters and element size. Calculate edge constraints in case the local smoothing multigrid is used.
| [in] | mapping | Describes the transformations from unit to real cell. |
| [in] | dof_handler | Describes the layout of DoFs and the type of FE. |
| [in] | constraints | Object with constraints according to DoFs. |
| [in] | quadrature | Required for local operations on cells. |
| [in] | forcing_function | Function specified in parameter file as source term. |
| [in] | properties_manager | The physical properties manager (see physical_properties_manager.h) |
| [in] | stabilization | Stabilization type specified in parameter file. |
| [in] | mg_level | Level of the operator in case of MG methods. |
| [in] | simulation_control | Required to get the time stepping method. |
| [in] | boundary_conditions | Contains information regarding all boundary conditions. Required to weakly impose boundary conditions. |
| [in] | enable_hessians_jacobian | Flag to turn hessian terms from jacobian on or off. |
| [in] | enable_hessians_residual | Flag to turn hessian terms from residual on or off. |
| [in] | enable_mortar | Flag to turn mortar parameters on or off. |
Definition at line 119 of file fluid_dynamics_matrix_free_operators.cc.
References bool_dof_mask, boundary_conditions, compute_element_size(), compute_forcing_term(), compute_solid_cell_mask(), constrained_indices, constrained_values, constraints, create_bool_dof_mask(), edge_constrained_cell, edge_constrained_indices, edge_constrained_values, enable_face_terms, enable_hessians_jacobian, enable_hessians_residual, enable_mortar, fe_degree, forcing_function, BoundaryConditions::function_weak, get_refinement_edges(), Parameters::Stabilization::gls, has_edge_constrained_indices, has_solids, matrix_free, BoundaryConditions::neumann_traction, BoundaryConditions::outlet, BoundaryConditions::pressure, properties_manager, Parameters::Stabilization::pspg_supg, simulation_control, solid_cell_mask, stabilization, and system_matrix.
| void NavierStokesOperatorBase< dim, number >::Tvmult | ( | VectorType & | dst, |
| const VectorType & | src ) const |
Perform the transposed operator evaluation.
| [in,out] | dst | Destination vector holding the result. |
| [in] | src | Input source vector. |
Definition at line 566 of file fluid_dynamics_matrix_free_operators.cc.
References vmult().
| void NavierStokesOperatorBase< dim, number >::update_beta_force | ( | const Tensor< 1, dim > & | beta_force | ) |
Store the values of the source term calculated if dynamic control is enabled in the appropriate structure.
| [in] | beta_force | Source term calculated by the dynamic flow control. |
Definition at line 1338 of file fluid_dynamics_matrix_free_operators.cc.
References beta_force.
| void NavierStokesOperatorBase< dim, number >::vmult | ( | VectorType & | dst, |
| const VectorType & | src ) const |
Perform an operator evaluation dst = A*src by looping with the help of the MatrixFree object over all cells and evaluating the effect of cell integrals.
| [in,out] | dst | Destination vector holding the result. |
| [in] | src | Input source vector. |
Definition at line 502 of file fluid_dynamics_matrix_free_operators.cc.
References constrained_indices, do_boundary_face_integral_range(), do_cell_integral_range(), do_internal_face_integral_range(), edge_constrained_indices, edge_constrained_values, enable_face_terms, enable_mortar, matrix_free, mortar_coupling_operator_mf, and timer.
| void NavierStokesOperatorBase< dim, number >::vmult_interface_down | ( | VectorType & | dst, |
| VectorType const & | src ) const |
Vmult operator for an interface. Required only if local smoothing multigrid is used and for meshes with hanging nodes.
| [in,out] | dst | Destination vector holding the result. |
| [in] | src | Input source vector. |
Definition at line 574 of file fluid_dynamics_matrix_free_operators.cc.
References constrained_indices, do_boundary_face_integral_range(), do_cell_integral_range(), do_internal_face_integral_range(), enable_face_terms, and matrix_free.
| void NavierStokesOperatorBase< dim, number >::vmult_interface_up | ( | VectorType & | dst, |
| VectorType const & | src ) const |
Vmult operator for an interface. Required only if local smoothing multigrid is used and for meshes with hanging nodes.
| [in,out] | dst | Destination vector holding the result. |
| [in] | src | Input source vector. |
Definition at line 600 of file fluid_dynamics_matrix_free_operators.cc.
References do_boundary_face_integral_range(), do_cell_integral_range(), do_internal_face_integral_range(), edge_constrained_indices, enable_face_terms, has_edge_constrained_indices, matrix_free, and timer.
|
protected |
Additional source term in the case of dynamic flow control.
Definition at line 692 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
DoF mask object needed for the sparsity pattern and computation of the system matrix of the coarse level in case FE_Q_iso_Q1 elements are used.
Definition at line 958 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Boundary conditions object to impose the correct boundary conditions. This object is only used to impose boundary conditions that appear in the weak form as face terms (Weak Dirichlet boundary conditions and, eventually, outlets). However, the entire boundary_conditions object is stored instead of trying to isolate which parameters are used since many of them are used in the initialization of the boundary conditions.
Definition at line 721 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Vector with the constrained indices used for the local smoothing approach.
Definition at line 918 of file fluid_dynamics_matrix_free_operators.h.
|
mutableprotected |
Vector with the constrained values used for the local smoothing approach.
Definition at line 924 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Object that stores constraints for the matrix free implementation.
Definition at line 637 of file fluid_dynamics_matrix_free_operators.h.
|
mutableprotected |
Sparsity pattern used when the matrix of certain level is computed and stored.
Definition at line 643 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Vector used to mark edge constrained cells in order to verify constrained indices for the local smoothing approach.
Definition at line 951 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Vector with the constrained edge indices for the local smoothing approach.
Definition at line 930 of file fluid_dynamics_matrix_free_operators.h.
|
mutableprotected |
Vector with edge constrained values used for the local smoothing approach.
Definition at line 943 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the face penalization term effective_beta_face.
Definition at line 891 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Aligned vector to store the element size of all the elements.
Definition at line 656 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Flag to turn the calculation of face terms on or off. This is used for weakly imposed Dirichlet boundary conditions or outlets.
Definition at line 753 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Flag to turn hessian terms from jacobian on or off.
Definition at line 727 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Flag to turn hessian terms from residual on or off.
Definition at line 733 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Flag to turn the computation of mortar coupling terms on or off.
Definition at line 896 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the velocity at faces.
Definition at line 801 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the target pressure of a pressure boundary condition.
Definition at line 815 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the target velocity of a weakly imposed Dirichlet boundary condition.
Definition at line 808 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Finite element degree for the operator.
Definition at line 680 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Force function or source function for the Navier-Stokes equations.
Definition at line 686 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with precomputed forcing term values.
Definition at line 739 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the gradient of the kinematic viscosity w.r.t shear rate.
Definition at line 861 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Variable to identify whether there are edge constrained indices for the local smoothing approach.
Definition at line 937 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Flag indicating whether the simulation contains any solid region (material_id > 0). When false, the solid-cell masking is skipped entirely so the no-solid case has zero overhead in the inner loop.
Definition at line 674 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the kinematic viscosity gradient.
Definition at line 869 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the kinematic viscosity.
Definition at line 854 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Object storing all the relevant data needed for the matrix free implementation.
Definition at line 631 of file fluid_dynamics_matrix_free_operators.h.
| std::shared_ptr<NavierStokesCouplingEvaluationSIPG<dim, double> > NavierStokesOperatorBase< dim, number >::mortar_coupling_evaluator_mf |
Definition at line 503 of file fluid_dynamics_matrix_free_operators.h.
| std::shared_ptr<CouplingOperator<dim, double> > NavierStokesOperatorBase< dim, number >::mortar_coupling_operator_mf |
Definition at line 501 of file fluid_dynamics_matrix_free_operators.h.
| std::shared_ptr<MortarManagerBase<dim> > NavierStokesOperatorBase< dim, number >::mortar_manager_mf |
Mortar coupling manager, operator, and evaluator used in the matrix-free solver. The matrix-based solver uses the shared pointers created in the NS base. Because we have a different system_operator here, we need to create new pointers.
Definition at line 500 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the velocity within the advective term. If ALE is enabled, this term is given by u - u_ALE. Otherwise, it returns the regular velocity tensor.
Definition at line 905 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the gradients of the previous newton step.
Definition at line 769 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the hessian of the previous newton step.
Definition at line 785 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the hessian diagonal of the previous newton step.
Definition at line 777 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the previous newton step.
Definition at line 761 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Conditional OStream for parallel output.
Definition at line 964 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the prescribed Neumann traction boundary condition values.
\((\boldsymbol{\sigma} \cdot \mathbf{n},\, \mathbf{v}) = (\mathrm{traction\_fn},\, \mathbf{v})\). assembled \((\mathbf{v},\mathrm{traction\_fn})\) on boundary faces where Neumann traction is prescribed. Our test function v involves both velocity and pressure components. Hence, the prescribed_neumann_traction has \(\dim\) components corresponding to velocity and 1 component corresponding to pressure (which is dummy), totalling \(\dim+1\) components.
Definition at line 832 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the shear_rate.
Definition at line 877 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the shear_rate_magnitude.
Definition at line 884 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Object pointing to the physical properties manager of the matrix free class.
Definition at line 710 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Object storing the information regarding the time stepping method.
Definition at line 704 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Per-cell-batch mask used to suppress contributions from solid cells (material_id > 0) inside the cell integrals. Each lane is 1.0 for fluid cells and 0.0 for solid cells. Mirrors the matrix-based behavior where solid cells are skipped during assembly. Only filled when has_solids is true.
Definition at line 666 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Stabilization type needed to add or remove terms from operator.
Definition at line 698 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the stabilization parameter tau.
Definition at line 839 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the stabilization parameter tau lsic.
Definition at line 846 of file fluid_dynamics_matrix_free_operators.h.
|
mutableprotected |
Sparse trilinos matrix used when the matrix of certain level is computed and stored.
Definition at line 650 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with precomputed thermal buoyancy term values.
Definition at line 746 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the time derivatives of previous solutions.
Definition at line 793 of file fluid_dynamics_matrix_free_operators.h.
|
mutable |
Timer for internal operator calls.
Definition at line 972 of file fluid_dynamics_matrix_free_operators.h.
|
protected |
Table with correct alignment for vectorization to store the values of the ALE velocity used in mortar coupling terms.
Definition at line 912 of file fluid_dynamics_matrix_free_operators.h.