mbsim  4.0.0
MBSim Kernel
point_polynomialfrustum.h
1/* Copyright (C) 2004-2012 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 POINT_POLYNOMIALFRUSTUM_H_
21#define POINT_POLYNOMIALFRUSTUM_H_
22
23#include "contact_kinematics.h"
24
25#include <mbsim/contours/polynomial_frustum.h>
26#include <mbsim/contours/point.h>
27#include <mbsim/numerics/nonlinear_algebra/multi_dimensional_newton_method.h>
28
29namespace MBSim {
30
34 class projectPointAlongNormal : public Function<fmatvec::Vec(fmatvec::Vec)> {
35 public:
37
38 ~projectPointAlongNormal() override;
39
40 void setUpSystemParamters(const fmatvec::Vec3 & referencePoint_, const double & phi_);
41
42 fmatvec::Vec operator()(const fmatvec::Vec &xin) override;
43
44 protected:
49
53 fmatvec::Vec3 referencePoint;
54
58 double phi;
59 };
60
65 public:
67
69
70 void setUpSystemParamters(const fmatvec::Vec3 & referencePoint_, const double & phi_);
71
72 fmatvec::SqrMat operator()(const fmatvec::Vec &xin) override;
73
74 protected:
79
83 fmatvec::Vec3 referencePoint;
84
88 double phi;
89 };
90
91
99 public:
102
103 /* INHERITED INTERFACE OF CONTACTKINEAMTICS */
104 void assignContours(const std::vector<Contour*> &contour) override;
105 void updateg(SingleContact &contact, int i=0) override;
106
107 protected:
111 int ipoint{-1};
112
116 int ifrustum{-1};
117
121 Point *point{nullptr};
122
127
131 double signh{1};
132
137
142
147
152
157
158 };
159
160} /* namespace MBSim */
161#endif /* POINT_POLYNOMIALFRUSTUM_H_ */
class for contact kinematics between convex frustum and an plate
Definition: point_polynomialfrustum.h:98
int ifrustum
contour index of frustum (in cpData)
Definition: point_polynomialfrustum.h:116
double signh
sign of h-direction of frustum
Definition: point_polynomialfrustum.h:131
void updateg(SingleContact &contact, int i=0) override
compute contact kinematics for a single contact
Definition: point_polynomialfrustum.cc:126
GlobalResidualCriteriaFunction criteriaProjectAlongNormal
criteria for newton method
Definition: point_polynomialfrustum.h:151
MBSim::MultiDimensionalNewtonMethod newtonProjectAlongNormal
newton method for solving the edge contact
Definition: point_polynomialfrustum.h:141
Point * point
pointer to the contour class for the plate
Definition: point_polynomialfrustum.h:121
MBSim::projectPointAlongNormal * funcProjectAlongNormal
function for intersection point
Definition: point_polynomialfrustum.h:136
PolynomialFrustum * frustum
pointer to the contour class for the polynomial frustum
Definition: point_polynomialfrustum.h:126
void assignContours(const std::vector< Contour * > &contour) override
treats ordering of contours
Definition: point_polynomialfrustum.cc:100
int ipoint
contour index of plate (in cpData)
Definition: point_polynomialfrustum.h:111
MBSim::StandardDampingFunction dampingProjectAlongNormal
damping function for newton method
Definition: point_polynomialfrustum.h:156
MBSim::projectPointAlongNormalJacobian * jacobianProjectAlongNormal
Jacobian for newton method.
Definition: point_polynomialfrustum.h:146
basic class for contact kinematical calculations
Definition: contact_kinematics.h:41
Definition: function.h:53
This criteria function class applies the infinity norm globally on the complete vector and compares i...
Definition: criteria_functions.h:170
Newton method for multidimensional root finding.
Definition: multi_dimensional_newton_method.h:41
base class for square Jacobians used for the newton method
Definition: newton_method_jacobian_functions.h:31
most primitive contour: the point (no extention)
Definition: point.h:35
Frustum contour with a polynomial radius over height course.
Definition: polynomial_frustum.h:38
class for contacts
Definition: single_contact.h:46
Definition: damping_functions.h:63
the Jacobian function for the projectAlongNormal Function
Definition: point_polynomialfrustum.h:64
double phi
azimuathal position where it all happens
Definition: point_polynomialfrustum.h:88
fmatvec::Vec3 referencePoint
point that should be projected
Definition: point_polynomialfrustum.h:83
PolynomialFrustum * frustum
constant pointer to the frustum
Definition: point_polynomialfrustum.h:78
function that is zero for a height-coordinate of the polynomial frustum on which the normal on that p...
Definition: point_polynomialfrustum.h:34
fmatvec::Vec3 referencePoint
point that should be projected
Definition: point_polynomialfrustum.h:53
PolynomialFrustum * frustum
constant pointer to the frustum
Definition: point_polynomialfrustum.h:48
double phi
azimuathal position where it all happens
Definition: point_polynomialfrustum.h:58
namespace MBSim
Definition: bilateral_constraint.cc:30