|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include "Structure/BoundaryGeometry.h"#include <algorithm>#include <cmath>#include <ctime>#include <filesystem>#include <fstream>#include <string>#include "H5hut.h"#include <cfloat>#include "AbstractObjects/OpalData.h"#include "Algorithms/PartBunchBase.h"#include "Expressions/SRefExpr.h"#include "Elements/OpalBeamline.h"#include "Physics/Physics.h"#include "Utilities/OpalException.h"#include "Utilities/Options.h"#include <gsl/gsl_sys.h>#include <boost/filesystem.hpp>
Go to the source code of this file.
Classes | |
| class | Triangle |
| class | Ray |
| class | Voxel |
Namespaces | |
| namespace | cmp_diff |
| namespace | cmp_ulp_obsolete |
| namespace | cmp_ulp |
Macros | |
| #define | SQR(x) ((x)*(x)) |
| #define | PointID(triangle_id, vertex_id) Triangles_m[triangle_id][vertex_id] |
| #define | Point(triangle_id, vertex_id) Points_m[Triangles_m[triangle_id][vertex_id]] |
| #define | FUNC_EQ(x, y) |
| #define | FUNC_EQ_ZERO(x) |
| #define | FUNC_LE(x, y) |
| #define | FUNC_LE_ZERO(x) |
| #define | FUNC_LT(x, y) |
| #define | FUNC_LT_ZERO(x) |
| #define | FUNC_GE(x, y) |
| #define | FUNC_GE_ZERO(x) |
| #define | FUNC_GT(x, y) |
| #define | FUNC_GT_ZERO(x) |
| #define | INSIDE 0 |
| #define | OUTSIDE 1 |
| #define | LERP(a, b, t) (a + t * (b - a)) |
| #define | mapPoint2VoxelIndices(pt, i, j, k) |
Functions | |
| bool | cmp_diff::almost_eq (double A, double B, double maxDiff=1e-15, double maxRelDiff=DBL_EPSILON) |
| bool | cmp_diff::almost_eq_zero (double A, double maxDiff=1e-15) |
| bool | cmp_diff::eq (double x, double y) |
| bool | cmp_diff::eq_zero (double x) |
| bool | cmp_diff::le (double x, double y) |
| bool | cmp_diff::le_zero (double x) |
| bool | cmp_diff::lt (double x, double y) |
| bool | cmp_diff::lt_zero (double x) |
| bool | cmp_diff::ge (double x, double y) |
| bool | cmp_diff::ge_zero (double x) |
| bool | cmp_diff::gt (double x, double y) |
| bool | cmp_diff::gt_zero (double x) |
| bool | cmp_ulp_obsolete::almost_eq (double A, double B, double maxDiff=1e-20, int maxUlps=1000) |
| bool | cmp_ulp_obsolete::almost_eq_zero (double A, double maxDiff=1e-15) |
| bool | cmp_ulp_obsolete::eq (double x, double y) |
| bool | cmp_ulp_obsolete::eq_zero (double x) |
| bool | cmp_ulp_obsolete::le (double x, double y) |
| bool | cmp_ulp_obsolete::le_zero (double x) |
| bool | cmp_ulp_obsolete::lt (double x, double y) |
| bool | cmp_ulp_obsolete::lt_zero (double x) |
| bool | cmp_ulp_obsolete::ge (double x, double y) |
| bool | cmp_ulp_obsolete::ge_zero (double x) |
| bool | cmp_ulp_obsolete::gt (double x, double y) |
| bool | cmp_ulp_obsolete::gt_zero (double x) |
| bool | cmp_ulp::almost_eq (double A, double B, double maxDiff=1e-20, int maxUlps=1000) |
| bool | cmp_ulp::almost_eq_zero (double A, double maxDiff=1e-15) |
| bool | cmp_ulp::eq (double x, double y) |
| bool | cmp_ulp::eq_zero (double x) |
| bool | cmp_ulp::le (double x, double y) |
| bool | cmp_ulp::le_zero (double x) |
| bool | cmp_ulp::lt (double x, double y) |
| bool | cmp_ulp::lt_zero (double x) |
| bool | cmp_ulp::ge (double x, double y) |
| bool | cmp_ulp::ge_zero (double x) |
| bool | cmp_ulp::gt (double x, double y) |
| bool | cmp_ulp::gt_zero (double x) |
| static int | face_plane (const Vector_t &p) |
| static int | bevel_2d (const Vector_t &p) |
| static int | bevel_3d (const Vector_t &p) |
| static int | check_point (const Vector_t &p1, const Vector_t &p2, const double alpha, const int mask) |
| static int | check_line (const Vector_t &p1, const Vector_t &p2, const int outcode_diff) |
| static int | SIGN3 (Vector_t A) |
| static int | point_triangle_intersection (const Vector_t &p, const Triangle &t) |
| static int | triangle_intersects_cube (const Triangle &t) |
| static Vector_t | normalVector (const Vector_t &A, const Vector_t &B, const Vector_t &C) |
| static double | computeArea (const Vector_t &A, const Vector_t &B, const Vector_t &C) |
| static double | magnitude (const Vector_t &v) |
Variables | |
| Inform * | gmsg |
| constexpr double | EPS = 10e-15 |
| #define FUNC_EQ | ( | x, | |
| y | |||
| ) |
Definition at line 63 of file BoundaryGeometry.cpp.
| #define FUNC_EQ_ZERO | ( | x | ) |
Definition at line 67 of file BoundaryGeometry.cpp.
| #define FUNC_GE | ( | x, | |
| y | |||
| ) |
Definition at line 99 of file BoundaryGeometry.cpp.
| #define FUNC_GE_ZERO | ( | x | ) |
Definition at line 106 of file BoundaryGeometry.cpp.
| #define FUNC_GT | ( | x, | |
| y | |||
| ) |
Definition at line 113 of file BoundaryGeometry.cpp.
| #define FUNC_GT_ZERO | ( | x | ) |
Definition at line 120 of file BoundaryGeometry.cpp.
| #define FUNC_LE | ( | x, | |
| y | |||
| ) |
Definition at line 71 of file BoundaryGeometry.cpp.
| #define FUNC_LE_ZERO | ( | x | ) |
Definition at line 78 of file BoundaryGeometry.cpp.
| #define FUNC_LT | ( | x, | |
| y | |||
| ) |
Definition at line 85 of file BoundaryGeometry.cpp.
| #define FUNC_LT_ZERO | ( | x | ) |
Definition at line 92 of file BoundaryGeometry.cpp.
| #define INSIDE 0 |
Definition at line 415 of file BoundaryGeometry.cpp.
| #define mapPoint2VoxelIndices | ( | pt, | |
| i, | |||
| j, | |||
| k | |||
| ) |
Definition at line 1543 of file BoundaryGeometry.cpp.
| #define OUTSIDE 1 |
Definition at line 416 of file BoundaryGeometry.cpp.
| #define Point | ( | triangle_id, | |
| vertex_id | |||
| ) | Points_m[Triangles_m[triangle_id][vertex_id]] |
Definition at line 49 of file BoundaryGeometry.cpp.
| #define PointID | ( | triangle_id, | |
| vertex_id | |||
| ) | Triangles_m[triangle_id][vertex_id] |
Definition at line 48 of file BoundaryGeometry.cpp.
| #define SQR | ( | x | ) | ((x)*(x)) |
Definition at line 47 of file BoundaryGeometry.cpp.
|
inlinestatic |
Definition at line 494 of file BoundaryGeometry.cpp.
References cmp_ulp::gt().
Referenced by triangle_intersects_cube().

