![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <cls_scratch_data.h>
Public Member Functions | |
| CLSScratchData (const std::shared_ptr< SimulationControl > &simulation_control, const PhysicalPropertiesManager &properties_manager, const FiniteElement< dim > &fe_cls, const Quadrature< dim > &quadrature, const Quadrature< dim - 1 > &face_quadrature, const Mapping< dim > &mapping, const FiniteElement< dim > &fe_fd) | |
| CLSScratchData (const CLSScratchData< dim > &sd) | |
| void | allocate () override |
| template<typename VectorType> | |
| void | reinit (const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType ¤t_solution, const std::vector< VectorType > &previous_solutions) |
| template<typename VectorType> | |
| void | reinit_internal_face (const typename DoFHandler< dim >::active_cell_iterator &cell, const unsigned int &face_no, const unsigned int &sub_face_no, const typename DoFHandler< dim >::active_cell_iterator &neighbor_cell, const unsigned int &neighbor_face_no, const unsigned int &neighbor_sub_face_no, const VectorType ¤t_solution) |
| template<typename VectorType> | |
| void | reinit_velocity (const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType ¤t_solution, const std::vector< VectorType > &previous_solutions, const Parameters::ALE< dim > &ale) |
| template<typename VectorType> | |
| void | reinit_face_velocity (const typename DoFHandler< dim >::active_cell_iterator &velocity_cell, const unsigned int &face_no, const VectorType &velocity_solution, const Parameters::ALE< dim > &ale) |
| Public Member Functions inherited from PhysicsScratchDataBase | |
| virtual | ~PhysicsScratchDataBase ()=default |
Public Attributes | |
| const std::shared_ptr< SimulationControl > | simulation_control |
| const PhysicalPropertiesManager | properties_manager |
| std::map< field, std::vector< double > > | fields |
| FEValues< dim > | fe_values_cls |
| FEInterfaceValues< dim > | fe_interface_values_cls |
| unsigned int | n_dofs |
| unsigned int | n_interface_dofs |
| unsigned int | n_q_points |
| double | cell_size |
| Table< 1, double > | JxW |
| std::vector< Point< dim > > | quadrature_points |
| std::vector< Point< dim > > | face_quadrature_points |
| std::vector< double > | present_phase_values |
| std::vector< Tensor< 1, dim > > | phase_gradients |
| std::vector< Tensor< 1, dim > > | previous_phase_gradients |
| std::vector< double > | phase_laplacians |
| std::vector< std::vector< double > > | previous_phase_values |
| std::vector< double > | values_here |
| std::vector< double > | values_there |
| std::vector< double > | phase_value_jump |
| Table< 2, double > | phi |
| Table< 2, Tensor< 1, dim > > | grad_phi |
| Table< 2, Tensor< 2, dim > > | hess_phi |
| Table< 2, double > | laplacian_phi |
| FEValues< dim > | fe_values_fd |
| FEFaceValues< dim > | fe_face_values_fd |
| FEValuesExtractors::Vector | velocities_fd |
| std::vector< Tensor< 1, dim > > | velocity_values |
| std::vector< std::vector< Tensor< 1, dim > > > | previous_velocity_values |
| std::vector< Tensor< 2, dim > > | velocity_gradient_values |
| std::vector< double > | velocity_divergences |
| std::vector< Tensor< 1, dim > > | face_velocity_values |
Store the information required by the assembly procedure for a CLS free surface equation. Consequently, this class calculates the phase values (values, gradients, laplacians) and the shape method (values, gradients, laplacians) at all the gauss points for all degrees of freedom and stores it into arrays. This class serves as a separation between the evaluation at the gauss point of the variables of interest and their use in the assembly, which is carried out by the assembler methods.
| dim | An integer that denotes the dimension of the space in which the flow is solved |
Definition at line 34 of file cls_scratch_data.h.
|
inline |
Constructor. The constructor creates the fe_values that will be used to fill the member variables of the scratch. It also allocated the necessary memory for all member variables. However, it does not do any evaluation, since this needs to be done at the cell level.
| simulation_control | The SimulationControl object that holds information related to the control of the steady-state or transient simulation. This is used to extrapolate velocity solutions in time for transient simulation. |
| properties_manager | Manager to calculate the physical properties. |
| fe_cls | The FESystem used to solve the CLS equations. |
| quadrature | The quadrature to use for the assembly within the cells. |
| face_quadrature | The quadrature to use for the assembly on faces. |
| mapping | The mapping of the domain in which the Navier-Stokes equations are solved. |
| fe_fd | The FESystem used to solve the Fluid Dynamics equations. |
Definition at line 62 of file cls_scratch_data.h.
References allocate(), fe_face_values_fd, fe_interface_values_cls, fe_values_cls, fe_values_fd, properties_manager, and simulation_control.
|
inline |
Copy Constructor. Same as the main constructor. This constructor only uses the other scratch to build the FeValues, it does not copy the content of the other scratch into itself since, by definition of the WorkStream mechanism it is assumed that the content of the scratch will be reset on a cell basis.
| sd | The scratch data to be copied |
Definition at line 97 of file cls_scratch_data.h.
References allocate(), CLSScratchData(), fe_face_values_fd, fe_interface_values_cls, fe_values_cls, fe_values_fd, properties_manager, and simulation_control.
|
overridevirtual |
Allocates the memory for the scratch.
This method allocates the necessary memory for all members of the scratch
Implements PhysicsScratchDataBase.
Definition at line 10 of file cls_scratch_data.cc.
References fe_values_cls, grad_phi, hess_phi, JxW, laplacian_phi, maximum_number_of_previous_solutions(), n_dofs, n_q_points, phase_gradients, phase_laplacians, phi, present_phase_values, previous_phase_gradients, previous_phase_values, previous_velocity_values, velocities_fd, velocity_divergences, velocity_gradient_values, and velocity_values.
|
inline |
Reinitialize the content of the scratch.
Using the FeValues and the content of the solutions and previous solutions, fills all of the class member of the scratch
| VectorType | The Vector type used for the solvers |
| [in] | cell | The cell over which the assembly is being carried. This cell must be compatible with the FE which is used to fill the FeValues. |
| [in] | current_solution | The present value of the solution for the CLS. |
| [in] | previous_solutions | The solutions at the previous time steps. |
Definition at line 150 of file cls_scratch_data.h.
References cell_size, compute_cell_diameter(), compute_cell_measure_with_JxW(), fe_values_cls, grad_phi, hess_phi, JxW, laplacian_phi, n_dofs, n_q_points, phase_gradients, phase_laplacians, phi, present_phase_values, previous_phase_gradients, previous_phase_values, and quadrature_points.
|
inline |
Reinitialize the content of the scratch regarding the velocity for internal/boundary faces. The velocity is inherently assumed to have been solved using a CG scheme.
| [in] | cell | The cell over which the assembly is being carried. |
| [in] | face_no | The face index associated with the cell |
| [in] | velocity_solution | The present value of the velocity solution. |
Definition at line 345 of file cls_scratch_data.h.
References Parameters::ALE< dim >::enabled(), face_quadrature_points, face_velocity_values, fe_face_values_fd, velocities_fd, and Parameters::ALE< dim >::velocity.
|
inline |
Reinitialize the content of the scratch for the internal faces. This is only used for the DG assemblers.
| [in] | cell | The cell over which the assembly is being carried. |
| [in] | face_no | The face index associated with the cell |
| [in] | sub_face_no | The subface index associated with the face |
| [in] | neighbor_cell | The neighboring cell |
| [in] | neighbor_face_no | The face index associated with the neighboring cell |
| [in] | neighbor_sub_face_no | The subface index associated with the neighboring cell |
| [in] | current_solution | The present value of the solution. |
Definition at line 216 of file cls_scratch_data.h.
References face_quadrature_points, fe_interface_values_cls, n_interface_dofs, phase_value_jump, values_here, and values_there.
|
inline |
Reinitialize the velocity, calculated by the Fluid Dynamics.
| VectorType | The Vector type used for the solvers |
| cell | The cell for which the velocity is reinitialized This cell must be compatible with the Fluid Dynamics FE |
| current_solution | The present value of the solution for \([u,p]\) |
| previous_solutions | Vector of \(n\) VectorType containers of previous fluid dynamic solutions ( \([u,p]\)). \(n\) depends on the BDF scheme selected for time-stepping. |
| ale | ALE parameters |
Definition at line 268 of file cls_scratch_data.h.
References bdf_extrapolate(), Parameters::ALE< dim >::enabled(), fe_values_fd, n_q_points, number_of_previous_solutions(), previous_velocity_values, quadrature_points, simulation_control, time_stepping_is_bdf(), velocities_fd, Parameters::ALE< dim >::velocity, velocity_divergences, velocity_gradient_values, and velocity_values.
| double CLSScratchData< dim >::cell_size |
Definition at line 393 of file cls_scratch_data.h.
| std::vector<Point<dim> > CLSScratchData< dim >::face_quadrature_points |
Definition at line 398 of file cls_scratch_data.h.
| std::vector<Tensor<1, dim> > CLSScratchData< dim >::face_velocity_values |
Definition at line 434 of file cls_scratch_data.h.
| FEFaceValues<dim> CLSScratchData< dim >::fe_face_values_fd |
Definition at line 424 of file cls_scratch_data.h.
| FEInterfaceValues<dim> CLSScratchData< dim >::fe_interface_values_cls |
Definition at line 389 of file cls_scratch_data.h.
| FEValues<dim> CLSScratchData< dim >::fe_values_cls |
Definition at line 388 of file cls_scratch_data.h.
| FEValues<dim> CLSScratchData< dim >::fe_values_fd |
Scratch component for the Navier-Stokes component
Definition at line 423 of file cls_scratch_data.h.
| std::map<field, std::vector<double> > CLSScratchData< dim >::fields |
Definition at line 385 of file cls_scratch_data.h.
| Table<2, Tensor<1, dim> > CLSScratchData< dim >::grad_phi |
Definition at line 415 of file cls_scratch_data.h.
| Table<2, Tensor<2, dim> > CLSScratchData< dim >::hess_phi |
Definition at line 416 of file cls_scratch_data.h.
| Table<1, double> CLSScratchData< dim >::JxW |
Definition at line 396 of file cls_scratch_data.h.
| Table<2, double> CLSScratchData< dim >::laplacian_phi |
Definition at line 417 of file cls_scratch_data.h.
| unsigned int CLSScratchData< dim >::n_dofs |
Definition at line 390 of file cls_scratch_data.h.
| unsigned int CLSScratchData< dim >::n_interface_dofs |
Definition at line 391 of file cls_scratch_data.h.
| unsigned int CLSScratchData< dim >::n_q_points |
Definition at line 392 of file cls_scratch_data.h.
| std::vector<Tensor<1, dim> > CLSScratchData< dim >::phase_gradients |
Definition at line 402 of file cls_scratch_data.h.
| std::vector<double> CLSScratchData< dim >::phase_laplacians |
Definition at line 405 of file cls_scratch_data.h.
| std::vector<double> CLSScratchData< dim >::phase_value_jump |
Definition at line 411 of file cls_scratch_data.h.
| Table<2, double> CLSScratchData< dim >::phi |
Definition at line 414 of file cls_scratch_data.h.
| std::vector<double> CLSScratchData< dim >::present_phase_values |
Definition at line 401 of file cls_scratch_data.h.
| std::vector<Tensor<1, dim> > CLSScratchData< dim >::previous_phase_gradients |
Definition at line 403 of file cls_scratch_data.h.
| std::vector<std::vector<double> > CLSScratchData< dim >::previous_phase_values |
Definition at line 406 of file cls_scratch_data.h.
| std::vector<std::vector<Tensor<1, dim> > > CLSScratchData< dim >::previous_velocity_values |
Definition at line 429 of file cls_scratch_data.h.
| const PhysicalPropertiesManager CLSScratchData< dim >::properties_manager |
Definition at line 384 of file cls_scratch_data.h.
| std::vector<Point<dim> > CLSScratchData< dim >::quadrature_points |
Definition at line 397 of file cls_scratch_data.h.
| const std::shared_ptr<SimulationControl> CLSScratchData< dim >::simulation_control |
Definition at line 381 of file cls_scratch_data.h.
| std::vector<double> CLSScratchData< dim >::values_here |
Definition at line 409 of file cls_scratch_data.h.
| std::vector<double> CLSScratchData< dim >::values_there |
Definition at line 410 of file cls_scratch_data.h.
| FEValuesExtractors::Vector CLSScratchData< dim >::velocities_fd |
Definition at line 426 of file cls_scratch_data.h.
| std::vector<double> CLSScratchData< dim >::velocity_divergences |
Definition at line 431 of file cls_scratch_data.h.
| std::vector<Tensor<2, dim> > CLSScratchData< dim >::velocity_gradient_values |
Definition at line 430 of file cls_scratch_data.h.
| std::vector<Tensor<1, dim> > CLSScratchData< dim >::velocity_values |
Definition at line 428 of file cls_scratch_data.h.