Feature map
Every feature of VecFor, where the tutorial teaches it, where the cookbook shows it and where the reference describes it.
| Feature | How | Tutorial | Cookbook | Reference |
|---|---|---|---|---|
| The vector type | type(vector), components x, y, z | 1 | components | The vector type |
| Versors | ex, ey, ez | 1 | components | Versors |
| Structure constructor | vector(x, y, z) | 1 | components | Building a vector |
| Assignment of a number | v = 2.5_R8P, any integer or real kind | 1 | one number | Assignment |
| Sum, difference, sign | a + b, a - b, -a, +a | 2 | sum | Arithmetic |
| Scaling | s * a, a * s, a / s, any kind | 2 | scaling | Arithmetic |
| A number on every component | a + s, s + a, a - s, s - a | 2 | plus a number | Arithmetic |
| Component-wise product, quotient | a * b, a / b | 2 | component-wise | Arithmetic |
| Dot product | a .dot. b | 3 | products | Products |
| Cross product | a .cross. b | 3 | products | Products |
| Length | normL2, sq_norm | 3 | length | Lengths and directions |
| Unit vector | normalized, normalize | 3 | unit vector | Lengths and directions |
| Angle | angle | 3 | angle | Angle |
| Parallel and orthogonal components | a .paral. n, a .ortho. n | 6 | components | Products |
| Face normals and areas | face_normal3, face_normal4, norm | 4 | triangle, quadrilateral | Face normals |
| Distance from a line | distance_to_line | 5 | line | Distances |
| Distance from a plane | distance_to_plane, distance_vectorial_to_plane | 5 | plane | Distances |
| Projection onto a plane | projection_onto_plane | 5 | plane | Distances |
| Collinear points | is_collinear, tolerance | 5 | collinear | Predicates |
| Concyclic points | is_concyclic, tolerance | 5 | concyclic | Predicates |
| Rotation | rotate(axis=, angle=), rotate(matrix=), rotation_matrix | 7 | axis, matrix | Rotations |
| Mirror | mirror(normal=), mirror(matrix=), mirror_matrix | 7 | plane, matrix | Mirrors |
| Matrix times vector | m .matrix. a | 7 | any matrix | Products |
| Comparisons | ==, /=, <, <=, >, >=, with vectors and numbers | 8 | vectors, numbers | Comparisons |
| Arrays of vectors | elemental operators and functions, p%x | 8 | arrays | Arrays |
| Methods or free functions | a%normL2() or normL2(a) | 3 | two spellings | Names |
| Precisions | vector_R4P, vector_R8P, vector_R16P, versors and functions of each | 9 | each precision | Precision and kinds |
| True quadruple precision | -DPENF_R16P | 9 | quadruple | Quadruple |
| Printing | printf(prefix=, sep=, suffix=, unit=) | 10 | printing | printf |
| Files | save_into_file, load_from_file, fmt, pos | 10 | binary, text, stream | Files |
| Record length | iolen | 10 | direct access | iolen |
| I/O errors | iostat, iomsg | 10 | errors | Errors |
| OpenACC device routines | *_oac | 11 | device | Device-callable API |
Not available: vectors of other dimensions than three; operations between vectors of two different kinds; sum, dot_product or matmul of the intrinsics on vectors; a tolerance in the comparisons (see Behaviour and limitations).