LCOV - code coverage report
Current view: top level - src/actions - CheckIntegrityAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 12 13 92.3 %
Date: 2025-07-17 01:28:37 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       61934 : CheckIntegrityAction::validParams()
      19             : {
      20       61934 :   InputParameters params = Action::validParams();
      21       61934 :   return params;
      22             : }
      23             : 
      24       61934 : CheckIntegrityAction::CheckIntegrityAction(const InputParameters & params) : Action(params) {}
      25             : 
      26             : void
      27      113668 : CheckIntegrityAction::act()
      28             : {
      29      113668 :   if (_current_task == "check_integrity_early")
      30             :   {
      31       57629 :     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       57621 :     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       56039 :     _awh.checkUnsatisfiedActions();
      43             : 
      44             :     mooseAssert(_problem, "Problem doesn't exist");
      45       56039 :     _problem->checkProblemIntegrity();
      46             :   }
      47      113548 : }

Generated by: LCOV version 1.14