|
MiniTensor Version of the Day
|
Lengths, areas, volumes and centroids of finite-element shapes, and related parametrization utilities. More...
Namespaces | |
| namespace | minitensor::ELEMENT |
Lengths, areas, volumes and centroids of finite-element shapes, and related parametrization utilities.
Finite element types.
| Enumerator | |
|---|---|
| UNKNOWN | |
| SEGMENTAL | |
| TRIANGULAR | |
| QUADRILATERAL | |
| TETRAHEDRAL | |
| HEXAHEDRAL | |
Definition at line 29 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION T minitensor::length | ( | Vector< T, N > const & | p0, |
| Vector< T, N > const & | p1 | ||
| ) |
Length of a segment
Definition at line 1558 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION T minitensor::area | ( | Vector< T, N > const & | p0, |
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2 | ||
| ) |
Area of a triangle
Definition at line 1569 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION T minitensor::area | ( | Vector< T, N > const & | p0, |
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3 | ||
| ) |
Area of a quadrilateral. Taken from: Calculation of the volume of a general hexahedron for flow predictions Davies, D. E.; Salmond, D. J. AIAA Journal (ISSN 0001-1452), vol. 23, June 1985, p. 954-956. Their vertex naming convention: ABCD Our convention: 0123
Definition at line 1592 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION T minitensor::volume | ( | Vector< T, N > const & | p0, |
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3 | ||
| ) |
Volume of tetrahedron
Definition at line 1610 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION T minitensor::volume | ( | Vector< T, N > const & | p0, |
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3, | ||
| Vector< T, N > const & | p4, | ||
| Vector< T, N > const & | p5, | ||
| Vector< T, N > const & | p6, | ||
| Vector< T, N > const & | p7 | ||
| ) |
Volume of hexahedron Taken from: Calculation of the volume of a general hexahedron for flow predictions Davies, D. E.; Salmond, D. J. AIAA Journal (ISSN 0001-1452), vol. 23, June 1985, p. 954-956. Their vertex naming convention: ABCDEFGH Our convention: 45670123
Definition at line 1634 of file MiniTensor_Geometry.h.
| Vector< T, N > minitensor::centroid | ( | std::vector< Vector< T, N > > const & | points | ) |
Centroids of segment, triangle, tetrahedron, quadrilateral and hexahedron. For these we can just take the average of the vertices. WARNING: This is not the center of mass.
Definition at line 1684 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::normal | ( | Vector< T, N > const & | p0, |
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2 | ||
| ) |
The surface normal of a face Input: 3 independent nodes on the face Output: normal vector
Definition at line 1705 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION bool minitensor::in_normal_side | ( | Vector< T, N > const & | p, |
| Vector< T, N > const & | p0, | ||
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| T const | tolerance = 0 |
||
| ) |
Given 3 points p0, p1, p2 that define a plane determine if point p is in the same side of the normal to the plane as defined by the right hand rule. If a tolrance is given, use that as criterion for minimal distance.
Definition at line 1726 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION std::pair< Vector< T, N >, Vector< T, N > > minitensor::bounding_box | ( | I | start, |
| I | end | ||
| ) |
Given two iterators to a container of points, find the associated bounding box.
| start | iterator that begins the sequence of points |
| end | iterator that ends the sequence of points |
Definition at line 1755 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION std::pair< Vector< T, DYNAMIC >, Vector< T, DYNAMIC > > minitensor::bounding_box | ( | I | start, |
| I | end | ||
| ) |
Bounding box of a sequence of points.
Definition at line 1793 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION bool minitensor::in_box | ( | Vector< T, N > const & | p, |
| Vector< T, N > const & | min, | ||
| Vector< T, N > const & | max | ||
| ) |
Determine if a given point is inside a bounding box.
| p | the point |
| min | lower corner of the box |
| max | upper corner of the box |
Definition at line 1807 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::random_in_box | ( | Vector< T, N > const & | min, |
| Vector< T, N > const & | max | ||
| ) |
Generate random point inside bounding box
| min | lower corner of the bounding box |
| max | upper corner of the bounding box |
Definition at line 1835 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION bool minitensor::in_tetrahedron | ( | Vector< T, N > const & | p, |
| Vector< T, N > const & | p0, | ||
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3, | ||
| T const | tolerance = 0 |
||
| ) |
Given 4 points p0, p1, p2, p3 that define a tetrahedron determine if point p is inside it. If a tolrance is given, use that as criterion for minimal distance.
Definition at line 1858 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION bool minitensor::in_hexahedron | ( | Vector< T, N > const & | p, |
| Vector< T, N > const & | p0, | ||
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3, | ||
| Vector< T, N > const & | p4, | ||
| Vector< T, N > const & | p5, | ||
| Vector< T, N > const & | p6, | ||
| Vector< T, N > const & | p7, | ||
| T const | tolerance = 0 |
||
| ) |
Given 8 points that define a hexahedron determine if point p is inside it. Assumption: faces are planar If a tolrance is given, use that as criterion for minimal distance.
Definition at line 1882 of file MiniTensor_Geometry.h.
| std::vector< Vector< T, N > >::size_type minitensor::closest_point | ( | Vector< T, N > const & | p, |
| std::vector< Vector< T, N > > const & | n | ||
| ) |
Closest point
| p | the point |
| n | vector of points to test |
Definition at line 1912 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION T minitensor::median | ( | Iterator | begin, |
| Iterator | end | ||
| ) |
Median of a sequence defined by random access iterators. Undefined for empty set.
| begin | iterator that begins the sequence |
| end | iterator that ends the sequence |
Definition at line 1953 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::interpolate_quadrilateral | ( | Vector< T, dimension_const< N, 2 >::value > & | xi, |
| Vector< T, N > const & | p0, | ||
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3 | ||
| ) |
Given quadrilateral nodes and a position in parametric coordinates, interpolate.
| xi | position in parametric coordinates |
| p0 | corner node |
| p1 | corner node |
| p2 | corner node |
| p3 | corner node |
Definition at line 2007 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::interpolate_triangle | ( | Vector< T, dimension_const< N, 3 >::value > & | xi, |
| Vector< T, N > const & | p0, | ||
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2 | ||
| ) |
Given triangle nodes and a position in parametric coordinates, interpolate.
| xi | position in parametric coordinates |
| p0 | corner node |
| p1 | corner node |
| p2 | corner node |
Definition at line 2043 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::interpolate_hexahedron | ( | Vector< T, dimension_const< N, 3 >::value > & | xi, |
| Vector< T, N > const & | p0, | ||
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3, | ||
| Vector< T, N > const & | p4, | ||
| Vector< T, N > const & | p5, | ||
| Vector< T, N > const & | p6, | ||
| Vector< T, N > const & | p7 | ||
| ) |
Given hexahedron nodes and a position in parametric coordinates, interpolate.
| xi | position in parametric coordinates |
| p0 | corner node |
| p1 | corner node |
| p2 | corner node |
| p3 | corner node |
| p4 | corner node |
| p5 | corner node |
| p6 | corner node |
| p7 | corner node |
Definition at line 2067 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::interpolate_tetrahedron | ( | Vector< T, dimension_const< N, 4 >::value > & | xi, |
| Vector< T, N > const & | p0, | ||
| Vector< T, N > const & | p1, | ||
| Vector< T, N > const & | p2, | ||
| Vector< T, N > const & | p3 | ||
| ) |
Given tetrahedron nodes and a position in parametric coordinates, interpolate.
| xi | position in parametric coordinates |
| p0 | corner node |
| p1 | corner node |
| p2 | corner node |
| p3 | corner node |
Definition at line 2121 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::interpolate_element | ( | ELEMENT::Type | element_type, |
| Vector< T, M > & | xi, | ||
| std::vector< Vector< T, N > > const & | v | ||
| ) |
Given element type and nodes and a position in parametric coordinates, interpolate.
| element_type | element type |
| xi | position in parametric coordinates |
| v | ... corner nodes |
Definition at line 2147 of file MiniTensor_Geometry.h.
| std::vector< std::vector< T > > minitensor::distance_matrix | ( | std::vector< Vector< T, N > > const & | points | ) |
Given a vector of points, determine distances between all of them.
| points | vector of points |
Definition at line 2190 of file MiniTensor_Geometry.h.
| std::vector< T > minitensor::minimum_distances | ( | std::vector< std::vector< T > > const & | distances | ) |
Given a distance matrix, determine the minimum distance between two distinct points.
| distances | distance matrix |
Definition at line 2227 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION ELEMENT::Type minitensor::find_type | ( | Index const | dimension, |
| Index const | number_nodes | ||
| ) |
Given space dimension and number of (vertex) nodes, determine the type of a finite element.
Definition at line 1015 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION minitensor::SphericalParametrization< T, N >::SphericalParametrization | ( | Tensor4< T, N > const & | A | ) |
Constructor that takes material tangent
| A | material tangent (fourth-order tensor) |
Definition at line 1052 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION void minitensor::SphericalParametrization< T, N >::operator() | ( | Vector< T, dimension_const< N, 2 >::value > const & | parameters | ) |
Evaluate the localization determinant for the normal defined by the spherical angles and update the extrema found so far.
| parameters | spherical angles (phi, theta) |
Definition at line 1093 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::SphericalParametrization< T, N >::get_normal | ( | Vector< T, dimension_const< N, 2 >::value > const & | parameters | ) | const |
Unit normal for the given spherical angles.
| parameters | spherical angles (phi, theta) |
Definition at line 1071 of file MiniTensor_Geometry.h.
|
inline |
Smallest localization determinant found so far.
Definition at line 406 of file MiniTensor_Geometry.h.
|
inline |
Largest localization determinant found so far.
Definition at line 413 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the minimum determinant occurs.
Definition at line 420 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the maximum determinant occurs.
Definition at line 427 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the minimum determinant occurs.
Definition at line 434 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the maximum determinant occurs.
Definition at line 441 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION minitensor::StereographicParametrization< T, N >::StereographicParametrization | ( | Tensor4< T, N > const & | A | ) |
Constructor that takes material tangent
| A | material tangent (fourth-order tensor) |
Definition at line 1127 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::StereographicParametrization< T, N >::get_normal | ( | Vector< T, dimension_const< N, 2 >::value > const & | parameters | ) | const |
Unit normal from the inverse stereographic projection.
| parameters | stereographic projection coordinates (x, y) |
Definition at line 1146 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION void minitensor::StereographicParametrization< T, N >::operator() | ( | Vector< T, dimension_const< N, 2 >::value > const & | parameters | ) |
Evaluate the localization determinant for the normal defined by the stereographic coordinates and update the extrema found so far.
| parameters | stereographic projection coordinates (x, y) |
Definition at line 1173 of file MiniTensor_Geometry.h.
|
inline |
Smallest localization determinant found so far.
Definition at line 514 of file MiniTensor_Geometry.h.
|
inline |
Largest localization determinant found so far.
Definition at line 521 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the minimum determinant occurs.
Definition at line 528 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the maximum determinant occurs.
Definition at line 535 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the minimum determinant occurs.
Definition at line 542 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the maximum determinant occurs.
Definition at line 549 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION minitensor::ProjectiveParametrization< T, N >::ProjectiveParametrization | ( | Tensor4< T, N > const & | A | ) |
Constructor that takes material tangent
Definition at line 1207 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION void minitensor::ProjectiveParametrization< T, N >::operator() | ( | Vector< T, dimension_const< N, 3 >::value > const & | parameters | ) |
Evaluate the localization determinant for the normal defined by the projective coordinates and update the extrema found so far.
| parameters | homogeneous (projective) coordinates (x, y, z) |
Definition at line 1260 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::ProjectiveParametrization< T, N >::get_normal | ( | Vector< T, dimension_const< N, 3 >::value > const & | parameters | ) | const |
Normalized normal for the given homogeneous coordinates.
| parameters | homogeneous (projective) coordinates (x, y, z) |
Definition at line 1226 of file MiniTensor_Geometry.h.
|
inline |
Smallest localization determinant found so far.
Definition at line 621 of file MiniTensor_Geometry.h.
|
inline |
Largest localization determinant found so far.
Definition at line 628 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the minimum determinant occurs.
Definition at line 635 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the maximum determinant occurs.
Definition at line 642 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the minimum determinant occurs.
Definition at line 649 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the maximum determinant occurs.
Definition at line 656 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION minitensor::TangentParametrization< T, N >::TangentParametrization | ( | Tensor4< T, N > const & | A | ) |
Constructor that takes material tangent
Definition at line 1294 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION void minitensor::TangentParametrization< T, N >::operator() | ( | Vector< T, dimension_const< N, 2 >::value > const & | parameters | ) |
Evaluate the localization determinant for the normal defined by the tangent coordinates and update the extrema found so far.
| parameters | tangent coordinates (x, y) |
Definition at line 1346 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::TangentParametrization< T, N >::get_normal | ( | Vector< T, dimension_const< N, 2 >::value > const & | parameters | ) | const |
Unit normal from the exponential map of the tangent coordinates.
| parameters | tangent coordinates (x, y) |
Definition at line 1313 of file MiniTensor_Geometry.h.
|
inline |
Smallest localization determinant found so far.
Definition at line 729 of file MiniTensor_Geometry.h.
|
inline |
Largest localization determinant found so far.
Definition at line 736 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the minimum determinant occurs.
Definition at line 743 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the maximum determinant occurs.
Definition at line 750 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the minimum determinant occurs.
Definition at line 757 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the maximum determinant occurs.
Definition at line 764 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION minitensor::CartesianParametrization< T, N >::CartesianParametrization | ( | Tensor4< T, N > const & | A | ) |
Constructor that takes material tangent
| A | material tangent (fourth-order tensor) |
Definition at line 1380 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION void minitensor::CartesianParametrization< T, N >::operator() | ( | Vector< T, dimension_const< N, 3 >::value > const & | parameters | ) |
Evaluate the localization determinant for the normal defined by the Cartesian coordinates and update the extrema found so far.
| parameters | Cartesian components (x, y, z) |
Definition at line 1424 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION Vector< T, N > minitensor::CartesianParametrization< T, N >::get_normal | ( | Vector< T, dimension_const< N, 3 >::value > const & | parameters | ) | const |
Normal formed directly from the Cartesian components. Note: not normalized.
| parameters | Cartesian components (x, y, z) |
Definition at line 1399 of file MiniTensor_Geometry.h.
|
inline |
Smallest localization determinant found so far.
Definition at line 838 of file MiniTensor_Geometry.h.
|
inline |
Largest localization determinant found so far.
Definition at line 845 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the minimum determinant occurs.
Definition at line 852 of file MiniTensor_Geometry.h.
|
inline |
Parameters at which the maximum determinant occurs.
Definition at line 859 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the minimum determinant occurs.
Definition at line 866 of file MiniTensor_Geometry.h.
|
inline |
Normal at which the maximum determinant occurs.
Definition at line 873 of file MiniTensor_Geometry.h.
|
inline |
Default constructor
Definition at line 921 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION minitensor::ParametricGrid< T, N >::ParametricGrid | ( | Vector< T, N > const & | lower, |
| Vector< T, N > const & | upper, | ||
| Vector< Index, N > const & | points_per_dimension | ||
| ) |
Constructor that defines grid limits
| lower | lower limit |
| upper | upper limit |
| points_per_dimension | number of points in each dimension |
Definition at line 1456 of file MiniTensor_Geometry.h.
| KOKKOS_INLINE_FUNCTION void minitensor::ParametricGrid< T, N >::traverse | ( | Visitor & | visitor | ) | const |
Traverse the grid, applying the visitor to each grid point.
| visitor | functor to apply at each grid point |
Definition at line 1478 of file MiniTensor_Geometry.h.
|
private |
Material tangent
Definition at line 449 of file MiniTensor_Geometry.h.
|
private |
Minimum of the localization determinant
Definition at line 455 of file MiniTensor_Geometry.h.
|
private |
Parameters of the minimum
Definition at line 461 of file MiniTensor_Geometry.h.
|
private |
Maximum of the localization determinant
Definition at line 467 of file MiniTensor_Geometry.h.
|
private |
Parameters of the maximum
Definition at line 473 of file MiniTensor_Geometry.h.
|
private |
Material tangent
Definition at line 557 of file MiniTensor_Geometry.h.
|
private |
Minimum of the localization determinant
Definition at line 563 of file MiniTensor_Geometry.h.
|
private |
Parameters of the minimum
Definition at line 569 of file MiniTensor_Geometry.h.
|
private |
Maximum of the localization determinant
Definition at line 575 of file MiniTensor_Geometry.h.
|
private |
Parameters of the maximum
Definition at line 581 of file MiniTensor_Geometry.h.
|
private |
Material tangent
Definition at line 664 of file MiniTensor_Geometry.h.
|
private |
Minimum of the localization determinant
Definition at line 670 of file MiniTensor_Geometry.h.
|
private |
Parameters of the minimum
Definition at line 676 of file MiniTensor_Geometry.h.
|
private |
Maximum of the localization determinant
Definition at line 682 of file MiniTensor_Geometry.h.
|
private |
Parameters of the maximum
Definition at line 688 of file MiniTensor_Geometry.h.
|
private |
Material tangent
Definition at line 772 of file MiniTensor_Geometry.h.
|
private |
Minimum of the localization determinant
Definition at line 778 of file MiniTensor_Geometry.h.
|
private |
Parameters of the minimum
Definition at line 784 of file MiniTensor_Geometry.h.
|
private |
Maximum of the localization determinant
Definition at line 790 of file MiniTensor_Geometry.h.
|
private |
Parameters of the maximum
Definition at line 796 of file MiniTensor_Geometry.h.
|
private |
Material tangent
Definition at line 881 of file MiniTensor_Geometry.h.
|
private |
Minimum of the localization determinant
Definition at line 887 of file MiniTensor_Geometry.h.
|
private |
Parameters of the minimum
Definition at line 893 of file MiniTensor_Geometry.h.
|
private |
Maximum of the localization determinant
Definition at line 899 of file MiniTensor_Geometry.h.
|
private |
Parameters of the maximum
Definition at line 905 of file MiniTensor_Geometry.h.
|
private |
Lower limits of the grid
Definition at line 950 of file MiniTensor_Geometry.h.
|
private |
Upper limits of the grid
Definition at line 956 of file MiniTensor_Geometry.h.
|
private |
Number of grid points in each dimension
Definition at line 962 of file MiniTensor_Geometry.h.