MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ScalarFunctions.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/ScalarFunctions.h,v 1.23 2017/01/12 14:46:08 masarati Exp $ */
2 /*
3  * HmFe (C) is a FEM analysis code.
4  *
5  * Copyright (C) 1996-2017
6  *
7  * Marco Morandini <morandini@aero.polimi.it>
8  *
9  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
10  * via La Masa, 34 - 20156 Milano, Italy
11  * http://www.aero.polimi.it
12  *
13  * Changing this copyright notice is forbidden.
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  *
18  */
19 /*
20  * MBDyn (C) is a multibody analysis code.
21  * http://www.mbdyn.org
22  *
23  * Copyright (C) 1996-2017
24  *
25  * This code is a partial merge of HmFe and MBDyn.
26  *
27  * Pierangelo Masarati <masarati@aero.polimi.it>
28  * Paolo Mantegazza <mantegazza@aero.polimi.it>
29  *
30  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
31  * via La Masa, 34 - 20156 Milano, Italy
32  * http://www.aero.polimi.it
33  *
34  * Changing this copyright notice is forbidden.
35  *
36  * This program is free software; you can redistribute it and/or modify
37  * it under the terms of the GNU General Public License as published by
38  * the Free Software Foundation (version 2 of the License).
39  *
40  *
41  * This program is distributed in the hope that it will be useful,
42  * but WITHOUT ANY WARRANTY; without even the implied warranty of
43  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44  * GNU General Public License for more details.
45  *
46  * You should have received a copy of the GNU General Public License
47  * along with this program; if not, write to the Free Software
48  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
49  */
50 #ifndef ScalarFunctions_hh
51 #define ScalarFunctions_hh
52 
53 #include "ac/f2c.h"
54 
56 public:
57  virtual ~BasicScalarFunction();
58  virtual doublereal operator()(const doublereal x) const = 0;
59 };
60 
62 public:
64  virtual doublereal operator()(const doublereal x) const = 0;
65  virtual doublereal ComputeDiff(const doublereal x, const integer order = 1) const = 0;
66 };
67 
68 class MBDynParser;
69 class DataManager;
70 
71 // implemented in ScalarFunctionsImpl.cc
72 extern const BasicScalarFunction *const
74 
75 extern void
77 
79  virtual ~ScalarFunctionRead( void ) { NO_OP; };
80  virtual const BasicScalarFunction *
81  Read(DataManager* const pDM, MBDynParser& HP) const = 0;
82 };
83 
84 extern bool
85 SetSF(const std::string &s, const ScalarFunctionRead *rf);
86 
87 extern void InitSF(void);
88 extern void DestroySF(void);
89 
90 #endif //ScalarFunctions_hh
virtual doublereal operator()(const doublereal x) const =0
#define NO_OP
Definition: myassert.h:74
enum @55 order
virtual ~ScalarFunctionRead(void)
virtual doublereal operator()(const doublereal x) const =0
void DestroySF(void)
virtual doublereal ComputeDiff(const doublereal x, const integer order=1) const =0
void InitSF(void)
bool SetSF(const std::string &s, const ScalarFunctionRead *rf)
virtual const BasicScalarFunction * Read(DataManager *const pDM, MBDynParser &HP) const =0
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
const BasicScalarFunction *const ParseScalarFunction(MBDynParser &HP, DataManager *const pDM)
void SetScalarFunctionDriveCallerData(void)