mbsim  4.0.0
MBSim Kernel
generalized_constraint.h
1 /* Copyright (C) 2004-2016 MBSim Development Team
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2.1 of the License, or (at your option) any later version.
6  *
7  * This library is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  * Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public
13  * License along with this library; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15  *
16  * Contact: martin.o.foerg@googlemail.com
17  */
18 
19 #ifndef _GENERALIZED_CONSTRAINT_H
20 #define _GENERALIZED_CONSTRAINT_H
21 
22 #include "mechanical_constraint.h"
23 
24 namespace MBSim {
25 
31  protected:
32  Frame *support;
33 
34  public:
35  GeneralizedConstraint(const std::string &name) : MechanicalConstraint(name), support(nullptr) { }
36 
37  void init(InitStage stage, const InitConfigSet &config) override;
38 
39  virtual void setSupportFrame(Frame *frame) { support = frame; }
40 
41  void initializeUsingXML(xercesc::DOMElement * element) override;
42 
43  private:
44  std::string saved_DependentBody, saved_supportFrame;
45  };
46 
47 }
48 
49 #endif
Class for mechanical constraints.
Definition: mechanical_constraint.h:32
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: generalized_constraint.cc:30
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:235
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
Class for generalized constraints.
Definition: generalized_constraint.h:30
namespace MBSim
Definition: eigenanalyzer.cc:47