MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
bulk.h File Reference
#include "elem.h"
#include "node.h"
#include "drive.h"
Include dependency graph for bulk.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BulkType
 
class  Bulk
 
class  BulkSpringSupport
 

Functions

ElemReadBulk (DataManager *pDM, MBDynParser &HP, unsigned int uLabel)
 

Variables

const char * psBulkNames []
 

Function Documentation

Elem* ReadBulk ( DataManager pDM,
MBDynParser HP,
unsigned int  uLabel 
)

Definition at line 39 of file bulk.cc.

References Elem::BULK, DEBUGCOUTFNAME, DataManager::fReadOutput(), MBDynParser::GetDriveCaller(), IncludeParser::GetLineData(), HighParser::GetWord(), HighParser::IsArg(), LASTKEYWORD, MBDYN_EXCEPT_ARGS, ReadScalarDof(), and SAFENEWWITHCONSTRUCTOR.

Referenced by DataManager::ReadOneElem().

40 {
41  DEBUGCOUTFNAME("ReadBulk");
42 
43  const char* sKeyWords[] = {
44  "spring" "support",
45  NULL
46  };
47 
48  /* enum delle parole chiave */
49  enum KeyWords {
50  UNKNOWN = -1,
51  SPRINGSUPPORT = 0,
53  };
54 
55  /* tabella delle parole chiave */
56  KeyTable K(HP, sKeyWords);
57 
58  /* lettura del tipo di elemento elettrico */
59  KeyWords CurrKeyWord = KeyWords(HP.GetWord());
60 
61 #ifdef DEBUG
62  if (CurrKeyWord >= 0) {
63  std::cout << "bulk element type: "
64  << sKeyWords[CurrKeyWord] << std::endl;
65  }
66 #endif
67 
68  Elem* pEl = NULL;
69 
70  switch (CurrKeyWord) {
71  /* */
72  case SPRINGSUPPORT: {
73  ScalarDof SD = ReadScalarDof(pDM, HP, true, false);
74  DriveCaller* pDC = HP.GetDriveCaller();
75  flag fOut = pDM->fReadOutput(HP, Elem::BULK);
76 
79  BulkSpringSupport(uLabel, pDC, SD, fOut));
80 
81  break;
82  }
83 
84  /* Aggiungere altri elementi elettrici */
85 
86  default: {
87  silent_cerr("unknown bulk element type in bulk element " << uLabel
88  << " at line " << HP.GetLineData() << std::endl);
90  }
91  }
92 
93  /* Se non c'e' il punto e virgola finale */
94  if (HP.IsArg()) {
95  silent_cerr("semicolon expected at line "
96  << HP.GetLineData() << std::endl);
98  }
99 
100  return pEl;
101 } /* End of ReadBulk() */
flag fReadOutput(MBDynParser &HP, const T &t) const
Definition: dataman.h:1064
long int flag
Definition: mbdyn.h:43
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
KeyWords
Definition: dataman4.cc:94
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual bool IsArg(void)
Definition: parser.cc:807
Definition: elem.h:75
virtual int GetWord(void)
Definition: parser.cc:1083
DriveCaller * GetDriveCaller(bool bDeferred=false)
Definition: mbpar.cc:2033
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
ScalarDof ReadScalarDof(const DataManager *pDM, MBDynParser &HP, bool bDof, bool bOrder)
Definition: dataman3.cc:2423

Here is the call graph for this function:

Variable Documentation

const char* psBulkNames[]

Definition at line 342 of file enums.cc.