LCOV - code coverage report
Current view: top level - src/functions - PiecewiseBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 14 15 93.3 %
Date: 2025-08-08 20:01:16 Functions: 6 6 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 "PiecewiseBase.h"
      11             : #include "DelimitedFileReader.h"
      12             : 
      13             : InputParameters
      14       75227 : PiecewiseBase::validParams()
      15             : {
      16       75227 :   return Function::validParams();
      17             : }
      18             : 
      19        2046 : PiecewiseBase::PiecewiseBase(const InputParameters & parameters) : Function(parameters) {}
      20             : 
      21             : Real
      22       15785 : PiecewiseBase::functionSize() const
      23             : {
      24       15785 :   return _raw_x.size();
      25             : }
      26             : 
      27             : Real
      28       85546 : PiecewiseBase::domain(const int i) const
      29             : {
      30       85546 :   return _raw_x[i];
      31             : }
      32             : 
      33             : Real
      34       15637 : PiecewiseBase::range(const int i) const
      35             : {
      36       15637 :   return _raw_y[i];
      37             : }
      38             : 
      39             : void
      40          14 : PiecewiseBase::setData(const std::vector<Real> & x, const std::vector<Real> & y)
      41             : {
      42          14 :   _raw_x = x;
      43          14 :   _raw_y = y;
      44          14 :   if (_raw_x.size() != _raw_y.size())
      45           0 :     mooseError("In PiecewiseBase ", _name, ": Lengths of x and y data do not match.");
      46          14 : }

Generated by: LCOV version 1.14