https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SBMInterfaceManager.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8
9#pragma once
10
12#include "KDTree.h"
13
14#include <map>
15
22{
23public:
26
27 virtual void initialSetup() override;
28
31 {
33 RealVectorValue distance;
35 RealVectorValue normal;
36 };
37
39 bool hasInterface(SubdomainID first, SubdomainID second) const;
40
43 queryInterface(SubdomainID first, SubdomainID second, const Point & point) const;
44
45protected:
48 {
50 std::vector<const SurfaceElement *> elements;
52 std::vector<Point> centroids;
54 std::unique_ptr<KDTree> kd_tree;
57 };
58
59 void detectInterfaces();
60
62 const unsigned int _leaf_max_size;
70 std::map<std::pair<SubdomainID, SubdomainID>, InterfaceData> _interfaces;
71};
const InputParameters & parameters() const
Detects shared interfaces between subdomains in a single surface mesh containing the complete boundar...
static InputParameters validParams()
const Real _relative_distance_tolerance
Relative tolerance for face matching, scaled by mesh size.
InterfaceQueryResult queryInterface(SubdomainID first, SubdomainID second, const Point &point) const
Return distance and normal data for an interface. The normal points from first to second.
Real _distance_tolerance
Absolute distance tolerance for face matching.
bool hasInterface(SubdomainID first, SubdomainID second) const
Whether an interface was detected between two subdomains.
const Real _normal_tolerance
Angular tolerance for comparing face normals.
std::map< std::pair< SubdomainID, SubdomainID >, InterfaceData > _interfaces
Map of detected interfaces keyed by sorted subdomain ID pairs.
virtual void initialSetup() override
const unsigned int _leaf_max_size
Maximum number of points in a k-d tree leaf node.
BoundaryMeshBuilder specialization that groups the surface elements by subdomain, building one Surfac...
Geometric data for a detected interface between two subdomains.
std::vector< Point > centroids
Centroids of the interface elements.
std::vector< const SurfaceElement * > elements
Surface elements belonging to the interface.
std::unique_ptr< KDTree > kd_tree
Spatial k-d tree built on element centroids for fast nearest-element queries.
Real max_element_radius
Maximum bounding radius of elements on this interface.
Result of querying distance and normal to an interface.
RealVectorValue distance
Shortest distance vector to the interface.
RealVectorValue normal
Unit normal vector of the interface (pointing from first to second subdomain)