ug4
subset_util.cpp File Reference
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include "subset_util.h"
#include "geom_obj_util/geom_obj_util.h"
#include "polychain_util.h"
#include "orientation_util.h"
#include "subset_color_util.h"

Namespaces

 ug
 the ug namespace
 

Functions

void ug::AdjustSubsetsForLgmNg (Grid &grid, SubsetHandler &sh, bool keepExistingInterfaceSubsets=false)
 reorders subsets in a way that allows for easy export to lgm-ng. More...
 
void ug::AssignFaceInterfaceEdgesToSubsets (Grid &grid, SubsetHandler &sh)
 assigns edges which belong to no subset and are adjacent to faces of different subsets to new subsets. More...
 
void ug::AssignGridToSubset (Grid &g, ISubsetHandler &sh, int subsetInd)
 Assigns all elements of the given grid to the given subset. More...
 
void ug::AssignInnerAndBoundarySubsets (Grid &grid, ISubsetHandler &shOut, int inSubset, int bndSubset)
 assigns objects to subsets depending on whether they are inner or boundary objects. More...
 
void ug::AssignRegionToSubset (Grid &grid, ISubsetHandler &shVolsOut, const ISubsetHandler &shFaces, Volume *proxyVol, int newSubsetIndex)
 assigns a region of volumes to a subset. More...
 
void ug::AssignSelectionToSubset (ISelector &sel, ISubsetHandler &sh, int subsetInd)
 Assigns all selected elements to the specified subset. More...
 
template<class TElem >
void ug::AssignSidesToSubsets (ISubsetHandler &sh, ISelector *psel=NULL)
 Assigns all sides of elements of the given type to a separate subset. More...
 
template void ug::AssignSidesToSubsets< Edge > (ISubsetHandler &, ISelector *)
 
template void ug::AssignSidesToSubsets< Face > (ISubsetHandler &, ISelector *)
 
template void ug::AssignSidesToSubsets< Volume > (ISubsetHandler &, ISelector *)
 
void ug::AssignSubsetColors (ISubsetHandler &sh)
 assigns a different color to each subset More...
 
void ug::AssignVolumeInterfaceFacesToSubsets (Grid &grid, SubsetHandler &sh)
 assigns faces which belong to no subset and are adjacent to volumes of different subsets to new subsets. More...
 
void ug::ComputeLocalSubsetDimensions (ISubsetHandler &sh, AChar aDimension, bool includeUnassigned)
 Computes the local subset dimension for each element and stores it in the given attachment. More...
 
template<class TIterator >
static void ug::CopySubsetFromHigherDimNbr (ISubsetHandler &sh, TIterator elemsBegin, TIterator elemsEnd, AChar aDimension)
 
void ug::CopySubsetIndicesToSides (ISubsetHandler &sh, bool toUnassignedOnly)
 copies subset-indices to sides of all elements in the subset handler More...
 
void ug::CopySubsetIndicesToSides (ISubsetHandler &sh, GridObjectCollection goc, bool toUnassignedOnly)
 copies subset-indices to sides of the specified elements More...
 
void ug::CopySubsetIndicesToSides (ISubsetHandler &sh, ISelector &sel, bool toUnassignedOnly)
 copies subset-indices to sides of the elements selected in 'sel' More...
 
void ug::EraseEmptySubsets (ISubsetHandler &sh)
 Erases all subsets which do not contain any geometric objects. More...
 
vector3 ug::GetColorFromStandardPalette (int index)
 Returns an rgb vector (values ranging from 0 to 1), with the i-th default color. More...
 
int ug::GetFirstFreeSubset (const ISubsetHandler &sh)
 returns the first subset, which does not contain any elements at all More...
 
template<class TElem >
static char ug::GetSmallestLocalSubsetDimension (typename Grid::traits< TElem >::secure_container &nbrs, MultiElementAttachmentAccessor< AChar > &aaDim)
 
template<class TElem >
static bool ug::NbrIsInSubset (ISubsetHandler &sh, typename Grid::traits< TElem >::secure_container &nbrs, int si)
 
void ug::SeparateFaceSubsetsByNormal (Grid &grid, SubsetHandler &sh, APosition aPos=aPosition, ANormal *paNorm=NULL, int applyToSubset=-2)
 separates faces by orthogonal axis-aligned normals. More...
 
void ug::SeparateFaceSubsetsByNormal (Grid &grid, SubsetHandler &sh, std::vector< vector3 > vNormals, APosition aPos=aPosition, ANormal *paNorm=NULL, int applyToSubset=-2)
 separates subset by the given normals. More...
 
bool ug::SeparateRegions (Grid &grid, ISubsetHandler &shVolsOut, const ISubsetHandler &shFaces, const MarkerPointManager &mpm, int firstSubsetIndex)
 finds regions by marker-points More...
 
bool ug::SplitIrregularManifoldSubset (SubsetHandler &sh, int srcIndex, int targetIndex, bool strictSplitting=false)
 Keeps a regular part in the subset and assigns all other faces to another one. More...
 
void ug::AssignSubsetsByElementType (ISubsetHandler &sh)
 Assigns subset depending on the element type. More...
 
void ug::AssignSubsetsByElementType (ISubsetHandler &sh, GridObjectCollection g)
 Assigns subset depending on the element type. More...