Typedefs | |
| using | Point1D = std::array< double, 1 > |
| using | Point2D = std::array< double, 2 > |
| using | Point3D = std::array< double, 3 > |
Functions | |
| std::vector< int > | assignRanks (const std::vector< double > &x, int N_ranks) |
| Assign ranks to a point cloud. | |
| std::vector< int > | assignRanks (const std::vector< Point1D > &x, int N_ranks) |
| Assign ranks to a point cloud. | |
| std::vector< int > | assignRanks (const std::vector< Point2D > &x, int N_ranks) |
| Assign ranks to a point cloud. | |
| std::vector< int > | assignRanks (const std::vector< Point3D > &x, int N_ranks) |
| Assign ranks to a point cloud. | |
| template<int NP, int NDIM> | |
| std::array< double, NP > | barycentric (const std::array< std::array< double, NDIM >, NP > &x, const std::array< double, NDIM > &p) |
| Compute the barycentric coordinates. | |
| double | distance (const Point3D &x1, const Point3D &x2) |
| Compute the distance between two points. | |
| template<std::size_t NDIM> | |
| double | distanceToBox (const std::array< double, NDIM > &pos, const std::array< double, NDIM > &ang, const std::array< double, NDIM > &lb, const std::array< double, NDIM > &ub) |
| Compute the intersection of a ray and a box. | |
| double | distanceToCircle (double r, const Point2D &pos, const Point2D &ang) |
| Compute the intersection of a ray and circle (2D) | |
| double | distanceToCircularFrustum (double rb, double rt, double h, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and circular frustum. | |
| double | distanceToCone (const Point3D &V, double theta, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and cone. | |
| double | distanceToCylinder (double r, double h, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and cylinder. | |
| double | distanceToLine (const Point2D &pos, const Point2D &ang, const Point2D &v1, const Point2D &v2) |
| Compute the intersection of a ray and a line segment. | |
| double | distanceToLine (const Point3D &pos, const Point3D &ang, const Point3D &v1, const Point3D &v2) |
| Compute the intersection of a ray and a line segment. | |
| double | distanceToPlane (const Point3D &n, const Point3D &p0, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and an infinite plane. | |
| double | distanceToQuadrilateral (const std::array< Point2D, 4 > &quad, const Point2D &pos, const Point2D &ang) |
| Compute the intersection of a ray and quadrilateral. | |
| double | distanceToQuadrilateral (const std::array< Point3D, 4 > &quad, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and quadrilateral. | |
| double | distanceToSphere (double r, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and sphere. | |
| double | distanceToTetrahedron (const std::array< Point3D, 4 > &tet, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and tetrahedron. | |
| double | distanceToTriangle (const std::array< Point2D, 3 > &tri, const Point2D &pos, const Point2D &ang) |
| Compute the intersection of a ray and triangle. | |
| double | distanceToTriangle (const std::array< Point3D, 3 > &tri, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and triangle. | |
| double | distanceToTube (double r1, double r2, double h, const Point3D &pos, const Point3D &ang) |
| Compute the intersection of a ray and tube. | |
| std::vector< Point2D > | get_poly_vertices (int N, double R) |
| Get the Vertices of a regular polygon. | |
| Point2D | map_circle_logical (double R, int method, double x, double y) |
| Map physical coordinates to the logical coordinates. | |
| Point2D | map_logical_circle (double R, int method, double x, double y) |
| Map logical coordinates to a circle. | |
| Point2D | map_logical_poly (int N, double R, double x, double y) |
| Map logical coordinates to a regular polygon. | |
| Point3D | map_logical_shell (double r1, double r2, double x, double y, double z) |
| Map logical coordinates to a shell. | |
| Point3D | map_logical_sphere (double R, double x, double y, double z) |
| Map logical coordinates to a sphere. | |
| Point3D | map_logical_sphere_surface (int method, double R, double x, double y) |
| Map logical coordinates to the surface of a sphere. | |
| Point2D | map_poly_logical (int N, double R, double x, double y) |
| Map physical coordinates to the logical coordinates. | |
| Point3D | map_shell_logical (double r1, double r2, double x, double y, double z) |
| Map a shell to logical coordinates. | |
| Point3D | map_sphere_logical (double R, double x, double y, double z) |
| Map logical coordinates to a sphere. | |
| Point2D | map_sphere_surface_logical (int method, double R, double x, double y, double z) |
| Map coordinates from the surface of a sphere to logical. | |
| Point2D | nearest (const Point2D &v1, const Point2D &v2, const Point2D &p) |
| Find the nearest point to a line segment. | |
| Point3D | nearest (const Point3D &v1, const Point3D &v2, const Point3D &p) |
| Find the nearest point to a line segment. | |
| Point3D | nearest (const std::array< Point3D, 3 > &v, const Point3D &p) |
| Find the nearest point to a triangle. | |
| Point3D | nearest (const std::array< Point3D, 4 > &v, const Point3D &p) |
| Find the nearest point to a tetrahedron. | |
| Point2D | normal (const Point2D &a, const Point2D &b) |
| Compute the normal to a line defined by 2 points. | |
| Point3D | normal (const Point3D &a, const Point3D &b, const Point3D &c) |
| Compute the normal to a plane defined by 3 points. | |
| Point3D | normalToQuadrilateral (const std::array< Point3D, 4 > &quad) |
| Compute the normal to a quadrilateral. | |
| std::vector< Point3D > | sampleLine (const std::array< Point3D, 2 > &v, double d0, bool interior=true) |
| Sample a line. | |
| std::vector< Point3D > | sampleQuad (const std::array< Point3D, 4 > &v, double d0, bool interior=true) |
| Sample a line. | |
| std::vector< Point3D > | sampleTet (const std::array< Point3D, 4 > &v, double d0, bool interior=true) |
| Sample a line. | |
| std::vector< Point3D > | sampleTri (const std::array< Point3D, 3 > &v, double d0, bool interior=true) |
| Sample a line. | |
| std::vector< AMP::Mesh::Point > | subdivide (const std::array< AMP::Mesh::Point, 3 > &v, double res) |
| Subdivide a triangle. | |
| using AMP::Geometry::GeometryHelpers::Point1D = typedef std::array<double, 1> |
Definition at line 17 of file GeometryHelpers.h.
| using AMP::Geometry::GeometryHelpers::Point2D = typedef std::array<double, 2> |
Definition at line 18 of file GeometryHelpers.h.
| using AMP::Geometry::GeometryHelpers::Point3D = typedef std::array<double, 3> |
Definition at line 19 of file GeometryHelpers.h.
| std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks | ( | const std::vector< double > & | x, |
| int | N_ranks | ||
| ) |
Assign ranks to a point cloud.
This routine will divide a point cloud spatially and assign ranks to a point cloud.
| [in] | x | Points |
| [in] | N_ranks | Number of processors |
| std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks | ( | const std::vector< Point1D > & | x, |
| int | N_ranks | ||
| ) |
Assign ranks to a point cloud.
This routine will divide a point cloud spatially and assign ranks to a point cloud.
| [in] | x | Points |
| [in] | N_ranks | Number of processors |
| std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks | ( | const std::vector< Point2D > & | x, |
| int | N_ranks | ||
| ) |
Assign ranks to a point cloud.
This routine will divide a point cloud spatially and assign ranks to a point cloud.
| [in] | x | Points |
| [in] | N_ranks | Number of processors |
| std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks | ( | const std::vector< Point3D > & | x, |
| int | N_ranks | ||
| ) |
Assign ranks to a point cloud.
This routine will divide a point cloud spatially and assign ranks to a point cloud.
| [in] | x | Points |
| [in] | N_ranks | Number of processors |
| std::array< double, NP > AMP::Geometry::GeometryHelpers::barycentric | ( | const std::array< std::array< double, NDIM >, NP > & | x, |
| const std::array< double, NDIM > & | p | ||
| ) |
Compute the barycentric coordinates.
This function will compute the barycentric coordinates determine the normal.
| [in] | x | Vertices |
| [in] | p | Point of interest |
Compute the distance between two points.
This function will compute the distance between two points
| [in] | x1 | First point |
| [in] | x2 | Second point |
| double AMP::Geometry::GeometryHelpers::distanceToBox | ( | const std::array< double, NDIM > & | pos, |
| const std::array< double, NDIM > & | ang, | ||
| const std::array< double, NDIM > & | lb, | ||
| const std::array< double, NDIM > & | ub | ||
| ) |
Compute the intersection of a ray and a box.
This function will compute the intersection of a ray with a box. If the ray will never intersect the object, this distance is inf.
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| [in] | lb | Lower bound of the box |
| [in] | ub | Upper bound of the box |
| double AMP::Geometry::GeometryHelpers::distanceToCircle | ( | double | r, |
| const Point2D & | pos, | ||
| const Point2D & | ang | ||
| ) |
Compute the intersection of a ray and circle (2D)
This function will compute the intersection of a ray with a circle. It assumes a circle of radius r centered at the origin. If the ray is inside the cylinder the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | r | Radius of circle |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToCircularFrustum | ( | double | rb, |
| double | rt, | ||
| double | h, | ||
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and circular frustum.
This function will compute the intersection of a ray with a circular frustum. It assumes the circular frustum is located at the origin (base radius), with the given height, oriented in the +z direction. If the ray is inside the cone the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | rb | Base radius |
| [in] | rt | Top radius |
| [in] | h | Object height |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToCone | ( | const Point3D & | V, |
| double | theta, | ||
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and cone.
This function will compute the intersection of a ray with a cone. It assumes a cone with the apex at the origin in the direction given by V. If the ray is inside the cone the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | V | Direction of cone |
| [in] | theta | Apex angle of cone |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToCylinder | ( | double | r, |
| double | h, | ||
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and cylinder.
This function will compute the intersection of a ray with a cylinder. It assumes a cylinder of radius r and height h, centered at the origin along the z axis: z=[-h/2,h/2]. If the ray is inside the cylinder the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | r | Radius of cylinder |
| [in] | h | Height of cylinder |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToLine | ( | const Point2D & | pos, |
| const Point2D & | ang, | ||
| const Point2D & | v1, | ||
| const Point2D & | v2 | ||
| ) |
Compute the intersection of a ray and a line segment.
This function will compute the intersection of a ray with a line segment. If the ray will never intersect the object, this distance is inf.
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| [in] | v1 | First vertex |
| [in] | v2 | Second vertex |
| double AMP::Geometry::GeometryHelpers::distanceToLine | ( | const Point3D & | pos, |
| const Point3D & | ang, | ||
| const Point3D & | v1, | ||
| const Point3D & | v2 | ||
| ) |
Compute the intersection of a ray and a line segment.
This function will compute the intersection of a ray with a line segment. If the ray will never intersect the object, this distance is inf.
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| [in] | v1 | First vertex |
| [in] | v2 | Second vertex |
| double AMP::Geometry::GeometryHelpers::distanceToPlane | ( | const Point3D & | n, |
| const Point3D & | p0, | ||
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and an infinite plane.
This function will compute the intersection of a ray with an infinite plane. The plane is described by the normal and a point on the plane. If the ray will never intersect the object, this distance is inf.
| [in] | n | Normal to the plane |
| [in] | p0 | A point on the plane |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToQuadrilateral | ( | const std::array< Point2D, 4 > & | quad, |
| const Point2D & | pos, | ||
| const Point2D & | ang | ||
| ) |
Compute the intersection of a ray and quadrilateral.
This function will compute the intersection of a ray with a quadrilateral. If the ray is inside the cone the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | quad | Triangle coordinates |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToQuadrilateral | ( | const std::array< Point3D, 4 > & | quad, |
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and quadrilateral.
This function will compute the intersection of a ray with a quadrilateral. If the ray is inside the cone the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | quad | Triangle coordinates |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToSphere | ( | double | r, |
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and sphere.
This function will compute the intersection of a ray with a cylinder. It assumes a sphere of radius r and height h, centered at the origin. If the ray is inside the cylinder the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | r | Radius of cylinder |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToTetrahedron | ( | const std::array< Point3D, 4 > & | tet, |
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and tetrahedron.
This function will compute the intersection of a ray with a tetrahedron. If the ray is inside the cone the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | tet | Tetrahedron coordinates |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToTriangle | ( | const std::array< Point2D, 3 > & | tri, |
| const Point2D & | pos, | ||
| const Point2D & | ang | ||
| ) |
Compute the intersection of a ray and triangle.
This function will compute the intersection of a ray with a triangle. If the ray is inside the cone the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | tri | Triangle coordinates |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToTriangle | ( | const std::array< Point3D, 3 > & | tri, |
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and triangle.
This function will compute the intersection of a ray with a triangle. If the ray is inside the cone the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | tri | Triangle coordinates |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| double AMP::Geometry::GeometryHelpers::distanceToTube | ( | double | r1, |
| double | r2, | ||
| double | h, | ||
| const Point3D & | pos, | ||
| const Point3D & | ang | ||
| ) |
Compute the intersection of a ray and tube.
This function will compute the intersection of a ray with a tube. It assumes a tube ith inner radius r1, outer radius r2, and height h centered at the origin along the z axis: z=[-h/2,h/2]. If the ray is inside the cylinder the distance is negative. If the ray will never intersect the object, this distance is inf.
| [in] | r1 | Inner radius of cylinder |
| [in] | r2 | Outer radius of cylinder |
| [in] | h | Height of cylinder |
| [in] | pos | Starting point of ray |
| [in] | ang | Direction of ray |
| std::vector< Point2D > AMP::Geometry::GeometryHelpers::get_poly_vertices | ( | int | N, |
| double | R | ||
| ) |
Get the Vertices of a regular polygon.
This function will return the Vertices of a N-sided polygon that is compatible with the functions map_logical_poly and map_poly_logical.
| [in] | N | Number of faces |
| [in] | R | Radius of circumcircle |
| Point2D AMP::Geometry::GeometryHelpers::map_circle_logical | ( | double | R, |
| int | method, | ||
| double | x, | ||
| double | y | ||
| ) |
Map physical coordinates to the logical coordinates.
This function will map physical coordinates (x,y) coordinates in a circle to [0,1] logical coordinates. It uses the inverse of the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains", SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008) There are 3 methods to choose from: 1 - D(d) = r*d/sqrt(2), R(d) = r*d 2 - D(d) = r*d/sqrt(2), R(d) = r 3 - D(d) = r*d*(2-d)/sqrt(2), R(d) = r1
| [in] | R | Radius of circle |
| [in] | method | Method to map |
| [in] | x | Physical x coordinate |
| [in] | y | Physical y coordinate |
| Point2D AMP::Geometry::GeometryHelpers::map_logical_circle | ( | double | R, |
| int | method, | ||
| double | x, | ||
| double | y | ||
| ) |
Map logical coordinates to a circle.
This function will map logical coordinates in [0,1] to (x,y) coordinates in a circle. It uses the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains", SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008) There are 3 methods to choose from: 1 - D(d) = r*d/sqrt(2), R(d) = r*d 2 - D(d) = r*d/sqrt(2), R(d) = r 3 - D(d) = r*d*(2-d)/sqrt(2), R(d) = r1
| [in] | R | Radius of circle |
| [in] | method | Method to map |
| [in] | x | Logical x coordinate |
| [in] | y | Logical y coordinate |
| Point2D AMP::Geometry::GeometryHelpers::map_logical_poly | ( | int | N, |
| double | R, | ||
| double | x, | ||
| double | y | ||
| ) |
Map logical coordinates to a regular polygon.
This function will map logical coordinates in [0,1] to (x,y) coordinates in a regular polygon.
| [in] | N | Number of faces |
| [in] | R | Radius of circumcircle |
| [in] | x | Logical x coordinate |
| [in] | y | Logical y coordinate |
| Point3D AMP::Geometry::GeometryHelpers::map_logical_shell | ( | double | r1, |
| double | r2, | ||
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Map logical coordinates to a shell.
This function will map logical coordinates in [0,1] to (x,y,z) coordinates in a shell. It uses the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains", SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008)
| [in] | r1 | Inner radius of shell |
| [in] | r2 | Outer radius of shell |
| [in] | x | Logical x coordinate |
| [in] | y | Logical y coordinate |
| [in] | z | Logical z coordinate |
| Point3D AMP::Geometry::GeometryHelpers::map_logical_sphere | ( | double | R, |
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Map logical coordinates to a sphere.
This function will map logical coordinates in [0,1] to (x,y,z) coordinates in a sphere. It uses the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains", SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008)
| [in] | R | Radius of sphere |
| [in] | x | Logical x coordinate |
| [in] | y | Logical y coordinate |
| [in] | z | Logical z coordinate |
| Point3D AMP::Geometry::GeometryHelpers::map_logical_sphere_surface | ( | int | method, |
| double | R, | ||
| double | x, | ||
| double | y | ||
| ) |
Map logical coordinates to the surface of a sphere.
This function will map logical coordinates in [0,1] to (x,y,z) coordinates on the surface of a sphere. It uses the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains", SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008)
| [in] | method | Method to use: 1 - Use method in Calhoun, requires extra attention to boundary conditions 2 - Half sphere mapping 3 - Spherical coordinates |
| [in] | R | Radius of sphere |
| [in] | x | Logical x coordinate |
| [in] | y | Logical y coordinate |
| Point2D AMP::Geometry::GeometryHelpers::map_poly_logical | ( | int | N, |
| double | R, | ||
| double | x, | ||
| double | y | ||
| ) |
Map physical coordinates to the logical coordinates.
This function will map physical coordinates (x,y) coordinates in a regular polygon to [0,1] logical coordinates.
| [in] | N | Number of faces |
| [in] | R | Radius of circumcircle |
| [in] | x | Physical x coordinate |
| [in] | y | Physical y coordinate |
| Point3D AMP::Geometry::GeometryHelpers::map_shell_logical | ( | double | r1, |
| double | r2, | ||
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Map a shell to logical coordinates.
This function will map (x,y,z) coordinates in a shell to logical coordinates in [0,1]. It uses the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains", SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008)
| [in] | r1 | Inner radius of shell |
| [in] | r2 | Outer radius of shell |
| [in] | x | Logical x coordinate |
| [in] | y | Logical y coordinate |
| [in] | z | Logical z coordinate |
| Point3D AMP::Geometry::GeometryHelpers::map_sphere_logical | ( | double | R, |
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Map logical coordinates to a sphere.
This function will map physical coordinates in (x,y,z) to [0,1] locial coordinates in a sphere. It uses the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains",Point3D SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008)
| [in] | R | Radius of sphere |
| [in] | x | Physical x coordinate |
| [in] | y | Physical y coordinate |
| [in] | z | Physical z coordinate |
| Point2D AMP::Geometry::GeometryHelpers::map_sphere_surface_logical | ( | int | method, |
| double | R, | ||
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Map coordinates from the surface of a sphere to logical.
This function will map the (x,y,z) coordinates on the surface of a sphere to logical coordinates in [0,1]. It uses the mapping by: Dona Calhoun, Christiane Helzel, Randall LeVeque, "Logically Rectangular Grids and Finite Volume Methods for PDEs in Circular and Spherical Domains", SIAM Review, Vol. 50, No. 4, pp. 723-752 (2008)
| [in] | method | Method to use: 1 - Use method in Calhoun, requires extra attention to boundary conditions 2 - Half sphere mapping 3 - Spherical coordinates |
| [in] | R | Radius of sphere |
| [in] | x | Physical x coordinate |
| [in] | y | Physical y coordinate |
| [in] | z | Physical z coordinate |
| Point2D AMP::Geometry::GeometryHelpers::nearest | ( | const Point2D & | v1, |
| const Point2D & | v2, | ||
| const Point2D & | p | ||
| ) |
Find the nearest point to a line segment.
This function will compute the nearest point to a line segment in 2D.
| [in] | v1 | First vertex |
| [in] | v2 | Second vertex |
| [in] | p | Point of interest |
| Point3D AMP::Geometry::GeometryHelpers::nearest | ( | const Point3D & | v1, |
| const Point3D & | v2, | ||
| const Point3D & | p | ||
| ) |
Find the nearest point to a line segment.
This function will compute the nearest point to a line segment in 3D.
| [in] | v1 | First vertex |
| [in] | v2 | Second vertex |
| [in] | p | Point of interest |
| Point3D AMP::Geometry::GeometryHelpers::nearest | ( | const std::array< Point3D, 3 > & | v, |
| const Point3D & | p | ||
| ) |
Find the nearest point to a triangle.
This function will compute the nearest point to a triangle defined by three points in 3D.
| [in] | v | Vertices |
| [in] | p | Point of interest |
| Point3D AMP::Geometry::GeometryHelpers::nearest | ( | const std::array< Point3D, 4 > & | v, |
| const Point3D & | p | ||
| ) |
Find the nearest point to a tetrahedron.
This function will compute the nearest point to a tetrahedron defined by three points in 3D.
| [in] | v | Vertices |
| [in] | p | Point of interest |
Compute the normal to a line defined by 2 points.
This function will compute the normal to a line defined by two points. The order of the points will determine the normal.
| [in] | a | First point |
| [in] | b | Second point |
| Point3D AMP::Geometry::GeometryHelpers::normal | ( | const Point3D & | a, |
| const Point3D & | b, | ||
| const Point3D & | c | ||
| ) |
Compute the normal to a plane defined by 3 points.
This function will compute the normal to a plane defined by three points. The order of the points will determine the normal.
| [in] | a | First point |
| [in] | b | Second point |
| [in] | c | Third point |
| Point3D AMP::Geometry::GeometryHelpers::normalToQuadrilateral | ( | const std::array< Point3D, 4 > & | quad | ) |
Compute the normal to a quadrilateral.
This function will compute the normal to a quadrilateral. Since the points within the quadrilateral may not be co-planer, this will approximate the normal by dividing the quadrilateral into 4 triangles, computing the normal to each triangle, and then averaging the normal.
| [in] | quad | Triangle coordinates |
| std::vector< Point3D > AMP::Geometry::GeometryHelpers::sampleLine | ( | const std::array< Point3D, 2 > & | v, |
| double | d0, | ||
| bool | interior = true |
||
| ) |
Sample a line.
Compute points on a line such that no point along the line is farther than d0 from a sample point
| [in] | v | Vertices |
| [in] | d0 | Maximum distance between points |
| [in] | interior | Choose interior points (default) or include the Vertices |
| std::vector< Point3D > AMP::Geometry::GeometryHelpers::sampleQuad | ( | const std::array< Point3D, 4 > & | v, |
| double | d0, | ||
| bool | interior = true |
||
| ) |
Sample a line.
Compute points on a line such that no point within a quadrilateral is farther than d0 from a sample point
| [in] | v | Vertices |
| [in] | d0 | Maximum distance between points |
| [in] | interior | Choose interior points (default) or include the Vertices |
| std::vector< Point3D > AMP::Geometry::GeometryHelpers::sampleTet | ( | const std::array< Point3D, 4 > & | v, |
| double | d0, | ||
| bool | interior = true |
||
| ) |
Sample a line.
Compute points on a line such that no point within a tetrahedron is farther than d0 from a sample point
| [in] | v | Vertices |
| [in] | d0 | Maximum distance between points |
| [in] | interior | Choose interior points (default) or include the Vertices |
| std::vector< Point3D > AMP::Geometry::GeometryHelpers::sampleTri | ( | const std::array< Point3D, 3 > & | v, |
| double | d0, | ||
| bool | interior = true |
||
| ) |
Sample a line.
Compute points on a triangle such that no point within the triangle is farther than d0 from a sample point
| [in] | v | Vertices |
| [in] | d0 | Maximum distance between points |
| [in] | interior | Choose interior points (default) or include the Vertices |
| std::vector< AMP::Mesh::Point > AMP::Geometry::GeometryHelpers::subdivide | ( | const std::array< AMP::Mesh::Point, 3 > & | v, |
| double | res | ||
| ) |
Subdivide a triangle.
Given the Vertices of a triangle, sub-divide the triangle recursively until it is with the resolution, returning the new set of points
| [in] | v | Vertices |
| [in] | res | Desired resolution |
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |