All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
planar_contact_search.h
1 /* Copyright (C) 2004-2010 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 _PLANAR_CONTACT_SEARCH_H_
21 #define _PLANAR_CONTACT_SEARCH_H_
22 
23 #include <mbsim/functions/function.h>
24 
25 namespace MBSim {
26 
27  template <typename Sig> class DistanceFunction;
28 
40  public:
44  PlanarContactSearch() : func(0), jac(0), s0(0.), searchAll(false) { }
45 
52  PlanarContactSearch(DistanceFunction<double(double)> *func_) : func(func_), jac(0), s0(0.), searchAll(false) { }
53 
60  PlanarContactSearch(DistanceFunction<double(double)> *func_, Function<double(double)> *jac_) : func(func_), jac(jac_), s0(0.), searchAll(false) { }
61 
62  /* GETTER / SETTER */
63  void setFunction(DistanceFunction<double(double)> *func_) { func = func_; }
64 
65  void setJacobianFunction(Function<double(double)> *jac_) { jac = jac_; }
66 
67  void setInitialValue(const double &s0_) { s0 = s0_; }
68  void setNodes(const fmatvec::Vec &nodes_) { nodes = nodes_; }
69  void setSearchAll(bool searchAll_) { searchAll = searchAll_; }
70  /*************************************************/
71 
78  void setEqualSpacing(const int &n, const double &x0, const double &dx);
79 
84  double slv();
90 
91  private:
96 
101 
105  double s0;
106 
111 
115  bool searchAll;
116  };
117 
118 }
119 
120 #endif
double s0
initial value for Newton method
Definition: planar_contact_search.h:105
Definition: distance_function.h:27
PlanarContactSearch()
standard constructor
Definition: planar_contact_search.h:44
PlanarContactSearch(DistanceFunction< double(double)> *func_, Function< double(double)> *jac_)
constructor
Definition: planar_contact_search.h:60
PlanarContactSearch(DistanceFunction< double(double)> *func_)
constructor
Definition: planar_contact_search.h:52
double slv()
solve for the one potential contact point with minimal distance (might be negative) ...
Definition: planar_contact_search.cc:37
DistanceFunction< double(double)> * func
distance-function holding all information for contact-search
Definition: planar_contact_search.h:95
Function< double(double)> * jac
Jacobian of root function part of distance function.
Definition: planar_contact_search.h:100
Definition: planar_contour.h:31
void setEqualSpacing(const int &n, const double &x0, const double &dx)
set equally distanced nodes
Definition: planar_contact_search.cc:30
fmatvec::Vec nodes
Definition: planar_contact_search.h:110
general class for contact search with respect to one contour-parameter
Definition: planar_contact_search.h:39
bool searchAll
all area searching by Regular-Falsi or known initial value for Newton-Method?
Definition: planar_contact_search.h:115
fmatvec::Mat slvAll()
solve for all potential contact points
Definition: planar_contact_search.cc:92

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML