Skip to content

vecfor_R16P ​

VecFor, Vector algebra class for Fortran poor people, R16P kind.

Source: src/lib/vecfor_R16P.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
ex_R16Ptype(vector_R16P)parameterX direction versor.
ey_R16Ptype(vector_R16P)parameterY direction versor.
ez_R16Ptype(vector_R16P)parameterZ direction versor.

Derived Types ​

vector_R16P ​

Vector class.

Components ​

NameTypeAttributesDescription
xreal(kind=R16P)Cartesian component in x direction.
yreal(kind=R16P)Cartesian component in y direction.
zreal(kind=R16P)Cartesian component in z direction.

Type-Bound Procedures ​

NameAttributesDescription
I1P_eq_vectorpass(rhs)Operator integer(I1P) ==.
I1P_great_eq_vectorpass(rhs)Operator integer(I1P) >=.
I1P_great_vectorpass(rhs)Operator integer(I1P) >.
I1P_low_eq_vectorpass(rhs)Operator integer(I1P) <=.
I1P_low_vectorpass(rhs)Operator integer(I1P) <.
I1P_mul_vectorpass(rhs)Operator integer(I1P) *.
I1P_not_eq_vectorpass(rhs)Operator integer(I1P) /=.
I1P_sub_vectorpass(rhs)Operator integer(I1P) -.
I1P_sum_vectorpass(rhs)Operator integer(I1P) +.
I2P_eq_vectorpass(rhs)Operator integer(I2P) ==.
I2P_great_eq_vectorpass(rhs)Operator integer(I2P) >=.
I2P_great_vectorpass(rhs)Operator integer(I2P) >.
I2P_low_eq_vectorpass(rhs)Operator integer(I2P) <=.
I2P_low_vectorpass(rhs)Operator integer(I2P) <.
I2P_mul_vectorpass(rhs)Operator integer(I2P) *.
I2P_not_eq_vectorpass(rhs)Operator integer(I2P) /=.
I2P_sub_vectorpass(rhs)Operator integer(I2P) -.
I2P_sum_vectorpass(rhs)Operator integer(I2P) +.
I4P_eq_vectorpass(rhs)Operator integer(I4P) ==.
I4P_great_eq_vectorpass(rhs)Operator integer(I4P) >=.
I4P_great_vectorpass(rhs)Operator integer(I4P) >.
I4P_low_eq_vectorpass(rhs)Operator integer(I4P) <=.
I4P_low_vectorpass(rhs)Operator integer(I4P) <.
I4P_mul_vectorpass(rhs)Operator integer(I4P) *.
I4P_not_eq_vectorpass(rhs)Operator integer(I4P) /=.
I4P_sub_vectorpass(rhs)Operator integer(I4P) -.
I4P_sum_vectorpass(rhs)Operator integer(I4P) +.
I8P_eq_vectorpass(rhs)Operator integer(I8P) ==.
I8P_great_eq_vectorpass(rhs)Operator integer(I8P) >=.
I8P_great_vectorpass(rhs)Operator integer(I8P) >.
I8P_low_eq_vectorpass(rhs)Operator integer(I8P) <=.
I8P_low_vectorpass(rhs)Operator integer(I8P) <.
I8P_mul_vectorpass(rhs)Operator integer(I8P) *.
I8P_not_eq_vectorpass(rhs)Operator integer(I8P) /=.
I8P_sub_vectorpass(rhs)Operator integer(I8P) -.
I8P_sum_vectorpass(rhs)Operator integer(I8P) +.
R16P_eq_vectorpass(rhs)Operator real(R16P) ==.
R16P_great_eq_vectorpass(rhs)Operator real(R16P) >=.
R16P_great_vectorpass(rhs)Operator real(R16P) >.
R16P_low_eq_vectorpass(rhs)Operator real(R16P) <=.
R16P_low_vectorpass(rhs)Operator real(R16P) <.
R16P_mul_vectorpass(rhs)Operator real(R16P) *.
R16P_not_eq_vectorpass(rhs)Operator real(R16P) /=.
R16P_sub_vectorpass(rhs)Operator real(R16P) -.
R16P_sum_vectorpass(rhs)Operator real(R16P) +.
R4P_eq_vectorpass(rhs)Operator real(R4P) ==.
R4P_great_eq_vectorpass(rhs)Operator real(R4P) >=.
R4P_great_vectorpass(rhs)Operator real(R4P) >.
R4P_low_eq_vectorpass(rhs)Operator real(R4P) <=.
R4P_low_vectorpass(rhs)Operator real(R4P) <.
R4P_mul_vectorpass(rhs)Operator real(R4P) *.
R4P_not_eq_vectorpass(rhs)Operator real(R4P) /=.
R4P_sub_vectorpass(rhs)Operator real(R4P) -.
R4P_sum_vectorpass(rhs)Operator real(R4P) +.
R8P_eq_vectorpass(rhs)Operator real(R8P) ==.
R8P_great_eq_vectorpass(rhs)Operator real(R8P) >=.
R8P_great_vectorpass(rhs)Operator real(R8P) >.
R8P_low_eq_vectorpass(rhs)Operator real(R8P) <=.
R8P_low_vectorpass(rhs)Operator real(R8P) <.
R8P_mul_vectorpass(rhs)Operator real(R8P) *.
R8P_not_eq_vectorpass(rhs)Operator real(R8P) /=.
R8P_sub_vectorpass(rhs)Operator real(R8P) -.
R8P_sum_vectorpass(rhs)Operator real(R8P) +.
anglepass(self)Return the angle (rad) between two
assign_I1Ppass(lhs)Operator = integer(I1P).
assign_I2Ppass(lhs)Operator = integer(I2P).
assign_I4Ppass(lhs)Operator = integer(I4P).
assign_I8Ppass(lhs)Operator = integer(I8P).
assign_R16Ppass(lhs)Operator = real(R16P).
assign_R4Ppass(lhs)Operator = real(R4P).
assign_R8Ppass(lhs)Operator = real(R8P).
assign_vectorpass(lhs)Operator =.
assignment(=)Overloading =.
crossproductpass(lhs)Compute the cross product.
distance_to_linepass(self)Return the distance (scalar) to
distance_to_planepass(self)Return the distance (signed, scalar)
distance_vectorial_to_planepass(self)Return the distance (vectorial) to
dotproductpass(lhs)Compute the scalar (dot) product.
face_normal3nopassReturn the normal of the face.
face_normal4nopassReturn the normal of the face.
iolenpass(self)Compute IO length.
is_collinearpass(self)Return true if the point is col-
is_concyclicpass(self)Return true if the point is concy-
load_from_filepass(self)Load vector from file.
matrixproductpass(rhs)Compute the matrix product.
mirrorMirror vector.
mirror_by_matrixpass(self)Mirror vector given matrix.
mirror_by_normalpass(self)Mirror vector given normal of mirroring plane.
negativepass(rhs)Operator -, unary.
normL2pass(self)Return the norm L2 of vector.
normalizepass(self)Normalize a vector.
normalizedpass(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 >=.
orthogonalpass(lhs)Compute the component of lhs orthogonal to rhs.
parallelpass(lhs)Compute the component of lhs parallel to rhs.
positivepass(rhs)Operator +, unary.
printfpass(self)Print vector components with a
projection_onto_planepass(self)Calculate the projection of point
rotateRotate vector.
rotate_by_axis_anglepass(self)Rotate vector given axis and angle.
rotate_by_matrixpass(self)Rotate vector given matrix.
save_into_filepass(self)Save vector into file.
sq_normpass(self)Return the square of the norm.
vector_div_I1Ppass(lhs)Operator / integer(I1P).
vector_div_I2Ppass(lhs)Operator / integer(I2P).
vector_div_I4Ppass(lhs)Operator / integer(I4P).
vector_div_I8Ppass(lhs)Operator / integer(I8P).
vector_div_R16Ppass(lhs)Operator / real(R16P).
vector_div_R4Ppass(lhs)Operator / real(R4P).
vector_div_R8Ppass(lhs)Operator / real(R8P).
vector_div_vectorpass(lhs)Operator /.
vector_eq_I1Ppass(lhs)Operator == integer(I1P).
vector_eq_I2Ppass(lhs)Operator == integer(I2P).
vector_eq_I4Ppass(lhs)Operator == integer(I4P).
vector_eq_I8Ppass(lhs)Operator == integer(I8P).
vector_eq_R16Ppass(lhs)Operator == real(R16P).
vector_eq_R4Ppass(lhs)Operator == real(R4P).
vector_eq_R8Ppass(lhs)Operator == real(R8P).
vector_eq_vectorpass(lhs)Operator ==.
vector_great_I1Ppass(lhs)Operator > integer(I1P).
vector_great_I2Ppass(lhs)Operator > integer(I2P).
vector_great_I4Ppass(lhs)Operator > integer(I4P).
vector_great_I8Ppass(lhs)Operator > integer(I8P).
vector_great_R16Ppass(lhs)Operator > real(R16P).
vector_great_R4Ppass(lhs)Operator > real(R4P).
vector_great_R8Ppass(lhs)Operator > real(R8P).
vector_great_eq_I1Ppass(lhs)Operator >= integer(I1P).
vector_great_eq_I2Ppass(lhs)Operator >= integer(I2P).
vector_great_eq_I4Ppass(lhs)Operator >= integer(I4P).
vector_great_eq_I8Ppass(lhs)Operator >= integer(I8P).
vector_great_eq_R16Ppass(lhs)Operator >= real(R16P).
vector_great_eq_R4Ppass(lhs)Operator >= real(R4P).
vector_great_eq_R8Ppass(lhs)Operator >= real(R8P).
vector_great_eq_vectorpass(lhs)Operator >=.
vector_great_vectorpass(lhs)Operator >.
vector_low_I1Ppass(lhs)Operator < integer(I1P).
vector_low_I2Ppass(lhs)Operator < integer(I2P).
vector_low_I4Ppass(lhs)Operator < integer(I4P).
vector_low_I8Ppass(lhs)Operator < integer(I8P).
vector_low_R16Ppass(lhs)Operator < real(R16P).
vector_low_R4Ppass(lhs)Operator < real(R4P).
vector_low_R8Ppass(lhs)Operator < real(R8P).
vector_low_eq_I1Ppass(lhs)Operator <= integer(I1P).
vector_low_eq_I2Ppass(lhs)Operator <= integer(I2P).
vector_low_eq_I4Ppass(lhs)Operator <= integer(I4P).
vector_low_eq_I8Ppass(lhs)Operator <= integer(I8P).
vector_low_eq_R16Ppass(lhs)Operator <= real(R16P).
vector_low_eq_R4Ppass(lhs)Operator <= real(R4P).
vector_low_eq_R8Ppass(lhs)Operator <= real(R8P).
vector_low_eq_vectorpass(lhs)Operator <=.
vector_low_vectorpass(lhs)Operator <.
vector_mul_I1Ppass(lhs)Operator * integer(I1P).
vector_mul_I2Ppass(lhs)Operator * integer(I2P).
vector_mul_I4Ppass(lhs)Operator * integer(I4P).
vector_mul_I8Ppass(lhs)Operator * integer(I8P).
vector_mul_R16Ppass(lhs)Operator * real(R16P).
vector_mul_R4Ppass(lhs)Operator * real(R4P).
vector_mul_R8Ppass(lhs)Operator * real(R8P).
vector_mul_vectorpass(lhs)Operator *.
vector_not_eq_I1Ppass(lhs)Operator /= integer(I1P).
vector_not_eq_I2Ppass(lhs)Operator /= integer(I2P).
vector_not_eq_I4Ppass(lhs)Operator /= integer(I4P).
vector_not_eq_I8Ppass(lhs)Operator /= integer(I8P).
vector_not_eq_R16Ppass(lhs)Operator /= real(R16P).
vector_not_eq_R4Ppass(lhs)Operator /= real(R4P).
vector_not_eq_R8Ppass(lhs)Operator /= real(R8P).
vector_not_eq_vectorpass(lhs)Operator /=.
vector_sub_I1Ppass(lhs)Operator - integer(I1P).
vector_sub_I2Ppass(lhs)Operator - integer(I2P).
vector_sub_I4Ppass(lhs)Operator - integer(I4P).
vector_sub_I8Ppass(lhs)Operator - integer(I8P).
vector_sub_R16Ppass(lhs)Operator - real(R16P).
vector_sub_R4Ppass(lhs)Operator - real(R4P).
vector_sub_R8Ppass(lhs)Operator - real(R8P).
vector_sub_vectorpass(lhs)Operator -.
vector_sum_I1Ppass(lhs)Operator + integer(I1P).
vector_sum_I2Ppass(lhs)Operator + integer(I2P).
vector_sum_I4Ppass(lhs)Operator + integer(I4P).
vector_sum_I8Ppass(lhs)Operator + integer(I8P).
vector_sum_R16Ppass(lhs)Operator + real(R16P).
vector_sum_R4Ppass(lhs)Operator + real(R4P).
vector_sum_R8Ppass(lhs)Operator + real(R8P).
vector_sum_vectorpass(lhs)Operator +.

Subroutines ​

R8P_mul_vector_R16P_dev ​

Device-callable real(R8P) * vector, subroutine form.

Attributes: pure

fortran
subroutine R8P_mul_vector_R16P_dev(s, a, c)

Arguments

NameTypeIntentAttributesDescription
sreal(kind=R8P)inLeft hand side scalar.
atype(vector_R16P)inRight hand side.
ctype(vector_R16P)outScaled vector result.

assign_I1P ​

Operator = integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = 1_I1P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine assign_I1P(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

assign_I2P ​

Operator = integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = 1_I2P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine assign_I2P(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

assign_I4P ​

Operator = integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = 1_I4P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine assign_I4P(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

assign_I8P ​

Operator = integer(I8P).

fortran
 type(vector_R16P) :: pt
 pt = 1_I8P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine assign_I8P(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

assign_R16P ​

Operator = real(R16P).

fortran
 type(vector_R16P) :: pt
 pt = 1._R16P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine assign_R16P(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhsreal(kind=R16P)inRight hand side.

assign_R4P ​

Operator = real(R4P).

fortran
 type(vector_R16P) :: pt
 pt = 1._R4P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine assign_R4P(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhsreal(kind=R4P)inRight hand side.

assign_R8P ​

Operator = real(R8P).

fortran
 type(vector_R16P) :: pt
 pt = 1._R8P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine assign_R8P(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhsreal(kind=R8P)inRight hand side.

assign_vector ​

Operator =

fortran
 type(vector_R16P) :: pt
 pt = 1 * ex_R16P + 2 * ey_R16P + 3 * ez_R16P
 print "(3(F3.1,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: pure

fortran
subroutine assign_vector(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inoutLeft hand side.
rhstype(vector_R16P)inRight hand side.

assign_vector_R16P_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

fortran
subroutine assign_vector_R16P_dev(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhstype(vector_R16P)outLeft hand side.
rhstype(vector_R16P)inRight hand side.

barycentric_tetrahedron_R16P_dev ​

Device-callable barycentric_tetrahedron_R16P, the coordinates as an intent(out) argument.

Attributes: pure

fortran
subroutine barycentric_tetrahedron_R16P_dev(p, pt1, pt2, pt3, pt4, l)

Arguments

NameTypeIntentAttributesDescription
ptype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.
pt4type(vector_R16P)inFourth vertex.
lreal(kind=R16P)outBarycentric coordinates.

Call graph

barycentric_triangle_R16P_dev ​

Device-callable barycentric_triangle_R16P, the coordinates as an intent(out) argument.

Attributes: pure

fortran
subroutine barycentric_triangle_R16P_dev(p, pt1, pt2, pt3, l)

Arguments

NameTypeIntentAttributesDescription
ptype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.
lreal(kind=R16P)outBarycentric coordinates.

Call graph

closest_point_triangle_R16P ​

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).

fortran
 type(vector_R16P) :: q
 integer          :: f
 call closest_point_triangle_R16P(2 * ex_R16P + ez_R16P, 0 * ex_R16P, ex_R16P, ey_R16P, q, f)
 print "(I1,3(1X,F3.1))", f, q%x, q%y, q%z

Attributes: elemental

fortran
subroutine closest_point_triangle_R16P(p, a, b, c, q, feature)

Arguments

NameTypeIntentAttributesDescription
ptype(vector_R16P)inPoint.
atype(vector_R16P)inFirst vertex.
btype(vector_R16P)inSecond vertex.
ctype(vector_R16P)inThird vertex.
qtype(vector_R16P)outClosest point.
featureintegeroutFeature of the triangle where q lies.

Call graph

closest_point_triangle_R16P_dev ​

Device-callable closest_point_triangle_R16P.

Attributes: pure

fortran
subroutine closest_point_triangle_R16P_dev(p, a, b, c, q, feature)

Arguments

NameTypeIntentAttributesDescription
ptype(vector_R16P)inPoint.
atype(vector_R16P)inFirst vertex.
btype(vector_R16P)inSecond vertex.
ctype(vector_R16P)inThird vertex.
qtype(vector_R16P)outClosest point.
featureintegeroutFeature of the triangle where q lies.

Call graph

crossproduct_R16P_dev ​

Device-callable cross product, subroutine form.

Attributes: pure

fortran
subroutine crossproduct_R16P_dev(a, b, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inLeft hand side.
btype(vector_R16P)inRight hand side.
ctype(vector_R16P)outCross product result.

Call graph

crossproduct_accurate_R16P_dev ​

Device-callable crossproduct_accurate_R16P.

Attributes: pure

fortran
subroutine crossproduct_accurate_R16P_dev(a, b, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inFirst vector.
btype(vector_R16P)inSecond vector.
ctype(vector_R16P)outCross product.

Call graph

distance_vectorial_to_plane_R16P_dev ​

Device-callable vectorial distance of the point a from the plane through pt1, pt2, pt3: distance_vectorial_to_plane_R16P, normal * (normal.dot.(a - pt1)) open-coded.

Attributes: pure

fortran
subroutine distance_vectorial_to_plane_R16P_dev(a, pt1, pt2, pt3, distance)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst point of the plane.
pt2type(vector_R16P)inSecond point of the plane.
pt3type(vector_R16P)inThird point of the plane.
distancetype(vector_R16P)outVectorial distance.

Call graph

face_normal3_R16P_dev ​

Device-callable normal of the triangle pt1, pt2, pt3: face_normal3_R16P 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

fortran
subroutine face_normal3_R16P_dev(pt1, pt2, pt3, normal, norm)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.
normaltype(vector_R16P)outFace normal.
normcharacter(len=1)inoptionalIf present, normalize the normal.

Call graph

face_normal4_R16P_dev ​

Device-callable normal of the quadrilateral pt1, pt2, pt3, pt4: face_normal4_R16P 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

fortran
subroutine face_normal4_R16P_dev(pt1, pt2, pt3, pt4, normal, norm)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.
pt4type(vector_R16P)inFourth vertex.
normaltype(vector_R16P)outFace normal.
normcharacter(len=1)inoptionalIf present, normalize the normal.

Call graph

load_from_file ​

Load vector from file.

fortran
 type(vector_R16P) :: pt
 pt = 1 * ex_R16P + 2 * ey_R16P + 3 * ez_R16P
 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%z
fortran
subroutine load_from_file(self, unit, fmt, pos, iostat, iomsg)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inoutVector.
unitinteger(kind=I4P)inLogic unit.
fmtcharacter(len=*)inoptionalIO format.
posinteger(kind=I8P)inoptionalPosition specifier.
iostatinteger(kind=I4P)outoptionalIO error.
iomsgcharacter(len=*)outoptionalIO error message.

matrixproduct_R16P_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_R16P) and calls matmul; here the product is open-coded, row by row in the order of the columns.

Attributes: pure

fortran
subroutine matrixproduct_R16P_dev(matrix, a, c)

Arguments

NameTypeIntentAttributesDescription
matrixreal(kind=R16P)inMatrix.
atype(vector_R16P)inVector.
ctype(vector_R16P)outMatrix product.

Call graph

mirror_by_matrix ​

Mirror vector given matrix (of mirroring).

Attributes: pure

fortran
subroutine mirror_by_matrix(self, matrix)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inoutVector.
matrixreal(kind=R16P)inMirroring matrix.

Call graph

mirror_by_matrix_R16P_dev ​

Device-callable in-place mirroring by matrix, call a%mirror(matrix=): mirror_by_matrix, matrixproduct_dev applied to a.

Attributes: pure

fortran
subroutine mirror_by_matrix_R16P_dev(a, matrix)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inoutVector, transformed on return.
matrixreal(kind=R16P)inTransformation matrix.

Call graph

mirror_by_normal ​

Mirror vector given normal of mirroring plane.

Attributes: pure

fortran
subroutine mirror_by_normal(self, normal)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inoutVector.
normaltype(vector_R16P)inNormal of mirroring plane.

Call graph

mirror_by_normal_R16P_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

fortran
subroutine mirror_by_normal_R16P_dev(a, normal)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inoutVector, mirrored on return.
normaltype(vector_R16P)inNormal of the mirroring plane.

Call graph

mirror_matrix_R16P_dev ​

Device-callable mirror matrix: mirror_matrix_R16P with the matrix as an intent(out) argument.

mirror_matrix_R16P 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_R16P, the normal normalized as by normalize, open-coded (no calls into the TBP-bound surface).

Attributes: pure

fortran
subroutine mirror_matrix_R16P_dev(normal, matrix)

Arguments

NameTypeIntentAttributesDescription
normaltype(vector_R16P)inNormal of the mirroring plane.
matrixreal(kind=R16P)outMirror 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.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 call pt%normalize
 print "(3(F4.2,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

fortran
subroutine normalize(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inoutVector.

Call graph

normalize_R16P_dev ​

Device-callable in-place normalization call a%normalize(): normalize open-coded.

Attributes: pure

fortran
subroutine normalize_R16P_dev(a)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inoutVector, normalized on return.

normalized_R16P_dev ​

Device-callable normalized copy c = a%normalized(): normalized_R16P open-coded, the norm guarded by smallRPP as in normalize.

Attributes: pure

fortran
subroutine normalized_R16P_dev(a, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inVector.
ctype(vector_R16P)outNormalized copy.

Call graph

normalized_checked_R16P ​

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.

fortran
 type(vector_R16P) :: c
 logical          :: ok
 call normalized_checked_R16P(3 * ex_R16P + 4 * ey_R16P, c, ok)
 print "(L1,3(1X,F4.2))", ok, c%x, c%y, c%z
fortran
 type(vector_R16P) :: c
 logical          :: ok
 call normalized_checked_R16P(1e-3_RPP * ex_R16P, c, ok, min_norm=1e-2_RPP)
 print "(L1,3(1X,F4.2))", ok, c%x, c%y, c%z

Attributes: elemental

fortran
subroutine normalized_checked_R16P(a, c, ok, min_norm)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inVector.
ctype(vector_R16P)outNormalized vector, the zero vector if not ok.
oklogicaloutTrue if the norm of a is above min_norm.
min_normreal(kind=R16P)inoptionalSmallest accepted norm (default smallRPP).

normalized_checked_R16P_dev ​

Device-callable normalized_checked_R16P: same arithmetic, same optional min_norm.

Attributes: pure

fortran
subroutine normalized_checked_R16P_dev(a, c, ok, min_norm)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inVector.
ctype(vector_R16P)outNormalized vector, the zero vector if not ok.
oklogicaloutTrue if the norm of a is above min_norm.
min_normreal(kind=R16P)inoptionalSmallest accepted norm (default smallRPP).

orthogonal_R16P_dev ​

Device-callable component of a orthogonal to b, c = a .ortho. b: orthogonal, a - (a .paral. b).

Attributes: pure

fortran
subroutine orthogonal_R16P_dev(a, b, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inVector.
btype(vector_R16P)inDirection.
ctype(vector_R16P)outComponent of a orthogonal to b.

Call graph

parallel_R16P_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

fortran
subroutine parallel_R16P_dev(a, b, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inVector.
btype(vector_R16P)inDirection.
ctype(vector_R16P)outComponent of a parallel to b.

Call graph

polygon_vector_area_R16P_dev ​

Device-callable polygon_vector_area_R16P, with the number of vertices explicit.

Attributes: pure

fortran
subroutine polygon_vector_area_R16P_dev(n, pts, area)

Arguments

NameTypeIntentAttributesDescription
nintegerinNumber of vertices.
ptstype(vector_R16P)inVertices.
areatype(vector_R16P)outVector area.

Call graph

printf ​

Print in a pretty ascii format the components of type Vector.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 call pt%printf(prefix='[x, y, z] = ', sep=', ')
fortran
subroutine printf(self, unit, prefix, sep, suffix, iostat, iomsg)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector.
unitinteger(kind=I4P)inoptionalLogic unit.
prefixcharacter(len=*)inoptionalPrefix string.
sepcharacter(len=*)inoptionalComponents separator.
suffixcharacter(len=*)inoptionalSuffix string.
iostatinteger(kind=I4P)outoptionalIO error.
iomsgcharacter(len=*)outoptionalIO error message.

Call graph

projection_onto_plane_R16P_dev ​

Device-callable projection of the point a onto the plane through pt1, pt2, pt3: projection_onto_plane_R16P, a - distance_vectorial_to_plane.

Attributes: pure

fortran
subroutine projection_onto_plane_R16P_dev(a, pt1, pt2, pt3, projection)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst point of the plane.
pt2type(vector_R16P)inSecond point of the plane.
pt3type(vector_R16P)inThird point of the plane.
projectiontype(vector_R16P)outProjection.

Call graph

rotate_by_axis_angle ​

Rotate vector given axis and angle.

Angle must be in radiants.

Attributes: pure

fortran
subroutine rotate_by_axis_angle(self, axis, angle)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inoutVector.
axistype(vector_R16P)inAxis of rotation.
anglereal(kind=R16P)inAngle of rotation.

Call graph

rotate_by_axis_angle_R16P_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

fortran
subroutine rotate_by_axis_angle_R16P_dev(a, axis, angle)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inoutVector, rotated on return.
axistype(vector_R16P)inAxis of rotation.
anglereal(kind=R16P)inAngle of rotation (radians).

Call graph

rotate_by_matrix ​

Rotate vector given matrix (of ratation).

Attributes: pure

fortran
subroutine rotate_by_matrix(self, matrix)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inoutVector.
matrixreal(kind=R16P)inRotation matrix.

Call graph

rotate_by_matrix_R16P_dev ​

Device-callable in-place rotation by matrix, call a%rotate(matrix=): rotate_by_matrix, matrixproduct_dev applied to a.

Attributes: pure

fortran
subroutine rotate_by_matrix_R16P_dev(a, matrix)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inoutVector, transformed on return.
matrixreal(kind=R16P)inTransformation matrix.

Call graph

rotation_matrix_R16P_dev ​

Device-callable rotation matrix: rotation_matrix_R16P with the matrix as an intent(out) argument.

rotation_matrix_R16P 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_R16P, 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

fortran
subroutine rotation_matrix_R16P_dev(axis, angle, matrix)

Arguments

NameTypeIntentAttributesDescription
axistype(vector_R16P)inAxis of rotation.
anglereal(kind=R16P)inAngle of rotation.
matrixreal(kind=R16P)outRotation matrix.

Call graph

save_into_file ​

Save vector into file.

fortran
 type(vector_R16P) :: pt
 pt = 1 * ex_R16P + 2 * ey_R16P + 3 * ez_R16P
 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%z
fortran
subroutine save_into_file(self, unit, fmt, pos, iostat, iomsg)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector data.
unitinteger(kind=I4P)inLogic unit.
fmtcharacter(len=*)inoptionalIO format.
posinteger(kind=I8P)inoptionalPosition specifier.
iostatinteger(kind=I4P)outoptionalIO error.
iomsgcharacter(len=*)outoptionalIO error message.

vector_mul_R8P_R16P_dev ​

Device-callable vector * real(R8P), subroutine form.

Attributes: pure

fortran
subroutine vector_mul_R8P_R16P_dev(a, s, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inLeft hand side.
sreal(kind=R8P)inRight hand side scalar.
ctype(vector_R16P)outScaled vector result.

vector_sub_vector_R16P_dev ​

Device-callable vector - vector, subroutine form.

Attributes: pure

fortran
subroutine vector_sub_vector_R16P_dev(a, b, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inLeft hand side.
btype(vector_R16P)inRight hand side.
ctype(vector_R16P)outDifference result.

Call graph

vector_sum_vector_R16P_dev ​

Device-callable vector + vector, subroutine form.

Attributes: pure

fortran
subroutine vector_sum_vector_R16P_dev(a, b, c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inLeft hand side.
btype(vector_R16P)inRight hand side.
ctype(vector_R16P)outSum result.

Functions ​

I1P_eq_vector ​

Operator integer(I1P) ==.

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", 5_I1P == pt

Attributes: elemental

Returns: logical

fortran
function I1P_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I1P_great_eq_vector ​

Operator integer(I1P) >=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I1P >= pt

Attributes: elemental

Returns: logical

fortran
function I1P_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I1P_great_vector ​

Operator integer(I1P) >.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I1P > pt

Attributes: elemental

Returns: logical

fortran
function I1P_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I1P_low_eq_vector ​

Operator integer(I1P) <=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I1P <= pt

Attributes: elemental

Returns: logical

fortran
function I1P_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I1P_low_vector ​

Operator integer(I1P) <.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I1P < pt

Attributes: elemental

Returns: logical

fortran
function I1P_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I1P_mul_vector ​

Operator integer(I1P) *.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I1P_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I1P_not_eq_vector ​

Operator integer(I1P) /=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I1P /= pt

Attributes: elemental

Returns: logical

fortran
function I1P_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I1P_sub_vector ​

Operator integer(I1P) -.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = 2_I1P - pt(1)
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function I1P_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I1P_sum_vector ​

Operator integer(I1P) +.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I1P_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I1P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I2P_eq_vector ​

Operator integer(I2P) ==.

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", 5_I2P == pt

Attributes: elemental

Returns: logical

fortran
function I2P_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I2P_great_eq_vector ​

Operator integer(I2P) >=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I2P >= pt

Attributes: elemental

Returns: logical

fortran
function I2P_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I2P_great_vector ​

Operator integer(I2P) >.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I2P > pt

Attributes: elemental

Returns: logical

fortran
function I2P_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I2P_low_eq_vector ​

Operator integer(I2P) <=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I2P <= pt

Attributes: elemental

Returns: logical

fortran
function I2P_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I2P_low_vector ​

Operator integer(I2P) <.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I2P < pt

Attributes: elemental

Returns: logical

fortran
function I2P_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I2P_mul_vector ​

Operator integer(I2P) *.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I2P_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I2P_not_eq_vector ​

Operator integer(I2P) /=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I2P /= pt

Attributes: elemental

Returns: logical

fortran
function I2P_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I2P_sub_vector ​

Operator integer(I2P) -.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = 2_I2P - pt(1)
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function I2P_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I2P_sum_vector ​

Operator integer(I2P) +.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I2P_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I2P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I4P_eq_vector ​

Operator integer(I4P) ==.

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", 5_I4P == pt

Attributes: elemental

Returns: logical

fortran
function I4P_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I4P_great_eq_vector ​

Operator integer(I4P) >=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I4P >= pt

Attributes: elemental

Returns: logical

fortran
function I4P_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I4P_great_vector ​

Operator integer(I4P) >.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I4P > pt

Attributes: elemental

Returns: logical

fortran
function I4P_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I4P_low_eq_vector ​

Operator integer(I4P) <=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I4P <= pt

Attributes: elemental

Returns: logical

fortran
function I4P_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I4P_low_vector ​

Operator integer(I4P) <.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I4P < pt

Attributes: elemental

Returns: logical

fortran
function I4P_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I4P_mul_vector ​

Operator integer(I4P) *.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I4P_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I4P_not_eq_vector ​

Operator integer(I4P) /=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I4P /= pt

Attributes: elemental

Returns: logical

fortran
function I4P_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I4P_sub_vector ​

Operator integer(I4P) -.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = 2_I4P - pt(1)
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function I4P_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I4P_sum_vector ​

Operator integer(I4P) +.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I4P_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I8P_eq_vector ​

Operator integer(I8P) ==.

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", 5_I8P == pt

Attributes: elemental

Returns: logical

fortran
function I8P_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I8P_great_eq_vector ​

Operator integer(I8P) >=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I8P >= pt

Attributes: elemental

Returns: logical

fortran
function I8P_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I8P_great_vector ​

Operator integer(I8P) >.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4_I8P > pt

Attributes: elemental

Returns: logical

fortran
function I8P_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I8P_low_eq_vector ​

Operator integer(I8P) <=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I8P <= pt

Attributes: elemental

Returns: logical

fortran
function I8P_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I8P_low_vector ​

Operator integer(I8P) <.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I8P < pt

Attributes: elemental

Returns: logical

fortran
function I8P_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I8P_mul_vector ​

Operator integer(I8P) *.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I8P_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I8P_not_eq_vector ​

Operator integer(I8P) /=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1_I8P /= pt

Attributes: elemental

Returns: logical

fortran
function I8P_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

I8P_sub_vector ​

Operator integer(I8P) -.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = 2_I8P - pt(1)
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function I8P_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

I8P_sum_vector ​

Operator integer(I8P) +.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function I8P_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsinteger(kind=I8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R16P_eq_vector ​

Operator real(R16P) ==.

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", 5._R16P == pt

Attributes: elemental

Returns: logical

fortran
function R16P_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R16P_great_eq_vector ​

Operator real(R16P) >=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4._R16P >= pt

Attributes: elemental

Returns: logical

fortran
function R16P_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R16P_great_vector ​

Operator real(R16P) >.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4._R16P > pt

Attributes: elemental

Returns: logical

fortran
function R16P_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R16P_low_eq_vector ​

Operator real(R16P) <=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R16P <= pt

Attributes: elemental

Returns: logical

fortran
function R16P_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R16P_low_vector ​

Operator real(R16P) <.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R16P < pt

Attributes: elemental

Returns: logical

fortran
function R16P_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R16P_mul_vector ​

Operator real(R16P) *.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function R16P_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R16P_not_eq_vector ​

Operator real(R16P) /=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R16P /= pt

Attributes: elemental

Returns: logical

fortran
function R16P_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R16P_sub_vector ​

Operator real(R16P) -.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = 2._R16P - pt(1)
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function R16P_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R16P_sum_vector ​

Operator real(R16P) +.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function R16P_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R4P_eq_vector ​

Operator real(R4P) ==.

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", 5._R4P == pt

Attributes: elemental

Returns: logical

fortran
function R4P_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R4P_great_eq_vector ​

Operator real(R4P) >=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4._R4P >= pt

Attributes: elemental

Returns: logical

fortran
function R4P_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R4P_great_vector ​

Operator real(R4P) >.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4._R4P > pt

Attributes: elemental

Returns: logical

fortran
function R4P_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R4P_low_eq_vector ​

Operator real(R4P) <=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R4P <= pt

Attributes: elemental

Returns: logical

fortran
function R4P_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R4P_low_vector ​

Operator real(R4P) <.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R4P < pt

Attributes: elemental

Returns: logical

fortran
function R4P_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R4P_mul_vector ​

Operator real(R4P) *.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function R4P_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R4P_not_eq_vector ​

Operator real(R4P) /=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R4P /= pt

Attributes: elemental

Returns: logical

fortran
function R4P_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R4P_sub_vector ​

Operator real(R4P) -.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = 2._R4P - pt(1)
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function R4P_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R4P_sum_vector ​

Operator real(R4P) +.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function R4P_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R4P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R8P_eq_vector ​

Operator real(R8P) ==.

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", 5._R8P == pt

Attributes: elemental

Returns: logical

fortran
function R8P_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R8P_great_eq_vector ​

Operator real(R8P) >=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4._R8P >= pt

Attributes: elemental

Returns: logical

fortran
function R8P_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R8P_great_vector ​

Operator real(R8P) >.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 4._R8P > pt

Attributes: elemental

Returns: logical

fortran
function R8P_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R8P_low_eq_vector ​

Operator real(R8P) <=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R8P <= pt

Attributes: elemental

Returns: logical

fortran
function R8P_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R8P_low_vector ​

Operator real(R8P) <.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R8P < pt

Attributes: elemental

Returns: logical

fortran
function R8P_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R8P_mul_vector ​

Operator real(R8P) *.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function R8P_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R8P_not_eq_vector ​

Operator real(R8P) /=.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", 1._R8P /= pt

Attributes: elemental

Returns: logical

fortran
function R8P_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

R8P_sub_vector ​

Operator real(R8P) -.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = 2._R8P - pt(1)
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function R8P_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

R8P_sum_vector ​

Operator real(R8P) +.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function R8P_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R8P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

angle_R16P ​

Calculate the angle (rad) between two vectors.

fortran
 type(vector_R16P) :: pt(1:2)
 real(R16P)        :: a

 pt(1) = ex_R16P
 pt(2) = 2 * ex_R16P
 a = pt(1)%angle(pt(2))
 print "(F3.1)", a
fortran
 type(vector_R16P) :: pt(1:2)
 real(R16P)        :: a

 pt(1) = ex_R16P
 pt(2) = ey_R16P
 a = angle_R16P(pt(1), pt(2))
 print "(F4.2)", a

Attributes: elemental

Returns: real(kind=R16P)

fortran
function angle_R16P(self, other) result(angle_)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inThe first vector.
othertype(vector_R16P)inOther vector.

Call graph

angle_R16P_dev ​

Device-callable angle (radians) between a and b: angle_R16P 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=R16P)

fortran
function angle_R16P_dev(a, b) result(angle_)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inFirst vector.
btype(vector_R16P)inSecond vector.

Call graph

barycentric_tetrahedron_R16P ​

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).

fortran
 real(R16P) :: l(4)
 l = barycentric_tetrahedron_R16P((ex_R16P + ey_R16P + ez_R16P) / 4, 0 * ex_R16P, ex_R16P, ey_R16P, ez_R16P)
 print "(4(F4.2,1X))", l

Attributes: pure

Returns: real(kind=R16P)

fortran
function barycentric_tetrahedron_R16P(p, pt1, pt2, pt3, pt4) result(l)

Arguments

NameTypeIntentAttributesDescription
ptype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.
pt4type(vector_R16P)inFourth vertex.

Call graph

barycentric_triangle_R16P ​

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).

fortran
 real(R16P) :: l(3)
 l = barycentric_triangle_R16P((ex_R16P + ey_R16P) / 3, 0 * ex_R16P, ex_R16P, ey_R16P)
 print "(3(F5.3,1X))", l

Attributes: pure

Returns: real(kind=R16P)

fortran
function barycentric_triangle_R16P(p, pt1, pt2, pt3) result(l)

Arguments

NameTypeIntentAttributesDescription
ptype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird 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.

V→=(y1z2−z1y2)i→+(z1x2−x1z2)j→+(x1y2−y1x2)k→

where ( x_i ), ( y_i ) and ( z_i ) ( i=1,2 ) are the components of the vectors.

fortran
 type(vector_R16P) :: pt(0:2)
 pt(1) = 2 * ex_R16P
 pt(2) = ex_R16P
 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_R16P)

fortran
function crossproduct_RPP(lhs, rhs) result(cross)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

crossproduct_accurate_R16P ​

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).

fortran
 type(vector_R16P) :: a, b, c
 a = (2._RPP**(digits(1._RPP)/2) + 1) * ex_R16P + 2._RPP**(digits(1._RPP)/2) * ey_R16P
 b = (2._RPP**(digits(1._RPP)/2) + 1) * ey_R16P + 2._RPP**(digits(1._RPP)/2) * ex_R16P
 c = crossproduct_accurate_R16P(a, b)
 print "(L1)", c%z == 2._RPP**(digits(1._RPP)/2 + 1) + 1

Attributes: elemental

Returns: type(vector_R16P)

fortran
function crossproduct_accurate_R16P(a, b) result(c)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inFirst vector.
btype(vector_R16P)inSecond vector.

Call graph

distance_to_line_R16P ​

Calculate the distance (scalar) to line defined by the 2 points.

The convention for the points numeration is the following:

         . self
         ^
         |
         |
 1.-------------.2
fortran
 type(vector_R16P) :: pt(0:2)
 real(R16P)        :: d

 pt(0) = 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 d = pt(0)%distance_to_line(pt1=pt(1), pt2=pt(2))
 print "(F3.1)", d
fortran
 type(vector_R16P) :: pt(0:2)
 real(R16P)        :: d

 pt(0) = 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 d = distance_to_line_R16P(pt(0), pt1=pt(1), pt2=pt(2))
 print "(F3.1)", d

Attributes: elemental

Returns: real(kind=R16P)

fortran
function distance_to_line_R16P(self, pt1, pt2) result(distance)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inThe point from which computing the distance.
pt1type(vector_R16P)inFirst line point.
pt2type(vector_R16P)inSecond line point.

Call graph

distance_to_line_R16P_dev ​

Device-callable distance of the point a from the line through pt1 and pt2: distance_to_line_R16P, normL2((a - pt1).cross.(a - pt2)) / normL2(pt2 - pt1) open-coded.

Attributes: pure

Returns: real(kind=R16P)

fortran
function distance_to_line_R16P_dev(a, pt1, pt2) result(distance)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst point of the line.
pt2type(vector_R16P)inSecond point of the line.

Call graph

distance_to_plane_R16P ​

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
fortran
 type(vector_R16P) :: pt(0:3)
 real(R16P)        :: d

 pt(0) = 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 d = pt(0)%distance_to_plane(pt1=pt(1), pt2=pt(2), pt3=pt(3))
 print "(F3.1)", d
fortran
 type(vector_R16P) :: pt(0:3)
 real(R16P)        :: d

 pt(0) = 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 d = distance_to_plane_R16P(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))
 print "(F3.1)", d

Attributes: elemental

Returns: real(kind=R16P)

fortran
function distance_to_plane_R16P(self, pt1, pt2, pt3) result(distance)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inThe point from which computing the distance.
pt1type(vector_R16P)inFirst plane point.
pt2type(vector_R16P)inSecond plane point.
pt3type(vector_R16P)inThird plane point.

Call graph

distance_to_plane_R16P_dev ​

Device-callable signed distance of the point a from the plane through pt1, pt2, pt3: distance_to_plane_R16P, the unit face normal dotted with a - pt1, open-coded.

Attributes: pure

Returns: real(kind=R16P)

fortran
function distance_to_plane_R16P_dev(a, pt1, pt2, pt3) result(distance)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst point of the plane.
pt2type(vector_R16P)inSecond point of the plane.
pt3type(vector_R16P)inThird point of the plane.

Call graph

distance_vectorial_to_plane_R16P ​

Calculate the distance (vectorial) to plane defined by the 3 points.

The convention for the points numeration is the following:

 3.----.2
   \   |
    \ *---------> . self
     \ |
      \|
       .1
fortran
 type(vector_R16P) :: pt(0:3)

 pt(0) = 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 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
fortran
 type(vector_R16P) :: pt(0:3)

 pt(0) = 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 pt(0) = distance_vectorial_to_plane_R16P(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function distance_vectorial_to_plane_R16P(self, pt1, pt2, pt3) result(distance)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inThe point from which computing the distance.
pt1type(vector_R16P)inFirst plane point.
pt2type(vector_R16P)inSecond plane point.
pt3type(vector_R16P)inThird 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=R16P)

fortran
function dop_RPP(a, b, c, d) result(r)

Arguments

NameTypeIntentAttributesDescription
areal(kind=R16P)inOperands.
breal(kind=R16P)inOperands.
creal(kind=R16P)inOperands.
dreal(kind=R16P)inOperands.

Call graph

dotproduct ​

Compute the scalar (dot) product.

D=x1⋅x2+y1⋅y2+z1⋅z2

where ( x_i ), ( y_i ) and ( z_i ) ( i=1,2 ) are the components of the vectors.

fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 print "(F3.1)", pt(1).dot.pt(2)

Attributes: elemental

Returns: real(kind=R16P)

fortran
function dotproduct(lhs, rhs) result(dot)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

dotproduct_R16P_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=R16P)

fortran
function dotproduct_R16P_dev(a, b) result(d)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inLeft hand side.
btype(vector_R16P)inRight hand side.

Call graph

dotproduct_accurate_R16P ​

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.

fortran
 type(vector_R16P) :: a, b
 real(R16P)        :: k
 k = 2._RPP**(digits(1._RPP)/2)
 a = (k + 1) * ex_R16P + k * ey_R16P + ez_R16P
 b = (k + 1) * ex_R16P - k * ey_R16P + ez_R16P
 print "(L1)", dotproduct_accurate_R16P(a, b) == 2 * k + 2

Attributes: elemental

Returns: real(kind=R16P)

fortran
function dotproduct_accurate_R16P(a, b) result(d)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inFirst vector.
btype(vector_R16P)inSecond vector.

Call graph

dotproduct_accurate_R16P_dev ​

Device-callable dotproduct_accurate_R16P.

Attributes: pure

Returns: real(kind=R16P)

fortran
function dotproduct_accurate_R16P_dev(a, b) result(d)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inFirst vector.
btype(vector_R16P)inSecond vector.

Call graph

face_normal3_R16P ​

Calculate the normal of the face defined by the 3 points.

The convention for the points numeration is the following:

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

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

fortran
 type(vector_R16P) :: pt(0:3)

 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 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)
fortran
 type(vector_R16P) :: pt(0:3)

 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 pt(0) = face_normal3_R16P(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_R16P)

fortran
function face_normal3_R16P(pt1, pt2, pt3, norm) result(normal)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst face point.
pt2type(vector_R16P)inSecond face point.
pt3type(vector_R16P)inThird face point.
normcharacter(len=1)inoptionalIf 'norm' is passed as argument the normal is normalized.

Call graph

face_normal4_R16P ​

Calculate the normal of the face defined by 4 points.

The convention for the points numeration is the following:

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

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

fortran
 type(vector_R16P) :: pt(0:4)

 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 pt(4) = ex_R16P + ey_R16P
 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)
fortran
 type(vector_R16P) :: pt(0:4)

 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 pt(4) = ex_R16P + ey_R16P
 pt(0) = face_normal4_R16P(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_R16P)

fortran
function face_normal4_R16P(pt1, pt2, pt3, pt4, norm) result(normal)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst face point.
pt2type(vector_R16P)inSecond face point.
pt3type(vector_R16P)inThird face point.
pt4type(vector_R16P)inFourth face point.
normcharacter(len=1)inoptionalIf '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=R16P)

fortran
function fma_RPP(a, b, c) result(r)

Arguments

NameTypeIntentAttributesDescription
areal(kind=R16P)inOperands.
breal(kind=R16P)inOperands.
creal(kind=R16P)inOperands.

Call graph

iolen_R16P ​

Compute IO length.

fortran
 use penf, only : byte_size
 type(vector_R16P) :: pt
 print*, pt%iolen()/byte_size(pt%x)
fortran
 use penf, only : byte_size
 type(vector_R16P) :: pt
 print*, iolen_R16P(pt)/byte_size(pt%x)

Returns: integer(kind=I4P)

fortran
function iolen_R16P(self) result(iolen_)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector.

is_collinear_R16P ​

Return true if the point is collinear with other two given points.

fortran
 type(vector_R16P) :: pt(0:2)

 pt(0) = 3 * ex_R16P
 pt(1) = 1 * ex_R16P
 pt(2) = 2 * ex_R16P
 print "(L1)", pt(0)%is_collinear(pt1=pt(1), pt2=pt(2))
fortran
 type(vector_R16P) :: pt(0:2)

 pt(0) = 3 * ex_R16P
 pt(1) = 1 * ex_R16P
 pt(2) = 2 * ex_R16P
 print "(L1)", is_collinear_R16P(pt(0), pt1=pt(1), pt2=pt(2))

Attributes: elemental

Returns: logical

fortran
function is_collinear_R16P(self, pt1, pt2, tolerance) result(is_collinear_)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector.
pt1type(vector_R16P)inFirst line point.
pt2type(vector_R16P)inSecond line point.
tolerancereal(kind=R16P)inoptionalTolerance for collinearity check.

Call graph

is_collinear_R16P_dev ​

Device-callable test of the point a on the line through pt1 and pt2: is_collinear_R16P, the distance from the line not above ZeroRPP + tolerance (0 when absent).

Attributes: pure

Returns: logical

fortran
function is_collinear_R16P_dev(a, pt1, pt2, tolerance) result(is_collinear_)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inPoint.
pt1type(vector_R16P)inFirst point of the line.
pt2type(vector_R16P)inSecond point of the line.
tolerancereal(kind=R16P)inoptionalTolerance.

Call graph

is_concyclic_R16P ​

Return true if the point is concyclic with other three given points.

Based on Ptolemy's Theorem.

fortran
 type(vector_R16P) :: pt(0:3)

 pt(0) = -1 * ey_R16P
 pt(1) =  1 * ex_R16P
 pt(2) =  1 * ey_R16P
 pt(3) = -1 * ex_R16P
 print "(L1)", pt(0)%is_concyclic(pt1=pt(1), pt2=pt(2), pt3=pt(3))
fortran
 type(vector_R16P) :: pt(0:3)

 pt(0) = -1 * ey_R16P
 pt(1) =  1 * ex_R16P
 pt(2) =  1 * ey_R16P
 pt(3) = -1 * ex_R16P
 print "(L1)", is_concyclic_R16P(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))

Attributes: elemental

Returns: logical

fortran
function is_concyclic_R16P(self, pt1, pt2, pt3, tolerance) result(is_concyclic_)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector.
pt1type(vector_R16P)inFirst arc point.
pt2type(vector_R16P)inSecond arc point.
pt3type(vector_R16P)inThird arc point.
tolerancereal(kind=R16P)inoptionalTolerance for concyclicity check.

Call graph

is_concyclic_R16P_dev ​

Device-callable test of the points a, pt1, pt2, pt3 on one circle: is_concyclic_R16P (Ptolemy's inequality) open-coded, against smallRPP + tolerance (0 when absent).

Attributes: pure

Returns: logical

fortran
function is_concyclic_R16P_dev(a, pt1, pt2, pt3, tolerance) result(is_concyclic_)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inPoint.
pt1type(vector_R16P)inSecond point.
pt2type(vector_R16P)inThird point.
pt3type(vector_R16P)inFourth point.
tolerancereal(kind=R16P)inoptionalTolerance.

Call graph

matrixproduct ​

Compute the matrix product.

fortran
 type(vector_R16P) :: pt(2)
 real(R16P)        :: I(3,3)
 pt(1) = 2 * ex_R16P
 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_R16P)

fortran
function matrixproduct(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsreal(kind=R16P)inLeft hand side.
rhsclass(vector_R16P)inRight hand side.

Call graph

mirror_matrix_R16P ​

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.

fortran
 type(vector_R16P) :: pt
 character(4)     :: res(3)
 pt = ex_R16P
 call pt%mirror(normal=ex_R16P + ey_R16P)
 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=R16P)

fortran
function mirror_matrix_R16P(normal) result(matrix)

Arguments

NameTypeIntentAttributesDescription
normaltype(vector_R16P)inNormal of mirroring plane.

Call graph

negative ​

Operator - unary.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = - pt(1)
 print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function negative(rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
rhsclass(vector_R16P)inRight hand side.

normL2_R16P ​

Return the norm L2 of vector.

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

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 print "(F4.2)", pt%normL2()
fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 print "(F4.2)", normL2_R16P(pt)

Attributes: elemental

Returns: real(kind=R16P)

fortran
function normL2_R16P(self) result(norm)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector.

Call graph

normL2_R16P_dev ​

Device-callable norm L2: normL2_R16P open-coded.

Attributes: pure

Returns: real(kind=R16P)

fortran
function normL2_R16P_dev(a) result(norm)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inVector.

Call graph

normalized_R16P ​

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.

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 pt = pt%normalized()
 print "(3(F4.2,1X))", abs(pt%x), abs(pt%y), abs(pt%z)
fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 pt = normalized_R16P(pt)
 print "(3(F4.2,1X))", abs(pt%x), abs(pt%y), abs(pt%z)

Attributes: elemental

Returns: type(vector_R16P)

fortran
function normalized_R16P(self) result(norm)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector.

Call graph

orthogonal ​

Compute the component of lhs orthogonal to rhs.

fortran
 type(vector_R16P) :: pt(0:2)
 pt(1) = 2 * ex_R16P + 3 * ey_R16P
 pt(2) = ex_R16P
 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_R16P)

fortran
function orthogonal(lhs, rhs) result(ortho)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

parallel ​

Attributes: elemental

Returns: type(vector_R16P)

fortran
function parallel(lhs, rhs) result(paral)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inCompute the component of lhs parallel to rhs.
rhstype(vector_R16P)inRight hand side.

Call graph

polygon_vector_area_R16P ​

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).

fortran
 type(vector_R16P) :: a
 a = polygon_vector_area_R16P([0 * ex_R16P, 2 * ex_R16P, 2 * ex_R16P + ey_R16P, ey_R16P])
 print "(3(F3.1,1X))", a%x, a%y, a%z

Attributes: pure

Returns: type(vector_R16P)

fortran
function polygon_vector_area_R16P(pts) result(area)

Arguments

NameTypeIntentAttributesDescription
ptstype(vector_R16P)inVertices.

Call graph

positive ​

Operator + unary.

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function positive(rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
rhsclass(vector_R16P)inRight hand side.

projection_onto_plane_R16P ​

Calculate the projection of point onto plane defined by 3 points.

The convention for the points numeration is the following:

 1.----.2
   \   |
    \ *---------> . self
     \ |
      \|
       .3
fortran
 type(vector_R16P) :: pt(0:3)

 pt(0) = 1 * ex_R16P + 2 * ey_R16P + 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 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
fortran
 type(vector_R16P) :: pt(0:3)

 pt(0) = 1 * ex_R16P + 2 * ey_R16P + 5.3 * ez_R16P
 pt(1) = ex_R16P
 pt(2) = ey_R16P
 pt(3) = ex_R16P - ey_R16P
 pt(0) = projection_onto_plane_R16P(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function projection_onto_plane_R16P(self, pt1, pt2, pt3) result(projection)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inThe point from which computing the distance.
pt1type(vector_R16P)inFirst plane point.
pt2type(vector_R16P)inSecond plane point.
pt3type(vector_R16P)inThird plane point.

Call graph

rotation_matrix_R16P ​

Return the rotation matrix given axis and angle of ratation.

Angle must be in radiants.

Attributes: pure

Returns: real(kind=R16P)

fortran
function rotation_matrix_R16P(axis, angle) result(matrix)

Arguments

NameTypeIntentAttributesDescription
axistype(vector_R16P)inAxis of ratation.
anglereal(kind=R16P)inAngle of ratation.

Call graph

sq_norm_R16P ​

Return the square of the norm of vector.

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

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 print "(F3.1)", pt%sq_norm()
fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P
 print "(F3.1)", sq_norm_R16P(pt)

Attributes: elemental

Returns: real(kind=R16P)

fortran
function sq_norm_R16P(self) result(sq)

Arguments

NameTypeIntentAttributesDescription
selfclass(vector_R16P)inVector.

Call graph

sq_norm_R16P_dev ​

Device-callable square of the norm L2: sq_norm_R16P open-coded.

Attributes: pure

Returns: real(kind=R16P)

fortran
function sq_norm_R16P_dev(a) result(sq)

Arguments

NameTypeIntentAttributesDescription
atype(vector_R16P)inVector.

Call graph

tetrahedron_volume_R16P ​

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).

fortran
 print "(F6.4,1X,F7.4)", tetrahedron_volume_R16P(0 * ex_R16P, ex_R16P, ey_R16P, ez_R16P), &
                         tetrahedron_volume_R16P(0 * ex_R16P, ey_R16P, ex_R16P, ez_R16P)

Attributes: elemental

Returns: real(kind=R16P)

fortran
function tetrahedron_volume_R16P(pt1, pt2, pt3, pt4) result(volume)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.
pt4type(vector_R16P)inFourth vertex.

Call graph

tetrahedron_volume_R16P_dev ​

Device-callable tetrahedron_volume_R16P.

Attributes: pure

Returns: real(kind=R16P)

fortran
function tetrahedron_volume_R16P_dev(pt1, pt2, pt3, pt4) result(volume)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.
pt4type(vector_R16P)inFourth vertex.

Call graph

triangle_area_R16P ​

Area of the triangle pt1, pt2, pt3: half the norm of (pt2 - pt1) .cross. (pt3 - pt1).

fortran
 print "(F4.2)", triangle_area_R16P(0 * ex_R16P, ex_R16P, ey_R16P)

Attributes: elemental

Returns: real(kind=R16P)

fortran
function triangle_area_R16P(pt1, pt2, pt3) result(area)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.

Call graph

triangle_area_R16P_dev ​

Device-callable triangle_area_R16P.

Attributes: pure

Returns: real(kind=R16P)

fortran
function triangle_area_R16P_dev(pt1, pt2, pt3) result(area)

Arguments

NameTypeIntentAttributesDescription
pt1type(vector_R16P)inFirst vertex.
pt2type(vector_R16P)inSecond vertex.
pt3type(vector_R16P)inThird vertex.

Call graph

vector_div_I1P ​

Operator / integer(I1P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

vector_div_I2P ​

Operator / integer(I2P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

vector_div_I4P ​

Operator / integer(I4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

vector_div_I8P ​

Operator / integer(I8P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

vector_div_R16P ​

Operator / real(R16P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

vector_div_R4P ​

Operator / real(R4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

vector_div_R8P ​

Operator / real(R8P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

vector_div_vector ​

Operator /.

fortran
 type(vector_R16P) :: pt(0:2)
 pt(1) = 1 * ex_R16P + 1 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_div_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

vector_eq_I1P ​

Operator == integer(I1P).

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", pt == 5_I1P

Attributes: elemental

Returns: logical

fortran
function vector_eq_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

Call graph

vector_eq_I2P ​

Operator == integer(I2P).

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", pt == 5_I2P

Attributes: elemental

Returns: logical

fortran
function vector_eq_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

Call graph

vector_eq_I4P ​

Operator == integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", pt == 5_I4P

Attributes: elemental

Returns: logical

fortran
function vector_eq_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

Call graph

vector_eq_I8P ​

Operator == integer(I8P).

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", pt == 5_I8P

Attributes: elemental

Returns: logical

fortran
function vector_eq_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

Call graph

vector_eq_R16P ​

Operator == real(R16P).

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", pt == 5._R16P

Attributes: elemental

Returns: logical

fortran
function vector_eq_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

Call graph

vector_eq_R4P ​

Operator == real(R4P).

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", pt == 5._R4P

Attributes: elemental

Returns: logical

fortran
function vector_eq_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

Call graph

vector_eq_R8P ​

Operator == real(R8P).

fortran
 type(vector_R16P) :: pt
 pt = 4 * ex_R16P + 3 * ey_R16P
 print "(L1)", pt == 5._R8P

Attributes: elemental

Returns: logical

fortran
function vector_eq_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

Call graph

vector_eq_vector ​

Operator ==.

The comparison is done with respect normL2 and, secondary, with respect the directions.

fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P + ey_R16P + ez_R16P
 pt(2) = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt(1) == pt(2)

Attributes: elemental

Returns: logical

fortran
function vector_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

vector_great_I1P ​

Operator > integer(I1P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt > 1_I1P

Attributes: elemental

Returns: logical

fortran
function vector_great_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

Call graph

vector_great_I2P ​

Operator > integer(I2P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt > 1_I2P

Attributes: elemental

Returns: logical

fortran
function vector_great_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

Call graph

vector_great_I4P ​

Operator > integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt > 1_I4P

Attributes: elemental

Returns: logical

fortran
function vector_great_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

Call graph

vector_great_I8P ​

Operator > integer(I8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt > 1_I8P

Attributes: elemental

Returns: logical

fortran
function vector_great_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

Call graph

vector_great_R16P ​

Operator > real(R16P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt > 1._R16P

Attributes: elemental

Returns: logical

fortran
function vector_great_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

Call graph

vector_great_R4P ​

Operator > real(R4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt > 1._R4P

Attributes: elemental

Returns: logical

fortran
function vector_great_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

Call graph

vector_great_R8P ​

Operator > real(R8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt > 1._R8P

Attributes: elemental

Returns: logical

fortran
function vector_great_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

Call graph

vector_great_eq_I1P ​

Operator >= integer(I1P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt >= 1_I1P

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

Call graph

vector_great_eq_I2P ​

Operator >= integer(I2P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt >= 1_I2P

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

Call graph

vector_great_eq_I4P ​

Operator >= integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt >= 1_I4P

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

Call graph

vector_great_eq_I8P ​

Operator >= integer(I8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt >= 1_I8P

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

Call graph

vector_great_eq_R16P ​

Operator >= real(R16P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt >= 1._R16P

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

Call graph

vector_great_eq_R4P ​

Operator >= real(R4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt >= 1._R4P

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

Call graph

vector_great_eq_R8P ​

Operator >= real(R8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt >= 1._R8P

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

Call graph

vector_great_eq_vector ​

Operator >=.

fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P + ey_R16P + ez_R16P
 pt(2) = pt(1) + 1
 print "(L1)", pt(2) >= pt(1)

Attributes: elemental

Returns: logical

fortran
function vector_great_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

vector_great_vector ​

Operator >.

fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P + ey_R16P + ez_R16P
 pt(2) = pt(1) + 1
 print "(L1)", pt(2) > pt(1)

Attributes: elemental

Returns: logical

fortran
function vector_great_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

vector_low_I1P ​

Operator < integer(I1P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt < 4_I1P

Attributes: elemental

Returns: logical

fortran
function vector_low_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

Call graph

vector_low_I2P ​

Operator < integer(I2P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt < 4_I2P

Attributes: elemental

Returns: logical

fortran
function vector_low_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

Call graph

vector_low_I4P ​

Operator < integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt < 4_I4P

Attributes: elemental

Returns: logical

fortran
function vector_low_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

Call graph

vector_low_I8P ​

Operator < integer(I8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt < 4_I8P

Attributes: elemental

Returns: logical

fortran
function vector_low_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

Call graph

vector_low_R16P ​

Operator < real(R16P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt < 4._R16P

Attributes: elemental

Returns: logical

fortran
function vector_low_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

Call graph

vector_low_R4P ​

Operator < real(R4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt < 4._R4P

Attributes: elemental

Returns: logical

fortran
function vector_low_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

Call graph

vector_low_R8P ​

Operator < real(R8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt < 4._R8P

Attributes: elemental

Returns: logical

fortran
function vector_low_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

Call graph

vector_low_eq_I1P ​

Operator <= integer(I1P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt <= 4_I1P

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

Call graph

vector_low_eq_I2P ​

Operator <= integer(I2P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt <= 4_I2P

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

Call graph

vector_low_eq_I4P ​

Operator <= integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt <= 4_I4P

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

Call graph

vector_low_eq_I8P ​

Operator <= integer(I8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt <= 4_I8P

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

Call graph

vector_low_eq_R16P ​

Operator <= real(R16P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt <= 4._R16P

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

Call graph

vector_low_eq_R4P ​

Operator <= real(R4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt <= 4._R4P

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

Call graph

vector_low_eq_R8P ​

Operator <= real(R8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt <= 4._R8P

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

Call graph

vector_low_eq_vector ​

Operator <=.

fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P + ey_R16P + ez_R16P
 pt(2) = pt(1) + 1
 print "(L1)", pt(1) <= pt(2)

Attributes: elemental

Returns: logical

fortran
function vector_low_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

vector_low_vector ​

Operator <.

fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P + ey_R16P + ez_R16P
 pt(2) = pt(1) + 1
 print "(L1)", pt(1) < pt(2)

Attributes: elemental

Returns: logical

fortran
function vector_low_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

vector_mul_I1P ​

Operator * integer(I1P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

vector_mul_I2P ​

Operator * integer(I2P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

vector_mul_I4P ​

Operator * integer(I4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

vector_mul_I8P ​

Operator * integer(I8P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

vector_mul_R16P ​

Operator * real(R16P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

vector_mul_R4P ​

Operator * real(R4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

vector_mul_R8P ​

Operator * real(R8P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

vector_mul_vector ​

Operator *.

fortran
 type(vector_R16P) :: pt(0:2)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_mul_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

vector_not_eq_I1P ​

Operator /= integer(I1P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt /= 1_I1P

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

Call graph

vector_not_eq_I2P ​

Operator /= integer(I2P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt /= 1_I2P

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

Call graph

vector_not_eq_I4P ​

Operator /= integer(I4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt /= 1_I4P

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

Call graph

vector_not_eq_I8P ​

Operator /= integer(I8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt /= 1_I8P

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

Call graph

vector_not_eq_R16P ​

Operator /= real(R16P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt /= 1._R16P

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

Call graph

vector_not_eq_R4P ​

Operator /= real(R4P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt /= 1._R4P

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

Call graph

vector_not_eq_R8P ​

Operator /= real(R8P).

fortran
 type(vector_R16P) :: pt
 pt = ex_R16P + ey_R16P + ez_R16P
 print "(L1)", pt /= 1._R8P

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

Call graph

vector_not_eq_vector ​

Operator /=.

The comparison is done with respect normL2 and, secondary, with respect the directions.

fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P + ey_R16P + ez_R16P
 pt(2) = pt(1) + 1
 print "(L1)", pt(1) /= pt(2)
fortran
 type(vector_R16P) :: pt(1:2)
 pt(1) = ex_R16P + ey_R16P + ez_R16P
 pt(2) = ex_R16P + ey_R16P - ez_R16P
 print "(L1)", pt(1) /= pt(2)

Attributes: elemental

Returns: logical

fortran
function vector_not_eq_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Call graph

vector_sub_I1P ​

Operator - integer(I1P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = pt(1) - 3_I1P
 print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function vector_sub_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

vector_sub_I2P ​

Operator - integer(I2P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = pt(1) - 3_I2P
 print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function vector_sub_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

vector_sub_I4P ​

Operator - integer(I4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = pt(1) - 3_I4P
 print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function vector_sub_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

vector_sub_I8P ​

Operator - integer(I8P).

fortran
 type(vector_R16P) :: pt(0:1)
 character(4) :: res(3)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sub_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

vector_sub_R16P ​

Operator - real(R16P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = pt(1) - 3._R16P
 print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function vector_sub_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

vector_sub_R4P ​

Operator - real(R4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 pt(0) = pt(1) - 3._R4P
 print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function vector_sub_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

vector_sub_R8P ​

Operator - real(R8P).

fortran
 type(vector_R16P) :: pt(0:1)
 character(4) :: res(3)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sub_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

vector_sub_vector ​

Operator -.

fortran
 type(vector_R16P) :: pt(0:2)
 pt(1) = 1 * ex_R16P + 1 * ey_R16P + 1 * ez_R16P
 pt(2) = pt(1) + 1
 pt(0) = pt(1) - pt(2)
 print "(3(F4.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Attributes: elemental

Returns: type(vector_R16P)

fortran
function vector_sub_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

vector_sum_I1P ​

Operator + integer(I1P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_I1P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I1P)inRight hand side.

vector_sum_I2P ​

Operator + integer(I2P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_I2P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I2P)inRight hand side.

vector_sum_I4P ​

Operator + integer(I4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_I4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I4P)inRight hand side.

vector_sum_I8P ​

Operator + integer(I8P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_I8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsinteger(kind=I8P)inRight hand side.

vector_sum_R16P ​

Operator + real(R16P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_R16P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R16P)inRight hand side.

vector_sum_R4P ​

Operator + real(R4P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_R4P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R4P)inRight hand side.

vector_sum_R8P ​

Operator + real(R8P).

fortran
 type(vector_R16P) :: pt(0:1)
 pt(1) = 1 * ex_R16P + 2 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_R8P(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhsreal(kind=R8P)inRight hand side.

vector_sum_vector ​

Operator +.

fortran
 type(vector_R16P) :: pt(0:2)
 pt(1) = 1 * ex_R16P + 1 * ey_R16P + 1 * ez_R16P
 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_R16P)

fortran
function vector_sum_vector(lhs, rhs) result(opr)

Arguments

NameTypeIntentAttributesDescription
lhsclass(vector_R16P)inLeft hand side.
rhstype(vector_R16P)inRight hand side.

Released under the GPL v3, BSD 2-Clause, BSD 3-Clause or MIT License.