DCS
a Driven-Cavity Open source Simulator code
 All Classes Files Functions Variables Groups Pages
Data_Type_Vector

Module definition of Type_Vector. More...

+ Collaboration diagram for Data_Type_Vector:
elemental real(r8p) function,
public 
data_type_vector::sq_norm (vec)
 Function for computing the square of the norm of a vector. More...
 
elemental real(r8p) function,
public 
data_type_vector::norml2 (vec)
 Function for computing the norm L2 of a vector. More...
 
elemental type(type_vector)
function, public 
data_type_vector::normalize (vec)
 Function for normalizing a vector. More...
 
elemental type(type_vector)
function, public 
data_type_vector::face_normal4 (norm, pt1, pt2, pt3, pt4)
 Function for calculating the normal of the face defined by 4 points vector pt1, pt2, pt3 and pt4. More...
 
elemental type(type_vector)
function, public 
data_type_vector::face_normal3 (norm, pt1, pt2, pt3)
 Function for calculating the normal of the face defined by the 3 points vector pt1, pt2 and pt3. More...
 

Detailed Description

Module definition of Type_Vector.

Function/Subroutine Documentation

elemental real(r8p) function, public data_type_vector::sq_norm ( type(type_vector), intent(in)  vec)

Function for computing the square of the norm of a vector.

The square norm if defined as $ N = x^2 + y^2 + z^2$.

Parameters
[in]vecVector.

Definition at line 405 of file Data_Type_Vector.f90.

elemental real(r8p) function, public data_type_vector::norml2 ( type(type_vector), intent(in)  vec)

Function for computing the norm L2 of a vector.

The norm L2 if defined as $N = \sqrt {x^2 + y^2 + z^2 }$.

Parameters
[in]vecVector.

Definition at line 420 of file Data_Type_Vector.f90.

elemental type(type_vector) function, public data_type_vector::normalize ( type(type_vector), intent(in)  vec)

Function for normalizing a vector.

The normalization is made by means of norm L2. If the norm L2 of the vector is less than the parameter smallR8P the normalization value is set to normL2(vec)+smallR8P.

Parameters
[in]vecVector to be normalized.

Definition at line 436 of file Data_Type_Vector.f90.

References data_type_vector::type_vector::norml2(), and ir_precision::smallr8p.

+ Here is the call graph for this function:

elemental type(type_vector) function, public data_type_vector::face_normal4 ( character(1), intent(in), optional  norm,
type(type_vector), intent(in)  pt1,
type(type_vector), intent(in)  pt2,
type(type_vector), intent(in)  pt3,
type(type_vector), intent(in)  pt4 
)

Function for calculating the normal of the face defined by 4 points vector pt1, pt2, pt3 and pt4.

The convention for the points numeration is the following:

1.----------.2
| |
| |
| |
| |
4.----------.3

The normal is calculated by the cross product of the diagonal d13 for the diagonal d24: d13 x d24. The normal is normalized if the variable 'norm' is passed (with any value).

Parameters
[in]normIf 'norm' is passed as argument the normal is normalized.
[in]pt1First face point.
[in]pt2Second face point.
[in]pt3Third face point.
[in]pt4Fourth face point.

Definition at line 468 of file Data_Type_Vector.f90.

References data_type_vector::type_vector::cross(), and data_type_vector::type_vector::normalize().

+ Here is the call graph for this function:

elemental type(type_vector) function, public data_type_vector::face_normal3 ( character(1), intent(in), optional  norm,
type(type_vector), intent(in)  pt1,
type(type_vector), intent(in)  pt2,
type(type_vector), intent(in)  pt3 
)

Function for calculating the normal of the face defined by the 3 points vector pt1, pt2 and pt3.

1.----.2
\ |
\ |
\ |
\|
.3

The normal is calculated by the cross product of the side s12 for the side s13: s12 x s13. The normal is normalized if the variable 'norm' is passed (with any value).

Parameters
[in]normIf 'norm' is passed as argument the normal is normalized.
[in]pt1First face point.
[in]pt2Second face point.
[in]pt3Third face point.

Definition at line 504 of file Data_Type_Vector.f90.

References data_type_vector::type_vector::cross(), and data_type_vector::type_vector::normalize().

+ Here is the call graph for this function: