33#ifndef _OPAL_BOUNDARY_GEOMETRY_H
34#define _OPAL_BOUNDARY_GEOMETRY_H
42#include "Utility/IpplTimings.h"
43#include "Utility/PAssert.h"
45#include <gsl/gsl_rng.h>
48#include <unordered_map>
49#include <unordered_set>
89 static const std::unordered_map<std::string, Topology> stringTopology_s = {
209 std::vector<std::array<unsigned int, 4>>
226 std::unordered_set<int>>
251 PAssert(1 <= vertex_id && vertex_id <= 3);
ippl::Vector< T, Dim > Vector_t
Inform & operator<<(Inform &os, const BoundaryGeometry &b)
double getReal(const Attribute &attr)
Return real value.
std::string getString(const Attribute &attr)
Get string value.
Definition(int size, const char *name, const char *help)
Constructor for exemplars.
Object(int size, const char *name, const char *help)
Constructor for exemplars.
std::vector< Attribute > itsAttr
The object attributes.
IpplTimings::TimerRef TisInside_m
int fastIsInside(const Vector_t< double, 3 > &reference_pt, const Vector_t< double, 3 > &P)
Vector_t< double, 3 > mapIndices2Voxel(const int, const int, const int)
BoundaryGeometry(const BoundaryGeometry &)
std::vector< double > TriAreas_m
virtual void execute()
Execute the command.
virtual void update()
Update this object.
IpplTimings::TimerRef TRayTrace_m
struct BoundaryGeometry::@117056140100230112133004050263065356254101277345 voxelMesh_m
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
Vector_t< double, 3 > maxExtent_m
Vector_t< double, 3 > gethr()
const Vector_t< double, 3 > & getPoint(const int triangle_id, const int vertex_id)
std::vector< std::array< unsigned int, 4 > > Triangles_m
bool getInsidePoint(Vector_t< double, 3 > &pt)
void operator=(const BoundaryGeometry &)
Vector_t< double, 3 > getmaxcoords()
int intersectLineTriangle(const enum INTERSECTION_TESTS kind, const Vector_t< double, 3 > &P0, const Vector_t< double, 3 > &P1, const int triangle_id, Vector_t< double, 3 > &I)
static BoundaryGeometry * find(const std::string &name)
IpplTimings::TimerRef Tinitialize_m
int mapVoxelIndices2ID(const int i, const int j, const int k)
void disableDebug(enum DebugFlags flags)
int intersectRayBoundary(const Vector_t< double, 3 > &P, const Vector_t< double, 3 > &v, Vector_t< double, 3 > &I)
IpplTimings::TimerRef TPartInside_m
IpplTimings::TimerRef TfastIsInside_m
int intersectTriangleVoxel(const int triangle_id, const int i, const int j, const int k)
void enableDebug(enum DebugFlags flags)
int intersectLineSegmentBoundary(const Vector_t< double, 3 > &P0, const Vector_t< double, 3 > &P1, Vector_t< double, 3 > &intersection_pt, int &triangle_id)
Vector_t< double, 3 > insidePoint_m
int partInside(const Vector_t< double, 3 > &r, const Vector_t< double, 3 > &v, const double dt, Vector_t< double, 3 > &intecoords, int &triId)
int intersectTinyLineSegmentBoundary(const Vector_t< double, 3 > &, const Vector_t< double, 3 > &, Vector_t< double, 3 > &, int &)
void writeGeomToVtk(std::string fn)
@ debug_intersectRayBoundary
@ debug_intersectTinyLineSegmentBoundary
@ debug_intersectLineSegmentBoundary
bool findInsidePoint(void)
Vector_t< int, 3 > getnr()
Vector_t< double, 3 > getmincoords()
virtual BoundaryGeometry * clone(const std::string &name)
Return a clone.
bool isInside(const Vector_t< double, 3 > &P)
Topology getTopology() const
virtual ~BoundaryGeometry()
Inform & printInfo(Inform &os) const
Vector_t< double, 3 > mapPoint2Voxel(const Vector_t< double, 3 > &)
void computeMeshVoxelization(void)
std::vector< Vector_t< double, 3 > > TriNormals_m
std::vector< Vector_t< double, 3 > > Points_m
Vector_t< double, 3 > minExtent_m
void updateElement(ElementBase *element)
std::string getFilename() const