13#include "libmesh/bounding_box.h"
29 std::unique_ptr<libMesh::MeshBase>
generate()
override;
50 std::unordered_map<SubdomainID, std::vector<std::unique_ptr<SurfaceElement>>>
56 std::unordered_map<SubdomainID, std::unique_ptr<AdaptiveRayContainmentCheck>>
const InputParameters & parameters() const
Common parameters and members for shifted boundary subdomain mesh generators that classify volume ele...
Assigns grain subdomain IDs to a volume mesh based on watertight closed boundaries in an external bou...
Point _ray_direction
Ray shooting direction in Point format.
std::unique_ptr< libMesh::MeshBase > _boundary_owned
The boundary mesh to use for identifying grain IDs.
std::unique_ptr< libMesh::MeshBase > & _boundary_mesh
Reference to the external boundary mesh defining grain boundaries.
void buildInOutTesters()
Build the IN-OUT testers for each subdomain.
std::unique_ptr< libMesh::MeshBase > generate() override
void buildSubdomainGroupedData()
build the data structure grouping by different subdomains
std::unordered_map< SubdomainID, BoundingBox > _bboxes_by_subdomain
The bounding boxes of the boundary elements grouped by subdomains.
std::unordered_map< SubdomainID, std::unique_ptr< AdaptiveRayContainmentCheck > > _subdomain_id_checkers
The IN-OUT testers for each subdomain.
static InputParameters validParams()
static bool boundingBoxesIntersect(const BoundingBox &lhs, const BoundingBox &rhs, const Real tolerance)
Check whether two bounding boxes overlap within a small tolerance.
std::unordered_map< SubdomainID, std::vector< std::unique_ptr< SurfaceElement > > > _boundary_elements_by_subdomain
The boundary elements grouped by subdomains.
unsigned int _leaf_max_size
Maximum number of boundary-element centroids in a leaf node of the k-d tree.
std::unordered_map< SubdomainID, std::vector< Point > > _centroids_by_subdomain
The centroids of the boundary elements grouped by subdomains.
std::vector< SubdomainCheckerEntry > _checker_entries
Cache contiguous checker metadata for faster per-element scans.
Real _eps
eps for intersection or on surface checking
Cache of bounding box and checker pointers for fast spatial queries.
AdaptiveRayContainmentCheck * checker
Pointer to the ray-casting containment checker for this subdomain.
BoundingBox bbox
Bounding box enclosing the surface elements of this subdomain.
SubdomainID subdomain_id
Subdomain ID associated with this checker.