chombo-discharge
|
Static class which contains some routines for fetching VoFs using various algorithms. Very useful in combination with least squares. More...
#include <CD_VofUtils.H>
Public Types | |
enum class | Connectivity { MonotonePath , SimplyConnected , All } |
Class for specifying connectivity of Vofs. More... | |
enum class | Neighborhood { Quadrant , Radius , SemiCircle } |
Neighborhood type. More... | |
Public Member Functions | |
VofUtils ()=delete | |
Disallowed. | |
Static Public Member Functions | |
static Vector< VolIndex > | getVofsInRadius (const VolIndex &a_startVof, const EBISBox &a_ebisbox, const int a_radius, const Connectivity a_connectivity, const bool a_addStartVof) |
Fetch vofs in a specified radius and with a specified connectivitiy between them. More... | |
static Vector< VolIndex > | getVofsInRadius (const VolIndex &a_startVof, const EBISBox &a_ebisbox, const int a_radius, const DenseIntVectSet &a_validCells, const Connectivity a_connectivity, const bool a_addStartVof) |
Fetch vofs in a specified radius and with a specified connectivitiy between them. More... | |
static Vector< VolIndex > | getVofsInQuadrant (const VolIndex &a_startVof, const EBISBox &a_ebisbox, const RealVect &a_normal, const int a_radius, const Connectivity a_connectivity, const bool a_addStartVof) |
Fetch vofs in a quadrant, using a specified radius and with a specified connectivitiy between them. More... | |
static Vector< VolIndex > | getVofsInSemiCircle (const VolIndex &a_startVof, const EBISBox &a_ebisbox, const RealVect &a_normal, const int a_radius, const Real a_deltaThresh, const Connectivity a_connectivity, const Location::Cell a_vofLocation, const Location::Cell a_cellLocation, const bool a_addStartVof) |
Get all vofs lying in a semi-circle (sphere in 3D) from the indicated position in the starting vof. More... | |
static void | excludeCells (Vector< VolIndex > &a_vofs, const Box &a_excludeBox) |
Modifies a_vofs so it doesn't include cells in a_excludeIVS. More... | |
static void | excludeCells (Vector< VolIndex > &a_vofs, const IntVectSet &a_excludeIVS) |
Modifies a_vofs so it doesn't include cells in a_excludeIVS. More... | |
static void | includeCells (Vector< VolIndex > &a_vofs, const Box &a_includeBox) |
Modifies a_vofs so it only includes cells in a box. More... | |
static void | includeCells (Vector< VolIndex > &a_vofs, const IntVectSet &a_includeIVS) |
Modifies a_vofs so it only includes cells in a box. More... | |
static void | includeCells (Vector< VolIndex > &a_vofs, const DenseIntVectSet &a_includeIVS) |
Modifies a_vofs so it only includes cells in a box. More... | |
static void | onlyUnique (Vector< VolIndex > &a_vofs) |
Discard duplicates. More... | |
Static Protected Member Functions | |
static bool | isQuadrantWellDefined (const RealVect a_normal) |
Check if a quadrant is well-defined for a direction in space. More... | |
static std::pair< int, Side::LoHiSide > | getCardinalDirection (const RealVect a_normal) |
Returns the coordinate direction. More... | |
static Vector< VolIndex > | getVofsInMonotonePath (const VolIndex &a_startVof, const EBISBox &a_ebisbox, const int a_radius, const bool a_addStartVof) |
Get all VoFs that can be found with a monotone path with specified radius. More... | |
static Vector< VolIndex > | getConnectedVofsInRadius (const VolIndex &a_startVof, const EBISBox &a_ebisbox, const int a_radius, const bool a_addStartVof) |
Get all connected Vofs in radius which can be reached without crossing a covered face or reaching into a domain boundary. More... | |
static Vector< VolIndex > | getAllVofsInRadius (const VolIndex &a_startVof, const EBISBox &a_ebisbox, const int a_radius, const bool a_addStartVof) |
Get all Vofs in a radius from a starting Vof. More... | |
static Vector< VolIndex > | connectedVofsOnly (const VolIndex &a_startVof, const Vector< VolIndex > &a_allVofs, const EBISBox &a_ebisbox) |
Get all Vofs that are connected to a specific starting Vof. The connection does not have to be direct. More... | |
static Box | getQuadrant (const RealVect &a_normal, const VolIndex &a_vof, const EBISBox &a_ebisbox, const Real a_radius) |
Get quadrant defined by direction in space. More... | |
static Box | getSymmetricQuadrant (const std::pair< int, Side::LoHiSide > &a_cardinal, const VolIndex &a_vof, const EBISBox &a_ebisbox, const Real a_radius) |
Get "symmetric" quadrant defined by direction in space. More... | |
static void | getVofsInMonotonePath (Vector< VolIndex > &a_vofList, const VolIndex &a_startVof, const EBISBox &a_ebisbox, const int a_radius, const IntVect &a_timesMoved, const IntVect &a_pathSign) |
Get all Vofs in a monotone path. Does not move more than a_radius in any direction. More... | |
static void | getVofsInMonotonePath (std::set< VolIndex > &a_vofList, const VolIndex &a_startVof, const EBISBox &a_ebisbox, const Box &a_validBox, const int &a_radius, const IntVect &a_timesMoved, const IntVect &a_pathSign) |
Get all Vofs in a monotone path. Does not move more than a_radius in any direction. More... | |
Static class which contains some routines for fetching VoFs using various algorithms. Very useful in combination with least squares.
|
strong |
Class for specifying connectivity of Vofs.
MontonePath: Vofs must be reachable with monotone path.
SimplyConnected: All vofs must be connected
All: All vofs allowed
|
strong |
Neighborhood type.
[in] | Quadrant. | Only fetch vofs in a specified quadrant. |
[in] | Radius. | Fetch all vofs in a specified radius. |
[in] | SemiCircle. | Fetch all vofs in a half-circle with specified radius. |
|
staticprotected |
Get all Vofs that are connected to a specific starting Vof. The connection does not have to be direct.
[in] | a_startVof | Starting Vof |
[in] | a_allVofs | All Vofs. This can, but does not have to, include a_startVof. |
[in] | a_ebisbox | EBISBox. |
|
static |
Modifies a_vofs so it doesn't include cells in a_excludeIVS.
[in] | a_vofs | List of vofs to be modified |
[in] | a_excludeBox | Box to be excluded |
|
static |
Modifies a_vofs so it doesn't include cells in a_excludeIVS.
[in] | a_vofs | List of vofs to be modified |
[in] | a_excludeIVS | List of cells to be excluded. |
|
staticprotected |
Get all Vofs in a radius from a starting Vof.
[in] | a_startVof | Starting Vof |
[in] | a_ebisbox | EBISBox |
[in] | a_radius | Search radius |
[in] | a_addStartVof | If false, a_startVof will not be included in the list. |
|
staticprotected |
Returns the coordinate direction.
[in] | Non-zero | normal vector |
[in] | Returns | dirction where ||a_normal[dir]|| == 1. If a_normal[dir] == -1 then dir => -dir |
|
staticprotected |
Get all connected Vofs in radius which can be reached without crossing a covered face or reaching into a domain boundary.
[in] | a_startVof | Starting Vof |
[in] | a_ebisbox | EBISBox |
[in] | a_radius | Search radius |
[in] | a_addStartVof | If false, a_startVof will not be in the returned list. |
|
staticprotected |
Get quadrant defined by direction in space.
[in] | a_cardinal | The direction in space which defines the quadrant. |
[in] | a_vof | Starting vof |
[in] | a_ebisbox | EBISBox |
[in] | a_radius | Quadrant radius |
|
staticprotected |
Get "symmetric" quadrant defined by direction in space.
[in] | a_cardinal | The direction in space which defines the quadrant. |
[in] | a_vof | Starting vof |
[in] | a_radius | Quadrant radius |
|
staticprotected |
Get all VoFs that can be found with a monotone path with specified radius.
[in] | a_startVof | Starting Vof. |
[in] | a_ebisbox | EBISBox. |
[in] | a_radius | Radius. |
[in] | a_addStartVof | If false, a_startVof will not be included in the list. |
|
staticprotected |
Get all Vofs in a monotone path. Does not move more than a_radius in any direction.
[in,out] | a_vofList | List of vofs that were within the monotone path |
[in] | a_startVof | Starting vof. |
[in] | a_ebisbox | EBISBox. |
[in] | a_radius | Maximum radius. |
[in] | a_timesMoved | Number of times moved in any direction |
[in] | a_pathSign | Path sign. |
|
staticprotected |
Get all Vofs in a monotone path. Does not move more than a_radius in any direction.
[in,out] | a_vofList | List of vofs that were within the monotone path |
[in] | a_startVof | Starting vof. |
[in] | a_ebisbox | EBISBox. |
[in] | a_radius | Maximum radius. |
[in] | a_timesMoved | Number of times moved in any direction |
[in] | a_pathSign | Path sign. |
|
static |
Fetch vofs in a quadrant, using a specified radius and with a specified connectivitiy between them.
[in] | a_startVof | Starting Vof. |
[in] | a_ebisbox | EBISBox. |
[in] | a_normal | Normal vector |
[in] | a_radius | Radius. |
[in] | a_connectivity | Connectivity specification (e.g. monotone path or simplyconnected) |
[in] | a_addStartVof | If false, a_startVof will not be included in the list. |
|
static |
Fetch vofs in a specified radius and with a specified connectivitiy between them.
[in] | a_startVof | Starting Vof. |
[in] | a_ebisbox | EBISBox. |
[in] | a_radius | Radius. |
[in] | a_connectivity | Connectivity specification (e.g. monotone path or simplyconnected) |
[in] | a_addStartVof | If false, a_startVof will not be included in the list. |
|
static |
Fetch vofs in a specified radius and with a specified connectivitiy between them.
[in] | a_startVof | Starting Vof. |
[in] | a_ebisbox | EBISBox. |
[in] | a_radius | Radius. |
[in] | a_validCells | Valid cells to include |
[in] | a_connectivity | Connectivity specification (e.g. monotone path or simplyconnected) |
[in] | a_addStartVof | If false, a_startVof will not be included in the list. |
|
static |
Get all vofs lying in a semi-circle (sphere in 3D) from the indicated position in the starting vof.
[in] | a_startVof | Starting Vof. |
[in] | a_ebisbox | EBISBox. |
[in] | a_normal | Normal vector |
[in] | a_radius | Radius. |
[in] | a_deltaThresh | Threshold for the normal distance betw |
[in] | a_connectivity | Connectivity specification (e.g. monotone path or simplyconnected) |
[in] | a_vofLocation | Point inside the current vof |
[in] | a_cellLocation | Other cell locations to test with. |
[in] | a_addStartVof | If false, a_startVof will not be included in the list. |
|
static |
Modifies a_vofs so it only includes cells in a box.
[in] | a_vofs | List of vofs to be modified |
[in] | a_includeBox | List of cells to be excluded. |
|
static |
Modifies a_vofs so it only includes cells in a box.
[in] | a_vofs | List of vofs to be modified |
[in] | a_includeIVS | List of cells to be included |
|
static |
Modifies a_vofs so it only includes cells in a box.
[in] | a_vofs | List of vofs to be modified |
[in] | a_includeIVS | List of cells to be included |
|
staticprotected |
Check if a quadrant is well-defined for a direction in space.
[in] | a_normal | The direction in space which defines the quadrant. |
a_normal.vectorLength(); // Idiot guard.
|
static |
Discard duplicates.
[in,out] | a_vofs | List of Vofs |