mbsim
4.0.0
MBSim Kernel
Loading...
Searching...
No Matches
flexibility_influence_function.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: markus.ms.schneider@gmail.com
18
*/
19
20
#ifndef _FLEXIBILITY_INFLUENCE_FUNCTION_H_
21
#define _FLEXIBILITY_INFLUENCE_FUNCTION_H_
22
23
#include "mbsim/functions/kinetics/influence_function.h"
24
#include "mbsim/utils/eps.h"
25
26
namespace
MBSim
{
27
28
/*
29
* \brief Influence function for flexibility of contour with no influence to other contours (or contour points)
30
*/
31
class
FlexibilityInfluenceFunction
:
public
InfluenceFunction
{
32
public
:
33
FlexibilityInfluenceFunction
() : flexibility(0) {
34
}
35
FlexibilityInfluenceFunction
(
const
std::string& ContourName_,
const
double
& flexibility_) :
36
flexibility(flexibility_) {
37
}
38
virtual
~FlexibilityInfluenceFunction
() {}
39
/* INHERITED INTERFACE OF FUNCTION2 */
40
virtual
double
operator()(
const
std::pair<Contour*, ContourFrame*>& firstContourInfo,
const
std::pair<Contour*, ContourFrame*>& secondContourInfo) {
41
if
(nrm2(evalZeta(firstContourInfo)- evalZeta(secondContourInfo)) < macheps)
42
return
flexibility;
43
else
44
return
0;
45
}
46
virtual
void
initializeUsingXML(xercesc::DOMElement *element);
47
/***************************************************/
48
49
protected
:
50
double
flexibility;
51
};
52
53
}
54
55
#endif
MBSim::FlexibilityInfluenceFunction
Definition
flexibility_influence_function.h:31
MBSim::InfluenceFunction
function describing the influence between the deformations on a body
Definition
influence_function.h:45
MBSim
namespace MBSim
Definition
bilateral_constraint.cc:30
mbsim
kernel
mbsim
functions
kinetics
flexibility_influence_function.h
Generated with
Doxygen
using
Doxygen Awesome
on Sun Nov 22 2026