13 #if !defined(KRATOS_PLANE_H_INCLUDED )
14 #define KRATOS_PLANE_H_INCLUDED
104 double det = std::fabs(a00*a11 - a01*a01);
105 double s = a01*b1 - a11*b0;
106 double t = a01*b0 - a00*b1;
107 double sqrDistance = 0.00;
121 sqrDistance = a00 + (2.00)*b0 +
c;
126 sqrDistance = b0*s +
c;
140 sqrDistance = a11 + (2.00)*b1 +
c;
145 sqrDistance = b1*
t +
c;
160 sqrDistance = a11 + (2.00)*b1 +
c;
165 sqrDistance = b1*
t +
c;
180 sqrDistance = a00 + (1.00)*b0 +
c;
185 sqrDistance = b0*s +
c;
191 double invDet = (1.00)/det;
194 sqrDistance = s*(a00*s + a01*
t + (2.00)*b0) +
195 t*(a01*s + a11*
t + (2.00)*b1) +
c;
200 double tmp0, tmp1, numer, denom;
209 denom = a00 - (2.00)*a01 + a11;
214 sqrDistance = a00 + (2.00)*b0 +
c;
220 sqrDistance = s*(a00*s + a01*
t + (2.00)*b0) +
221 t*(a01*s + a11*
t + (2.00)*b1) +
c;
230 sqrDistance = a11 + (2.00)*b1 +
c;
240 sqrDistance = b1*
t +
c;
251 denom = a00 - (2.00)*a01 + a11;
256 sqrDistance = a11 + (2.00)*b1 +
c;
262 sqrDistance = s*(a00*s + a01*
t + (2.00)*b0) +
263 t*(a01*s + a11*
t + (2.00)*b1) +
c;
272 sqrDistance = a00 + (2.00)*b0 +
c;
282 sqrDistance = b0*s +
c;
288 numer = a11 + b1 - a01 - b0;
293 sqrDistance = a11 + (2.00)*b1 +
c;
297 denom = a00 - (2.00)*a01 + a11;
302 sqrDistance = a00 + (2.00)*b0 +
c;
308 sqrDistance = s*(a00*s + a01*
t + (2.00)*b0) +
309 t*(a01*s + a11*
t + (2.00)*b1) +
c;
316 if (sqrDistance < 0.00)
338 else if (distance > 0.00)
static void UnitCrossProduct(T1 &c, const T2 &a, const T3 &b)
Performs the unitary cross product of the two input vectors a,b.
Definition: math_utils.h:831
array_1d< double, 3 > mNormal
Definition: plane.h:346
~Plane()
Definition: plane.h:41
Plane(const array_1d< double, 3 > &p0, const array_1d< double, 3 > &p1, const array_1d< double, 3 > &p2)
Definition: plane.h:56
double DistanceTo(const array_1d< double, 3 > &p)
Calcula la distancia del punto al plano.
Definition: plane.h:81
Plane(const array_1d< double, 3 > &normal, double &constant)
Definition: plane.h:44
double mConstant
Definition: plane.h:347
int WhichSide(const array_1d< double, 3 > &p)
Definition: plane.h:333
array_1d< double, 3 > mClosestPoint
Definition: plane.h:345
Plane(const array_1d< double, 3 > &normal, const array_1d< double, 3 > &p)
Definition: plane.h:50
double DistPoint3Triangle3(array_1d< double, 3 > &rPoint, array_1d< double, 3 > &p0, array_1d< double, 3 > &p1, array_1d< double, 3 > &p2)
computa la distancia de un punto a un triangulo 3D
Definition: plane.h:87
Plane()
Definition: plane.h:33
array_1d< double, 3 > mTriangleBary
Definition: plane.h:344
void AssignPointsAndComputeParameters(array_1d< double, 3 > &p0, array_1d< double, 3 > &p1, array_1d< double, 3 > &p2)
Definition: plane.h:69
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
int t
Definition: ode_solve.py:392
p
Definition: sensitivityMatrix.py:52