16#ifndef _B2PROPERTY_CONTACT_2D_TUBE_H_
17#define _B2PROPERTY_CONTACT_2D_TUBE_H_
19#include "elements/properties/b2property_contact_rb.H"
20#include "model/b2element.H"
23class PropertyContact2DTube :
public PropertyContactRB {
25 bool check(
const double coor[3],
double coor_target[3])
const {
27 sub_2(coor, centre, rcoor);
29 const double r =
norm_2(rcoor);
30 const bool inside = (r_min > 0 && r <= r_min);
31 const bool outside = (r_max > r_min && r >= r_max);
33 if (!inside && !outside) {
return false; }
35 const double c = (inside ? r_min : r_max) / r;
36 coor_target[0] = centre[0] + centre[0] + c * rcoor[0];
37 coor_target[1] = centre[1] + centre[1] + c * rcoor[1];
38 coor_target[2] = coor[2];
Contains the base classes for implementing Finite Elements.
Definition b2boundary_condition.H:32
void sub_2(const T1 v1[2], const T2 v2[2], T3 dest[2])
Definition b2tensor_calculus.H:248
T norm_2(T a[2])
Definition b2tensor_calculus.H:376