MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
solman.cc
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/libraries/libmbmath/solman.cc,v 1.46 2017/01/12 14:43:54 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 /* solution manager */
33 
34 #include "mbconfig.h" /* This goes first in every *.c,*.cc file */
35 
36 #include <string.h> /* for memset() */
37 
38 #include <iostream>
39 #include <iomanip>
40 
41 #include "solman.h"
42 #include "matvec3.h"
43 #include "ls.h"
44 
45 /* SolutionDataManager - begin */
46 
48 {
49  NO_OP;
50 }
51 
52 /* SolutionDataManager - end */
53 
54 
55 /* SolutionManager - begin */
56 
58 : pLS(0)
59 {
60  NO_OP;
61 }
62 
64 {
65  if (pLS != NULL) {
66  SAFEDELETE(pLS);
67  }
68 }
69 
70 /* Inizializzatore "speciale" */
71 void
73 {
74  MatrReset();
75 }
76 
77 void
79 {
80  silent_cerr("SolutionManager::SolveT() not supported" << std::endl);
82 }
83 
84 void
86  VectorHandler& XPrimeCurr)
87 {
88  NO_OP;
89 }
90 
91 /* sposta il puntatore al vettore del residuo */
92 doublereal *
94 {
95  ASSERT(pLS);
96  return pLS->pdSetResVec(pd);
97 }
98 
99 /* sposta il puntatore al vettore della soluzione */
100 doublereal *
102 {
103  ASSERT(pLS);
104  return pLS->pdSetSolVec(pd);
105 }
106 
108 {
109  return pLS->bGetConditionNumber(dCond);
110 }
111 
112 /* SolutionManager - end */
113 
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
doublereal * pdSetSolVec(doublereal *pd)
Definition: solman.cc:101
virtual bool bGetConditionNumber(doublereal &dCond)
Definition: ls.cc:132
SolutionManager(void)
Definition: solman.cc:57
#define NO_OP
Definition: myassert.h:74
virtual void SolveT(void)
Definition: solman.cc:78
doublereal * pdSetResVec(doublereal *pd)
Definition: ls.cc:95
doublereal * pdSetSolVec(doublereal *pd)
Definition: ls.cc:113
doublereal * pdSetResVec(doublereal *pd)
Definition: solman.cc:93
virtual void MatrReset(void)=0
virtual ~SolutionDataManager(void)
Definition: solman.cc:47
#define ASSERT(expression)
Definition: colamd.c:977
virtual void MatrInitialize(void)
Definition: solman.cc:72
virtual void LinkToSolution(VectorHandler &XCurr, VectorHandler &XPrimeCurr)
Definition: solman.cc:85
virtual ~SolutionManager(void)
Definition: solman.cc:63
bool bGetConditionNumber(doublereal &dCond) const
Definition: solman.cc:107
LinearSolver * pLS
Definition: solman.h:151
double doublereal
Definition: colamd.c:52
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710