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

Generated by: LCOV version 1.14