LCOV - code coverage report
Current view: top level - src/ics - ArrayConstantIC.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 "ArrayConstantIC.h"
      11             : 
      12             : #include "libmesh/point.h"
      13             : 
      14             : registerMooseObject("MooseApp", ArrayConstantIC);
      15             : 
      16             : InputParameters
      17       15563 : ArrayConstantIC::validParams()
      18             : {
      19       15563 :   InputParameters params = ArrayInitialCondition::validParams();
      20       15563 :   params.addRequiredParam<RealEigenVector>("value", "The values to be set in IC");
      21       15563 :   params.addClassDescription("Sets constant component values for an array field variable.");
      22       15563 :   return params;
      23           0 : }
      24             : 
      25         690 : ArrayConstantIC::ArrayConstantIC(const InputParameters & parameters)
      26         690 :   : ArrayInitialCondition(parameters), _value(getParam<RealEigenVector>("value"))
      27             : {
      28         690 :   if (_var.count() != _value.size())
      29           4 :     mooseError("'value' size is inconsistent to the number of components of the array variable");
      30         686 : }
      31             : 
      32             : RealEigenVector
      33       97248 : ArrayConstantIC::value(const Point & /*p*/)
      34             : {
      35       97248 :   return _value;
      36             : }

Generated by: LCOV version 1.14