LCOV - code coverage report
Current view: top level - src/executioners - PIMPLESolve.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 13 14 92.9 %
Date: 2025-08-14 10:14:56 Functions: 3 3 100.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             : #include "PIMPLESolve.h"
      11             : #include "FEProblem.h"
      12             : #include "SegregatedSolverUtils.h"
      13             : #include "LinearSystem.h"
      14             : 
      15             : using namespace libMesh;
      16             : 
      17             : InputParameters
      18         286 : PIMPLESolve::validParams()
      19             : {
      20         286 :   InputParameters params = LinearAssemblySegregatedSolve::validParams();
      21         572 :   params.addParam<unsigned int>(
      22             :       "num_piso_iterations",
      23         572 :       0,
      24             :       "The number of PISO iterations without recomputing the momentum matrix.");
      25             : 
      26         286 :   return params;
      27           0 : }
      28             : 
      29         143 : PIMPLESolve::PIMPLESolve(Executioner & ex)
      30             :   : LinearAssemblySegregatedSolve(ex),
      31         286 :     _num_piso_iterations(getParam<unsigned int>("num_piso_iterations"))
      32             : {
      33         143 : }
      34             : 
      35             : std::pair<unsigned int, Real>
      36      101994 : PIMPLESolve::correctVelocity(const bool /*subtract_updated_pressure*/,
      37             :                              const bool /*recompute_face_mass_flux*/,
      38             :                              const SolverParams & solver_params)
      39             : {
      40             :   std::pair<unsigned int, Real> residual;
      41             :   unsigned int piso_iteration_counter = 0;
      42      225688 :   while (piso_iteration_counter <= _num_piso_iterations)
      43             :   {
      44      123694 :     residual = LinearAssemblySegregatedSolve::correctVelocity(
      45             :         piso_iteration_counter == 0, piso_iteration_counter == _num_piso_iterations, solver_params);
      46      123694 :     piso_iteration_counter++;
      47             :   }
      48             : 
      49      101994 :   return residual;
      50             : }

Generated by: LCOV version 1.14