MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
invsolwrap.cc File Reference
#include "mbconfig.h"
#include "solver.h"
#include "invsolver.h"
Include dependency graph for invsolwrap.cc:

Go to the source code of this file.

Classes

struct  mb_sol_wrap_t
 

Functions

static mb_sol_wrap_tmb_sol_create_ (const char *sIn, const char *sOut)
 
void * mb_sol_create (const char *sIn, const char *sOut)
 
void * mb_sol_create_inv (const char *sIn, const char *sOut)
 
int mb_sol_prepare (void *p)
 
int mb_sol_start (void *p)
 
int mb_sol_advance (void *p)
 
int mb_sol_destroy (void *p)
 
int mb_sol_setbufin (void *p, unsigned uLabel, integer iSize, doublereal *pdBuf)
 
int mb_sol_setbufout (void *p, unsigned uLabel, integer iSize, doublereal *pdBuf)
 

Function Documentation

int mb_sol_advance ( void *  p)

Definition at line 66 of file invsolwrap.cc.

References Solver::Advance(), and mb_sol_wrap_t::pS.

67 {
68  mb_sol_wrap_t *pSW = (mb_sol_wrap_t *)p;
69  if (!pSW->pS->Advance()) {
70  return -1;
71  }
72 
73  return 0;
74 }
Solver * pS
Definition: invsolwrap.cc:11
virtual bool Advance(void)
Definition: solver.cc:1376

Here is the call graph for this function:

void* mb_sol_create ( const char *  sIn,
const char *  sOut 
)

Definition at line 28 of file invsolwrap.cc.

References mb_sol_create_(), mb_sol_wrap_t::pHP, and mb_sol_wrap_t::pS.

29 {
30  mb_sol_wrap_t *pSW = mb_sol_create_(sIn, sOut);
31  pSW->pS = new Solver(*pSW->pHP, sIn, sOut, false);
32  return (void *)pSW;
33 }
Solver * pS
Definition: invsolwrap.cc:11
static mb_sol_wrap_t * mb_sol_create_(const char *sIn, const char *sOut)
Definition: invsolwrap.cc:15
MBDynParser * pHP
Definition: invsolwrap.cc:10
Definition: solver.h:78

Here is the call graph for this function:

static mb_sol_wrap_t* mb_sol_create_ ( const char *  sIn,
const char *  sOut 
)
static

Definition at line 15 of file invsolwrap.cc.

References mb_sol_wrap_t::pHP, mb_sol_wrap_t::pIn, mb_sol_wrap_t::pMP, mb_sol_wrap_t::pT, and mb_sol_wrap_t::streamIn.

Referenced by mb_sol_create(), and mb_sol_create_inv().

16 {
17  mb_sol_wrap_t *pSW = new mb_sol_wrap_t;
18  pSW->pT = new Table(true);
19  pSW->pMP = new MathParser(*pSW->pT, false);
20  pSW->streamIn.open(sIn);
21  pSW->pIn = new InputStream(pSW->streamIn);
22  pSW->pHP = new MBDynParser(*pSW->pMP, *pSW->pIn, sIn);
23 
24  return pSW;
25 }
MathParser * pMP
Definition: invsolwrap.cc:7
Table * pT
Definition: invsolwrap.cc:6
std::ifstream streamIn
Definition: invsolwrap.cc:8
MBDynParser * pHP
Definition: invsolwrap.cc:10
Definition: table.h:43
InputStream * pIn
Definition: invsolwrap.cc:9
void* mb_sol_create_inv ( const char *  sIn,
const char *  sOut 
)

Definition at line 36 of file invsolwrap.cc.

References mb_sol_create_(), mb_sol_wrap_t::pHP, and mb_sol_wrap_t::pS.

37 {
38  mb_sol_wrap_t *pSW = mb_sol_create_(sIn, sOut);
39  pSW->pS = new InverseSolver(*pSW->pHP, sIn, sOut, false);
40  return (void *)pSW;
41 }
Solver * pS
Definition: invsolwrap.cc:11
static mb_sol_wrap_t * mb_sol_create_(const char *sIn, const char *sOut)
Definition: invsolwrap.cc:15
MBDynParser * pHP
Definition: invsolwrap.cc:10

Here is the call graph for this function:

int mb_sol_destroy ( void *  p)

Definition at line 77 of file invsolwrap.cc.

References mb_sol_wrap_t::pIn, mb_sol_wrap_t::pMP, mb_sol_wrap_t::pS, and mb_sol_wrap_t::pT.

78 {
79  mb_sol_wrap_t *pSW = (mb_sol_wrap_t *)p;
80  delete pSW->pS;
81  delete pSW->pIn;
82  delete pSW->pMP;
83  delete pSW->pT;
84  delete pSW;
85 
86  return 0;
87 }
Solver * pS
Definition: invsolwrap.cc:11
MathParser * pMP
Definition: invsolwrap.cc:7
Table * pT
Definition: invsolwrap.cc:6
InputStream * pIn
Definition: invsolwrap.cc:9
int mb_sol_prepare ( void *  p)

Definition at line 44 of file invsolwrap.cc.

References Solver::Prepare(), and mb_sol_wrap_t::pS.

45 {
46  mb_sol_wrap_t *pSW = (mb_sol_wrap_t *)p;
47  if (!pSW->pS->Prepare()) {
48  return -1;
49  }
50 
51  return 0;
52 }
virtual bool Prepare(void)
Definition: solver.cc:399
Solver * pS
Definition: invsolwrap.cc:11

Here is the call graph for this function:

int mb_sol_setbufin ( void *  p,
unsigned  uLabel,
integer  iSize,
doublereal pdBuf 
)

Definition at line 90 of file invsolwrap.cc.

References Solver::pGetDataManager(), mb_sol_wrap_t::pS, and DataManager::SetBufInRaw().

91 {
92  mb_sol_wrap_t *pSW = (mb_sol_wrap_t *)p;
93  DataManager *pDM = pSW->pS->pGetDataManager();
94  pDM->SetBufInRaw(uLabel, iSize, pdBuf);
95 
96  return 0;
97 }
Solver * pS
Definition: invsolwrap.cc:11
virtual DataManager * pGetDataManager(void) const
Definition: solver.h:395
void SetBufInRaw(unsigned uL, integer n, const doublereal *p)
Definition: dataman2.cc:2769

Here is the call graph for this function:

int mb_sol_setbufout ( void *  p,
unsigned  uLabel,
integer  iSize,
doublereal pdBuf 
)

Definition at line 100 of file invsolwrap.cc.

References Solver::pGetDataManager(), mb_sol_wrap_t::pS, and DataManager::SetBufOutRaw().

101 {
102  mb_sol_wrap_t *pSW = (mb_sol_wrap_t *)p;
103  DataManager *pDM = pSW->pS->pGetDataManager();
104  pDM->SetBufOutRaw(uLabel, iSize, pdBuf);
105 
106  return 0;
107 }
Solver * pS
Definition: invsolwrap.cc:11
void SetBufOutRaw(unsigned uL, integer n, const doublereal *p)
Definition: dataman2.cc:2804
virtual DataManager * pGetDataManager(void) const
Definition: solver.h:395

Here is the call graph for this function:

int mb_sol_start ( void *  p)

Definition at line 55 of file invsolwrap.cc.

References mb_sol_wrap_t::pS, and Solver::Start().

56 {
57  mb_sol_wrap_t *pSW = (mb_sol_wrap_t *)p;
58  if (!pSW->pS->Start()) {
59  return -1;
60  }
61 
62  return 0;
63 }
Solver * pS
Definition: invsolwrap.cc:11
virtual bool Start(void)
Definition: solver.cc:1202

Here is the call graph for this function: