LCOV - code coverage report
Current view: top level - src/utils - ThermochimicaUtils.C (source / functions) Hit Total Coverage
Test: idaholab/moose chemical_reactions: #31405 (292dce) with base fef103 Lines: 7 7 100.0 %
Date: 2025-09-04 07:52:33 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 "ThermochimicaUtils.h"
      11             : #include "InputParameters.h"
      12             : #include "MooseObject.h"
      13             : #include "Action.h"
      14             : 
      15             : namespace ThermochimicaUtils
      16             : {
      17             : 
      18             : static const std::string message =
      19             :     "To use this object, you need to have the `Thermochimica` library installed. Refer to the "
      20             :     "documentation for guidance on how to enable it.";
      21             : 
      22             : void
      23         922 : addClassDescription(InputParameters & params, const std::string & desc)
      24             : {
      25             : #ifdef THERMOCHIMICA_ENABLED
      26         922 :   params.addClassDescription(desc);
      27             : #else
      28             :   params.addClassDescription(message + " (Original description: " + desc + ")");
      29             : #endif
      30         922 : }
      31             : 
      32             : void
      33         242 : checkLibraryAvailability(MooseObject & self)
      34             : {
      35             : #ifndef THERMOCHIMICA_ENABLED
      36             :   self.paramError("type", message);
      37             : #else
      38             :   libmesh_ignore(self);
      39             : #endif
      40         242 : }
      41             : 
      42             : void
      43         237 : checkLibraryAvailability(Action & self)
      44             : {
      45             : #ifndef THERMOCHIMICA_ENABLED
      46             :   mooseError(self.parameters().blockLocation() + ": " + message);
      47             : #else
      48             :   libmesh_ignore(self);
      49             : #endif
      50         237 : }
      51             : 
      52             : // namespace ThermochimicaUtils
      53             : }

Generated by: LCOV version 1.14