1 #ifndef __ODE_SOLVER_BASE__     2 #define __ODE_SOLVER_BASE__     4 #include <deal.II/base/conditional_ostream.h>     5 #include <deal.II/base/table_handler.h>     6 #include <deal.II/lac/vector.h>     7 #include "parameters/all_parameters.h"     8 #include "limiter/bound_preserving_limiter_factory.hpp"    12 #include "dg/dg_base.hpp"    13 #include "parameters/all_parameters.h"    14 #include "reduced_order/pod_basis_base.h"    22 template <
int dim, 
typename real, 
typename MeshType = dealii::Triangulation<dim>>
    24 template <
int dim, 
typename real, 
typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
    44         const double current_residual,
    45         const std::shared_ptr <dealii::TableHandler> data_table) 
const;
    70     virtual void step_in_time(real dt, 
const bool pseudotime) = 0;
   100     std::shared_ptr<DGBase<dim,real,MeshType>> 
dg;
   103     std::shared_ptr<ProperOrthogonalDecomposition::PODBase<dim>> 
pod;
   106     std::unique_ptr<BoundPreservingLimiter<dim,real>> 
limiter;
 virtual void step_in_time(real dt, const bool pseudotime)=0
Virtual function to evaluate solution update. 
double FR_entropy_contribution_RRK_solver
Entropy FR correction at the current timestep. 
std::shared_ptr< ProperOrthogonalDecomposition::PODBase< dim > > pod
Smart pointer to PODBasis. 
const MPI_Comm mpi_communicator
MPI communicator. 
virtual int steady_state()
Evaluate steady state solution. 
double CFL_factor
CFL factor for (un)successful linesearches. 
const int mpi_rank
MPI rank. 
int advance_solution_time(double time_advance)
Function to advance solution to time+dt. 
double modified_time_step
Modified time step after calling step_in_time. 
virtual ~ODESolverBase()=default
Destructor. 
dealii::LinearAlgebra::distributed::Vector< double > solution_update
Solution update given by the ODE solver. 
void write_ode_solver_steady_state_convergence_data_to_table(const unsigned int current_iteration, const double current_residual, const std::shared_ptr< dealii::TableHandler > data_table) const
Writes the ode solver steady state convergence data to a file. 
unsigned int current_iteration
Current iteration. 
void initialize_steady_polynomial_ramping(const unsigned int global_final_poly_degree)
Ramps up the solution from p0 all the way up to the given global_final_poly_degree. 
double current_desired_time_for_output_solution_every_dt_time_intervals
Current desired time for output solution every dt time intervals. 
Files for the baseline physics. 
double residual_norm_decrease
Current residual norm normalized by initial residual. Only makes sense for steady state...
double initial_residual_norm
Initial residual norm. 
double original_time_step
Original time step before calling step_in_time. 
double get_modified_time_step() const
Getter for modified_time_step. 
Main parameter class that contains the various other sub-parameter classes. 
ODESolverBase(std::shared_ptr< DGBase< dim, real, MeshType > > dg_input, std::shared_ptr< ProperOrthogonalDecomposition::PODBase< dim >> pod)
Default constructor that will set the constants. 
double current_time
Useful for accurate time-stepping. 
const Parameters::AllParameters *const all_parameters
Input parameters. 
double relaxation_parameter_RRK_solver
Relaxation parameter. 
double residual_norm
Current residual norm. Only makes sense for steady state. 
const Parameters::ODESolverParam ode_param
Input ODE solver parameters. 
void valid_initial_conditions() const
Checks whether the DG vector has valid values. 
dealii::ConditionalOStream pcout
Parallel std::cout that only outputs on mpi_rank==0. 
double get_original_time_step() const
Getter for original_time_step. 
virtual double get_automatic_initial_step_size(real dt, const bool pseudotime)
Virtual function to evaluate initial automatic error adaptive time step. 
virtual void allocate_ode_system()=0
Virtual function to allocate the ODE system. 
Parameters related to the ODE solver. 
std::unique_ptr< BoundPreservingLimiter< dim, real > > limiter
Pointer to BoundPreservingLimiter. 
virtual double get_automatic_error_adaptive_step_size(real dt, const bool pseudotime)
Virtual function to evaluate automatic error adaptive time step. 
double update_norm
Norm of the solution update. 
DGBase is independent of the number of state variables. 
dealii::TableHandler solutions_table
Table used to output solution vector at each time step. 
std::shared_ptr< DGBase< dim, real, MeshType > > dg
Smart pointer to DGBase.