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