MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
modalmappingext.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/modalmappingext.h,v 1.16 2017/01/12 14:46:43 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 2007-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 /* Forza */
33 
34 #ifndef MODALMAPPINGEXT_H
35 #define MODALMAPPINGEXT_H
36 
37 #include <vector>
38 #include <string>
39 
40 #include "modalext.h"
41 #include "spmapmh.h"
42 #include "stlvh.h"
43 
44 /* ModalMappingExt - begin */
45 
46 class ModalMappingExt : virtual public Elem, public ExtForce {
47 protected:
49  unsigned uFlags;
53 
55 
56  // Moore-Penrose Generalized Inverse of MSD nodes to modes mapping
58 
59  // Mapped nodes data
60  struct NodeData {
61  const StructNode* pNode;
66  };
67 
68  std::vector<NodeData> Nodes;
69 
70  // rigid-body forces
74 
77 
82 
86 
87 public:
88  /* Costruttore */
89  ModalMappingExt(unsigned int uL,
90  DataManager *pDM,
91  const StructNode *pRefNode,
92  std::vector<const StructNode *>& n,
97  bool bSendAfterPredict,
98  int iCoupling,
102  flag fOut);
103 
104  virtual ~ModalMappingExt(void);
105 
106  /* Tipo di forza */
107  virtual Force::Type GetForceType(void) const;
108 
109  void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const;
110 
112  doublereal dCoef,
113  const VectorHandler& XCurr,
114  const VectorHandler& XPrimeCurr);
115 
116  virtual void Output(OutputHandler& OH) const;
117 
118  /* *******PER IL SOLUTORE PARALLELO******** */
119  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
120  * utile per l'assemblaggio della matrice di connessione fra i dofs */
121  virtual void
122  GetConnectedNodes(std::vector<const Node *>& connectedNodes) const;
123  /* ************************************************ */
124 };
125 
126 /* ModalMappingExt - end */
127 
128 class DataManager;
129 class MBDynParser;
130 
131 extern SpMapMatrixHandler *
133 
134 extern Elem*
136  MBDynParser& HP,
137  unsigned int uLabel);
138 
139 #endif // MODALMAPPINGEXT_H
140 
SpMapMatrixHandler * pH
bool bUseReferenceNodeForces
long int flag
Definition: mbdyn.h:43
STLVectorHandler x
Definition: matvec3.h:98
void Recv(void)
Definition: extforce.cc:798
Elem * ReadModalMappingExtForce(DataManager *pDM, MBDynParser &HP, unsigned int uLabel)
virtual void Output(OutputHandler &OH) const
Type
Definition: force.h:50
bool bSendAfterPredict
Definition: extforce.h:196
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
virtual Force::Type GetForceType(void) const
ExtModalForceBase * pEMF
STLVectorHandler p
STLVectorHandler q
DataManager * pDM
Definition: mbpar.h:252
SpMapMatrixHandler * ReadSparseMappingMatrix(MBDynParser &HP, integer &nRows, integer &nCols)
ExtFileHandlerBase * pEFH
Definition: extforce.h:193
void Send(ExtFileHandlerBase *pEFH, ExtFileHandlerBase::SendWhen when)
const StructNode * pNode
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
STLVectorHandler f
const StructNode * pRefNode
bool bRotateReferenceNodeForces
virtual ~ModalMappingExt(void)
ModalMappingExt(unsigned int uL, DataManager *pDM, const StructNode *pRefNode, std::vector< const StructNode * > &n, SpMapMatrixHandler *pH, bool bOutputAccelerations, ExtFileHandlerBase *pEFH, ExtModalForceBase *pEMF, bool bSendAfterPredict, int iCoupling, ExtModalForceBase::BitMask bm, bool bUseReferenceNodeForces, bool bRotateReferenceNodeForces, flag fOut)
Definition: elem.h:75
std::vector< NodeData > Nodes
STLVectorHandler qP
STLVectorHandler xP
double doublereal
Definition: colamd.c:52
int iCoupling
Definition: extforce.h:212
long int integer
Definition: colamd.c:51
bool Prepare(ExtFileHandlerBase *pEFH)
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)