https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PiecewiseConstantFromCSV.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 "PropertyReadFile.h"
14
19{
20public:
22
24
31 virtual Real value(Real t, const Point & pt) const override;
32 using Function::value;
33
34 virtual Real timeDerivative(Real, const Point &) const override { return 0; };
35
36protected:
37 void initialSetup() override;
38
41
43 const unsigned int _column_number;
44
47
49 std::unique_ptr<libMesh::PointLocatorBase> _point_locator;
50};
Base class for function objects.
Definition Function.h:30
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero,...
Definition Function.C: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
Function which provides a piecewise constant, in space, field from a CSV file.
const PropertyReadFile::ReadTypeEnum _read_type
Type of read - element, grain, or block.
const unsigned int _column_number
The column number of interest in the CSV file.
const PropertyReadFile * _read_prop_user_object
A user object that takes care of reading the CSV file.
void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
std::unique_ptr< libMesh::PointLocatorBase > _point_locator
The point locator is used when values are sorted by elements or blocks in the CSV.
virtual Real value(Real t, const Point &pt) const override
Get the value of the function based on the data in the CSV file.
virtual Real timeDerivative(Real, const Point &) const override
Get the time derivative of the function.
static InputParameters validParams()
Read properties from file - grain, element, node or block Input file syntax: prop1 prop2 etc.
ReadTypeEnum
How data is organized in the CSV file.