mbsim 4.0.0 MBSim Kernel

contour_interpolation.h
1 /* Copyright (C) 2004-2009 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 _CONTOUR_INTERPOLATION_H_
21 #define _CONTOUR_INTERPOLATION_H_
22
23 #include "mbsim/contours/contour.h"
24
25 namespace MBSim {
26
27 class Point;
28
35 class ContourInterpolation : public Contour {
36 public:
43 ContourInterpolation(const std::string &name, int parameters_, int nPoints_);
49 void setPoint(Point *point_, int n);
53 std::vector<Point*> getPoints() const {return iPoints;}
54 Point* getPoint(const int n) const {return iPoints[n];}
58 int getNPoints() const {return numberOfPoints;}
62 int getNZeta() const {return contourParameters;}
68 virtual bool testInsideBounds(const fmatvec::Vec2 &zeta) = 0;
75 virtual double computePointWeight(const fmatvec::Vec2 &zeta, int i) = 0;
83 virtual double computePointWeight(const fmatvec::Vec2 &zeta, int i, int diff) = 0;
87 // fmatvec::VecV computePointWeights(const fmatvec::Vec2 &zeta);
88 //
89 // fmatvec::Vec3 getWrOC(const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return getWrOC(cp);};
90 // fmatvec::Vec3 computeWvC (const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return computeWvC (cp);};
91 // fmatvec::Mat3xV computeWt (const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return computeWt (cp);};
92 // fmatvec::Vec3 computeWn (const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return computeWn (cp);};
93 //
94 // fmatvec::Vec3 getWrOC(const ContourPointData &cp);
95 // fmatvec::Vec3 computeWvC (const ContourPointData &cp);
96 //
97 // fmatvec::Mat3xV computeWt (const ContourPointData &cp);
98 // virtual fmatvec::Vec3 computeWn (const ContourPointData &cp) = 0;
99
100 protected:
104 std::vector<Point*> iPoints;
108 int contourParameters;
112 int numberOfPoints;
113 };
114 }
115
116 #endif /* _CONTOUR_INTERPOLATION_H_ */
MBSim::ContourInterpolation::getPoints
std::vector< Point * > getPoints() const
get list of Point s
Definition: contour_interpolation.h:53
MBSim::ContourInterpolation::setPoint
void setPoint(Point *point_, int n)
set point for interpolation
Definition: contour_interpolation.cc:29
MBSim::ContourInterpolation::numberOfPoints
int numberOfPoints
size of iPoints, number of Point s used for interpolation
Definition: contour_interpolation.h:112
MBSim::Contour
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
MBSim::ContourInterpolation::getNPoints
int getNPoints() const
get number of Point s used for interpolation
Definition: contour_interpolation.h:58
MBSim::ContourInterpolation::iPoints
std::vector< Point * > iPoints
compute all weights for nodes
Definition: contour_interpolation.h:104
MBSim::ContourInterpolation::testInsideBounds
virtual bool testInsideBounds(const fmatvec::Vec2 &zeta)=0
prototype for test if Contour-point given is inside or outside defined contour area
MBSim::ContourInterpolation::ContourInterpolation
ContourInterpolation(const std::string &name, int parameters_, int nPoints_)
constructor
Definition: contour_interpolation.cc:28
MBSim::Element::name
std::string name
name of element
Definition: element.h:260
MBSim::ContourInterpolation
Basis-Class for Contour interpolation between Point s, standard contact Point-ContourInterpolation is...
Definition: contour_interpolation.h:35
MBSim::Point
most primitive contour: the point (no extention)
Definition: point.h:35
MBSim::ContourInterpolation::getNZeta
int getNZeta() const
get number of Contour-parameters of Contour
Definition: contour_interpolation.h:62
MBSim::ContourInterpolation::contourParameters
int contourParameters
number of Contour-parameters used by ContourInterpolation: 1 for lines, 2 for surfaces
Definition: contour_interpolation.h:108
MBSim::ContourInterpolation::computePointWeight
virtual double computePointWeight(const fmatvec::Vec2 &zeta, int i)=0
prototype of method giving weights of all Point s
MBSim
namespace MBSim
Definition: bilateral_constraint.cc:30