OOFEM 3.0
Loading...
Searching...
No Matches
scalarfunction.h
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35#ifndef scalarfunction_h
36#define scalarfunction_h
37
38#include "parser.h"
39#include "error.h"
40#include "gausspoint.h"
41#include "floatarray.h"
42
43#include <string>
44#include <map>
45
46namespace oofem {
48class Domain;
49
63{
65 double dValue;
67 std :: string eValue;
70
73
74public:
83 ScalarFunction(double val);
88 ScalarFunction(std :: string & val);
93 ScalarFunction(int val);
94
100 void setValue(double val);
101
106 void setSimpleExpression(std :: string &val);
107
112 void setReference(int val);
113
119 double eval(const std :: map< std :: string, FunctionArgument >valDict, Domain *d, GaussPoint *gp=NULL, double param=0.) const;
120
126 double eval(double time, Domain *d) const;
127
129 /*
130 * Evaluates the receiver (convenience function that directly takes just the time and coordinates as parameters).
131 * @param time Time to evaluate for.
132 * @param coords Coordinates to evaluate for.
133 * @param d domain managing external functions
134 */
135 //double eval(double time, const FloatArray &coords, Domain *d) const;
136
140 bool isDefined() const;
141
142 friend std :: ostream &operator << ( std :: ostream & out, const ScalarFunction & s );
143};
144} // end namespace OOFEM
145
146#endif // scalarfunction_h
enum oofem::ScalarFunction::@044127242061323210226146117116105310173173316037 dvType
Enum value determining the dataValue type.
double dValue
Constant, double value.
void setSimpleExpression(std ::string &val)
int fReference
Reference to external function.
double eval(const std ::map< std ::string, FunctionArgument >valDict, Domain *d, GaussPoint *gp=NULL, double param=0.) const
friend std::ostream & operator<<(std ::ostream &out, const ScalarFunction &s)
void setReference(int val)
void setValue(double val)
std::string eValue
Simple expression (evaluated by internal parser).

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011