#include <implicit_explicit_integrator.hpp>
|
| using | VectorType = dealii::LinearAlgebra::distributed::Vector< number > |
| |
| using | ExplicitRhsFunctionType = std::function< void(number, number, VectorType &, const VectorType &, const bool, const std::function< void(unsigned, unsigned)> &)> |
| |
| using | JacobianType = std::function< void(number time, number time_step, VectorType &dst, const VectorType &src)> |
| |
| using | ResidualType = std::function< void(number time, number time_step, const VectorType &src, VectorType &dst, const VectorType &explicit_solution)> |
| |
| using | DistributeConstraintsType = std::function< void(VectorType &dst)> |
| |
| using | CustomSolverType = std::function< void(number time, number time_step, const VectorType &explicit_step_solution, const VectorType &solution)> |
| |
|
| | ImplicitExplicitIntegrator (const TimeIntegratorData< number > &time_integrator_data, const SolverFunctions solver_functions, Preconditioner< dim, VectorType, number > &&preconditioner_in=Preconditioner< dim, VectorType, number >(IdentityPreconditioner< dim, VectorType, number >())) |
| |
| unsigned | required_solution_history_size () const override |
| |
| void | reinit (const VectorType &vector_template) override |
| |
| void | reinit (const SolutionHistory< VectorType > &solution_history) override |
| |
| void | perform_time_step (const number current_time, const number time_step, SolutionHistory< VectorType > &solution_history, const std::function< void(number, number, VectorType &, const VectorType &)> &stage_pre_processing, const std::function< void(number, number, VectorType &, const VectorType &)> &stage_post_processing) override |
| |
| | TimeIntegratorBase (const TimeIntegratorData< number > &time_integrator_data_in) |
| |
| virtual | ~TimeIntegratorBase ()=default |
| |
| TimeIntegratorSchemes | get_integrator_type () const |
| |
| void | set_monitoring_vector (VectorType &monitoring_vector_in) |
| |
| void | reset_monitoring_vector () |
| |
◆ CustomSolverType
template<unsigned int dim, typename number >
◆ DistributeConstraintsType
template<unsigned int dim, typename number >
◆ ExplicitRhsFunctionType
template<unsigned int dim, typename number >
◆ JacobianType
template<unsigned int dim, typename number >
◆ ResidualType
template<unsigned int dim, typename number >
◆ VectorType
template<unsigned int dim, typename number >
◆ ImplicitExplicitIntegrator()
template<unsigned int dim, typename number >
Constructor. After construction it is still make a call to reinit() before the integrator can be used.
- Parameters
-
| time_integrator_data | Time integrator data struct setting the scheme of the integrator. |
| solver_functions | Struct containing the functions used by the internal solver to solve the explicit and implicit step. |
| preconditioner_in | Preconditioner to be used in the linear solver of the implicit step. |
◆ apply_explicit_step()
template<unsigned int dim, typename number >
Apply the explicit and store the result in dst. The solution at \( t^n \) is given by the vector src.
◆ apply_implicit_step()
template<unsigned int dim, typename number >
Solve the implicit step of the implicit-explicit scheme. If the function custom_solver has been set this function is used, otherwise the default nonlinear solver of the class is used. The result, i.e., the solution at the new time step, is stored in solution. The solution after the explicit step is given by explicit_solution.
◆ perform_time_step()
template<unsigned int dim, typename number >
| void MeltPoolDG::TimeIntegration::ImplicitExplicitIntegrator< dim, number >::perform_time_step |
( |
const number |
current_time, |
|
|
const number |
time_step, |
|
|
SolutionHistory< VectorType > & |
solution_history, |
|
|
const std::function< void(number, number, VectorType &, const VectorType &)> & |
stage_pre_processing, |
|
|
const std::function< void(number, number, VectorType &, const VectorType &)> & |
stage_post_processing |
|
) |
| |
|
overridevirtual |
Perform a single time step by first computing an intermediate explicit solution using an explicit Euler step for the part of the pde which is treated explicitly. The explicit step is followed by an implicit Euler step for the implicit part of the PDE resulting in the solution at the new time step.
- Parameters
-
| current_time | Current time. |
| time_step | Current time step size. |
| solution_history | Solution history object providing the current and all required previous solutions. |
| stage_pre_processing | Function which is executed before the explicit step. |
| stage_post_processing | Function which is executed after the solution at the new time step has been computed. |
Implements MeltPoolDG::TimeIntegration::TimeIntegratorBase< number >.
◆ reinit() [1/2]
template<unsigned int dim, typename number >
◆ reinit() [2/2]
template<unsigned int dim, typename number >
◆ required_solution_history_size()
template<unsigned int dim, typename number >
◆ compute_jacobian
template<unsigned int dim, typename number >
Apply the Jacobian of the residual operator to a given vector.
This function computes the action of the Jacobian, associated with the residual
\[
R = \frac{y^{n+1} - \tilde{y}}{\Delta t} - G(y^{n+1}),
\]
on the input vector src and stores the result in dst.
Function Signature:
void f(number time,
number time_step,
dealii::LinearAlgebra::distributed::Vector< number > VectorType
Definition implicit_explicit_integrator.hpp:25
Parameters:
time : Current simulation time \(t^n\).
time_step : Current time step size \(\Delta t\).
dst : Destination vector to store the Jacobian–vector product.
src : Input vector to which the Jacobian is applied.
- Note
- This function is only used if the internal nonlinear solver of the class is used.
◆ compute_residual
template<unsigned int dim, typename number >
Compute the negative residual for the implicit step of the time integrator.
Assuming that the explicit part of the update
\[
\tilde{y} = y^{n} + \Delta t F(y^{n})
\]
has already been computed and is provided as explicit_step_solution, this function evaluates the residual of the implicit equation
\[
R = \frac{y^{n+1} - \tilde{y}}{\Delta t} - G(y^{n+1}),
\]
and returns its negative, i.e., \( -R \). The negative residual is required directly by the internal nonlinear solver.
Function Signature:
void f(number time,
number time_step,
Parameters:
time : Current simulation time \(t^n\).
time_step : Current time step size \(\Delta t\).
dst : Destination vector to store the negative residual.
src : Current solution vector, i.e., \( y^{n+1} \).
explicit_step_solution : Result \(\tilde{y}\) from the explicit step. This vector may be modified safely, as it will be overwritten during the next integration step.
- Note
- This function is only used if the internal nonlinear solver of the class is used.
◆ distribute_constraints
template<unsigned int dim, typename number >
Apply constraints to a given vector.
This function enforces problem-specific constraints (e.g., boundary conditions or degrees of freedom restrictions) directly on the input vector dst.
Function Signature:
Parameters:
dst : Vector to which the constraints are applied (modified in place).
- Note
- This function is only used if the internal nonlinear solver of the class is used.
◆ explicit_compute_rhs
template<unsigned int dim, typename number >
Explicit right-hand side function for the ODE system
\[
y' = F(y) + G(y),
\]
where \(F\) is treated explicitly and \(G\) implicitly. This function computes the explicit part \(F(y)\).
Function Signature:
void f(number time,
number time_step,
const bool zero_dst_vec,
std::function<void(unsigned, unsigned)> post);
Parameters:
time : Current simulation time at \(t^n\).
time_step : Current step size \(\Delta t\).
dst : Destination vector for the explicit RHS contribution.
src : Source solution vector \(y^n\).
zero_dst_vec : If true, zero out dst before adding contributions. This allows efficient accumulation while computing values.
post : Post-processing function applied after computing the RHS. Receives a range of global indices [begin, end) to process, ensuring all indices are handled. Designed for efficient integration with deal.II’s matrix-free framework.
◆ intermediate_explicit_solution
template<unsigned int dim, typename number >
Vector to store the solution of the explicit step.
◆ n_steps_performed
template<unsigned int dim, typename number >
Number of time steps already performed by the integrator.
◆ preconditioner
template<unsigned int dim, typename number >
Preconditioner for the linear solver used within each nonlinear solver iteration.
◆ preconditioner_update_flag
template<unsigned int dim, typename number >
Boolean to indicate whether the preconditioner needs to be updated before the next solve.
◆ solver
template<unsigned int dim, typename number >
Nonlinear solver used when no custom solver is provided.
The documentation for this class was generated from the following files: