Loading [MathJax]/extensions/tex2jax.js
mbsim  4.0.0
MBSim Kernel
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
funcpair_hyperbola_circle.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 _FUNCPAIR_HYPERBOLA_CIRCLE_H_
21#define _FUNCPAIR_HYPERBOLA_CIRCLE_H_
22
23#include <mbsim/functions/contact/funcpair_conesection_circle.h>
24
25namespace MBSim {
26
33 public:
41 FuncPairHyperbolaCircle(double R_, double a_, double b_) :
42 FuncPairConeSectionCircle(R_, a_, b_) {
43 }
44
52 FuncPairHyperbolaCircle(double R_, double a_, double b_, bool hy_IN_ci_) :
53 FuncPairConeSectionCircle(R_, a_, b_, hy_IN_ci_) {
54 }
55
56 /* INHERITED INTERFACE OF DISTANCEFUNCTION */
57 double operator()(const double &phi) override;
58 fmatvec::Vec3 evalWrD(const double &phi) override;
59 /*************************************************/
60 };
61
62 inline double FuncPairHyperbolaCircle::operator()(const double &phi) {
63 return -2 * b * (b2(0) * d(0) + b2(1) * d(1) + b2(2) * d(2)) * cosh(phi) - 2 * a * (b1(0) * d(0) + b1(1) * d(1) + b1(2) * d(2)) * sinh(phi) - ((a * a) + (b * b)) * sinh(2 * phi);
64 }
65 inline fmatvec::Vec3 FuncPairHyperbolaCircle::evalWrD(const double &phi) {
66 return d + b1 * a * cosh(phi) + b2 * b * sinh(phi);
67 }
68
69}
70
71#endif
base root function for planar pairing ConeSection and Circle
Definition: funcpair_conesection_circle.h:32
fmatvec::Vec3 b1
normed base-vectors of cone-section
Definition: funcpair_conesection_circle.h:80
fmatvec::Vec3 d
distance-vector of cone-section- and circle-midpoint
Definition: funcpair_conesection_circle.h:85
root function for planar pairing Hyperbola and Circle
Definition: funcpair_hyperbola_circle.h:32
FuncPairHyperbolaCircle(double R_, double a_, double b_)
constructor
Definition: funcpair_hyperbola_circle.h:41
FuncPairHyperbolaCircle(double R_, double a_, double b_, bool hy_IN_ci_)
constructor
Definition: funcpair_hyperbola_circle.h:52
namespace MBSim
Definition: bilateral_constraint.cc:30