OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
function.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 - 2013 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 function_h
36 #define function_h
37 
38 #include "femcmpnn.h"
39 #include "valuemodetype.h"
40 #include "intarray.h"
41 #include "floatarray.h"
42 #include "gausspoint.h"
43 
44 #include <map>
45 #include <algorithm>
46 
48 
49 #define _IFT_Function_initialvalue "initialvalue"
50 
51 
52 namespace oofem {
53 class FloatArray;
54 class IntArray;
55 
60 class OOFEM_EXPORT FunctionArgument
61 {
62 public:
68  };
69 
72 
73  double val0;
75  int val2;
77 
78  FunctionArgument(double val) : type(FAT_double), val0(val), val1(), val2(0), val3() { }
79  FunctionArgument(FloatArray val) : type(FAT_FloatArray), val0(0), val1(std::move(val)), val2(0), val3() { }
80  FunctionArgument(int val) : type(FAT_int), val0(0), val1(), val2(val), val3() { }
81  FunctionArgument(IntArray val) : type(FAT_IntArray), val0(0), val1(), val2(0), val3(std::move(val)) { }
82 };
83 
88 class OOFEM_EXPORT Function : public FEMComponent
89 {
90 public:
93 
99  Function(int n, Domain * d);
101  virtual ~Function() { }
102 
110  double evaluate(TimeStep *tStep, ValueModeType mode);
111 
117  virtual void evaluate(FloatArray &answer, const std :: map< std :: string, FunctionArgument > &valDict, GaussPoint *gp=NULL, double param=0.);
123  virtual double evaluate(const std :: map< std :: string, FunctionArgument > &valDict);
124 
130  virtual double evaluateAtTime(double t);
136  virtual double evaluateVelocityAtTime(double t) = 0;
142  virtual double evaluateAccelerationAtTime(double t) = 0;
143 
144  double giveFunctionParameter(int paramID);
145 };
146 } // end namespace oofem
147 #endif // function_h
FunctionArgument(double val)
Definition: function.h:78
Class and object Domain.
Definition: domain.h:115
FunctionArgument(IntArray val)
Definition: function.h:81
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
Class implementing an array of integers.
Definition: intarray.h:61
Wrapper for values of varying types.
Definition: function.h:60
Domain * funcDomain
Definition: function.h:91
FunctionArgument(int val)
Definition: function.h:80
FunctionArgumentType type
Determines which of the types the instance points towards.
Definition: function.h:71
Class representing vector of real numbers.
Definition: floatarray.h:82
Abstract base class representing a function with vector input and output.
Definition: function.h:88
FunctionArgument(FloatArray val)
Definition: function.h:79
the oofem namespace is to define a context or scope in which all oofem names are defined.
int parameterType
Definition: function.h:92
virtual ~Function()
Destructor.
Definition: function.h:101
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
The top abstract class of all classes constituting the finite element mesh.
Definition: femcmpnn.h:76

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011