vecfor_RPP
VecFor, Vector algebra class for Fortran poor people, default kind. If not defined otherwise, the default kind is R8P.
Source: src/lib/vecfor_RPP.F90
Dependencies
Contents
- vector
- R8P_mul_vector_dev
- assign_I1P
- assign_I2P
- assign_I4P
- assign_I8P
- assign_R16P
- assign_R4P
- assign_R8P
- assign_vector
- assign_vector_dev
- barycentric_tetrahedron_dev
- barycentric_triangle_dev
- closest_point_triangle
- closest_point_triangle_dev
- crossproduct_accurate_dev
- crossproduct_dev
- distance_vectorial_to_plane_dev
- face_normal3_dev
- face_normal4_dev
- load_from_file
- matrixproduct_dev
- mirror_by_matrix
- mirror_by_matrix_dev
- mirror_by_normal
- mirror_by_normal_dev
- mirror_matrix_dev
- normalize
- normalize_dev
- normalized_checked
- normalized_checked_dev
- normalized_dev
- orthogonal_dev
- parallel_dev
- polygon_vector_area_dev
- printf
- projection_onto_plane_dev
- rotate_by_axis_angle
- rotate_by_axis_angle_dev
- rotate_by_matrix
- rotate_by_matrix_dev
- rotation_matrix_dev
- save_into_file
- vector_mul_R8P_dev
- vector_sub_vector_dev
- vector_sum_vector_dev
- I1P_eq_vector
- I1P_great_eq_vector
- I1P_great_vector
- I1P_low_eq_vector
- I1P_low_vector
- I1P_mul_vector
- I1P_not_eq_vector
- I1P_sub_vector
- I1P_sum_vector
- I2P_eq_vector
- I2P_great_eq_vector
- I2P_great_vector
- I2P_low_eq_vector
- I2P_low_vector
- I2P_mul_vector
- I2P_not_eq_vector
- I2P_sub_vector
- I2P_sum_vector
- I4P_eq_vector
- I4P_great_eq_vector
- I4P_great_vector
- I4P_low_eq_vector
- I4P_low_vector
- I4P_mul_vector
- I4P_not_eq_vector
- I4P_sub_vector
- I4P_sum_vector
- I8P_eq_vector
- I8P_great_eq_vector
- I8P_great_vector
- I8P_low_eq_vector
- I8P_low_vector
- I8P_mul_vector
- I8P_not_eq_vector
- I8P_sub_vector
- I8P_sum_vector
- R16P_eq_vector
- R16P_great_eq_vector
- R16P_great_vector
- R16P_low_eq_vector
- R16P_low_vector
- R16P_mul_vector
- R16P_not_eq_vector
- R16P_sub_vector
- R16P_sum_vector
- R4P_eq_vector
- R4P_great_eq_vector
- R4P_great_vector
- R4P_low_eq_vector
- R4P_low_vector
- R4P_mul_vector
- R4P_not_eq_vector
- R4P_sub_vector
- R4P_sum_vector
- R8P_eq_vector
- R8P_great_eq_vector
- R8P_great_vector
- R8P_low_eq_vector
- R8P_low_vector
- R8P_mul_vector
- R8P_not_eq_vector
- R8P_sub_vector
- R8P_sum_vector
- angle
- angle_dev
- barycentric_tetrahedron
- barycentric_triangle
- crossproduct_RPP
- crossproduct_accurate
- distance_to_line
- distance_to_line_dev
- distance_to_plane
- distance_to_plane_dev
- distance_vectorial_to_plane
- dop_RPP
- dotproduct
- dotproduct_accurate
- dotproduct_accurate_dev
- dotproduct_dev
- face_normal3
- face_normal4
- fma_RPP
- iolen
- is_collinear
- is_collinear_dev
- is_concyclic
- is_concyclic_dev
- matrixproduct
- mirror_matrix
- negative
- normL2
- normL2_dev
- normalized
- orthogonal
- parallel
- polygon_vector_area
- positive
- projection_onto_plane
- rotation_matrix
- sq_norm
- sq_norm_dev
- tetrahedron_volume
- tetrahedron_volume_dev
- triangle_area
- triangle_area_dev
- vector_div_I1P
- vector_div_I2P
- vector_div_I4P
- vector_div_I8P
- vector_div_R16P
- vector_div_R4P
- vector_div_R8P
- vector_div_vector
- vector_eq_I1P
- vector_eq_I2P
- vector_eq_I4P
- vector_eq_I8P
- vector_eq_R16P
- vector_eq_R4P
- vector_eq_R8P
- vector_eq_vector
- vector_great_I1P
- vector_great_I2P
- vector_great_I4P
- vector_great_I8P
- vector_great_R16P
- vector_great_R4P
- vector_great_R8P
- vector_great_eq_I1P
- vector_great_eq_I2P
- vector_great_eq_I4P
- vector_great_eq_I8P
- vector_great_eq_R16P
- vector_great_eq_R4P
- vector_great_eq_R8P
- vector_great_eq_vector
- vector_great_vector
- vector_low_I1P
- vector_low_I2P
- vector_low_I4P
- vector_low_I8P
- vector_low_R16P
- vector_low_R4P
- vector_low_R8P
- vector_low_eq_I1P
- vector_low_eq_I2P
- vector_low_eq_I4P
- vector_low_eq_I8P
- vector_low_eq_R16P
- vector_low_eq_R4P
- vector_low_eq_R8P
- vector_low_eq_vector
- vector_low_vector
- vector_mul_I1P
- vector_mul_I2P
- vector_mul_I4P
- vector_mul_I8P
- vector_mul_R16P
- vector_mul_R4P
- vector_mul_R8P
- vector_mul_vector
- vector_not_eq_I1P
- vector_not_eq_I2P
- vector_not_eq_I4P
- vector_not_eq_I8P
- vector_not_eq_R16P
- vector_not_eq_R4P
- vector_not_eq_R8P
- vector_not_eq_vector
- vector_sub_I1P
- vector_sub_I2P
- vector_sub_I4P
- vector_sub_I8P
- vector_sub_R16P
- vector_sub_R4P
- vector_sub_R8P
- vector_sub_vector
- vector_sum_I1P
- vector_sum_I2P
- vector_sum_I4P
- vector_sum_I8P
- vector_sum_R16P
- vector_sum_R4P
- vector_sum_R8P
- vector_sum_vector
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
ex | type(vector) | parameter | X direction versor. |
ey | type(vector) | parameter | Y direction versor. |
ez | type(vector) | parameter | Z direction versor. |
Derived Types
vector
Vector class.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
x | real(kind=R8P) | Cartesian component in x direction. | |
y | real(kind=R8P) | Cartesian component in y direction. | |
z | real(kind=R8P) | Cartesian component in z direction. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
I1P_eq_vector | pass(rhs) | Operator integer(I1P) ==. |
I1P_great_eq_vector | pass(rhs) | Operator integer(I1P) >=. |
I1P_great_vector | pass(rhs) | Operator integer(I1P) >. |
I1P_low_eq_vector | pass(rhs) | Operator integer(I1P) <=. |
I1P_low_vector | pass(rhs) | Operator integer(I1P) <. |
I1P_mul_vector | pass(rhs) | Operator integer(I1P) *. |
I1P_not_eq_vector | pass(rhs) | Operator integer(I1P) /=. |
I1P_sub_vector | pass(rhs) | Operator integer(I1P) -. |
I1P_sum_vector | pass(rhs) | Operator integer(I1P) +. |
I2P_eq_vector | pass(rhs) | Operator integer(I2P) ==. |
I2P_great_eq_vector | pass(rhs) | Operator integer(I2P) >=. |
I2P_great_vector | pass(rhs) | Operator integer(I2P) >. |
I2P_low_eq_vector | pass(rhs) | Operator integer(I2P) <=. |
I2P_low_vector | pass(rhs) | Operator integer(I2P) <. |
I2P_mul_vector | pass(rhs) | Operator integer(I2P) *. |
I2P_not_eq_vector | pass(rhs) | Operator integer(I2P) /=. |
I2P_sub_vector | pass(rhs) | Operator integer(I2P) -. |
I2P_sum_vector | pass(rhs) | Operator integer(I2P) +. |
I4P_eq_vector | pass(rhs) | Operator integer(I4P) ==. |
I4P_great_eq_vector | pass(rhs) | Operator integer(I4P) >=. |
I4P_great_vector | pass(rhs) | Operator integer(I4P) >. |
I4P_low_eq_vector | pass(rhs) | Operator integer(I4P) <=. |
I4P_low_vector | pass(rhs) | Operator integer(I4P) <. |
I4P_mul_vector | pass(rhs) | Operator integer(I4P) *. |
I4P_not_eq_vector | pass(rhs) | Operator integer(I4P) /=. |
I4P_sub_vector | pass(rhs) | Operator integer(I4P) -. |
I4P_sum_vector | pass(rhs) | Operator integer(I4P) +. |
I8P_eq_vector | pass(rhs) | Operator integer(I8P) ==. |
I8P_great_eq_vector | pass(rhs) | Operator integer(I8P) >=. |
I8P_great_vector | pass(rhs) | Operator integer(I8P) >. |
I8P_low_eq_vector | pass(rhs) | Operator integer(I8P) <=. |
I8P_low_vector | pass(rhs) | Operator integer(I8P) <. |
I8P_mul_vector | pass(rhs) | Operator integer(I8P) *. |
I8P_not_eq_vector | pass(rhs) | Operator integer(I8P) /=. |
I8P_sub_vector | pass(rhs) | Operator integer(I8P) -. |
I8P_sum_vector | pass(rhs) | Operator integer(I8P) +. |
R16P_eq_vector | pass(rhs) | Operator real(R16P) ==. |
R16P_great_eq_vector | pass(rhs) | Operator real(R16P) >=. |
R16P_great_vector | pass(rhs) | Operator real(R16P) >. |
R16P_low_eq_vector | pass(rhs) | Operator real(R16P) <=. |
R16P_low_vector | pass(rhs) | Operator real(R16P) <. |
R16P_mul_vector | pass(rhs) | Operator real(R16P) *. |
R16P_not_eq_vector | pass(rhs) | Operator real(R16P) /=. |
R16P_sub_vector | pass(rhs) | Operator real(R16P) -. |
R16P_sum_vector | pass(rhs) | Operator real(R16P) +. |
R4P_eq_vector | pass(rhs) | Operator real(R4P) ==. |
R4P_great_eq_vector | pass(rhs) | Operator real(R4P) >=. |
R4P_great_vector | pass(rhs) | Operator real(R4P) >. |
R4P_low_eq_vector | pass(rhs) | Operator real(R4P) <=. |
R4P_low_vector | pass(rhs) | Operator real(R4P) <. |
R4P_mul_vector | pass(rhs) | Operator real(R4P) *. |
R4P_not_eq_vector | pass(rhs) | Operator real(R4P) /=. |
R4P_sub_vector | pass(rhs) | Operator real(R4P) -. |
R4P_sum_vector | pass(rhs) | Operator real(R4P) +. |
R8P_eq_vector | pass(rhs) | Operator real(R8P) ==. |
R8P_great_eq_vector | pass(rhs) | Operator real(R8P) >=. |
R8P_great_vector | pass(rhs) | Operator real(R8P) >. |
R8P_low_eq_vector | pass(rhs) | Operator real(R8P) <=. |
R8P_low_vector | pass(rhs) | Operator real(R8P) <. |
R8P_mul_vector | pass(rhs) | Operator real(R8P) *. |
R8P_not_eq_vector | pass(rhs) | Operator real(R8P) /=. |
R8P_sub_vector | pass(rhs) | Operator real(R8P) -. |
R8P_sum_vector | pass(rhs) | Operator real(R8P) +. |
angle | pass(self) | Return the angle (rad) between two |
assign_I1P | pass(lhs) | Operator = integer(I1P). |
assign_I2P | pass(lhs) | Operator = integer(I2P). |
assign_I4P | pass(lhs) | Operator = integer(I4P). |
assign_I8P | pass(lhs) | Operator = integer(I8P). |
assign_R16P | pass(lhs) | Operator = real(R16P). |
assign_R4P | pass(lhs) | Operator = real(R4P). |
assign_R8P | pass(lhs) | Operator = real(R8P). |
assign_vector | pass(lhs) | Operator =. |
assignment(=) | Overloading =. | |
crossproduct | pass(lhs) | Compute the cross product. |
distance_to_line | pass(self) | Return the distance (scalar) to |
distance_to_plane | pass(self) | Return the distance (signed, scalar) |
distance_vectorial_to_plane | pass(self) | Return the distance (vectorial) to |
dotproduct | pass(lhs) | Compute the scalar (dot) product. |
face_normal3 | nopass | Return the normal of the face. |
face_normal4 | nopass | Return the normal of the face. |
iolen | pass(self) | Compute IO length. |
is_collinear | pass(self) | Return true if the point is col- |
is_concyclic | pass(self) | Return true if the point is concy- |
load_from_file | pass(self) | Load vector from file. |
matrixproduct | pass(rhs) | Compute the matrix product. |
mirror | Mirror vector. | |
mirror_by_matrix | pass(self) | Mirror vector given matrix. |
mirror_by_normal | pass(self) | Mirror vector given normal of mirroring plane. |
negative | pass(rhs) | Operator -, unary. |
normL2 | pass(self) | Return the norm L2 of vector. |
normalize | pass(self) | Normalize a vector. |
normalized | pass(self) | Return a normalized copy of vector. |
operator(*) | Overloading *. | |
operator(+) | Overloading +. | |
operator(-) | Overloading -. | |
operator(.cross.) | Cross product operator. | |
operator(.dot.) | Scalar (dot) product operator. | |
operator(.matrix.) | Matrix product operator. | |
operator(.ortho.) | Component of lhs orthogonal to rhs operator. | |
operator(.paral.) | Component of lhs parallel to rhs operator. | |
operator(/) | Overloading /. | |
operator(/=) | Overloading /=. | |
operator(<) | Overloading <. | |
operator(<=) | Overloading <=. | |
operator(==) | Overloading ==. | |
operator(>) | Overloading >. | |
operator(>=) | Overloading >=. | |
orthogonal | pass(lhs) | Compute the component of lhs orthogonal to rhs. |
parallel | pass(lhs) | Compute the component of lhs parallel to rhs. |
positive | pass(rhs) | Operator +, unary. |
printf | pass(self) | Print vector components with a |
projection_onto_plane | pass(self) | Calculate the projection of point |
rotate | Rotate vector. | |
rotate_by_axis_angle | pass(self) | Rotate vector given axis and angle. |
rotate_by_matrix | pass(self) | Rotate vector given matrix. |
save_into_file | pass(self) | Save vector into file. |
sq_norm | pass(self) | Return the square of the norm. |
vector_div_I1P | pass(lhs) | Operator / integer(I1P). |
vector_div_I2P | pass(lhs) | Operator / integer(I2P). |
vector_div_I4P | pass(lhs) | Operator / integer(I4P). |
vector_div_I8P | pass(lhs) | Operator / integer(I8P). |
vector_div_R16P | pass(lhs) | Operator / real(R16P). |
vector_div_R4P | pass(lhs) | Operator / real(R4P). |
vector_div_R8P | pass(lhs) | Operator / real(R8P). |
vector_div_vector | pass(lhs) | Operator /. |
vector_eq_I1P | pass(lhs) | Operator == integer(I1P). |
vector_eq_I2P | pass(lhs) | Operator == integer(I2P). |
vector_eq_I4P | pass(lhs) | Operator == integer(I4P). |
vector_eq_I8P | pass(lhs) | Operator == integer(I8P). |
vector_eq_R16P | pass(lhs) | Operator == real(R16P). |
vector_eq_R4P | pass(lhs) | Operator == real(R4P). |
vector_eq_R8P | pass(lhs) | Operator == real(R8P). |
vector_eq_vector | pass(lhs) | Operator ==. |
vector_great_I1P | pass(lhs) | Operator > integer(I1P). |
vector_great_I2P | pass(lhs) | Operator > integer(I2P). |
vector_great_I4P | pass(lhs) | Operator > integer(I4P). |
vector_great_I8P | pass(lhs) | Operator > integer(I8P). |
vector_great_R16P | pass(lhs) | Operator > real(R16P). |
vector_great_R4P | pass(lhs) | Operator > real(R4P). |
vector_great_R8P | pass(lhs) | Operator > real(R8P). |
vector_great_eq_I1P | pass(lhs) | Operator >= integer(I1P). |
vector_great_eq_I2P | pass(lhs) | Operator >= integer(I2P). |
vector_great_eq_I4P | pass(lhs) | Operator >= integer(I4P). |
vector_great_eq_I8P | pass(lhs) | Operator >= integer(I8P). |
vector_great_eq_R16P | pass(lhs) | Operator >= real(R16P). |
vector_great_eq_R4P | pass(lhs) | Operator >= real(R4P). |
vector_great_eq_R8P | pass(lhs) | Operator >= real(R8P). |
vector_great_eq_vector | pass(lhs) | Operator >=. |
vector_great_vector | pass(lhs) | Operator >. |
vector_low_I1P | pass(lhs) | Operator < integer(I1P). |
vector_low_I2P | pass(lhs) | Operator < integer(I2P). |
vector_low_I4P | pass(lhs) | Operator < integer(I4P). |
vector_low_I8P | pass(lhs) | Operator < integer(I8P). |
vector_low_R16P | pass(lhs) | Operator < real(R16P). |
vector_low_R4P | pass(lhs) | Operator < real(R4P). |
vector_low_R8P | pass(lhs) | Operator < real(R8P). |
vector_low_eq_I1P | pass(lhs) | Operator <= integer(I1P). |
vector_low_eq_I2P | pass(lhs) | Operator <= integer(I2P). |
vector_low_eq_I4P | pass(lhs) | Operator <= integer(I4P). |
vector_low_eq_I8P | pass(lhs) | Operator <= integer(I8P). |
vector_low_eq_R16P | pass(lhs) | Operator <= real(R16P). |
vector_low_eq_R4P | pass(lhs) | Operator <= real(R4P). |
vector_low_eq_R8P | pass(lhs) | Operator <= real(R8P). |
vector_low_eq_vector | pass(lhs) | Operator <=. |
vector_low_vector | pass(lhs) | Operator <. |
vector_mul_I1P | pass(lhs) | Operator * integer(I1P). |
vector_mul_I2P | pass(lhs) | Operator * integer(I2P). |
vector_mul_I4P | pass(lhs) | Operator * integer(I4P). |
vector_mul_I8P | pass(lhs) | Operator * integer(I8P). |
vector_mul_R16P | pass(lhs) | Operator * real(R16P). |
vector_mul_R4P | pass(lhs) | Operator * real(R4P). |
vector_mul_R8P | pass(lhs) | Operator * real(R8P). |
vector_mul_vector | pass(lhs) | Operator *. |
vector_not_eq_I1P | pass(lhs) | Operator /= integer(I1P). |
vector_not_eq_I2P | pass(lhs) | Operator /= integer(I2P). |
vector_not_eq_I4P | pass(lhs) | Operator /= integer(I4P). |
vector_not_eq_I8P | pass(lhs) | Operator /= integer(I8P). |
vector_not_eq_R16P | pass(lhs) | Operator /= real(R16P). |
vector_not_eq_R4P | pass(lhs) | Operator /= real(R4P). |
vector_not_eq_R8P | pass(lhs) | Operator /= real(R8P). |
vector_not_eq_vector | pass(lhs) | Operator /=. |
vector_sub_I1P | pass(lhs) | Operator - integer(I1P). |
vector_sub_I2P | pass(lhs) | Operator - integer(I2P). |
vector_sub_I4P | pass(lhs) | Operator - integer(I4P). |
vector_sub_I8P | pass(lhs) | Operator - integer(I8P). |
vector_sub_R16P | pass(lhs) | Operator - real(R16P). |
vector_sub_R4P | pass(lhs) | Operator - real(R4P). |
vector_sub_R8P | pass(lhs) | Operator - real(R8P). |
vector_sub_vector | pass(lhs) | Operator -. |
vector_sum_I1P | pass(lhs) | Operator + integer(I1P). |
vector_sum_I2P | pass(lhs) | Operator + integer(I2P). |
vector_sum_I4P | pass(lhs) | Operator + integer(I4P). |
vector_sum_I8P | pass(lhs) | Operator + integer(I8P). |
vector_sum_R16P | pass(lhs) | Operator + real(R16P). |
vector_sum_R4P | pass(lhs) | Operator + real(R4P). |
vector_sum_R8P | pass(lhs) | Operator + real(R8P). |
vector_sum_vector | pass(lhs) | Operator +. |
Subroutines
R8P_mul_vector_dev
Device-callable real(R8P) * vector, subroutine form.
Attributes: pure
subroutine R8P_mul_vector_dev(s, a, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
s | real(kind=R8P) | in | Left hand side scalar. | |
a | type(vector) | in | Right hand side. | |
c | type(vector) | out | Scaled vector result. |
assign_I1P
Operator = integer(I4P).
type(vector) :: pt
pt = 1_I1P
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine assign_I1P(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
assign_I2P
Operator = integer(I4P).
type(vector) :: pt
pt = 1_I2P
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine assign_I2P(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
assign_I4P
Operator = integer(I4P).
type(vector) :: pt
pt = 1_I4P
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine assign_I4P(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
assign_I8P
Operator = integer(I8P).
type(vector) :: pt
pt = 1_I8P
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine assign_I8P(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
assign_R16P
Operator = real(R16P).
type(vector) :: pt
pt = 1._R16P
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine assign_R16P(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
assign_R4P
Operator = real(R4P).
type(vector) :: pt
pt = 1._R4P
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine assign_R4P(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
assign_R8P
Operator = real(R8P).
type(vector) :: pt
pt = 1._R8P
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine assign_R8P(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
assign_vector
Operator =
type(vector) :: pt
pt = 1 * ex + 2 * ey + 3 * ez
print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: pure
subroutine assign_vector(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | inout | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
assign_vector_dev
Device-callable vector = vector. Subroutine form is mandatory because Fortran assignment overloads must be subroutines, and the user-defined assign_vector TBP is unreachable from device code.
Attributes: pure
subroutine assign_vector_dev(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | type(vector) | out | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
barycentric_tetrahedron_dev
Device-callable barycentric_tetrahedron, the coordinates as an intent(out) argument.
Attributes: pure
subroutine barycentric_tetrahedron_dev(p, pt1, pt2, pt3, pt4, l)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | type(vector) | in | Point. | |
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. | |
pt4 | type(vector) | in | Fourth vertex. | |
l | real(kind=R8P) | out | Barycentric coordinates. |
Call graph
barycentric_triangle_dev
Device-callable barycentric_triangle, the coordinates as an intent(out) argument.
Attributes: pure
subroutine barycentric_triangle_dev(p, pt1, pt2, pt3, l)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | type(vector) | in | Point. | |
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. | |
l | real(kind=R8P) | out | Barycentric coordinates. |
Call graph
closest_point_triangle
Point q of the triangle a, b, c closest to p, and the feature it lies on: 1, 2, 3 the vertices a, b, c; 4, 5, 6 the edges ab, bc, ca; 7 the face (Ericson's Voronoi-region test, the region signs by Kahan's algorithm). For a signed distance to a mesh, sign |p - q| with the angle-weighted pseudo-normal of that feature (face normal on the face, an average over the faces sharing an edge or a vertex otherwise).
type(vector) :: q
integer :: f
call closest_point_triangle(2 * ex + ez, 0 * ex, ex, ey, q, f)
print "(I1,3(1X,F3.1))", f, q%x, q%y, q%zAttributes: elemental
subroutine closest_point_triangle(p, a, b, c, q, feature)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | type(vector) | in | Point. | |
a | type(vector) | in | First vertex. | |
b | type(vector) | in | Second vertex. | |
c | type(vector) | in | Third vertex. | |
q | type(vector) | out | Closest point. | |
feature | integer | out | Feature of the triangle where q lies. |
Call graph
closest_point_triangle_dev
Device-callable closest_point_triangle.
Attributes: pure
subroutine closest_point_triangle_dev(p, a, b, c, q, feature)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | type(vector) | in | Point. | |
a | type(vector) | in | First vertex. | |
b | type(vector) | in | Second vertex. | |
c | type(vector) | in | Third vertex. | |
q | type(vector) | out | Closest point. | |
feature | integer | out | Feature of the triangle where q lies. |
Call graph
crossproduct_accurate_dev
Device-callable crossproduct_accurate.
Attributes: pure
subroutine crossproduct_accurate_dev(a, b, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | First vector. | |
b | type(vector) | in | Second vector. | |
c | type(vector) | out | Cross product. |
Call graph
crossproduct_dev
Device-callable cross product, subroutine form.
Attributes: pure
subroutine crossproduct_dev(a, b, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Left hand side. | |
b | type(vector) | in | Right hand side. | |
c | type(vector) | out | Cross product result. |
Call graph
distance_vectorial_to_plane_dev
Device-callable vectorial distance of the point a from the plane through pt1, pt2, pt3: distance_vectorial_to_plane, normal * (normal.dot.(a - pt1)) open-coded.
Attributes: pure
subroutine distance_vectorial_to_plane_dev(a, pt1, pt2, pt3, distance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Point. | |
pt1 | type(vector) | in | First point of the plane. | |
pt2 | type(vector) | in | Second point of the plane. | |
pt3 | type(vector) | in | Third point of the plane. | |
distance | type(vector) | out | Vectorial distance. |
Call graph
face_normal3_dev
Device-callable normal of the triangle pt1, pt2, pt3: face_normal3 open-coded. With norm present (any value, as on the host) the normal is normalized, otherwise its length is the area of the triangle.
Attributes: pure
subroutine face_normal3_dev(pt1, pt2, pt3, normal, norm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. | |
normal | type(vector) | out | Face normal. | |
norm | character(len=1) | in | optional | If present, normalize the normal. |
Call graph
face_normal4_dev
Device-callable normal of the quadrilateral pt1, pt2, pt3, pt4: face_normal4 open-coded (cross product of the diagonals). With norm present (any value, as on the host) the normal is normalized, otherwise its length is the area of the quadrilateral.
Attributes: pure
subroutine face_normal4_dev(pt1, pt2, pt3, pt4, normal, norm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. | |
pt4 | type(vector) | in | Fourth vertex. | |
normal | type(vector) | out | Face normal. | |
norm | character(len=1) | in | optional | If present, normalize the normal. |
Call graph
load_from_file
Load vector from file.
type(vector) :: pt
pt = 1 * ex + 2 * ey + 3 * ez
open(unit=10, form='unformatted', status='scratch')
call pt%save_into_file(unit=10)
rewind(unit=10)
call pt%load_from_file(unit=10)
close(unit=10)
print "(3(F3.1,1X))", pt%x, pt%y, pt%zsubroutine load_from_file(self, unit, fmt, pos, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | inout | Vector. | |
unit | integer(kind=I4P) | in | Logic unit. | |
fmt | character(len=*) | in | optional | IO format. |
pos | integer(kind=I8P) | in | optional | Position specifier. |
iostat | integer(kind=I4P) | out | optional | IO error. |
iomsg | character(len=*) | out | optional | IO error message. |
matrixproduct_dev
Device-callable matrix product c = matrix .matrix. a, subroutine form of matrixproduct.
matrixproduct is reached through the .matrix. generic of a class dummy (an indirect call on the device), returns a type(vector) and calls matmul; here the product is open-coded, row by row in the order of the columns.
Attributes: pure
subroutine matrixproduct_dev(matrix, a, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
matrix | real(kind=R8P) | in | Matrix. | |
a | type(vector) | in | Vector. | |
c | type(vector) | out | Matrix product. |
Call graph
mirror_by_matrix
Mirror vector given matrix (of mirroring).
Attributes: pure
subroutine mirror_by_matrix(self, matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | inout | Vector. | |
matrix | real(kind=R8P) | in | Mirroring matrix. |
Call graph
mirror_by_matrix_dev
Device-callable in-place mirroring by matrix, call a%mirror(matrix=): mirror_by_matrix, matrixproduct_dev applied to a.
Attributes: pure
subroutine mirror_by_matrix_dev(a, matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | inout | Vector, transformed on return. | |
matrix | real(kind=R8P) | in | Transformation matrix. |
Call graph
mirror_by_normal
Mirror vector given normal of mirroring plane.
Attributes: pure
subroutine mirror_by_normal(self, normal)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | inout | Vector. | |
normal | type(vector) | in | Normal of mirroring plane. |
Call graph
mirror_by_normal_dev
Device-callable in-place mirror image across the plane of normal normal, call a%mirror(normal=): mirror_by_normal, the mirror_matrix_dev matrix applied with matrixproduct_dev.
Attributes: pure
subroutine mirror_by_normal_dev(a, normal)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | inout | Vector, mirrored on return. | |
normal | type(vector) | in | Normal of the mirroring plane. |
Call graph
mirror_matrix_dev
Device-callable mirror matrix: mirror_matrix with the matrix as an intent(out) argument.
mirror_matrix returns the matrix by value, which nvfortran (26.1 and 26.9) miscompiles in device code: no diagnostic, wrong results. The arithmetic is that of mirror_matrix, the normal normalized as by normalize, open-coded (no calls into the TBP-bound surface).
Attributes: pure
subroutine mirror_matrix_dev(normal, matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
normal | type(vector) | in | Normal of the mirroring plane. | |
matrix | real(kind=R8P) | out | Mirror matrix. |
Call graph
normalize
Normalize vector.
The normalization is made by means of norm L2. If the norm L2 of the vector is less than the parameter smallRPP the normalization value is set to normL2 + smallRPP.
type(vector) :: pt
pt = ex + ey
call pt%normalize
print "(3(F4.2,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
subroutine normalize(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | inout | Vector. |
Call graph
normalize_dev
Device-callable in-place normalization call a%normalize(): normalize open-coded.
Attributes: pure
subroutine normalize_dev(a)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | inout | Vector, normalized on return. |
normalized_checked
Normalize a into c only when its norm is above min_norm (default smallRPP): ok tells which.
Where normalize divides a degenerate vector by its norm plus smallRPP and returns something small but not unit, this reports the degenerate case: with ok false, c is the zero vector.
type(vector) :: c
logical :: ok
call normalized_checked(3 * ex + 4 * ey, c, ok)
print "(L1,3(1X,F4.2))", ok, c%x, c%y, c%z type(vector) :: c
logical :: ok
call normalized_checked(1e-3_RPP * ex, c, ok, min_norm=1e-2_RPP)
print "(L1,3(1X,F4.2))", ok, c%x, c%y, c%zAttributes: elemental
subroutine normalized_checked(a, c, ok, min_norm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Vector. | |
c | type(vector) | out | Normalized vector, the zero vector if not ok. | |
ok | logical | out | True if the norm of a is above min_norm. | |
min_norm | real(kind=R8P) | in | optional | Smallest accepted norm (default smallRPP). |
normalized_checked_dev
Device-callable normalized_checked: same arithmetic, same optional min_norm.
Attributes: pure
subroutine normalized_checked_dev(a, c, ok, min_norm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Vector. | |
c | type(vector) | out | Normalized vector, the zero vector if not ok. | |
ok | logical | out | True if the norm of a is above min_norm. | |
min_norm | real(kind=R8P) | in | optional | Smallest accepted norm (default smallRPP). |
normalized_dev
Device-callable normalized copy c = a%normalized(): normalized open-coded, the norm guarded by smallRPP as in normalize.
Attributes: pure
subroutine normalized_dev(a, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Vector. | |
c | type(vector) | out | Normalized copy. |
Call graph
orthogonal_dev
Device-callable component of a orthogonal to b, c = a .ortho. b: orthogonal, a - (a .paral. b).
Attributes: pure
subroutine orthogonal_dev(a, b, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Vector. | |
b | type(vector) | in | Direction. | |
c | type(vector) | out | Component of a orthogonal to b. |
Call graph
parallel_dev
Device-callable component of a parallel to b, c = a .paral. b: parallel open-coded, (a.dot.b) * normalized(b) / normL2(b) in the same order (the normalization guarded by smallRPP, the divisor not, as on the host).
Attributes: pure
subroutine parallel_dev(a, b, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Vector. | |
b | type(vector) | in | Direction. | |
c | type(vector) | out | Component of a parallel to b. |
Call graph
polygon_vector_area_dev
Device-callable polygon_vector_area, with the number of vertices explicit.
Attributes: pure
subroutine polygon_vector_area_dev(n, pts, area)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
n | integer | in | Number of vertices. | |
pts | type(vector) | in | Vertices. | |
area | type(vector) | out | Vector area. |
Call graph
printf
Print in a pretty ascii format the components of type Vector.
type(vector) :: pt
pt = ex + ey
call pt%printf(prefix='[x, y, z] = ', sep=', ')subroutine printf(self, unit, prefix, sep, suffix, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector. | |
unit | integer(kind=I4P) | in | optional | Logic unit. |
prefix | character(len=*) | in | optional | Prefix string. |
sep | character(len=*) | in | optional | Components separator. |
suffix | character(len=*) | in | optional | Suffix string. |
iostat | integer(kind=I4P) | out | optional | IO error. |
iomsg | character(len=*) | out | optional | IO error message. |
Call graph
projection_onto_plane_dev
Device-callable projection of the point a onto the plane through pt1, pt2, pt3: projection_onto_plane, a - distance_vectorial_to_plane.
Attributes: pure
subroutine projection_onto_plane_dev(a, pt1, pt2, pt3, projection)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Point. | |
pt1 | type(vector) | in | First point of the plane. | |
pt2 | type(vector) | in | Second point of the plane. | |
pt3 | type(vector) | in | Third point of the plane. | |
projection | type(vector) | out | Projection. |
Call graph
rotate_by_axis_angle
Rotate vector given axis and angle.
Angle must be in radiants.
Attributes: pure
subroutine rotate_by_axis_angle(self, axis, angle)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | inout | Vector. | |
axis | type(vector) | in | Axis of rotation. | |
angle | real(kind=R8P) | in | Angle of rotation. |
Call graph
rotate_by_axis_angle_dev
Device-callable in-place rotation about axis by angle, call a%rotate(axis=, angle=): rotate_by_axis_angle, the rotation_matrix_dev matrix applied with matrixproduct_dev.
Attributes: pure
subroutine rotate_by_axis_angle_dev(a, axis, angle)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | inout | Vector, rotated on return. | |
axis | type(vector) | in | Axis of rotation. | |
angle | real(kind=R8P) | in | Angle of rotation (radians). |
Call graph
rotate_by_matrix
Rotate vector given matrix (of ratation).
Attributes: pure
subroutine rotate_by_matrix(self, matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | inout | Vector. | |
matrix | real(kind=R8P) | in | Rotation matrix. |
Call graph
rotate_by_matrix_dev
Device-callable in-place rotation by matrix, call a%rotate(matrix=): rotate_by_matrix, matrixproduct_dev applied to a.
Attributes: pure
subroutine rotate_by_matrix_dev(a, matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | inout | Vector, transformed on return. | |
matrix | real(kind=R8P) | in | Transformation matrix. |
Call graph
rotation_matrix_dev
Device-callable rotation matrix: rotation_matrix with the matrix as an intent(out) argument.
rotation_matrix returns the matrix by value, which nvfortran (26.1 and 26.9) miscompiles in device code: no diagnostic, wrong results. The arithmetic is that of rotation_matrix, the axis normalized as by normalize, open-coded (no calls into the TBP-bound surface), so device and host results agree bit-exact.
Angle must be in radians.
Attributes: pure
subroutine rotation_matrix_dev(axis, angle, matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | type(vector) | in | Axis of rotation. | |
angle | real(kind=R8P) | in | Angle of rotation. | |
matrix | real(kind=R8P) | out | Rotation matrix. |
Call graph
save_into_file
Save vector into file.
type(vector) :: pt
pt = 1 * ex + 2 * ey + 3 * ez
open(unit=10, form='unformatted', status='scratch')
call pt%save_into_file(unit=10)
rewind(unit=10)
call pt%load_from_file(unit=10)
close(unit=10)
print "(3(F3.1,1X))", pt%x, pt%y, pt%zsubroutine save_into_file(self, unit, fmt, pos, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector data. | |
unit | integer(kind=I4P) | in | Logic unit. | |
fmt | character(len=*) | in | optional | IO format. |
pos | integer(kind=I8P) | in | optional | Position specifier. |
iostat | integer(kind=I4P) | out | optional | IO error. |
iomsg | character(len=*) | out | optional | IO error message. |
vector_mul_R8P_dev
Device-callable vector * real(R8P), subroutine form.
Attributes: pure
subroutine vector_mul_R8P_dev(a, s, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Left hand side. | |
s | real(kind=R8P) | in | Right hand side scalar. | |
c | type(vector) | out | Scaled vector result. |
vector_sub_vector_dev
Device-callable vector - vector, subroutine form.
Attributes: pure
subroutine vector_sub_vector_dev(a, b, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Left hand side. | |
b | type(vector) | in | Right hand side. | |
c | type(vector) | out | Difference result. |
Call graph
vector_sum_vector_dev
Device-callable vector + vector, subroutine form.
Attributes: pure
subroutine vector_sum_vector_dev(a, b, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Left hand side. | |
b | type(vector) | in | Right hand side. | |
c | type(vector) | out | Sum result. |
Functions
I1P_eq_vector
Operator integer(I1P) ==.
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", 5_I1P == ptAttributes: elemental
Returns: logical
function I1P_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I1P_great_eq_vector
Operator integer(I1P) >=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I1P >= ptAttributes: elemental
Returns: logical
function I1P_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I1P_great_vector
Operator integer(I1P) >.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I1P > ptAttributes: elemental
Returns: logical
function I1P_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I1P_low_eq_vector
Operator integer(I1P) <=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I1P <= ptAttributes: elemental
Returns: logical
function I1P_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I1P_low_vector
Operator integer(I1P) <.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I1P < ptAttributes: elemental
Returns: logical
function I1P_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I1P_mul_vector
Operator integer(I1P) *.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I1P * pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I1P_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I1P_not_eq_vector
Operator integer(I1P) /=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I1P /= ptAttributes: elemental
Returns: logical
function I1P_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I1P_sub_vector
Operator integer(I1P) -.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I1P - pt(1)
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function I1P_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I1P_sum_vector
Operator integer(I1P) +.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I1P + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I1P_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I1P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I2P_eq_vector
Operator integer(I2P) ==.
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", 5_I2P == ptAttributes: elemental
Returns: logical
function I2P_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I2P_great_eq_vector
Operator integer(I2P) >=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I2P >= ptAttributes: elemental
Returns: logical
function I2P_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I2P_great_vector
Operator integer(I2P) >.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I2P > ptAttributes: elemental
Returns: logical
function I2P_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I2P_low_eq_vector
Operator integer(I2P) <=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I2P <= ptAttributes: elemental
Returns: logical
function I2P_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I2P_low_vector
Operator integer(I2P) <.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I2P < ptAttributes: elemental
Returns: logical
function I2P_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I2P_mul_vector
Operator integer(I2P) *.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I2P * pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I2P_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I2P_not_eq_vector
Operator integer(I2P) /=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I2P /= ptAttributes: elemental
Returns: logical
function I2P_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I2P_sub_vector
Operator integer(I2P) -.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I2P - pt(1)
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function I2P_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I2P_sum_vector
Operator integer(I2P) +.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I2P + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I2P_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I2P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I4P_eq_vector
Operator integer(I4P) ==.
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", 5_I4P == ptAttributes: elemental
Returns: logical
function I4P_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I4P_great_eq_vector
Operator integer(I4P) >=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I4P >= ptAttributes: elemental
Returns: logical
function I4P_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I4P_great_vector
Operator integer(I4P) >.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I4P > ptAttributes: elemental
Returns: logical
function I4P_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I4P_low_eq_vector
Operator integer(I4P) <=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I4P <= ptAttributes: elemental
Returns: logical
function I4P_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I4P_low_vector
Operator integer(I4P) <.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I4P < ptAttributes: elemental
Returns: logical
function I4P_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I4P_mul_vector
Operator integer(I4P) *.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I4P * pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I4P_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I4P_not_eq_vector
Operator integer(I4P) /=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I4P /= ptAttributes: elemental
Returns: logical
function I4P_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I4P_sub_vector
Operator integer(I4P) -.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I4P - pt(1)
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function I4P_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I4P_sum_vector
Operator integer(I4P) +.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I4P + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I4P_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I8P_eq_vector
Operator integer(I8P) ==.
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", 5_I8P == ptAttributes: elemental
Returns: logical
function I8P_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I8P_great_eq_vector
Operator integer(I8P) >=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I8P >= ptAttributes: elemental
Returns: logical
function I8P_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I8P_great_vector
Operator integer(I8P) >.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4_I8P > ptAttributes: elemental
Returns: logical
function I8P_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I8P_low_eq_vector
Operator integer(I8P) <=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I8P <= ptAttributes: elemental
Returns: logical
function I8P_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I8P_low_vector
Operator integer(I8P) <.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I8P < ptAttributes: elemental
Returns: logical
function I8P_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I8P_mul_vector
Operator integer(I8P) *.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I8P * pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I8P_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I8P_not_eq_vector
Operator integer(I8P) /=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1_I8P /= ptAttributes: elemental
Returns: logical
function I8P_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
I8P_sub_vector
Operator integer(I8P) -.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I8P - pt(1)
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function I8P_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
I8P_sum_vector
Operator integer(I8P) +.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2_I8P + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function I8P_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | integer(kind=I8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R16P_eq_vector
Operator real(R16P) ==.
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", 5._R16P == ptAttributes: elemental
Returns: logical
function R16P_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R16P_great_eq_vector
Operator real(R16P) >=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4._R16P >= ptAttributes: elemental
Returns: logical
function R16P_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R16P_great_vector
Operator real(R16P) >.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4._R16P > ptAttributes: elemental
Returns: logical
function R16P_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R16P_low_eq_vector
Operator real(R16P) <=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R16P <= ptAttributes: elemental
Returns: logical
function R16P_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R16P_low_vector
Operator real(R16P) <.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R16P < ptAttributes: elemental
Returns: logical
function R16P_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R16P_mul_vector
Operator real(R16P) *.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R16P * pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function R16P_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R16P_not_eq_vector
Operator real(R16P) /=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R16P /= ptAttributes: elemental
Returns: logical
function R16P_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R16P_sub_vector
Operator real(R16P) -.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R16P - pt(1)
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function R16P_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R16P_sum_vector
Operator real(R16P) +.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R16P + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function R16P_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R16P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R4P_eq_vector
Operator real(R4P) ==.
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", 5._R4P == ptAttributes: elemental
Returns: logical
function R4P_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R4P_great_eq_vector
Operator real(R4P) >=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4._R4P >= ptAttributes: elemental
Returns: logical
function R4P_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R4P_great_vector
Operator real(R4P) >.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4._R4P > ptAttributes: elemental
Returns: logical
function R4P_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R4P_low_eq_vector
Operator real(R4P) <=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R4P <= ptAttributes: elemental
Returns: logical
function R4P_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R4P_low_vector
Operator real(R4P) <.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R4P < ptAttributes: elemental
Returns: logical
function R4P_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R4P_mul_vector
Operator real(R4P) *.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R4P * pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function R4P_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R4P_not_eq_vector
Operator real(R4P) /=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R4P /= ptAttributes: elemental
Returns: logical
function R4P_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R4P_sub_vector
Operator real(R4P) -.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R4P - pt(1)
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function R4P_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R4P_sum_vector
Operator real(R4P) +.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R4P + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function R4P_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R4P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R8P_eq_vector
Operator real(R8P) ==.
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", 5._R8P == ptAttributes: elemental
Returns: logical
function R8P_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R8P_great_eq_vector
Operator real(R8P) >=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4._R8P >= ptAttributes: elemental
Returns: logical
function R8P_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R8P_great_vector
Operator real(R8P) >.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 4._R8P > ptAttributes: elemental
Returns: logical
function R8P_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R8P_low_eq_vector
Operator real(R8P) <=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R8P <= ptAttributes: elemental
Returns: logical
function R8P_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R8P_low_vector
Operator real(R8P) <.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R8P < ptAttributes: elemental
Returns: logical
function R8P_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R8P_mul_vector
Operator real(R8P) *.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R8P * pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function R8P_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R8P_not_eq_vector
Operator real(R8P) /=.
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", 1._R8P /= ptAttributes: elemental
Returns: logical
function R8P_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
R8P_sub_vector
Operator real(R8P) -.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R8P - pt(1)
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function R8P_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
R8P_sum_vector
Operator real(R8P) +.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = 2._R8P + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function R8P_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
angle
Calculate the angle (rad) between two vectors.
type(vector) :: pt(1:2)
real(R8P) :: a
pt(1) = ex
pt(2) = 2 * ex
a = pt(1)%angle(pt(2))
print "(F3.1)", a type(vector) :: pt(1:2)
real(R8P) :: a
pt(1) = ex
pt(2) = ey
a = angle(pt(1), pt(2))
print "(F4.2)", aAttributes: elemental
Returns: real(kind=R8P)
function angle(self, other) result(angle_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | The first vector. | |
other | type(vector) | in | Other vector. |
Call graph
angle_dev
Device-callable angle (radians) between a and b: angle without its polymorphic array constructor ([self%normalized(), other%normalized()], a host-only runtime call on the device): both versors by normalized_dev, then atan2(normL2(v1.cross.v2), v1.dot.v2) as on the host.
Attributes: pure
Returns: real(kind=R8P)
function angle_dev(a, b) result(angle_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | First vector. | |
b | type(vector) | in | Second vector. |
Call graph
barycentric_tetrahedron
Barycentric coordinates of p in the tetrahedron pt1, pt2, pt3, pt4: ratios of signed sub-volumes, so p = sum(l(i)*pt(i)), sum(l) = 1, all in [0, 1] inside (the point-in-cell test of donor search).
real(R8P) :: l(4)
l = barycentric_tetrahedron((ex + ey + ez) / 4, 0 * ex, ex, ey, ez)
print "(4(F4.2,1X))", lAttributes: pure
Returns: real(kind=R8P)
function barycentric_tetrahedron(p, pt1, pt2, pt3, pt4) result(l)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | type(vector) | in | Point. | |
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. | |
pt4 | type(vector) | in | Fourth vertex. |
Call graph
barycentric_triangle
Barycentric coordinates of p (of its projection onto the plane) in the triangle pt1, pt2, pt3: p = l(1)*pt1 + l(2)*pt2 + l(3)*pt3 with sum(l) = 1; all in [0, 1] inside the triangle (Ericson's method, the 2x2 determinants by Kahan's algorithm).
real(R8P) :: l(3)
l = barycentric_triangle((ex + ey) / 3, 0 * ex, ex, ey)
print "(3(F5.3,1X))", lAttributes: pure
Returns: real(kind=R8P)
function barycentric_triangle(p, pt1, pt2, pt3) result(l)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | type(vector) | in | Point. | |
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. |
Call graph
crossproduct_RPP
Compute the cross product. */ Left hand side. */ Right hand side. */ Cross product vector. */
Compute the scalar (dot) product. */ Left hand side. */ Right hand side. */ Dot product. */
Compute the cross product.
where ( x_i ), ( y_i ) and ( z_i ) ( i=1,2 ) are the components of the vectors.
type(vector) :: pt(0:2)
pt(1) = 2 * ex
pt(2) = ex
pt(0) = pt(1).cross.pt(2)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function crossproduct_RPP(lhs, rhs) result(cross)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
crossproduct_accurate
Cross product a .cross. b with each component as accurate as one rounding allows (up to 2 ulps): every component a_i * b_j - a_j * b_i by Kahan's algorithm with a fused multiply-add. The .cross. operator rounds both products first and can lose all digits when they nearly cancel (nearly parallel vectors, sliver faces).
type(vector) :: a, b, c
a = (2._RPP**(digits(1._RPP)/2) + 1) * ex + 2._RPP**(digits(1._RPP)/2) * ey
b = (2._RPP**(digits(1._RPP)/2) + 1) * ey + 2._RPP**(digits(1._RPP)/2) * ex
c = crossproduct_accurate(a, b)
print "(L1)", c%z == 2._RPP**(digits(1._RPP)/2 + 1) + 1Attributes: elemental
Returns: type(vector)
function crossproduct_accurate(a, b) result(c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | First vector. | |
b | type(vector) | in | Second vector. |
Call graph
distance_to_line
Calculate the distance (scalar) to line defined by the 2 points.
The convention for the points numeration is the following:
. self
^
|
|
1.-------------.2 type(vector) :: pt(0:2)
real(R8P) :: d
pt(0) = 5.3 * ez
pt(1) = ex
pt(2) = ey
d = pt(0)%distance_to_line(pt1=pt(1), pt2=pt(2))
print "(F3.1)", d type(vector) :: pt(0:2)
real(R8P) :: d
pt(0) = 5.3 * ez
pt(1) = ex
pt(2) = ey
d = distance_to_line(pt(0), pt1=pt(1), pt2=pt(2))
print "(F3.1)", dAttributes: elemental
Returns: real(kind=R8P)
function distance_to_line(self, pt1, pt2) result(distance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | The point from which computing the distance. | |
pt1 | type(vector) | in | First line point. | |
pt2 | type(vector) | in | Second line point. |
Call graph
distance_to_line_dev
Device-callable distance of the point a from the line through pt1 and pt2: distance_to_line, normL2((a - pt1).cross.(a - pt2)) / normL2(pt2 - pt1) open-coded.
Attributes: pure
Returns: real(kind=R8P)
function distance_to_line_dev(a, pt1, pt2) result(distance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Point. | |
pt1 | type(vector) | in | First point of the line. | |
pt2 | type(vector) | in | Second point of the line. |
Call graph
distance_to_plane
Calculate the distance (signed, scalar) to plane defined by the 3 points.
The convention for the points numeration is the following:
3.----.2
\ |
\ *---------> . self
\ |
\|
.1 type(vector) :: pt(0:3)
real(R8P) :: d
pt(0) = 5.3 * ez
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
d = pt(0)%distance_to_plane(pt1=pt(1), pt2=pt(2), pt3=pt(3))
print "(F3.1)", d type(vector) :: pt(0:3)
real(R8P) :: d
pt(0) = 5.3 * ez
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
d = distance_to_plane(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))
print "(F3.1)", dAttributes: elemental
Returns: real(kind=R8P)
function distance_to_plane(self, pt1, pt2, pt3) result(distance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | The point from which computing the distance. | |
pt1 | type(vector) | in | First plane point. | |
pt2 | type(vector) | in | Second plane point. | |
pt3 | type(vector) | in | Third plane point. |
Call graph
distance_to_plane_dev
Device-callable signed distance of the point a from the plane through pt1, pt2, pt3: distance_to_plane, the unit face normal dotted with a - pt1, open-coded.
Attributes: pure
Returns: real(kind=R8P)
function distance_to_plane_dev(a, pt1, pt2, pt3) result(distance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Point. | |
pt1 | type(vector) | in | First point of the plane. | |
pt2 | type(vector) | in | Second point of the plane. | |
pt3 | type(vector) | in | Third point of the plane. |
Call graph
distance_vectorial_to_plane
Calculate the distance (vectorial) to plane defined by the 3 points.
The convention for the points numeration is the following:
3.----.2
\ |
\ *---------> . self
\ |
\|
.1 type(vector) :: pt(0:3)
pt(0) = 5.3 * ez
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(0) = pt(0)%distance_vectorial_to_plane(pt1=pt(1), pt2=pt(2), pt3=pt(3))
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z type(vector) :: pt(0:3)
pt(0) = 5.3 * ez
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(0) = distance_vectorial_to_plane(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function distance_vectorial_to_plane(self, pt1, pt2, pt3) result(distance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | The point from which computing the distance. | |
pt1 | type(vector) | in | First plane point. | |
pt2 | type(vector) | in | Second plane point. | |
pt3 | type(vector) | in | Third plane point. |
Call graph
dop_RPP
a * b - c * d by Kahan's algorithm (private): error at most 2 units in the last place of the result (Jeannerod, Louvet, Muller, Math. Comp. 2013), where the plain expression can lose every digit to cancellation.
Attributes: pure
Returns: real(kind=R8P)
function dop_RPP(a, b, c, d) result(r)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | Operands. | |
b | real(kind=R8P) | in | Operands. | |
c | real(kind=R8P) | in | Operands. | |
d | real(kind=R8P) | in | Operands. |
Call graph
dotproduct
Compute the scalar (dot) product.
where ( x_i ), ( y_i ) and ( z_i ) ( i=1,2 ) are the components of the vectors.
type(vector) :: pt(1:2)
pt(1) = ex
pt(2) = ey
print "(F3.1)", pt(1).dot.pt(2)Attributes: elemental
Returns: real(kind=R8P)
function dotproduct(lhs, rhs) result(dot)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
dotproduct_accurate
Dot product a .dot. b as if computed in twice the working precision, then rounded (Ogita, Rump, Oishi 2005, Dot2: products by TwoProduct with a fused multiply-add, sums by TwoSum). The .dot. operator can lose every digit when the products nearly cancel.
type(vector) :: a, b
real(R8P) :: k
k = 2._RPP**(digits(1._RPP)/2)
a = (k + 1) * ex + k * ey + ez
b = (k + 1) * ex - k * ey + ez
print "(L1)", dotproduct_accurate(a, b) == 2 * k + 2Attributes: elemental
Returns: real(kind=R8P)
function dotproduct_accurate(a, b) result(d)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | First vector. | |
b | type(vector) | in | Second vector. |
Call graph
dotproduct_accurate_dev
Device-callable dotproduct_accurate.
Attributes: pure
Returns: real(kind=R8P)
function dotproduct_accurate_dev(a, b) result(d)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | First vector. | |
b | type(vector) | in | Second vector. |
Call graph
dotproduct_dev
Device-callable dot product. CPU consumers should keep using a .dot. b or a%dotproduct(b); this entry point is for device kernel code only.
Attributes: pure
Returns: real(kind=R8P)
function dotproduct_dev(a, b) result(d)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Left hand side. | |
b | type(vector) | in | Right hand side. |
Call graph
face_normal3
Calculate the normal of the face defined by the 3 points.
The convention for the points numeration is the following:
3.----.2
\ |
\ |
\ |
\|
.1The 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).
type(vector) :: pt(0:3)
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(0) = pt(1)%face_normal3(pt1=pt(1), pt2=pt(2), pt3=pt(3), norm='y')
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z) type(vector) :: pt(0:3)
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(0) = face_normal3(pt1=pt(1), pt2=pt(2), pt3=pt(3), norm='y')
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function face_normal3(pt1, pt2, pt3, norm) result(normal)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First face point. | |
pt2 | type(vector) | in | Second face point. | |
pt3 | type(vector) | in | Third face point. | |
norm | character(len=1) | in | optional | If 'norm' is passed as argument the normal is normalized. |
Call graph
face_normal4
Calculate the normal of the face defined by 4 points.
The convention for the points numeration is the following:
3.----------.2
| |
| |
| |
| |
4.----------.1The 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).
type(vector) :: pt(0:4)
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(4) = ex + ey
pt(0) = pt(1)%face_normal4(pt1=pt(1), pt2=pt(2), pt3=pt(3), pt4=pt(4), norm='y')
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z) type(vector) :: pt(0:4)
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(4) = ex + ey
pt(0) = face_normal4(pt1=pt(1), pt2=pt(2), pt3=pt(3), pt4=pt(4), norm='y')
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function face_normal4(pt1, pt2, pt3, pt4, norm) result(normal)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First face point. | |
pt2 | type(vector) | in | Second face point. | |
pt3 | type(vector) | in | Third face point. | |
pt4 | type(vector) | in | Fourth face point. | |
norm | character(len=1) | in | optional | If 'norm' is passed as argument the normal is normalized. |
Call graph
fma_RPP
a * b + c with a single rounding (private). nvfortran: C fma/fmaf through a device-callable bind(c) interface (its ieee_fma is not device-callable); other compilers: ieee_fma (any real kind, quad included).
Attributes: pure
Returns: real(kind=R8P)
function fma_RPP(a, b, c) result(r)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | Operands. | |
b | real(kind=R8P) | in | Operands. | |
c | real(kind=R8P) | in | Operands. |
Call graph
iolen
Compute IO length.
use penf, only : byte_size
type(vector) :: pt
print*, pt%iolen()/byte_size(pt%x) use penf, only : byte_size
type(vector) :: pt
print*, iolen(pt)/byte_size(pt%x)Returns: integer(kind=I4P)
function iolen(self) result(iolen_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector. |
is_collinear
Return true if the point is collinear with other two given points.
type(vector) :: pt(0:2)
pt(0) = 3 * ex
pt(1) = 1 * ex
pt(2) = 2 * ex
print "(L1)", pt(0)%is_collinear(pt1=pt(1), pt2=pt(2)) type(vector) :: pt(0:2)
pt(0) = 3 * ex
pt(1) = 1 * ex
pt(2) = 2 * ex
print "(L1)", is_collinear(pt(0), pt1=pt(1), pt2=pt(2))Attributes: elemental
Returns: logical
function is_collinear(self, pt1, pt2, tolerance) result(is_collinear_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector. | |
pt1 | type(vector) | in | First line point. | |
pt2 | type(vector) | in | Second line point. | |
tolerance | real(kind=R8P) | in | optional | Tolerance for collinearity check. |
Call graph
is_collinear_dev
Device-callable test of the point a on the line through pt1 and pt2: is_collinear, the distance from the line not above ZeroRPP + tolerance (0 when absent).
Attributes: pure
Returns: logical
function is_collinear_dev(a, pt1, pt2, tolerance) result(is_collinear_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Point. | |
pt1 | type(vector) | in | First point of the line. | |
pt2 | type(vector) | in | Second point of the line. | |
tolerance | real(kind=R8P) | in | optional | Tolerance. |
Call graph
is_concyclic
Return true if the point is concyclic with other three given points.
Based on Ptolemy's Theorem.
type(vector) :: pt(0:3)
pt(0) = -1 * ey
pt(1) = 1 * ex
pt(2) = 1 * ey
pt(3) = -1 * ex
print "(L1)", pt(0)%is_concyclic(pt1=pt(1), pt2=pt(2), pt3=pt(3)) type(vector) :: pt(0:3)
pt(0) = -1 * ey
pt(1) = 1 * ex
pt(2) = 1 * ey
pt(3) = -1 * ex
print "(L1)", is_concyclic(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))Attributes: elemental
Returns: logical
function is_concyclic(self, pt1, pt2, pt3, tolerance) result(is_concyclic_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector. | |
pt1 | type(vector) | in | First arc point. | |
pt2 | type(vector) | in | Second arc point. | |
pt3 | type(vector) | in | Third arc point. | |
tolerance | real(kind=R8P) | in | optional | Tolerance for concyclicity check. |
Call graph
is_concyclic_dev
Device-callable test of the points a, pt1, pt2, pt3 on one circle: is_concyclic (Ptolemy's inequality) open-coded, against smallRPP + tolerance (0 when absent).
Attributes: pure
Returns: logical
function is_concyclic_dev(a, pt1, pt2, pt3, tolerance) result(is_concyclic_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Point. | |
pt1 | type(vector) | in | Second point. | |
pt2 | type(vector) | in | Third point. | |
pt3 | type(vector) | in | Fourth point. | |
tolerance | real(kind=R8P) | in | optional | Tolerance. |
Call graph
matrixproduct
Compute the matrix product.
type(vector) :: pt(2)
real(R8P) :: I(3,3)
pt(1) = 2 * ex
I = 0._RPP
I(1,1) = 1._RPP
I(2,2) = 1._RPP
I(3,3) = 1._RPP
pt(2) = I.matrix.pt(1)
print "(3(F3.1,1X))", abs(pt(2)%x), abs(pt(2)%y), abs(pt(2)%z)Attributes: pure
Returns: type(vector)
function matrixproduct(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | real(kind=R8P) | in | Left hand side. | |
rhs | class(vector) | in | Right hand side. |
Call graph
mirror_matrix
Return the mirror matrix (Householder's matrix) given normal of the mirroring plane.
The matrix is ( M = I - 2 \hat n \hat n^T ), ( \hat n ) being the normalized normal.
type(vector) :: pt
character(4) :: res(3)
pt = ex
call pt%mirror(normal=ex + ey)
res(1) = trim(adjustl(str('(F4.1)',abs(pt%x))))
res(2) = trim(adjustl(str('(F4.1)',pt%y)))
res(3) = trim(adjustl(str('(F4.1)',abs(pt%z))))
print "(A3,1X,A4,1X,A3)", res(1), res(2), res(3)Attributes: pure
Returns: real(kind=R8P)
function mirror_matrix(normal) result(matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
normal | type(vector) | in | Normal of mirroring plane. |
Call graph
negative
Operator - unary.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = - pt(1)
print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function negative(rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
rhs | class(vector) | in | Right hand side. |
normL2
Return the norm L2 of vector.
The norm L2 if defined as ( N = \sqrt {x^2 + y^2 + z^2 } ).
type(vector) :: pt
pt = ex + ey
print "(F4.2)", pt%normL2() type(vector) :: pt
pt = ex + ey
print "(F4.2)", normL2(pt)Attributes: elemental
Returns: real(kind=R8P)
function normL2(self) result(norm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector. |
Call graph
normL2_dev
Device-callable norm L2: normL2 open-coded.
Attributes: pure
Returns: real(kind=R8P)
function normL2_dev(a) result(norm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Vector. |
Call graph
normalized
Return a normalized copy of vector.
The normalization is made by means of norm L2. If the norm L2 of the vector is less than the parameter smallRPP the normalization value is set to normL2(vec)+smallRPP.
type(vector) :: pt
pt = ex + ey
pt = pt%normalized()
print "(3(F4.2,1X))", abs(pt%x), abs(pt%y), abs(pt%z) type(vector) :: pt
pt = ex + ey
pt = normalized(pt)
print "(3(F4.2,1X))", abs(pt%x), abs(pt%y), abs(pt%z)Attributes: elemental
Returns: type(vector)
function normalized(self) result(norm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector. |
Call graph
orthogonal
Compute the component of lhs orthogonal to rhs.
type(vector) :: pt(0:2)
pt(1) = 2 * ex + 3 * ey
pt(2) = ex
pt(0) = pt(1).ortho.pt(2)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function orthogonal(lhs, rhs) result(ortho)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
parallel
Attributes: elemental
Returns: type(vector)
function parallel(lhs, rhs) result(paral)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Compute the component of lhs parallel to rhs. | |
rhs | type(vector) | in | Right hand side. |
Call graph
polygon_vector_area
Vector area of the polygon pts(1), ..., pts(n) (vertices in order, closed implicitly): half the sum of (pts(i) - pts(1)) .cross. (pts(i+1) - pts(1)). Its norm is the area of a planar polygon, its direction the normal by the right-hand rule; it does not depend on the origin, and the outward vector areas of the faces of a closed polyhedron sum to zero (the discrete geometric conservation law of finite volumes).
type(vector) :: a
a = polygon_vector_area([0 * ex, 2 * ex, 2 * ex + ey, ey])
print "(3(F3.1,1X))", a%x, a%y, a%zAttributes: pure
Returns: type(vector)
function polygon_vector_area(pts) result(area)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pts | type(vector) | in | Vertices. |
Call graph
positive
Operator + unary.
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = + pt(1)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function positive(rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
rhs | class(vector) | in | Right hand side. |
projection_onto_plane
Calculate the projection of point onto plane defined by 3 points.
The convention for the points numeration is the following:
1.----.2
\ |
\ *---------> . self
\ |
\|
.3 type(vector) :: pt(0:3)
pt(0) = 1 * ex + 2 * ey + 5.3 * ez
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(0) = pt(0)%projection_onto_plane(pt1=pt(1), pt2=pt(2), pt3=pt(3))
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z type(vector) :: pt(0:3)
pt(0) = 1 * ex + 2 * ey + 5.3 * ez
pt(1) = ex
pt(2) = ey
pt(3) = ex - ey
pt(0) = projection_onto_plane(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))
print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function projection_onto_plane(self, pt1, pt2, pt3) result(projection)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | The point from which computing the distance. | |
pt1 | type(vector) | in | First plane point. | |
pt2 | type(vector) | in | Second plane point. | |
pt3 | type(vector) | in | Third plane point. |
Call graph
rotation_matrix
Return the rotation matrix given axis and angle of ratation.
Angle must be in radiants.
Attributes: pure
Returns: real(kind=R8P)
function rotation_matrix(axis, angle) result(matrix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | type(vector) | in | Axis of ratation. | |
angle | real(kind=R8P) | in | Angle of ratation. |
Call graph
sq_norm
Return the square of the norm of vector.
The square norm if defined as ( N = x^2 + y^2 + z^2 ).
type(vector) :: pt
pt = ex + ey
print "(F3.1)", pt%sq_norm() type(vector) :: pt
pt = ex + ey
print "(F3.1)", sq_norm(pt)Attributes: elemental
Returns: real(kind=R8P)
function sq_norm(self) result(sq)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(vector) | in | Vector. |
Call graph
sq_norm_dev
Device-callable square of the norm L2: sq_norm open-coded.
Attributes: pure
Returns: real(kind=R8P)
function sq_norm_dev(a) result(sq)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | type(vector) | in | Vector. |
Call graph
tetrahedron_volume
Signed volume of the tetrahedron pt1, pt2, pt3, pt4: (pt2 - pt1) .dot. ((pt3 - pt1) .cross. (pt4 - pt1)) / 6, positive when pt4 lies on the side where (pt2 - pt1) .cross. (pt3 - pt1) points (right-handed order).
print "(F6.4,1X,F7.4)", tetrahedron_volume(0 * ex, ex, ey, ez), &
tetrahedron_volume(0 * ex, ey, ex, ez)Attributes: elemental
Returns: real(kind=R8P)
function tetrahedron_volume(pt1, pt2, pt3, pt4) result(volume)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. | |
pt4 | type(vector) | in | Fourth vertex. |
Call graph
tetrahedron_volume_dev
Device-callable tetrahedron_volume.
Attributes: pure
Returns: real(kind=R8P)
function tetrahedron_volume_dev(pt1, pt2, pt3, pt4) result(volume)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. | |
pt4 | type(vector) | in | Fourth vertex. |
Call graph
triangle_area
Area of the triangle pt1, pt2, pt3: half the norm of (pt2 - pt1) .cross. (pt3 - pt1).
print "(F4.2)", triangle_area(0 * ex, ex, ey)Attributes: elemental
Returns: real(kind=R8P)
function triangle_area(pt1, pt2, pt3) result(area)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. |
Call graph
triangle_area_dev
Device-callable triangle_area.
Attributes: pure
Returns: real(kind=R8P)
function triangle_area_dev(pt1, pt2, pt3) result(area)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pt1 | type(vector) | in | First vertex. | |
pt2 | type(vector) | in | Second vertex. | |
pt3 | type(vector) | in | Third vertex. |
Call graph
vector_div_I1P
Operator / integer(I1P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) / 2_I1P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
vector_div_I2P
Operator / integer(I2P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) / 2_I2P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
vector_div_I4P
Operator / integer(I4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) / 2_I4P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
vector_div_I8P
Operator / integer(I8P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) / 2_I8P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
vector_div_R16P
Operator / real(R16P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) / 2._R16P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
vector_div_R4P
Operator / real(R4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) / 2._R4P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
vector_div_R8P
Operator / real(R8P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) / 2._R8P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
vector_div_vector
Operator /.
type(vector) :: pt(0:2)
pt(1) = 1 * ex + 1 * ey + 1 * ez
pt(2) = pt(1) + 1
pt(0) = pt(1) / pt(2)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_div_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
vector_eq_I1P
Operator == integer(I1P).
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", pt == 5_I1PAttributes: elemental
Returns: logical
function vector_eq_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
Call graph
vector_eq_I2P
Operator == integer(I2P).
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", pt == 5_I2PAttributes: elemental
Returns: logical
function vector_eq_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
Call graph
vector_eq_I4P
Operator == integer(I4P).
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", pt == 5_I4PAttributes: elemental
Returns: logical
function vector_eq_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
Call graph
vector_eq_I8P
Operator == integer(I8P).
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", pt == 5_I8PAttributes: elemental
Returns: logical
function vector_eq_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
Call graph
vector_eq_R16P
Operator == real(R16P).
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", pt == 5._R16PAttributes: elemental
Returns: logical
function vector_eq_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
Call graph
vector_eq_R4P
Operator == real(R4P).
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", pt == 5._R4PAttributes: elemental
Returns: logical
function vector_eq_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
Call graph
vector_eq_R8P
Operator == real(R8P).
type(vector) :: pt
pt = 4 * ex + 3 * ey
print "(L1)", pt == 5._R8PAttributes: elemental
Returns: logical
function vector_eq_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
Call graph
vector_eq_vector
Operator ==.
The comparison is done with respect normL2 and, secondary, with respect the directions.
type(vector) :: pt(1:2)
pt(1) = ex + ey + ez
pt(2) = ex + ey + ez
print "(L1)", pt(1) == pt(2)Attributes: elemental
Returns: logical
function vector_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
vector_great_I1P
Operator > integer(I1P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt > 1_I1PAttributes: elemental
Returns: logical
function vector_great_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
Call graph
vector_great_I2P
Operator > integer(I2P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt > 1_I2PAttributes: elemental
Returns: logical
function vector_great_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
Call graph
vector_great_I4P
Operator > integer(I4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt > 1_I4PAttributes: elemental
Returns: logical
function vector_great_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
Call graph
vector_great_I8P
Operator > integer(I8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt > 1_I8PAttributes: elemental
Returns: logical
function vector_great_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
Call graph
vector_great_R16P
Operator > real(R16P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt > 1._R16PAttributes: elemental
Returns: logical
function vector_great_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
Call graph
vector_great_R4P
Operator > real(R4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt > 1._R4PAttributes: elemental
Returns: logical
function vector_great_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
Call graph
vector_great_R8P
Operator > real(R8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt > 1._R8PAttributes: elemental
Returns: logical
function vector_great_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
Call graph
vector_great_eq_I1P
Operator >= integer(I1P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt >= 1_I1PAttributes: elemental
Returns: logical
function vector_great_eq_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
Call graph
vector_great_eq_I2P
Operator >= integer(I2P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt >= 1_I2PAttributes: elemental
Returns: logical
function vector_great_eq_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
Call graph
vector_great_eq_I4P
Operator >= integer(I4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt >= 1_I4PAttributes: elemental
Returns: logical
function vector_great_eq_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
Call graph
vector_great_eq_I8P
Operator >= integer(I8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt >= 1_I8PAttributes: elemental
Returns: logical
function vector_great_eq_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
Call graph
vector_great_eq_R16P
Operator >= real(R16P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt >= 1._R16PAttributes: elemental
Returns: logical
function vector_great_eq_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
Call graph
vector_great_eq_R4P
Operator >= real(R4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt >= 1._R4PAttributes: elemental
Returns: logical
function vector_great_eq_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
Call graph
vector_great_eq_R8P
Operator >= real(R8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt >= 1._R8PAttributes: elemental
Returns: logical
function vector_great_eq_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
Call graph
vector_great_eq_vector
Operator >=.
type(vector) :: pt(1:2)
pt(1) = ex + ey + ez
pt(2) = pt(1) + 1
print "(L1)", pt(2) >= pt(1)Attributes: elemental
Returns: logical
function vector_great_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
vector_great_vector
Operator >.
type(vector) :: pt(1:2)
pt(1) = ex + ey + ez
pt(2) = pt(1) + 1
print "(L1)", pt(2) > pt(1)Attributes: elemental
Returns: logical
function vector_great_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
vector_low_I1P
Operator < integer(I1P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt < 4_I1PAttributes: elemental
Returns: logical
function vector_low_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
Call graph
vector_low_I2P
Operator < integer(I2P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt < 4_I2PAttributes: elemental
Returns: logical
function vector_low_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
Call graph
vector_low_I4P
Operator < integer(I4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt < 4_I4PAttributes: elemental
Returns: logical
function vector_low_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
Call graph
vector_low_I8P
Operator < integer(I8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt < 4_I8PAttributes: elemental
Returns: logical
function vector_low_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
Call graph
vector_low_R16P
Operator < real(R16P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt < 4._R16PAttributes: elemental
Returns: logical
function vector_low_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
Call graph
vector_low_R4P
Operator < real(R4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt < 4._R4PAttributes: elemental
Returns: logical
function vector_low_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
Call graph
vector_low_R8P
Operator < real(R8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt < 4._R8PAttributes: elemental
Returns: logical
function vector_low_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
Call graph
vector_low_eq_I1P
Operator <= integer(I1P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt <= 4_I1PAttributes: elemental
Returns: logical
function vector_low_eq_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
Call graph
vector_low_eq_I2P
Operator <= integer(I2P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt <= 4_I2PAttributes: elemental
Returns: logical
function vector_low_eq_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
Call graph
vector_low_eq_I4P
Operator <= integer(I4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt <= 4_I4PAttributes: elemental
Returns: logical
function vector_low_eq_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
Call graph
vector_low_eq_I8P
Operator <= integer(I8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt <= 4_I8PAttributes: elemental
Returns: logical
function vector_low_eq_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
Call graph
vector_low_eq_R16P
Operator <= real(R16P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt <= 4._R16PAttributes: elemental
Returns: logical
function vector_low_eq_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
Call graph
vector_low_eq_R4P
Operator <= real(R4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt <= 4._R4PAttributes: elemental
Returns: logical
function vector_low_eq_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
Call graph
vector_low_eq_R8P
Operator <= real(R8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt <= 4._R8PAttributes: elemental
Returns: logical
function vector_low_eq_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
Call graph
vector_low_eq_vector
Operator <=.
type(vector) :: pt(1:2)
pt(1) = ex + ey + ez
pt(2) = pt(1) + 1
print "(L1)", pt(1) <= pt(2)Attributes: elemental
Returns: logical
function vector_low_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
vector_low_vector
Operator <.
type(vector) :: pt(1:2)
pt(1) = ex + ey + ez
pt(2) = pt(1) + 1
print "(L1)", pt(1) < pt(2)Attributes: elemental
Returns: logical
function vector_low_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
vector_mul_I1P
Operator * integer(I1P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) * 2_I1P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
vector_mul_I2P
Operator * integer(I2P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) * 2_I2P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
vector_mul_I4P
Operator * integer(I4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) * 2_I4P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
vector_mul_I8P
Operator * integer(I8P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) * 2_I8P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
vector_mul_R16P
Operator * real(R16P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) * 2._R16P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
vector_mul_R4P
Operator * real(R4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) * 2._R4P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
vector_mul_R8P
Operator * real(R8P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) * 2._R8P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
vector_mul_vector
Operator *.
type(vector) :: pt(0:2)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(2) = pt(1) + 1
pt(0) = pt(1) * pt(2)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_mul_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
vector_not_eq_I1P
Operator /= integer(I1P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt /= 1_I1PAttributes: elemental
Returns: logical
function vector_not_eq_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
Call graph
vector_not_eq_I2P
Operator /= integer(I2P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt /= 1_I2PAttributes: elemental
Returns: logical
function vector_not_eq_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
Call graph
vector_not_eq_I4P
Operator /= integer(I4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt /= 1_I4PAttributes: elemental
Returns: logical
function vector_not_eq_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
Call graph
vector_not_eq_I8P
Operator /= integer(I8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt /= 1_I8PAttributes: elemental
Returns: logical
function vector_not_eq_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
Call graph
vector_not_eq_R16P
Operator /= real(R16P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt /= 1._R16PAttributes: elemental
Returns: logical
function vector_not_eq_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
Call graph
vector_not_eq_R4P
Operator /= real(R4P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt /= 1._R4PAttributes: elemental
Returns: logical
function vector_not_eq_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
Call graph
vector_not_eq_R8P
Operator /= real(R8P).
type(vector) :: pt
pt = ex + ey + ez
print "(L1)", pt /= 1._R8PAttributes: elemental
Returns: logical
function vector_not_eq_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
Call graph
vector_not_eq_vector
Operator /=.
The comparison is done with respect normL2 and, secondary, with respect the directions.
type(vector) :: pt(1:2)
pt(1) = ex + ey + ez
pt(2) = pt(1) + 1
print "(L1)", pt(1) /= pt(2) type(vector) :: pt(1:2)
pt(1) = ex + ey + ez
pt(2) = ex + ey - ez
print "(L1)", pt(1) /= pt(2)Attributes: elemental
Returns: logical
function vector_not_eq_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
Call graph
vector_sub_I1P
Operator - integer(I1P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) - 3_I1P
print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function vector_sub_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
vector_sub_I2P
Operator - integer(I2P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) - 3_I2P
print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function vector_sub_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
vector_sub_I4P
Operator - integer(I4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) - 3_I4P
print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function vector_sub_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
vector_sub_I8P
Operator - integer(I8P).
type(vector) :: pt(0:1)
character(4) :: res(3)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) - 2_I8P
res(1) = trim(adjustl(str('(F4.1)',pt(0)%x)))
res(2) = trim(adjustl(str('(F4.1)',pt(0)%y)))
res(3) = trim(adjustl(str('(F4.1)',pt(0)%z)))
print "(A4,1X,A3,1X,A4)", res(1), res(2), res(3)Attributes: elemental
Returns: type(vector)
function vector_sub_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
vector_sub_R16P
Operator - real(R16P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) - 3._R16P
print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function vector_sub_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
vector_sub_R4P
Operator - real(R4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) - 3._R4P
print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function vector_sub_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
vector_sub_R8P
Operator - real(R8P).
type(vector) :: pt(0:1)
character(4) :: res(3)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) - 2._R8P
res(1) = trim(adjustl(str('(F4.1)',pt(0)%x)))
res(2) = trim(adjustl(str('(F4.1)',pt(0)%y)))
res(3) = trim(adjustl(str('(F4.1)',pt(0)%z)))
print "(A4,1X,A3,1X,A4)", res(1), res(2), res(3)Attributes: elemental
Returns: type(vector)
function vector_sub_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
vector_sub_vector
Operator -.
type(vector) :: pt(0:2)
pt(1) = 1 * ex + 1 * ey + 1 * ez
pt(2) = pt(1) + 1
pt(0) = pt(1) - pt(2)
print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%zAttributes: elemental
Returns: type(vector)
function vector_sub_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |
vector_sum_I1P
Operator + integer(I1P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) + 2_I1P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_I1P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I1P) | in | Right hand side. |
vector_sum_I2P
Operator + integer(I2P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) + 2_I2P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_I2P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I2P) | in | Right hand side. |
vector_sum_I4P
Operator + integer(I4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) + 2_I4P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_I4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I4P) | in | Right hand side. |
vector_sum_I8P
Operator + integer(I8P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) + 2_I8P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_I8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | integer(kind=I8P) | in | Right hand side. |
vector_sum_R16P
Operator + real(R16P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) + 2._R16P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_R16P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R16P) | in | Right hand side. |
vector_sum_R4P
Operator + real(R4P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) + 2._R4P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_R4P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R4P) | in | Right hand side. |
vector_sum_R8P
Operator + real(R8P).
type(vector) :: pt(0:1)
pt(1) = 1 * ex + 2 * ey + 1 * ez
pt(0) = pt(1) + 2._R8P
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_R8P(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | real(kind=R8P) | in | Right hand side. |
vector_sum_vector
Operator +.
type(vector) :: pt(0:2)
pt(1) = 1 * ex + 1 * ey + 1 * ez
pt(2) = pt(1) + 1
pt(0) = pt(1) + pt(2)
print "(3(F3.1,1X))", abs(pt(0)%x), abs(pt(0)%y), abs(pt(0)%z)Attributes: elemental
Returns: type(vector)
function vector_sum_vector(lhs, rhs) result(opr)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(vector) | in | Left hand side. | |
rhs | type(vector) | in | Right hand side. |