MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
invsolver.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/invsolver.h,v 1.20 2017/09/09 09:20:12 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  /*
33  *
34  * Copyright (C) 2008
35  * Alessandro Fumagalli <alessandro.fumagalli@polimi.it>
36  *
37  * Handler of inverse dynamics problem:
38  *
39  * - Initialize data (nodes and elements)
40  * - Allocate memory for solution vectors
41  * - Handle outputs
42  *
43  */
44 
45 #ifndef INVERSESOLVER_H
46 #define INVERSESOLVER_H
47 
48 #include <unistd.h>
49 #include <cfloat>
50 #include <cmath>
51 
52 class InverseSolver;
53 #include "myassert.h"
54 #include "mynewmem.h"
55 #include "except.h"
56 #include "dataman.h"
57 #include "schurdataman.h"
58 #include "schsolman.h"
59 #include "solver.h"
60 #include <deque>
61 #include "linsol.h"
62 #include "stepsol.h"
63 #include "nonlin.h"
64 #include "mfree.h"
65 #include "precond.h"
66 
67 class InverseSolver : public Solver {
68 protected:
74 
76 
77  /* Lettura dati */
78  void ReadData(MBDynParser& HP);
79 
80 public:
81  /* costruttore */
83  const std::string& sInputFileName,
84  const std::string& sOutputFileName,
85  unsigned int nThreads,
86  bool bParallel = false);
87 
88  /* distruttore: esegue tutti i distruttori e libera la memoria */
89  virtual ~InverseSolver(void);
90 
91  /* esegue la simulazione */
92  virtual bool Prepare(void);
93  virtual bool Start(void);
94  virtual bool Advance(void);
95 
96  // virtual void Run(void);
97 
98  std::ostream& Restart(std::ostream& out, DataManager::eRestart type) const;
99 
102 };
103 
104 /* InverseSolver - end */
105 
106 #endif /* INVERSESOLVER_H */
107 
bool bFullResTest
Definition: invsolver.h:75
virtual bool Start(void)
Definition: invsolver.cc:517
bool bParallel
Definition: solver.h:315
virtual bool Advance(void)
Definition: invsolver.cc:538
doublereal dw2[3]
Definition: invsolver.h:71
std::string sOutputFileName
Definition: solver.h:114
doublereal dw1[3]
Definition: invsolver.h:70
InverseSolver(MBDynParser &HP, const std::string &sInputFileName, const std::string &sOutputFileName, unsigned int nThreads, bool bParallel=false)
Definition: invsolver.cc:79
virtual ~InverseSolver(void)
Definition: invsolver.cc:759
InverseDynamics::Type GetProblemType(void) const
Definition: invsolver.cc:889
std::string sInputFileName
Definition: solver.h:113
std::ostream & Restart(std::ostream &out, DataManager::eRestart type) const
Definition: invsolver.cc:791
virtual bool Prepare(void)
Definition: invsolver.cc:93
void ReadData(MBDynParser &HP)
Definition: invsolver.cc:924
MyVectorHandler * pLambda
Definition: invsolver.h:73
InverseDynamics::Type ProblemType
Definition: invsolver.h:69
Definition: solver.h:78
double doublereal
Definition: colamd.c:52
void GetWeight(InverseDynamics::Order iOrder, doublereal &dw1, doublereal &dw2) const
Definition: invsolver.cc:895
MBDynParser & HP
Definition: solver.h:115
MyVectorHandler * pXPrimePrime
Definition: invsolver.h:72