MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
loadable.cc
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/loadable.cc,v 1.65 2017/05/12 17:28:14 morandini 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 <unistd.h>
35 
36 #include "dataman.h"
37 #include "loadable.h"
38 
39 /* funzioni di default */
40 static unsigned int
41 int_i_get_num_dof(const LoadableElem* /* pEl */ )
42 {
43  return 0;
44 }
45 
46 static DofOrder::Order
47 int_set_dof(const LoadableElem*, unsigned int /* i */ )
48 {
49  silent_cerr("You shouldn't be here!" << std::endl);
51 }
52 
53 static void
54 int_output(const LoadableElem* /* pEl */ , OutputHandler& /* OH */ )
55 {
56  NO_OP;
57 }
58 
59 static std::ostream&
60 int_restart(const LoadableElem* pEl , std::ostream& out)
61 {
62  return out << "loadable: " << pEl->GetLabel()
63  << ", not implemented yet;" << std::endl;
64 }
65 
66 static void
67 int_work_space_dim(const LoadableElem* /* pEl */ ,
68  integer* piNumRows,
69  integer* piNumCols)
70 {
71  *piNumRows = 0;
72  *piNumCols = 0;
73 }
74 
77  VariableSubMatrixHandler& WorkMat,
78  doublereal /* dCoef */ ,
79  const VectorHandler& /* XCurr */ ,
80  const VectorHandler& /* XPrimeCurr */ )
81 {
82  WorkMat.SetNullMatrix();
83  return WorkMat;
84 }
85 
86 static void
88  VariableSubMatrixHandler& WorkMatA,
89  VariableSubMatrixHandler& WorkMatB,
90  const VectorHandler& /* XCurr */ ,
91  const VectorHandler& /* XPrimeCurr */ )
92 {
93  WorkMatA.SetNullMatrix();
94  WorkMatB.SetNullMatrix();
95 }
96 
97 static SubVectorHandler&
99  SubVectorHandler& WorkVec,
100  doublereal /* dCoef */ ,
101  const VectorHandler& /* XCurr */ ,
102  const VectorHandler& /* XPrimeCurr */ )
103 {
104  WorkVec.Resize(0);
105  return WorkVec;
106 }
107 
108 static void
110  VectorHandler& /* X */ ,
111  VectorHandler& /* XP */ ,
112  VectorHandler& /* XPrev */ ,
113  VectorHandler& /* XPPrev */ )
114 {
115  NO_OP;
116 }
117 
118 static void
119 int_after_predict(const LoadableElem* /* pEl */ ,
120  VectorHandler& /* X */ ,
121  VectorHandler& /* XP */ )
122 {
123  NO_OP;
124 }
125 
126 static void
128  const VectorHandler& /* X */ ,
129  const VectorHandler& /* XP */ )
130 {
131  NO_OP;
132 }
133 
134 static void
136  const VectorHandler& /* X */ ,
137  const VectorHandler& /* XP */ )
138 {
139  NO_OP;
140 }
141 
142 static unsigned int
144 {
145  return 0;
146 }
147 
148 static void
150  integer* piNumRows,
151  integer* piNumCols)
152 {
153  *piNumRows = 0;
154  *piNumCols = 0;
155 }
156 
159  VariableSubMatrixHandler& WorkMat,
160  const VectorHandler& /* XCurr */ )
161 {
162  WorkMat.SetNullMatrix();
163  return WorkMat;
164 }
165 
166 static SubVectorHandler&
168  SubVectorHandler& WorkVec,
169  const VectorHandler& /* XCurr */ )
170 {
171  WorkVec.Resize(0);
172  return WorkVec;
173 }
174 
175 static void
176 int_set_value(const LoadableElem* /* pEl */ ,
177  DataManager *pDM,
178  VectorHandler& /* X */ ,
179  VectorHandler& /* XP */ ,
181 {
182  NO_OP;
183 }
184 
185 static void
186 int_set_initial_value(const LoadableElem* /* pEl */ , VectorHandler& /* X */ )
187 {
188  NO_OP;
189 }
190 
191 static unsigned int
193 {
194  return 0;
195 }
196 
197 static unsigned int
198 int_i_get_priv_data_idx(const LoadableElem* /* pEl */ , const char *s)
199 {
200  silent_cerr("You shouldn't be here!" << std::endl);
202 }
203 
204 static doublereal
205 int_d_get_priv_data(const LoadableElem* /* pEl */ , unsigned int /* i */ )
206 {
207  silent_cerr("You shouldn't be here!" << std::endl);
209 }
210 
211 static int
213 {
214  return 0;
215 }
216 
217 static void
218 int_get_connected_nodes(const LoadableElem* pEl, std::vector<const Node *>& connectedNodes)
219 {
220  connectedNodes.resize(0);
221 }
222 
223 static void
225 {
226  NO_OP;
227 }
228 
229 /* metodi della classe */
230 
231 LoadableElem::LoadableElem(unsigned int uLabel,
232  const DofOwner* pDO,
233  DataManager* pDM,
234  MBDynParser& HP)
235 : Elem(uLabel, flag(0)),
236 UserDefinedElem(uLabel, pDO),
237 priv_data(0),
238 module_name(0),
239 #ifdef USE_RUNTIME_LOADING
240 handle(0),
241 #endif // USE_RUNTIME_LOADING
242 calls(0)
243 {
244  ASSERT(pDM != 0);
245 
246  GetCalls(HP);
247  BindCalls(pDM, HP);
248 }
249 
250 LoadableElem::LoadableElem(unsigned int uLabel,
251  const DofOwner* pDO,
252  const LoadableCalls *c,
253  DataManager* pDM,
254  MBDynParser& HP)
255 : Elem(uLabel, flag(0)),
256 UserDefinedElem(uLabel, pDO),
257 priv_data(0),
258 module_name(0),
259 #ifdef USE_RUNTIME_LOADING
260 handle(0),
261 #endif // USE_RUNTIME_LOADING
262 calls(const_cast<LoadableCalls *>(c))
263 {
264  ASSERT(pDM != NULL);
265 
266  BindCalls(pDM, HP);
267 }
268 
269 void
271 {
272 #ifdef USE_RUNTIME_LOADING
273  /* nome del modulo */
274  const char* s = HP.GetFileName();
275  if (s == NULL) {
276  silent_cerr("Loadable(" << GetLabel()
277  << "): unable to get module name" << std::endl);
279  }
280 
282  handle = lt_dlopenext(module_name);
283 
284  if (handle == NULL) {
285  const char *err = lt_dlerror();
286  if (err == 0) {
287  err = "";
288  }
289 
290  silent_cerr("Loadable(" << uLabel
291  << "): unable to open module <" << module_name
292  << "> (" << err << ") at line " << HP.GetLineData()
293  << std::endl);
295  }
296 
297  /* default LoadableCalls struct */
298  const char *data_name = "calls";
299 
300  LoadableCalls **tmpcalls = NULL;
301  if (HP.IsKeyWord("name")) {
302  data_name = HP.GetStringWithDelims();
303  }
304  DEBUGCOUT("binding to data \"" << data_name
305  << "\" (must be def'd!)" << std::endl);
306  tmpcalls = (LoadableCalls **)lt_dlsym(handle, data_name);
307 
308  if (tmpcalls == NULL) {
309  const char* err = lt_dlerror();
310  if (err == NULL) {
311  silent_cerr("Loadable(" << uLabel
312  << "): data \"" << data_name
313  << "\" must be defined in module <"
314  << module_name << ">" << std::endl);
315  } else {
316  silent_cerr("Loadable(" << uLabel
317  << "): error while binding to data \""
318  << data_name
319  << "\" in module <" << module_name
320  << "> (\"" << err
321  << "\")" << std::endl);
322  }
324  }
325 
326  calls = *tmpcalls;
327 #else // !USE_RUNTIME_LOADING
328  silent_cerr("LoadableElem(" << GetLabel() << ") GetCalls: "
329  "should not be called when --disable-runtime-loading" << std::endl);
331 #endif // ! USE_RUNTIME_LOADING
332 }
333 
334 void
336 {
338  silent_cerr("Loadable(" << uLabel
339  << "): incompatible version; need "
341  << ", got "
343  << std::endl);
345  }
346 
347  if (calls->read == NULL) {
348  silent_cerr("Loadable(" << uLabel
349  << "): function \"read\" must be defined in module <"
350  << module_name << "> data" << std::endl);
352  }
353 
354  if (calls->name == NULL) {
356  }
357 
358  if (calls->version == NULL) {
359  calls->version = "(undefined)";
360  }
361 
362  if (calls->vendor == NULL) {
363  calls->vendor = "(undefined)";
364  }
365 
366  if (calls->description == NULL) {
367  calls->description = "";
368  }
369 
370  silent_cout("Loadable(" << uLabel << "): " << calls->name
371  << " version " << calls->version << std::endl
372  << "\tvendor: " << calls->vendor << std::endl
373  << "\tdescription: " << calls->description
374  << std::endl);
375 
376  /*
377  * Mette i default ove servono
378  */
379  if (calls->i_get_num_dof == NULL) {
381  }
382 
383  if (calls->set_dof == NULL) {
385  }
386 
387  if (calls->output == NULL) {
389  }
390 
391  if (calls->restart == NULL) {
393  }
394 
395  if (calls->work_space_dim == NULL) {
397  }
398 
399  if (calls->ass_jac == NULL) {
401  }
402 
403  if (calls->ass_mats == NULL) {
405  }
406 
407  if (calls->ass_res == NULL) {
409  }
410 
411  if (calls->before_predict == NULL) {
413  }
414 
415  if (calls->after_predict == NULL) {
417  }
418 
419  if (calls->update == NULL) {
421  }
422 
423  if (calls->after_convergence == NULL) {
425  }
426 
427  if (calls->i_get_initial_num_dof == NULL) {
429  }
430 
431  if (calls->initial_work_space_dim == NULL) {
433  }
434 
435  if (calls->initial_ass_jac == NULL) {
437  }
438 
439  if (calls->initial_ass_res == NULL) {
441  }
442 
443  if (calls->set_value == NULL) {
445  }
446 
447  if (calls->set_initial_value == NULL) {
449  }
450 
451  if (calls->i_get_num_priv_data == NULL) {
453  }
454 
455  if (calls->i_get_priv_data_idx == NULL) {
457  }
458 
459  if (calls->d_get_priv_data == NULL) {
461  }
462 
463  if (calls->i_get_num_connected_nodes == NULL) {
465  }
466 
467  if (calls->get_connected_nodes == NULL) {
469  }
470 
471  if (calls->destroy == NULL) {
473  }
474 
475  priv_data = calls->read(this, pDM, HP);
477 }
478 
480 {
481  ASSERT(calls->destroy != NULL);
482  calls->destroy(this);
483 
484 #ifdef USE_RUNTIME_LOADING
485  if (handle != NULL) {
486  if (lt_dlclose(handle) != 0) {
487  silent_cerr("unable to close module "
488  "\"" << module_name << "\"" << std::endl);
489  }
490  }
491 #endif // USE_RUNTIME_LOADING
492 
494 }
495 
496 unsigned int
498 {
499  ASSERT(calls->i_get_num_dof != NULL);
500  return calls->i_get_num_dof(this);
501 }
502 
504 LoadableElem::GetDofType(unsigned int i) const
505 {
506  ASSERT(i < iGetNumDof());
507  ASSERT(calls->set_dof != NULL);
508  return calls->set_dof(this, i);
509 }
510 
511 void
513 {
514  ASSERT(calls->output != NULL);
515  calls->output(this, OH);
516 }
517 
518 std::ostream&
519 LoadableElem::Restart(std::ostream& out) const
520 {
521  ASSERT(calls->restart != NULL);
522  out << " loadable: " << GetLabel() << ", \""
523  << module_name << "\", ";
524  return calls->restart(this, out) << ';' << std::endl;
525 }
526 
527 void
528 LoadableElem::WorkSpaceDim(integer* piNumRows, integer* piNumCols) const
529 {
530  ASSERT(calls->work_space_dim != NULL);
531  calls->work_space_dim(this, piNumRows, piNumCols);
532 }
533 
536  doublereal dCoef,
537  const VectorHandler& XCurr,
538  const VectorHandler& XPCurr)
539 {
540  ASSERT(calls->ass_jac != NULL);
541  return calls->ass_jac(this, WorkMat, dCoef, XCurr, XPCurr);
542 }
543 
544 void
546  VariableSubMatrixHandler& WorkMatB,
547  const VectorHandler& XCurr,
548  const VectorHandler& XPCurr)
549 {
550  ASSERT(calls->ass_mats != NULL);
551  calls->ass_mats(this, WorkMatA, WorkMatB, XCurr, XPCurr);
552 }
553 
556  doublereal dCoef,
557  const VectorHandler& XCurr,
558  const VectorHandler& XPCurr)
559 {
560  ASSERT(calls->ass_res != NULL);
561  return calls->ass_res(this, WorkVec,
562  dCoef, XCurr, XPCurr);
563 }
564 
565 void
567  VectorHandler& XP,
568  VectorHandler& XPrev,
569  VectorHandler& XPPrev) const
570 {
571  ASSERT(calls->before_predict != NULL);
572  calls->before_predict(this, X, XP, XPrev, XPPrev);
573 }
574 
575 void
577  VectorHandler& XP)
578 {
579  ASSERT(calls->after_predict != NULL);
580  calls->after_predict(this, X, XP);
581 }
582 
583 void
585  const VectorHandler& XPrimeCurr)
586 {
587  ASSERT(calls->update != NULL);
588  calls->update(this, XCurr, XPrimeCurr);
589 }
590 
591 void
593  const VectorHandler& XP)
594 {
595  ASSERT(calls->after_convergence != NULL);
596  calls->after_convergence(this, X, XP);
597 }
598 
599 unsigned int
601 {
603  return calls->i_get_initial_num_dof(this);
604 }
605 
606 void
607 LoadableElem::InitialWorkSpaceDim(integer* piNumRows, integer* piNumCols) const
608 {
610  calls->initial_work_space_dim(this, piNumRows, piNumCols);
611 }
612 
615  const VectorHandler& XCurr)
616 {
617  ASSERT(calls->initial_ass_jac != NULL);
618  return calls->initial_ass_jac(this, WorkMat, XCurr);
619 }
620 
623  const VectorHandler& XCurr)
624 {
625  ASSERT(calls->initial_ass_res != NULL);
626  return calls->initial_ass_res(this, WorkVec, XCurr);
627 }
628 
629 void
631 {
632  ASSERT(calls->set_initial_value != NULL);
633  calls->set_initial_value(this, X);
634 }
635 
636 void
640 {
641  ASSERT(calls->set_value != NULL);
642  calls->set_value(this, pDM, X, XP, ph);
643 }
644 
645 unsigned int
647 {
648  ASSERT(calls->i_get_num_priv_data != NULL);
649  return calls->i_get_num_priv_data(this);
650 }
651 
652 unsigned int
653 LoadableElem::iGetPrivDataIdx(const char *s) const
654 {
655  ASSERT(calls->i_get_priv_data_idx != NULL);
656  return calls->i_get_priv_data_idx(this, s);
657 }
658 
660 LoadableElem::dGetPrivData(unsigned int i) const
661 {
662  ASSERT(calls->d_get_priv_data != NULL);
663  return calls->d_get_priv_data(this, i);
664 }
665 
666 int
668 {
670  return calls->i_get_num_connected_nodes(this);
671 }
672 
673 void
674 LoadableElem::GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
675  ASSERT(calls->get_connected_nodes != NULL);
676  return calls->get_connected_nodes(this, connectedNodes);
677 }
678 
680 LoadableElemRead::Read(unsigned int uLabel, const DofOwner* pDO,
681  DataManager* pDM, MBDynParser& HP) const
682 {
683  UserDefinedElem* pEl = NULL;
684 
685  if (HP.IsKeyWord("reference")) {
686  const char *s = HP.GetStringWithDelims();
687 
688  const LoadableCalls *c = pDM->GetLoadableElemModule(s);
689 
690  if (c == 0) {
691  silent_cerr("Loadable(" << uLabel << "): "
692  "unable to find loadable element module \""
693  << s << "\" at line " << HP.GetLineData()
694  << std::endl);
696  }
697 
699  LoadableElem,
700  LoadableElem(uLabel, pDO, c, pDM, HP));
701 
702  } else {
704  LoadableElem,
705  LoadableElem(uLabel, pDO, pDM, HP));
706  }
707 
708  return pEl;
709 }
flag fReadOutput(MBDynParser &HP, const T &t) const
Definition: dataman.h:1064
static void int_work_space_dim(const LoadableElem *, integer *piNumRows, integer *piNumCols)
Definition: loadable.cc:67
virtual int GetNumConnectedNodes(void) const
Definition: loadable.cc:667
p_set_dof set_dof
Definition: loadable.h:195
p_work_space_dim work_space_dim
Definition: loadable.h:198
static std::ostream & int_restart(const LoadableElem *pEl, std::ostream &out)
Definition: loadable.cc:60
static SubVectorHandler & int_initial_ass_res(LoadableElem *, SubVectorHandler &WorkVec, const VectorHandler &)
Definition: loadable.cc:167
~LoadableElem(void)
Definition: loadable.cc:479
p_set_initial_value set_initial_value
Definition: loadable.h:211
virtual unsigned int iGetInitialNumDof(void) const
Definition: loadable.cc:600
static doublereal int_d_get_priv_data(const LoadableElem *, unsigned int)
Definition: loadable.cc:205
void * calls
p_get_connected_nodes get_connected_nodes
Definition: loadable.h:216
p_i_get_num_dof i_get_num_dof
Definition: loadable.h:194
long int flag
Definition: mbdyn.h:43
const char * version
Definition: loadable.h:181
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: loadable.cc:674
static unsigned int int_i_get_initial_num_dof(const LoadableElem *)
Definition: loadable.cc:143
static void int_set_value(const LoadableElem *, DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph)
Definition: loadable.cc:176
virtual std::ostream & Restart(std::ostream &out) const
Definition: loadable.cc:519
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: loadable.cc:653
p_read read
Definition: loadable.h:189
virtual void AssMats(VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: loadable.cc:545
#define SAFEDELETEARR(pnt)
Definition: mynewmem.h:713
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: loadable.cc:535
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: loadable.cc:555
p_i_get_priv_data_idx i_get_priv_data_idx
Definition: loadable.h:213
virtual const char * GetFileName(enum Delims Del=DEFAULTDELIM)
Definition: parsinc.cc:673
const char * description
Definition: loadable.h:183
static SubVectorHandler & int_ass_res(LoadableElem *, SubVectorHandler &WorkVec, doublereal, const VectorHandler &, const VectorHandler &)
Definition: loadable.cc:98
#define NO_OP
Definition: myassert.h:74
p_i_get_num_connected_nodes i_get_num_connected_nodes
Definition: loadable.h:215
virtual void Output(OutputHandler &OH) const
Definition: loadable.cc:512
std::vector< Hint * > Hints
Definition: simentity.h:89
static int int_i_get_num_connected_nodes(const LoadableElem *pEl)
Definition: loadable.cc:212
p_restart restart
Definition: loadable.h:197
const LoadableCalls * GetLoadableElemModule(std::string) const
Definition: dataman2.cc:58
LoadableCalls * calls
Definition: loadable.h:232
virtual DofOrder::Order GetDofType(unsigned int i) const
Definition: loadable.cc:504
virtual UserDefinedElem * Read(unsigned uLabel, const DofOwner *pDO, DataManager *const pDM, MBDynParser &HP) const
Definition: loadable.cc:680
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: loadable.cc:607
void GetCalls(MBDynParser &HP)
Definition: loadable.cc:270
p_i_get_initial_num_dof i_get_initial_num_dof
Definition: loadable.h:206
p_ass_res ass_res
Definition: loadable.h:201
static VariableSubMatrixHandler & int_ass_jac(LoadableElem *, VariableSubMatrixHandler &WorkMat, doublereal, const VectorHandler &, const VectorHandler &)
Definition: loadable.cc:76
void SetNullMatrix(void)
Definition: submat.h:1159
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: loadable.cc:622
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: loadable.cc:614
p_i_get_num_priv_data i_get_num_priv_data
Definition: loadable.h:212
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
Definition: loadable.cc:637
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual const char * GetStringWithDelims(enum Delims Del=DEFAULTDELIM, bool escape=true)
Definition: parser.cc:1228
virtual unsigned int iGetNumDof(void) const
Definition: loadable.cc:497
p_before_predict before_predict
Definition: loadable.h:202
p_destroy destroy
Definition: loadable.h:218
static VariableSubMatrixHandler & int_initial_ass_jac(LoadableElem *, VariableSubMatrixHandler &WorkMat, const VectorHandler &)
Definition: loadable.cc:158
static void int_before_predict(const LoadableElem *, VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &)
Definition: loadable.cc:109
static unsigned int int_i_get_priv_data_idx(const LoadableElem *, const char *s)
Definition: loadable.cc:198
unsigned int uLabel
Definition: withlab.h:44
static void int_after_convergence(const LoadableElem *, const VectorHandler &, const VectorHandler &)
Definition: loadable.cc:135
static void int_set_initial_value(const LoadableElem *, VectorHandler &)
Definition: loadable.cc:186
p_ass_mats ass_mats
Definition: loadable.h:200
p_d_get_priv_data d_get_priv_data
Definition: loadable.h:214
unsigned long loadable_version
Definition: loadable.h:174
virtual void SetInitialValue(VectorHandler &X)
Definition: loadable.cc:630
#define ASSERT(expression)
Definition: colamd.c:977
p_initial_ass_jac initial_ass_jac
Definition: loadable.h:208
static void int_initial_work_space_dim(const LoadableElem *, integer *piNumRows, integer *piNumCols)
Definition: loadable.cc:149
p_after_convergence after_convergence
Definition: loadable.h:205
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
p_initial_ass_res initial_ass_res
Definition: loadable.h:209
virtual doublereal dGetPrivData(unsigned int i) const
Definition: loadable.cc:660
virtual void BeforePredict(VectorHandler &X, VectorHandler &XP, VectorHandler &XPrev, VectorHandler &XPPrev) const
Definition: loadable.cc:566
static std::stack< cleanup * > c
Definition: cleanup.cc:59
static void int_destroy(LoadableElem *)
Definition: loadable.cc:224
void * priv_data
Definition: loadable.h:227
void BindCalls(DataManager *pDM, MBDynParser &HP)
Definition: loadable.cc:335
const char * vendor
Definition: loadable.h:182
Definition: elem.h:75
static unsigned int int_i_get_num_dof(const LoadableElem *)
Definition: loadable.cc:41
LoadableElem(unsigned int uLabel, const DofOwner *pDO, DataManager *pDM, MBDynParser &HP)
Definition: loadable.cc:231
#define SAFESTRDUP(pnt, src)
Definition: mynewmem.h:707
p_ass_jac ass_jac
Definition: loadable.h:199
virtual unsigned int iGetNumPrivData(void) const
Definition: loadable.cc:646
p_update update
Definition: loadable.h:204
virtual void Update(const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: loadable.cc:584
static DofOrder::Order int_set_dof(const LoadableElem *, unsigned int)
Definition: loadable.cc:47
char * module_name
Definition: loadable.h:228
static void int_ass_mats(LoadableElem *, VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &, const VectorHandler &)
Definition: loadable.cc:87
#define LOADABLE_VERSION_OUT(v)
Definition: loadable.h:48
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
Definition: loadable.cc:576
static void int_after_predict(const LoadableElem *, VectorHandler &, VectorHandler &)
Definition: loadable.cc:119
virtual void SetOutputFlag(flag f=flag(1))
Definition: output.cc:896
#define LOADABLE_VERSION
Definition: loadable.h:47
double doublereal
Definition: colamd.c:52
static void int_update(LoadableElem *, const VectorHandler &, const VectorHandler &)
Definition: loadable.cc:127
long int integer
Definition: colamd.c:51
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
unsigned int GetLabel(void) const
Definition: withlab.cc:62
static unsigned int int_i_get_num_priv_data(const LoadableElem *)
Definition: loadable.cc:192
p_output output
Definition: loadable.h:196
p_set_value set_value
Definition: loadable.h:210
static void int_get_connected_nodes(const LoadableElem *pEl, std::vector< const Node * > &connectedNodes)
Definition: loadable.cc:218
static void int_output(const LoadableElem *, OutputHandler &)
Definition: loadable.cc:54
p_initial_work_space_dim initial_work_space_dim
Definition: loadable.h:207
virtual void Resize(integer iNewSize)=0
const char * name
Definition: loadable.h:180
p_after_predict after_predict
Definition: loadable.h:203
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: loadable.cc:592
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: loadable.cc:528