https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PiecewiseBase.h
Go to the documentation of this file.
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#pragma once
11
12#include "Function.h"
13#include "LinearInterpolation.h"
14
20class PiecewiseBase : public Function
21{
22public:
24
26
27 virtual Real functionSize() const;
28 virtual Real domain(const int i) const;
29 virtual Real range(const int i) const;
30
35 virtual void setData(const std::vector<Real> & x, const std::vector<Real> & y);
36
37protected:
39 std::vector<Real> _raw_x;
40 std::vector<Real> _raw_y;
42
43 using Function::_name;
44};
Base class for function objects.
Definition Function.h:30
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & _name
The name of this class.
Definition MooseBase.h:381
Function base which provides a piecewise approximation to a specified (x,y) point data set.
virtual Real functionSize() const
static InputParameters validParams()
virtual void setData(const std::vector< Real > &x, const std::vector< Real > &y)
Provides a means for explicitly setting the x and y data.
virtual Real domain(const int i) const
virtual Real range(const int i) const
std::vector< Real > _raw_x
raw function data as read
std::vector< Real > _raw_y