MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
simentity.cc
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/simentity.cc,v 1.36 2017/01/12 14:46:10 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 #include "mbconfig.h" /* This goes first in every *.c,*.cc file */
33 
34 #include <sstream>
35 
36 #include "simentity.h"
37 #include "dataman.h"
38 #include "tpldrive.h"
39 #include "hint_impl.h"
40 
41 /* SimulationEntity - begin */
42 
44 {
45  NO_OP;
46 }
47 
49 {
50  NO_OP;
51 }
52 
53 bool
54 SimulationEntity::bIsValidIndex(unsigned int i) const
55 {
56  if (i >= 1 && i <= iGetNumDof()) {
57  return true;
58  }
59  return false;
60 }
61 
62 void
66 {
67 #if 0
68  if (*ppX0_Xp0 != NULL) {
69  // scrive in X e XP i dati iniziali
70  }
71 #endif
72  NO_OP;
73 }
74 
75 Hint *
76 SimulationEntity::ParseHint(DataManager *pDM, const char *s) const
77 {
78  return ::ParseHint(pDM, s);
79 }
80 
81 void
83  VectorHandler& /* XP */ ,
84  VectorHandler& /* XPrev */ ,
85  VectorHandler& /* XPPrev */ ) const
86 {
87  NO_OP;
88 }
89 
90 void
92  VectorHandler& /* XP */ )
93 {
94  NO_OP;
95 }
96 
97 void
99  const VectorHandler& /* XPrimeCurr */ )
100 {
101  NO_OP;
102 }
103 
104 void
106  const VectorHandler& XPrimeCurr)
107 {
108  Update(XCurr, XPrimeCurr);
109 }
110 
111 /* Inverse Dynamics: */
112 void
114  InverseDynamics::Order /* iOrder */ )
115 {
116  NO_OP;
117 }
118 
119 void
121  const VectorHandler& /* XP */ )
122 {
123  NO_OP;
124 }
125 
126 /* Inverse Dynamics:*/
127 void
129  const VectorHandler& /* XP */,
130  const VectorHandler& /* XPP */)
131 {
132  NO_OP;
133 }
134 
135 unsigned int
137 {
138  return 0;
139 }
140 
141 unsigned int
143 {
144  silent_cerr("no private data available" << std::endl);
146 }
147 
149 SimulationEntity::dGetPrivData(unsigned int /* i */ ) const
150 {
151  silent_cerr("no private data available" << std::endl);
153 }
154 
155 std::ostream&
156 SimulationEntity::OutputAppend(std::ostream& out) const
157 {
158  return out;
159 }
160 
162 {
163  NO_OP;
164 }
165 
166 /* SimulationEntity - end */
167 
Definition: hint.h:38
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual Hint * ParseHint(DataManager *pDM, const char *s) const
Definition: simentity.cc:76
Hint * ParseHint(DataManager *pDM, const char *s)
Definition: hint_impl.cc:37
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: simentity.cc:142
virtual void ReadInitialState(MBDynParser &HP)
Definition: simentity.cc:161
#define NO_OP
Definition: myassert.h:74
std::vector< Hint * > Hints
Definition: simentity.h:89
SimulationEntity(void)
Definition: simentity.cc:43
virtual std::ostream & OutputAppend(std::ostream &out) const
Definition: simentity.cc:156
virtual void BeforePredict(VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
Definition: simentity.cc:82
virtual doublereal dGetPrivData(unsigned int i) const
Definition: simentity.cc:149
virtual unsigned int iGetNumPrivData(void) const
Definition: simentity.cc:136
virtual bool bIsValidIndex(unsigned int i) const
Definition: simentity.cc:54
virtual unsigned int iGetNumDof(void) const =0
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: simentity.cc:120
virtual void DerivativesUpdate(const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: simentity.cc:105
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
Definition: simentity.cc:91
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
Definition: simentity.cc:63
double doublereal
Definition: colamd.c:52
virtual ~SimulationEntity(void)
Definition: simentity.cc:48
virtual void Update(const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: simentity.cc:98