|
inlinestatic |
Definition at line 520 of file BoundaryGeometry.cpp.
References cmp_ulp::gt().
Referenced by triangle_intersects_cube().

|
inlinestatic |
Definition at line 570 of file BoundaryGeometry.cpp.
References check_point(), INSIDE, and OUTSIDE.
Referenced by triangle_intersects_cube().

|
inlinestatic |
Definition at line 545 of file BoundaryGeometry.cpp.
References Physics::alpha, face_plane(), and LERP.
Referenced by check_line().

|
inlinestatic |
Definition at line 928 of file BoundaryGeometry.cpp.
Referenced by BoundaryGeometry::initialize().

|
inlinestatic |
Definition at line 474 of file BoundaryGeometry.cpp.
References cmp_ulp::gt(), and cmp_ulp::lt().
Referenced by check_point(), and triangle_intersects_cube().

|
inlinestatic |
Definition at line 1250 of file BoundaryGeometry.cpp.
Referenced by TrimCoilMirrored::doApplyField(), BoundaryGeometry::fastIsInside(), Corrector::goOnline(), RingSection::normalise(), normalVector(), and Corrector::setDesignEnergy().

|
inlinestatic |
Definition at line 916 of file BoundaryGeometry.cpp.
References cross(), cmp_ulp::gt_zero(), magnitude(), PAssert, SQR, and sqrt().
Referenced by BoundaryGeometry::initialize().

Definition at line 605 of file BoundaryGeometry.cpp.
References cross(), cmp_ulp::gt(), INSIDE, cmp_ulp::lt(), max(), min(), OUTSIDE, SIGN3(), Triangle::v1(), Triangle::v2(), and Triangle::v3().
Referenced by triangle_intersects_cube().

|
inlinestatic |
Definition at line 596 of file BoundaryGeometry.cpp.
References EPS.
Referenced by point_triangle_intersection().
|
static |
Definition at line 660 of file BoundaryGeometry.cpp.
References abs(), bevel_2d(), bevel_3d(), check_line(), cross(), cmp_ulp::eq_zero(), face_plane(), INSIDE, cmp_ulp::le(), OUTSIDE, point_triangle_intersection(), Triangle::v1(), Triangle::v2(), and Triangle::v3().
Referenced by Voxel::intersect().

|
constexpr |
Definition at line 594 of file BoundaryGeometry.cpp.
Referenced by SIGN3().
|
extern |
Definition at line 70 of file Main.cpp.
Referenced by BoundaryGeometry::computeMeshVoxelization(), BoundaryGeometry::fastIsInside(), BoundaryGeometry::findInsidePoint(), BoundaryGeometry::initialize(), BoundaryGeometry::intersectLineSegmentBoundary(), BoundaryGeometry::intersectRayBoundary(), BoundaryGeometry::intersectTinyLineSegmentBoundary(), and BoundaryGeometry::partInside().