LCOV - code coverage report
Current view: top level - include/timeintegrators - ExplicitSSPRungeKutta.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 1 2 50.0 %
Date: 2025-07-17 01:28:37 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #pragma once
      11             : 
      12             : #include "ExplicitTimeIntegrator.h"
      13             : 
      14             : /**
      15             :  * Explicit strong stability preserving Runge-Kutta methods
      16             :  */
      17             : class ExplicitSSPRungeKutta : public ExplicitTimeIntegrator
      18             : {
      19             : public:
      20             :   static InputParameters validParams();
      21             : 
      22             :   ExplicitSSPRungeKutta(const InputParameters & parameters);
      23             : 
      24             :   virtual void computeTimeDerivatives() override;
      25             :   virtual void computeADTimeDerivatives(ADReal & ad_u_dot,
      26             :                                         const dof_id_type & dof,
      27             :                                         ADReal & ad_u_dotdot) const override;
      28             :   virtual void solve() override;
      29             :   virtual void postResidual(NumericVector<Number> & residual) override;
      30           0 :   virtual int order() override { return _order; }
      31         330 :   virtual bool overridesSolve() const override { return true; }
      32             : 
      33             : protected:
      34             :   /**
      35             :    * Solves a stage of the time integrator
      36             :    *
      37             :    * @returns true if converged, false if not
      38             :    */
      39             :   bool solveStage();
      40             : 
      41             :   virtual Real duDotDuCoeff() const override;
      42             : 
      43             :   /// Order of time integration
      44             :   const MooseEnum & _order;
      45             : 
      46             :   /// Number of stages
      47             :   unsigned int _n_stages;
      48             :   /// Runge-Kutta "a" coefficient matrix
      49             :   std::vector<std::vector<Real>> _a;
      50             :   /// Runge-Kutta "b" coefficient vector
      51             :   std::vector<Real> _b;
      52             :   /// Runge-Kutta "c" coefficient vector
      53             :   std::vector<Real> _c;
      54             :   /// Current stage
      55             :   unsigned int _stage;
      56             :   /// Pointer to solution vector for each stage
      57             :   std::vector<const NumericVector<Number> *> _solution_stage;
      58             : 
      59             :   /// Solution vector for intermediate stage
      60             :   NumericVector<Number> * _solution_intermediate_stage;
      61             :   /// Temporary solution vector
      62             :   NumericVector<Number> * _tmp_solution;
      63             :   /// Temporary mass-matrix/solution vector product
      64             :   NumericVector<Number> * _tmp_mass_solution_product;
      65             : };

Generated by: LCOV version 1.14