All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
generalized_friction.h
1 /* Copyright (C) 2004-2009 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_FRICTION_H_
20 #define _GENERALIZED_FRICTION_H_
21 
22 #include "mbsim/links/dual_rigid_body_link.h"
23 #include "mbsim/functions/function.h"
24 
25 namespace MBSim {
26 
27  class RigidBody;
28  class FrictionForceLaw;
29 
31  protected:
32  FrictionForceLaw *func;
34  public:
35  GeneralizedFriction(const std::string &name="") : DualRigidBodyLink(name), func(NULL), laN(0) { }
37  void updateGeneralizedForces();
38 
39  bool isActive() const { return true; }
40  bool gActiveChanged() { return false; }
41  virtual bool isSingleValued() const { return true; }
42  std::string getType() const { return "GeneralizedFriction"; }
43  void init(InitStage stage);
44 
45  void setGeneralizedFrictionForceLaw(FrictionForceLaw *func_);
46  void setGeneralizedNormalForceFunction(Function<double(double)> *laN_) {
47  laN = laN_;
48  laN->setParent(this);
49  }
50 
51  void initializeUsingXML(xercesc::DOMElement *element);
52  };
53 
54 }
55 
56 #endif
57 
Definition: generalized_friction.h:30
virtual bool isSingleValued() const
asks the link if it contains single valued force laws that contribute to the right-hand side vector h...
Definition: generalized_friction.h:41
InitStage
The stages of the initialization.
Definition: element.h:97
basic friction force law on acceleration level for constraint description
Definition: friction_force_law.h:32
bool gActiveChanged()
Definition: generalized_friction.h:40
std::string name
name of element
Definition: element.h:298
bool isActive() const
Definition: generalized_friction.h:39
void init(InitStage stage)
plots time series header
Definition: generalized_friction.cc:45
std::string getType() const
Definition: generalized_friction.h:42

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML