MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
drive.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/drive.h,v 1.58 2017/05/29 16:09:39 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 /* drivers */
33 
34 #ifndef DRIVE_H
35 #define DRIVE_H
36 
37 
38 /* include generali */
39 #include <time.h>
40 #include "ac/f2c.h"
41 #include "ac/pthread.h"
42 
43 /* include per il debug */
44 #include "myassert.h"
45 #include "mynewmem.h"
46 
47 /* include del programma */
48 #include "mathp.h"
49 #include "output.h"
50 #include "solman.h"
51 #include "withlab.h"
52 
53 #ifdef USE_AUTODIFF
54 #include <gradient.h>
55 #endif
56 
57 extern const char* psDriveNames[];
58 extern const char* psReadControlDrivers[];
59 
60 /* Drive - begin */
61 
62 /* Classe dei drivers, ovvero oggetti che sono in grado di restituire
63  * il valore di certi parametri utilizzati da elementi in funzione
64  * di altri parametri indipendenti, principalmente del tempo.
65  * Per ora la principale classe derivata da questi e' costituita
66  * da funzioni ottenute per interpolazione di dati forniti dall'utente.
67  * Esistono altri due tipi di drivers che, per varie ragioni, non
68  * sono stati derivati da questa classe, ma incorporati
69  * direttamente nel DriveHandler (vedi sotto). Questi due tipi restituiscono
70  * il valore mediante valutazione di funzioni prestabilite in dipendenza da
71  * parametri forniti dal valutatore, dato dalla classe DriveCaller.
72  * Nel primo caso la funzione e' "built-in" nel DriveHandler, nel secondo
73  * si ottiene mediante valutazione nel MathParser di una stringa fornita
74  * dall'utente. La tabella dei simboli del MathParser contiene di default
75  * la variabile Time, che viene mantenuta aggiornata e puo' essere usata
76  * per valutare il valore delle espressioni fornite dall'utente.
77  *
78  * Quindi:
79  * - ogni elemento che usa drivers contiene gli opportuni DriveCaller.
80  * - il DriveCaller contiene i dati necessari per chiamare il DriveHandler.
81  * - il DriveHandler restituisce il valore richiesto:
82  * - valutando le funzioni "built-in"
83  * - interrogando i singoli Drive.
84  * */
85 
86 class DriveHandler;
87 class DriveCaller;
88 
89 class Drive : public WithLabel {
90 public:
91  // Tipi di drive
92  enum Type {
93  UNKNOWN = -1,
94 
95  FILEDRIVE = 0,
96 
98  };
99 
100 public:
101  enum Bailout {
102  BO_NONE = 0x0,
103  BO_UPPER = 0x1,
104  BO_LOWER = 0x2,
106  };
107 
108 protected:
111 
112 public:
113  Drive(unsigned int uL, const DriveHandler* pDH);
114  virtual ~Drive(void);
115 
116  /* Tipo del drive (usato solo per debug ecc.) */
117  virtual Drive::Type GetDriveType(void) const = 0;
118 
119  virtual std::ostream& Restart(std::ostream& out) const = 0;
120 
121  virtual void ServePending(const doublereal& t) = 0;
122 };
123 
124 /* Drive - end */
125 
126 /* DriveOwner - begin */
127 
128 /* Possessore di DriveCaller, ne garantisce la corretta distruzione */
129 
130 class DriveOwner {
131  void operator=(const DriveOwner&) {}
132 protected:
134 
135 public:
136  DriveOwner(const DriveCaller* pDC = 0);
137  DriveOwner(const DriveOwner& drive);
138  virtual ~DriveOwner(void);
139 
140  void Set(const DriveCaller* pDC);
141  DriveCaller* pGetDriveCaller(void) const;
142 
143  doublereal dGet(const doublereal& dVar) const;
144  doublereal dGet(void) const;
145 
146  /* this is about drives that are differentiable */
147  bool bIsDifferentiable(void) const;
148  doublereal dGetP(const doublereal& dVar) const;
149  doublereal dGetP(void) const;
150 
151 #ifdef USE_AUTODIFF
152  inline void dGet(doublereal x, doublereal& y) const;
153  template <int N>
154  inline void dGet(const grad::Gradient<N>& x, grad::Gradient<N>& y) const;
155 #endif
156 };
157 
158 /* DriveOwner - end */
159 
160 
161 
162 
163 /* DriveHandler - begin */
164 
165 /* Classe che gestisce la valutazione del valore dei Drive. L'oggetto e'
166  * posseduto dal DataManager, che lo costruisce e lo mette a disposizione
167  * dei DriveCaller. Contiene i Drive definiti dall'utente piu' i due
168  * "built-in" che valutano funzioni prestabilite o fornite dall'utente
169  * sotto forma di stringa */
170 
172  friend class DataManager;
173  friend class RandDriveCaller;
174  friend class MeterDriveCaller;
176  friend class SHDriveCaller;
177 
178 private:
179 #ifdef USE_MULTITHREAD
180  mutable pthread_mutex_t parser_mutex;
181 #endif /* USE_MULTITHREAD */
183 
184  /* variabili predefinite: tempo e variabile generica */
189 
190  static doublereal dDriveHandlerReturnValue; /* Usato per ritornare un reference */
191 
194 
196 
197  /* For meters */
198  class MyMeter : public WithLabel {
199  protected:
201  mutable integer iCurr;
202 
203  public:
204  MyMeter(unsigned int uLabel, integer iS = 1);
205  virtual ~MyMeter(void);
206 
207  inline integer iGetSteps(void) const;
208  inline bool bGetMeter(void) const;
209  virtual inline void Set(void);
210  };
211 
212  /* For random drivers */
213  class MyRand : public MyMeter {
214  protected:
216 
217  public:
218  MyRand(unsigned int uLabel, integer iS = 1, integer iR = 0);
219  virtual ~MyRand(void);
220 
221  inline integer iGetSteps(void) const;
222  inline integer iGetRand(void) const;
223  virtual inline void Set(void);
224  };
225 
226  /* For closest next drivers */
227  class MyClosestNext : public WithLabel {
228  protected:
233 
234  public:
235  MyClosestNext(unsigned int uLabel, const DriveHandler *pDH,
236  const DriveCaller *pIncrementDC, doublereal dStartTime);
237  virtual ~MyClosestNext(void);
238 
239  inline bool bGetClosestNext(void) const;
240  virtual inline void Set(void);
241  };
242 
243  /* For sample'n'hold */
244  class MySH : public WithLabel {
245  protected:
247  mutable doublereal dVal;
250 
251  public:
252  MySH(unsigned int uLabel,
253  const DriveCaller *pFunc,
254  const DriveCaller *pTrigger,
255  const doublereal dVal0);
256  virtual ~MySH(void);
257 
258  inline doublereal dGetSH(void) const;
259  virtual inline void Set(void);
260  const DriveCaller *pGetFunc(void) const;
261  const DriveCaller *pGetTrigger(void) const;
262  const doublereal dGetVal0(void) const;
263  };
264 
265  std::vector<MyMeter *> Meter;
266  std::vector<MyRand *> Rand;
267  std::vector<MyClosestNext *> ClosestNext;
268  std::vector<MySH *> SH;
269 
270 protected:
271  void SetTime(const doublereal& dt, const doublereal& dts,
272  const integer& s);
273  void LinkToSolution(const VectorHandler& XCurr,
274  const VectorHandler& XPrimeCurr);
275  integer iRandInit(integer iSteps);
276  integer iMeterInit(integer iSteps);
277  integer iClosestNextInit(const DriveCaller *pIncrement, doublereal dStartTime);
278  integer iSHInit(const DriveCaller *pFunc, const DriveCaller *pTrigger,
279  const doublereal dVal0);
280 
281 public:
283  ~DriveHandler(void);
284 
285  void PutSymbolTable(Table& T);
286  void SetVar(const doublereal& dVar);
287 
288 #ifndef USE_EE
289  doublereal dGet(InputStream& InStr) const;
290 #endif // ! USE_EE
291 
292  inline doublereal dGetTime(void) const;
293  inline doublereal dGetTimeStep(void) const;
294  inline integer iGetStep(void) const;
295  inline long int iGetRand(integer iNumber) const;
296  inline bool bGetMeter(integer iNumber) const;
297  inline bool bGetClosestNext(integer iNumber) const;
298  inline doublereal dGetSH(integer iNumber) const;
299 
300  const DriveCaller *pGetSHFunc(integer iNumber) const;
301  const DriveCaller *pGetSHTrigger(integer iNumber) const;
302  const doublereal dGetSHVal0(integer iNumber) const;
303 };
304 
305 
306 inline integer
308 {
309  return iRand;
310 }
311 
312 
313 inline void
315 {
316  MyMeter::Set();
317  if (iCurr == 0) {
318  iRand = rand();
319  }
320 }
321 
322 
323 inline integer
325 {
326  return iSteps;
327 }
328 
329 
330 inline bool
332 {
333  return iCurr == 0;
334 }
335 
336 
337 inline void
339 {
340  if (++iCurr == iSteps) {
341  iCurr = 0;
342  }
343 }
344 
345 
346 inline bool
348 {
349  return pDH->dGetTime() >= dNext;
350 }
351 
352 
353 inline void
355 {
356  if (bMustSetNext) {
357  do {
358  dNext += Increment.dGet();
359  } while (bGetClosestNext());
360 
361  bMustSetNext = false;
362 
363  } else if (bGetClosestNext()) {
364  bMustSetNext = true;
365  }
366 }
367 
368 
369 inline doublereal
371 {
372  return dVal;
373 }
374 
375 
376 inline void
378 {
379  if (Trigger.dGet()) {
380  dVal = Func.dGet();
381  }
382 }
383 
384 
385 inline doublereal
387 {
388  ASSERT(pTime != 0);
389  return pTime->GetVal().GetReal();
390 }
391 
392 inline doublereal
394 {
395  ASSERT(pTimeStep != 0);
396  return pTimeStep->GetVal().GetReal();
397 }
398 
399 inline integer
401 {
402  ASSERT(pStep != 0);
403  return pStep->GetVal().GetInt();
404 }
405 
406 
407 inline long int
409 {
410  return Rand[iNumber]->iGetRand();
411 }
412 
413 
414 inline bool
416 {
417  return Meter[iNumber]->bGetMeter();
418 }
419 
420 inline bool
422 {
423  return ClosestNext[iNumber]->bGetClosestNext();
424 }
425 
426 inline doublereal
428 {
429  return SH[iNumber]->dGetSH();
430 }
431 
432 /* DriveHandler - end */
433 
434 
435 
436 /* DriveCaller - begin */
437 
438 /* Classe che chiama il drive handler per ottenere il valore del driver ad
439  * un dato istante di tempo. Gli oggetti sono posseduti dai singoli elementi.
440  * Ogni oggetto contiene i parametri che gli occorrono per la chiamata. */
441 
442 class DriveCaller : public WithLabel, public ToBeOutput, public Traceable {
443 protected:
445 
446 public:
447  enum OutputFlags {
448  OUTPUT_VALUE = OUTPUT_PRIVATE << 0,
449  OUTPUT_DERIVATIVE = OUTPUT_PRIVATE << 1
450  };
451 
452  enum TraceFlags {
453  TRACE_VALUE = TRACE_PRIVATE << 0,
454  TRACE_DERIVATIVE = TRACE_PRIVATE << 1
455  };
456 
457  DriveCaller(const DriveHandler* pDH);
458  virtual ~DriveCaller(void);
459 
460  /* Copia */
461  virtual DriveCaller* pCopy(void) const = 0;
462 
463  /* Scrive il contributo del DriveCaller al file di restart */
464  virtual std::ostream& Restart(std::ostream& out) const = 0;
465 
466  /* Restituisce il valore del driver */
467  virtual doublereal dGet(const doublereal& dVar) const = 0;
468  virtual inline doublereal dGet(void) const;
469 
470 #ifdef USE_AUTODIFF
471  inline void dGet(doublereal x, doublereal& y) const;
472  template <int N>
473  inline void dGet(const grad::Gradient<N>& x, grad::Gradient<N>& y) const;
474 #endif
475 
476  /* this is about drives that are differentiable */
477  virtual bool bIsDifferentiable(void) const;
478  virtual doublereal dGetP(const doublereal& dVar) const;
479  virtual inline doublereal dGetP(void) const;
480 
481  /* allows to set the drive handler */
482  virtual void SetDrvHdl(const DriveHandler* pDH);
483  virtual const DriveHandler *pGetDrvHdl(void) const;
484  virtual void Output(OutputHandler& OH) const;
485  virtual void Trace(OutputHandler& OH) const;
486 };
487 
488 inline doublereal
489 DriveCaller::dGet(void) const
490 {
491  return dGet(pDrvHdl->dGetTime());
492 }
493 
494 inline bool
496 {
497  return false;
498 }
499 
500 inline doublereal
502 {
503  return dGetP(pDrvHdl->dGetTime());
504 }
505 
506 #ifdef USE_AUTODIFF
507 inline void DriveCaller::dGet(doublereal x, doublereal& y) const
508 {
509  y = dGet(x);
510 }
511 
512 template <int N>
513 inline void DriveCaller::dGet(const grad::Gradient<N>& gx, grad::Gradient<N>& gy) const
514 {
515  using namespace grad;
516  const doublereal x = gx.dGetValue();
517  const doublereal y = dGet(x);
518  const doublereal dy_dx = dGetP(x);
519 
520  gy.SetValuePreserve(y);
521  gy.DerivativeResizeReset(gx.pGetDofMap(), gx.iGetStartIndexLocal(), gx.iGetEndIndexLocal(), MapVectorBase::LOCAL, 0.);
522 
523  for (index_type i = gx.iGetStartIndexLocal(); i < gx.iGetEndIndexLocal(); ++i) {
524  gy.SetDerivativeLocal(i, dy_dx * gx.dGetDerivativeLocal(i));
525  }
526 }
527 
528 inline void DriveOwner::dGet(doublereal x, doublereal& y) const
529 {
530  pDriveCaller->dGet(x, y);
531 }
532 
533 template <int N>
534 inline void DriveOwner::dGet(const grad::Gradient<N>& x, grad::Gradient<N>& y) const
535 {
536  pDriveCaller->dGet(x, y);
537 }
538 #endif
539 
540 /* DriveCaller - end */
541 
542 
543 /* NullDriveCaller - begin */
544 
545 class NullDriveCaller : public DriveCaller {
546 public:
547  NullDriveCaller(void);
548  virtual ~NullDriveCaller(void);
549 
550  /* Copia */
551  virtual DriveCaller* pCopy(void) const;
552 
553  /* Scrive il contributo del DriveCaller al file di restart */
554  virtual std::ostream& Restart(std::ostream& out) const;
555 
556  /* Restituisce il valore del driver */
557  virtual inline doublereal dGet(const doublereal& dVar) const;
558  virtual inline doublereal dGet(void) const;
559 
560  /* this is about drives that are differentiable */
561  virtual bool bIsDifferentiable(void) const;
562  virtual doublereal dGetP(const doublereal& dVar) const;
563  virtual inline doublereal dGetP(void) const;
564 };
565 
566 inline doublereal
567 NullDriveCaller::dGet(const doublereal& /* dVar */ ) const
568 {
569  return 0.;
570 }
571 
572 inline doublereal
574 {
575  return 0.;
576 }
577 
578 inline bool
580 {
581  return true;
582 }
583 
584 inline doublereal
585 NullDriveCaller::dGetP(const doublereal& /* dVar */ ) const
586 {
587  return 0.;
588 }
589 
590 inline doublereal
592 {
593  return 0.;
594 }
595 
596 /* NullDriveCaller - end */
597 
598 
599 /* OneDriveCaller - begin */
600 
601 class OneDriveCaller : public DriveCaller {
602 public:
603  OneDriveCaller(void);
604  virtual ~OneDriveCaller(void);
605 
606  /* Copia */
607  virtual DriveCaller* pCopy(void) const;
608 
609  /* Scrive il contributo del DriveCaller al file di restart */
610  virtual std::ostream& Restart(std::ostream& out) const;
611 
612  /* Restituisce il valore del driver */
613  virtual inline doublereal dGet(const doublereal& dVar) const;
614  virtual inline doublereal dGet(void) const;
615 
616  /* this is about drives that are differentiable */
617  virtual bool bIsDifferentiable(void) const;
618  virtual doublereal dGetP(const doublereal& dVar) const;
619  virtual inline doublereal dGetP(void) const;
620 };
621 
622 inline doublereal
623 OneDriveCaller::dGet(const doublereal& /* dVar */ ) const
624 {
625  return 1.;
626 }
627 
628 inline doublereal
630 {
631  return 1.;
632 }
633 
634 inline bool
636 {
637  return true;
638 }
639 
640 inline doublereal
641 OneDriveCaller::dGetP(const doublereal& /* dVar */ ) const
642 {
643  return 0.;
644 }
645 
646 inline doublereal
648 {
649  return 0.;
650 }
651 
652 /* OneDriveCaller - end */
653 
654 
655 /* ConstDriveCaller - begin */
656 
658 private:
660 
661 public:
663  virtual ~ConstDriveCaller(void);
664 
665  /* Copia */
666  virtual DriveCaller* pCopy(void) const;
667 
668  /* Scrive il contributo del DriveCaller al file di restart */
669  virtual std::ostream& Restart(std::ostream& out) const;
670 
671  inline doublereal dGet(const doublereal& /* dVar */ ) const;
672  inline doublereal dGet(void) const;
673 
674  /* this is about drives that are differentiable */
675  virtual bool bIsDifferentiable(void) const;
676  virtual doublereal dGetP(const doublereal& dVar) const;
677  virtual inline doublereal dGetP(void) const;
678 };
679 
680 inline doublereal
681 ConstDriveCaller::dGet(const doublereal& /* dVar */ ) const
682 {
683  return dConst;
684 }
685 
686 inline doublereal
688 {
689  return dConst;
690 }
691 
692 inline bool
694 {
695  return true;
696 }
697 
698 inline doublereal
699 ConstDriveCaller::dGetP(const doublereal& /* dVar */ ) const
700 {
701  return 0.;
702 }
703 
704 inline doublereal
706 {
707  return 0.;
708 }
709 
710 /* ConstDriveCaller - end */
711 
712 
713 class DataManager;
714 class MBDynParser;
715 
716 
717 /* prototype of the functional object: reads a drive */
718 struct DriveRead {
719 public:
720  virtual ~DriveRead(void);
721  virtual Drive *
722  Read(unsigned uLabel, const DataManager *pDM, MBDynParser& HP) = 0;
723 };
724 
725 /* drive registration function: call to register one */
726 extern bool
727 SetDriveData(const std::string &s, DriveRead *rf);
728 
729 /* function that reads a drive */
730 extern Drive *
731 ReadDriveData(unsigned uLabel, const DataManager *pDM, MBDynParser& HP);
732 
733 /* create/destroy */
734 extern void InitDriveData(void);
735 extern void DestroyDriveData(void);
736 
737 
738 /* prototype of the functional object: reads a drive caller */
740 protected:
741  /* Helper */
742  void
743  NeedDM(const DataManager* pDM, MBDynParser& HP, bool bDeferred,
744  const char *const name);
745 
746 public:
747  virtual ~DriveCallerRead(void);
748  virtual DriveCaller *
749  Read(const DataManager* pDM, MBDynParser& HP, bool bDeferred) = 0;
750  static void ReadOutput(DriveCaller* pDC, const DataManager* pDM, MBDynParser& HP);
751 };
752 
753 /* drive caller registration function: call to register one */
754 extern bool
755 SetDriveCallerData(const char *name, DriveCallerRead* rf);
756 
757 /* function that reads a drive caller */
758 extern DriveCaller*
759 ReadDriveCallerData(const DataManager* pDM, MBDynParser& HP, bool bDeferred);
760 
761 /* create/destroy */
762 extern void InitDriveCallerData(void);
763 extern void DestroyDriveCallerData(void);
764 
765 #endif /* DRIVE_H */
766 
virtual doublereal dGet(void) const
Definition: drive.h:629
void SetDerivativeLocal(index_type iLocalDof, scalar_deriv_type dCoef)
Definition: gradient.h:2554
virtual bool bIsDifferentiable(void) const
Definition: drive.h:579
bool SetDriveData(const std::string &s, DriveRead *rf)
Definition: drive_.cc:1274
index_type iGetStartIndexLocal() const
Definition: gradient.h:2576
virtual doublereal dGet(void) const
Definition: drive.h:573
bool SetDriveCallerData(const char *name, DriveCallerRead *rf)
Definition: drive_.cc:1324
static doublereal dReturnValue
Definition: drive.h:110
Definition: mathtyp.h:175
doublereal dGet(void) const
Definition: drive.h:687
virtual ~Drive(void)
Definition: drive.cc:50
const DriveOwner Trigger
Definition: drive.h:249
const DriveOwner Func
Definition: drive.h:248
Definition: drive.h:89
void SetDrvHdl(DriveHandler *)
integer iGetRand(void) const
Definition: drive.h:307
virtual void Set(void)
Definition: drive.h:338
doublereal dGet(void) const
Definition: drive.cc:671
void operator=(const DriveOwner &)
Definition: drive.h:131
virtual bool bIsDifferentiable(void) const
Definition: drive.h:635
Bailout
Definition: drive.h:101
Var * pTime
Definition: drive.h:185
integer index_type
Definition: gradient.h:104
DriveCaller * pDriveCaller
Definition: drive.h:133
Type
Definition: drive.h:92
virtual void ServePending(const doublereal &t)=0
bool bGetMeter(void) const
Definition: drive.h:331
const doublereal dVal0
Definition: drive.h:246
MathParser & Parser
Definition: drive.h:182
Drive * ReadDriveData(unsigned uLabel, const DataManager *pDM, MBDynParser &HP)
Definition: drive_.cc:1283
const char * psReadControlDrivers[]
Definition: enums.cc:357
std::vector< MyMeter * > Meter
Definition: drive.h:265
bool bGetClosestNext(integer iNumber) const
Definition: drive.h:421
std::vector< MyClosestNext * > ClosestNext
Definition: drive.h:267
virtual void Set(void)
Definition: drive.h:314
doublereal dGetSH(void) const
Definition: drive.h:370
Drive(unsigned int uL, const DriveHandler *pDH)
Definition: drive.cc:43
VectorHandler * pXCurr
Definition: drive.h:192
const DriveHandler * pDrvHdl
Definition: drive.h:109
LocalDofMap * pGetDofMap() const
Definition: gradient.h:2626
virtual bool bIsDifferentiable(void) const
Definition: drive.h:495
integer iGetStep(void) const
Definition: drive.h:400
virtual void Set(void)
Definition: drive.h:377
virtual void Set(void)
Definition: drive.h:354
void DestroyDriveCallerData(void)
Definition: drive_.cc:3113
virtual doublereal dGetP(void) const
Definition: drive.h:705
doublereal dGetTimeStep(void) const
Definition: drive.h:393
void SetValuePreserve(scalar_func_type dVal)
Definition: gradient.h:2511
static doublereal dDriveHandlerReturnValue
Definition: drive.h:190
std::vector< MyRand * > Rand
Definition: drive.h:266
Var * pStep
Definition: drive.h:187
unsigned int uLabel
Definition: withlab.h:44
doublereal dVal
Definition: drive.h:247
bool bGetClosestNext(void) const
Definition: drive.h:347
DriveHandler * pDrvHdl
Definition: drive.h:444
#define ASSERT(expression)
Definition: colamd.c:977
void DerivativeResizeReset(LocalDofMap *pMap, index_type iStartGlobal, index_type iEndGlobal, MapVectorBase::GlobalScope s, scalar_deriv_type dVal)
Definition: gradient.h:2538
virtual bool bIsDifferentiable(void) const
Definition: drive.h:693
virtual doublereal dGet(void) const
Definition: drive.h:489
VectorHandler * pXPrimeCurr
Definition: drive.h:193
integer iGetSteps(void) const
Definition: drive.h:324
DriveCaller * ReadDriveCallerData(const DataManager *pDM, MBDynParser &HP, bool bDeferred)
Definition: drive_.cc:1333
virtual Drive::Type GetDriveType(void) const =0
Var * pVar
Definition: drive.h:188
virtual doublereal dGetP(void) const
Definition: drive.h:501
bool bGetMeter(integer iNumber) const
Definition: drive.h:415
long int iGetRand(integer iNumber) const
Definition: drive.h:408
const DriveOwner Increment
Definition: drive.h:230
virtual std::ostream & Restart(std::ostream &out) const =0
std::vector< MySH * > SH
Definition: drive.h:268
integer iCurrStep
Definition: drive.h:195
doublereal dGetTime(void) const
Definition: drive.h:386
void DestroyDriveData(void)
Definition: drive_.cc:3028
virtual doublereal dGetP(void) const
Definition: drive.h:647
Var * pTimeStep
Definition: drive.h:186
void InitDriveCallerData(void)
Definition: drive_.cc:3050
void InitDriveData(void)
Definition: drive_.cc:3002
scalar_func_type dGetValue() const
Definition: gradient.h:2502
Definition: table.h:43
doublereal dStartTime
doublereal dGetSH(integer iNumber) const
Definition: drive.h:427
scalar_deriv_type dGetDerivativeLocal(index_type iLocalDof) const
Definition: gradient.h:2516
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
index_type iGetEndIndexLocal() const
Definition: gradient.h:2580
const DriveHandler * pDH
Definition: drive.h:229
static int drive(const MathParser::MathArgs &args)
Definition: modelns.cc:716
doublereal dConst
Definition: drive.h:659
virtual doublereal dGetP(void) const
Definition: drive.h:591
const char * psDriveNames[]
Definition: enums.cc:351