All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
generalized_velocity_excitation.h
1 /* Copyright (C) 2004-2015 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@gmail.com
18  */
19 
20 #ifndef _GENERALIZED_VELOCITY_EXCITATION_H_
21 #define _GENERALIZED_VELOCITY_EXCITATION_H_
22 
23 #include "mbsim/links/generalized_kinematic_excitation.h"
24 #include "mbsim/functions/time_dependent_function.h"
25 #include "mbsim/functions/state_dependent_function.h"
26 
27 namespace MBSim {
28 
30  protected:
32  public:
34 
35  void calcxSize();
36  void init(InitStage stage);
37 
38  void updateGeneralizedPositions();
39  void updateGeneralizedVelocities();
40  void updatexd();
41  void updatewb();
42 
43  std::string getType() const { return "GeneralizedVelocityExcitation"; }
44 
45  void setExcitationFunction(Function<fmatvec::VecV(fmatvec::VecV,double)>* f_) {
46  f = f_;
47  f->setParent(this);
48  f->setName("Excitation");
49  }
50  void setExcitationFunction(Function<fmatvec::VecV(fmatvec::VecV)>* f_) {
51  setExcitationFunction(new StateDependentFunction<fmatvec::VecV>(f_));
52  }
53  void setExcitationFunction(Function<fmatvec::VecV(double)>* f_) {
54  setExcitationFunction(new TimeDependentFunction<fmatvec::VecV>(f_));
55  }
56  };
57 
58 }
59 
60 #endif
std::string getType() const
Definition: generalized_velocity_excitation.h:43
Definition: generalized_kinematic_excitation.h:30
void init(InitStage stage)
plots time series header
Definition: generalized_velocity_excitation.cc:33
InitStage
The stages of the initialization.
Definition: element.h:97
std::string name
name of element
Definition: element.h:298
Definition: generalized_velocity_excitation.h:29
void setName(const std::string &str)
Definition: element.h:163

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML