Advanced Multi-Physics (AMP)
On-Line Documentation
Namespaces | Typedefs | Functions
GeometryHelpers.h File Reference
#include "AMP/utils/MeshPoint.h"
#include <array>
#include <vector>
Include dependency graph for GeometryHelpers.h:

Go to the source code of this file.

Namespaces

namespace  AMP
 
namespace  AMP::Geometry
 
namespace  AMP::Geometry::GeometryHelpers
 
namespace  AMP::Mesh
 

Typedefs

using AMP::Mesh::Point = AMP::Mesh::MeshPoint< double >
 
using AMP::Geometry::GeometryHelpers::Point1D = std::array< double, 1 >
 
using AMP::Geometry::GeometryHelpers::Point2D = std::array< double, 2 >
 
using AMP::Geometry::GeometryHelpers::Point3D = std::array< double, 3 >
 

Functions

std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks (const std::vector< double > &x, int N_ranks)
 Assign ranks to a point cloud.
 
std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks (const std::vector< Point1D > &x, int N_ranks)
 Assign ranks to a point cloud.
 
std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks (const std::vector< Point2D > &x, int N_ranks)
 Assign ranks to a point cloud.
 
std::vector< int > AMP::Geometry::GeometryHelpers::assignRanks (const std::vector< Point3D > &x, int N_ranks)
 Assign ranks to a point cloud.
 
template<int NP, int NDIM>
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.
 
double AMP::Geometry::GeometryHelpers::distance (const Point3D &x1, const Point3D &x2)
 Compute the distance between two points.
 
template<std::size_t NDIM>
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.
 
double AMP::Geometry::GeometryHelpers::distanceToCircle (double r, const Point2D &pos, const Point2D &ang)
 Compute the intersection of a ray and circle (2D)
 
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.
 
double AMP::Geometry::GeometryHelpers::distanceToCone (const Point3D &V, double theta, const Point3D &pos, const Point3D &ang)
 Compute the intersection of a ray and cone.
 
double AMP::Geometry::GeometryHelpers::distanceToCylinder (double r, double h, const Point3D &pos, const Point3D &ang)
 Compute the intersection of a ray and cylinder.
 
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.
 
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.
 
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.
 
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.
 
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.
 
double AMP::Geometry::GeometryHelpers::distanceToSphere (double r, const Point3D &pos, const Point3D &ang)
 Compute the intersection of a ray and sphere.
 
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.
 
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.
 
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.
 
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.
 
std::vector< Point2DAMP::Geometry::GeometryHelpers::get_poly_vertices (int N, double R)
 Get the Vertices of a regular polygon.
 
Point2D AMP::Geometry::GeometryHelpers::map_circle_logical (double R, int method, double x, double y)
 Map physical coordinates to the logical coordinates.
 
Point2D AMP::Geometry::GeometryHelpers::map_logical_circle (double R, int method, double x, double y)
 Map logical coordinates to a circle.
 
Point2D AMP::Geometry::GeometryHelpers::map_logical_poly (int N, double R, double x, double y)
 Map logical coordinates to a regular polygon.
 
Point3D AMP::Geometry::GeometryHelpers::map_logical_shell (double r1, double r2, double x, double y, double z)
 Map logical coordinates to a shell.
 
Point3D AMP::Geometry::GeometryHelpers::map_logical_sphere (double R, double x, double y, double z)
 Map logical coordinates to a sphere.
 
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.
 
Point2D AMP::Geometry::GeometryHelpers::map_poly_logical (int N, double R, double x, double y)
 Map physical coordinates to the logical coordinates.
 
Point3D AMP::Geometry::GeometryHelpers::map_shell_logical (double r1, double r2, double x, double y, double z)
 Map a shell to logical coordinates.
 
Point3D AMP::Geometry::GeometryHelpers::map_sphere_logical (double R, double x, double y, double z)
 Map logical coordinates to a sphere.
 
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.
 
Point2D AMP::Geometry::GeometryHelpers::nearest (const Point2D &v1, const Point2D &v2, const Point2D &p)
 Find the nearest point to a line segment.
 
Point3D AMP::Geometry::GeometryHelpers::nearest (const Point3D &v1, const Point3D &v2, const Point3D &p)
 Find the nearest point to a line segment.
 
Point3D AMP::Geometry::GeometryHelpers::nearest (const std::array< Point3D, 3 > &v, const Point3D &p)
 Find the nearest point to a triangle.
 
Point3D AMP::Geometry::GeometryHelpers::nearest (const std::array< Point3D, 4 > &v, const Point3D &p)
 Find the nearest point to a tetrahedron.
 
Point2D AMP::Geometry::GeometryHelpers::normal (const Point2D &a, const Point2D &b)
 Compute the normal to a line defined by 2 points.
 
Point3D AMP::Geometry::GeometryHelpers::normal (const Point3D &a, const Point3D &b, const Point3D &c)
 Compute the normal to a plane defined by 3 points.
 
Point3D AMP::Geometry::GeometryHelpers::normalToQuadrilateral (const std::array< Point3D, 4 > &quad)
 Compute the normal to a quadrilateral.
 
std::vector< Point3DAMP::Geometry::GeometryHelpers::sampleLine (const std::array< Point3D, 2 > &v, double d0, bool interior=true)
 Sample a line.
 
std::vector< Point3DAMP::Geometry::GeometryHelpers::sampleQuad (const std::array< Point3D, 4 > &v, double d0, bool interior=true)
 Sample a line.
 
std::vector< Point3DAMP::Geometry::GeometryHelpers::sampleTet (const std::array< Point3D, 4 > &v, double d0, bool interior=true)
 Sample a line.
 
std::vector< Point3DAMP::Geometry::GeometryHelpers::sampleTri (const std::array< Point3D, 3 > &v, double d0, bool interior=true)
 Sample a line.
 
std::vector< AMP::Mesh::PointAMP::Geometry::GeometryHelpers::subdivide (const std::array< AMP::Mesh::Point, 3 > &v, double res)
 Subdivide a triangle.
 



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page