All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
ffr_interface_node_frame.h
1 /* Copyright (C) 2004-2019 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: martin.o.foerg@googlemail.com
18  */
19 
20 #ifndef _FFR_INTERFACE_NODE_FRAME_H__
21 #define _FFR_INTERFACE_NODE_FRAME_H__
22 
23 #include "mbsimFlexibleBody/frames/node_based_frame.h"
24 
25 namespace MBSimFlexibleBody {
26 
32 
33  public:
34  FfrInterfaceNodeFrame(const std::string &name = "dummy") : NodeBasedFrame(name), Id(fmatvec::Eye()) { }
35 
36  void setNodeNumbers(const fmatvec::VecVI &nodes_) { nodes = nodes_; }
37  const fmatvec::VecVI& getNodeNumbers() const { return nodes; }
38 
39  void setWeightingFactors(const fmatvec::VecV &weights_) { weights = weights_; }
40  const fmatvec::VecV& getWeightingFactors() const { return weights; }
41 
42  void setApproximateShapeMatrixOfRotation(bool approximateShapeMatrixOfRotation_) { approximateShapeMatrixOfRotation = approximateShapeMatrixOfRotation_; }
43  bool getApproximateShapeMatrixOfRotation() const { return approximateShapeMatrixOfRotation; }
44 
45  void updatePositions() override;
46  void updateVelocities() override;
47  void updateAccelerations() override;
48  void updateJacobians(int j=0) override;
49  void updateGyroscopicAccelerations() override;
50  const fmatvec::Vec3& evalGlobalRelativePosition() { if(updPos) updatePositions(); return WrRP; }
51  const fmatvec::Vec3& evalGlobalRelativeVelocity() { if(updVel) updateVelocities(); return Wvrel; }
52  const fmatvec::Vec3& evalGlobalRelativeAngularVelocity() { if(updVel) updateVelocities(); return Womrel; }
53  fmatvec::Vec3& getGlobalRelativeVelocity(bool check=true) { assert((not check) or (not updVel)); return Wvrel; }
54 
55  void init(InitStage stage, const MBSim::InitConfigSet &config) override;
56  void initializeUsingXML(xercesc::DOMElement *element) override;
57 
58  protected:
59  MBSim::Frame *R;
60 
64  fmatvec::VecVI nodes;
65 
69  fmatvec::VecV weights;
70 
71  fmatvec::Vec3 KrKP, WrRP, Wvrel, Womrel;
72  fmatvec::SqrMat3 ARP;
73  fmatvec::Mat3xV Phi, Psi;
74  fmatvec::SqrMat3 Id;
75 
76  bool approximateShapeMatrixOfRotation{false};
77  };
78 
79 }
80 
81 #endif
frame on interface nodes for flexible ffr bodies
Definition: ffr_interface_node_frame.h:31
fmatvec::VecV weights
weights
Definition: ffr_interface_node_frame.h:69
node based frame
Definition: node_based_frame.h:31
fmatvec::VecVI nodes
node number
Definition: ffr_interface_node_frame.h:64

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Home