OperationTypeErasure< dim, number > Class Template Reference
|
Developer Documentation
|
Common interface class for compressible flow operation classes based on the type erasure idiom. More...
#include <operation_type_erasure.hpp>
Classes | |
| struct | OperationConcept |
| Abstract base class defining the interface for compressible flow operations. More... | |
| struct | OperationModel |
| Concrete implementation of OperationConcept using a specific compressible flow operation type. More... | |
Public Types | |
| using | VectorType = dealii::LinearAlgebra::distributed::Vector< number > |
Public Member Functions | |
| OperationTypeErasure ()=default | |
| Default constructor. | |
| template<typename OperationType > | |
| OperationTypeErasure (std::unique_ptr< OperationType > &&operation) | |
| Constructor, takes ownership of the passed unique pointer. | |
| void | solve (const number current_time, const number time_step) |
| Solves the compressible Navier-Stokes equations for a single time step. | |
| void | distribute_dofs (dealii::DoFHandler< dim > &dof_handler) const |
| Distribute the degrees of freedom to the passed dof handler object. | |
| void | reinit () |
| Set up the required internal data structures. | |
| std::vector< std::complex< number > > | estimate_jacobian_eigenvalues (const number time_step) const |
| Estimate the eigenvalues of the Jacobian matrix. | |
| void | attach_output_vectors (GenericDataOut< dim, number > &data_out) const |
| Attach the solution to the passed data out object. | |
| number | compute_time_step_size (const bool do_print=false) const |
| Compute the maximum time step size. | |
| void | set_initial_condition (const dealii::Function< dim > &function) |
| Set the solution vector to the passed initial flow field state. | |
| void | set_boundary_conditions (const std::shared_ptr< SimulationCaseBase< dim, number > > &simulation_case, const std::string &operation_name) |
| Set the boundary conditions. | |
| void | set_body_force (std::unique_ptr< dealii::Function< dim > > body_force_in) |
| Set a body force, e.g. gravity, specified by the passed function. | |
| bool | repartition (VectorType &level_set, const std::function< void()> &distribute_level_set_dofs) |
| Repartition the triangulation among the MPI processes with cell weights according to the location of the cells with respect to the level set, and rebuild all data structures affected by the new partitioning. | |
| void | add_external_force (std::shared_ptr< ExternalFlowForce< dim, number > > external_force_residuum, std::shared_ptr< ExternalFlowForceJacobian< dim, number > > external_force_jacobian=nullptr) |
| const dealii::DoFHandler< dim > & | get_dof_handler () const |
| Get a constant reference to the DoFHandler used in the current operation. | |
| const VectorType & | get_solution () const |
| Get a constant reference to the solution vector. | |
| VectorType & | get_solution () |
| Get a reference to the solution vector. | |
| bool | is_initialized () const |
| Check if the compressible flow operation is initialized,. | |
| void | clear () |
| Delete the compressible flow operation object stored in this class. | |
Private Attributes | |
| std::unique_ptr< OperationConcept > | operation_pimpl |
Detailed Description
class MeltPoolDG::CompressibleFlow::OperationTypeErasure< dim, number >
Common interface class for compressible flow operation classes based on the type erasure idiom.
Member Typedef Documentation
◆ VectorType
| using MeltPoolDG::CompressibleFlow::OperationTypeErasure< dim, number >::VectorType = dealii::LinearAlgebra::distributed::Vector<number> |
Constructor & Destructor Documentation
◆ OperationTypeErasure() [1/2]
|
default |
Default constructor.
◆ OperationTypeErasure() [2/2]
|
inlineexplicit |
Constructor, takes ownership of the passed unique pointer.
- Parameters
-
operation Unique pointer to an operation object for a specific type of compressible flow operation.
Member Function Documentation
◆ add_external_force()
| void MeltPoolDG::CompressibleFlow::OperationTypeErasure< dim, number >::add_external_force | ( | std::shared_ptr< ExternalFlowForce< dim, number > > | external_force_residuum, |
| std::shared_ptr< ExternalFlowForceJacobian< dim, number > > | external_force_jacobian = nullptr |
||
| ) |
◆ attach_output_vectors()
|
inline |
Attach the solution to the passed data out object.
- Parameters
-
data_out Object to which the solution vector is attached.
◆ clear()
|
inline |
Delete the compressible flow operation object stored in this class.
◆ compute_time_step_size()
|
inline |
Compute the maximum time step size.
The maximum time step size arises from the convective and viscous time step limits. It is optionally printed to the console.
- Parameters
-
do_print If true, the time step limit is printed to the console.
◆ distribute_dofs()
|
inline |
Distribute the degrees of freedom to the passed dof handler object.
- Parameters
-
dof_handler Dof handler object used for the compressible flow solver.
◆ estimate_jacobian_eigenvalues()
|
inline |
Estimate the eigenvalues of the Jacobian matrix.
- Parameters
-
time_step The current time step size.
- Returns
- A vector of complex eigenvalues.
◆ get_dof_handler()
|
inline |
Get a constant reference to the DoFHandler used in the current operation.
- Returns
- A constant reference to the dealii::DoFHandler object.
◆ get_solution() [1/2]
|
inline |
Get a reference to the solution vector.
- Returns
- A reference to the solution vector.
◆ get_solution() [2/2]
|
inline |
Get a constant reference to the solution vector.
- Returns
- A constant reference to the solution vector.
◆ is_initialized()
|
inline |
Check if the compressible flow operation is initialized,.
Check that the current object holds a valid pointer to any compressible flow operation object.
- Returns
- True if object holds a valid preconditioner object.
◆ reinit()
|
inline |
Set up the required internal data structures.
After a call to this function the solve() function of the class can be utilized.
◆ repartition()
|
inline |
Repartition the triangulation among the MPI processes with cell weights according to the location of the cells with respect to the level set, and rebuild all data structures affected by the new partitioning.
Repartitioning reduces the potential load imbalance between MPI processes in cut applications caused by the increased complexity of evaluating and integrating over intersected cells.
- Parameters
-
level_set Level-set vector, which is transferred to the new partitioning. distribute_level_set_dofs Function that distributes the DoFs of the level-set DoFHandler and reinitializes level_setaccording to the new partitioning.
- Returns
- True if the triangulation has been repartitioned.
- Note
- The function simply passes the parameters to the corresponding operation function.
- Exceptions
-
This function is only available for cut-element applications. An exception is thrown if the operation does not support repartitioning.
◆ set_body_force()
|
inline |
Set a body force, e.g. gravity, specified by the passed function.
- Parameters
-
body_force_in Function specifying the body force.
- Note
- The function simply passes the parameters to the corresponding operator function.
◆ set_boundary_conditions()
|
inline |
Set the boundary conditions.
- Parameters
-
simulation_case dealii::Pointer to the considered simulation case class. operation_name String for the name of the considered operation.
- Note
- The function simply passes the parameters to the corresponding operation function.
◆ set_initial_condition()
|
inline |
Set the solution vector to the passed initial flow field state.
- Parameters
-
function Initial condition of the flow field.
◆ solve()
|
inline |
Solves the compressible Navier-Stokes equations for a single time step.
- Parameters
-
current_time Current time at t^n. time_step Current time step size.
Member Data Documentation
◆ operation_pimpl
|
private |
Pointer to the actual compressible flow operation object to which the function calls are forwarded.
The documentation for this class was generated from the following file:
- include/meltpooldg/compressible_flow/operation_type_erasure.hpp
Generated by