LCOV - code coverage report
Current view: top level - src/actions - CheckIntegrityAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 12 13 92.3 %
Date: 2025-08-08 20:01:16 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 "CheckIntegrityAction.h"
      11             : #include "ActionWarehouse.h"
      12             : #include "FEProblem.h"
      13             : 
      14             : registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity");
      15             : registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity_early");
      16             : 
      17             : InputParameters
      18       66787 : CheckIntegrityAction::validParams()
      19             : {
      20       66787 :   InputParameters params = Action::validParams();
      21       66787 :   return params;
      22             : }
      23             : 
      24       66787 : CheckIntegrityAction::CheckIntegrityAction(const InputParameters & params) : Action(params) {}
      25             : 
      26             : void
      27      122708 : CheckIntegrityAction::act()
      28             : {
      29      122708 :   if (_current_task == "check_integrity_early")
      30             :   {
      31       62153 :     if (!_app.getExecutioner() && !_app.getExecutor())
      32           8 :       mooseError("\"Executioner\" does not exist, make sure your input file contains an "
      33             :                  "[Executioner] block or your simulation adds an Executioner through an Action.");
      34             : 
      35             :     // This situation shouldn't be possible due to "determine_system_type" and/or autobuild.
      36       62145 :     if (!_problem)
      37           0 :       mooseError("Your simulation does not contain a \"Problem\", which ironically means that YOU "
      38             :                  "have a problem...");
      39             :   }
      40             :   else
      41             :   {
      42       60555 :     _awh.checkUnsatisfiedActions();
      43             : 
      44             :     mooseAssert(_problem, "Problem doesn't exist");
      45       60555 :     _problem->checkProblemIntegrity();
      46             :   }
      47      122588 : }

Generated by: LCOV version 1.14