https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PiecewiseTabularInterface.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 "MooseObject.h"
13#include "InputParameters.h"
14
15class JSONFileReader;
16
18{
19public:
21
23 std::vector<Real> & data_x,
24 std::vector<Real> & data_y);
25
26protected:
28 bool isRawDataLoaded() const { return _raw_data_loaded; }
29
32
34 void buildFromJSON(const JSONFileReader & json_uo);
35
37 void buildFromXandY();
38
40 void buildFromXY();
41
43 unsigned int _axis;
44 const bool _has_axis;
46
47private:
50
53
55 bool _raw_data_loaded = false;
56
58 std::vector<Real> & _data_x;
59 std::vector<Real> & _data_y;
61};
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
User object that reads a JSON file and makes its data available to other objects.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
void buildFromXY()
Builds data from 'xy_data' parameter.
const MooseObject & _object
The object.
static InputParameters validParams()
void buildFromXandY()
Builds data from 'x' and 'y' parameters.
const InputParameters & _parameters
Parameters supplied to the object.
bool isRawDataLoaded() const
Returns whether the raw data has been loaded already.
void buildFromFile(const libMesh::Parallel::Communicator &comm)
Reads data from supplied CSV file.
std::vector< Real > & _data_x
raw function data as read
unsigned int _axis
if _has_axis is true point component to use as function argument, otherwise use t
void buildFromJSON(const JSONFileReader &json_uo)
Reads data from supplied JSON reader.
bool _raw_data_loaded
Boolean to keep track of whether the data has been loaded.