ug4
Domain Bridge

Modules

 Load Balancing Bridge
 
 Periodic Bounadry Bridge
 
 Refinement Bridge
 
 Selection Bridge
 
 Transformation Bridge
 
 libGrid Bridge
 

Classes

struct  ug::bridge::Domain::Functionality
 
struct  ug::bridge::Domain::Functionality2d3d
 methods that are only available for 2d and 3d are registered here More...
 

Functions

template<typename TDomain >
static number ug::FaceArea (TDomain &dom, int si)
 
template<typename TDomain >
static number ug::FaceArea (TDomain &dom, int si, size_t lvl)
 
template<typename TDomain >
static number ug::FaceArea (TDomain &dom, ISelector &sel)
 
template<typename TDomain >
static number ug::FaceArea (TDomain &dom, ISubsetHandler &sh, int si, size_t lvl)
 
template<class TDomain , class TElem >
static TElem * ug::GetElementByCoordinate (TDomain &dom, number x, number y, number z)
 
template<typename TDomain >
static number ug::GetMaxEdgeLength (TDomain &dom)
 
template<typename TDomain >
static void ug::LoadAndRefineDomain (TDomain &domain, const char *filename, int numRefs)
 
template<typename TDomain >
static void ug::MinimizeMemoryFootprint (TDomain &dom)
 
template<typename TDomain >
static void ug::PrintElementEdgeRatios (TDomain &dom)
 
template<typename TDomain >
static void ug::ProjectVerticesToSphere (TDomain &dom, std::vector< number > center, number radius, number eps)
 
template<typename TDomain >
static void ug::RandomizeDomain (TDomain &dom, number dx, number dy, number dz)
 
template<typename TDomain >
static bool ug::SavePartitionMap (PartitionMap &pmap, TDomain &domain, const char *filename)
 
template<typename TDomain >
static void ug::ScaleDomain (TDomain &dom, number sx, number sy, number sz)
 
template<typename TDomain >
static bool ug::TestDomainInterfaces (TDomain *dom)
 
template<typename TDomain >
static bool ug::TestDomainInterfaces (TDomain *dom, bool verbose)
 
template<typename TDomain >
static void ug::TranslateDomain (TDomain &dom, number tx, number ty, number tz)
 

Detailed Description

Function Documentation

◆ FaceArea() [1/4]

template<typename TDomain >
static number ug::FaceArea ( TDomain &  dom,
int  si 
)
static

Calculates the area sum of faces in a given domain with implicit given subset handler. Please note the sum is returned for faces in subset with index si on grid level 0 in the domain dom.

Parameters
domdomain
sisubset index
Returns
number area sum

References ug::FaceArea(), and UG_ASSERT.

◆ FaceArea() [2/4]

template<typename TDomain >
static number ug::FaceArea ( TDomain &  dom,
int  si,
size_t  lvl 
)
static

Calculates the area sum of faces in given domain with implicit given subset handler. Please note the sum is returned for faces in subset with index si and on grid level lvl in the domain dom.

Parameters
domdomain
sisubset index
lvlgrid level
Returns
number area sum

References ug::FaceArea(), and UG_ASSERT.

◆ FaceArea() [3/4]

template<typename TDomain >
static number ug::FaceArea ( TDomain &  dom,
ISelector sel 
)
static

Calculates the area sum of faces in a given domain. Please note the sum is returned for all faces selected by the selector sel in the domain dom.

Parameters
domdomain
selselector
Returns
number area sum

References UG_ASSERT.

Referenced by ug::FaceArea().

◆ FaceArea() [4/4]

template<typename TDomain >
static number ug::FaceArea ( TDomain &  dom,
ISubsetHandler sh,
int  si,
size_t  lvl 
)
static

Calculates the area sum of faces in given domain and subset handler sh. Please note that the sum is returned for faces in subset with index si and on grid level lvl in the domain dom.

Parameters
domdomain
shsubset handler
sisubset index
lvlgrid level
Returns
number area sum

References ug::FaceArea(), and UG_ASSERT.

Referenced by ug::CalculateTetrahedronRootMeanSquareFaceArea(), ug::CalculateVolume(), ug::FaceArea(), ug::FindLargestFace(), and ug::FindSmallestFace().

◆ GetElementByCoordinate()

template<class TDomain , class TElem >
static TElem* ug::GetElementByCoordinate ( TDomain &  dom,
number  x,
number  y,
number  z 
)
static

References ug::VecCopy().

◆ GetMaxEdgeLength()

template<typename TDomain >
static number ug::GetMaxEdgeLength ( TDomain &  dom)
static

◆ LoadAndRefineDomain()

template<typename TDomain >
static void ug::LoadAndRefineDomain ( TDomain &  domain,
const char *  filename,
int  numRefs 
)
static

◆ MinimizeMemoryFootprint()

template<typename TDomain >
static void ug::MinimizeMemoryFootprint ( TDomain &  dom)
static

◆ PrintElementEdgeRatios()

template<typename TDomain >
static void ug::PrintElementEdgeRatios ( TDomain &  dom)
static

◆ ProjectVerticesToSphere()

template<typename TDomain >
static void ug::ProjectVerticesToSphere ( TDomain &  dom,
std::vector< number center,
number  radius,
number  eps 
)
static

Moves all vertices in an eps-environment of a sphere to the sphere.

Parameters
domdomain
centercenter of sphere
radiusradius of sphere
epssize of eps-environment

References dim, ug::RaySphereIntersection(), s, UG_THROW, ug::VecDistance(), ug::VecScaleAdd(), and ug::VecSubtract().

◆ RandomizeDomain()

template<typename TDomain >
static void ug::RandomizeDomain ( TDomain &  dom,
number  dx,
number  dy,
number  dz 
)
static
Parameters
domthe domain
dxamount of wiggle in x-direction
dyamount of wiggle in y-direction
dzamount of wiggle in z-direction iterates through all vertices and adds a random number between -d[] and d[] to the position. note that this is absolute, so one has to be careful that elements are not intersecting after this. this function is used in some AMG tests to get 'unstructured' grids of different sizes

References UG_ASSERT, and ug::urand().

◆ SavePartitionMap()

template<typename TDomain >
static bool ug::SavePartitionMap ( PartitionMap pmap,
TDomain &  domain,
const char *  filename 
)
static

◆ ScaleDomain()

template<typename TDomain >
static void ug::ScaleDomain ( TDomain &  dom,
number  sx,
number  sy,
number  sz 
)
static

References s, and UG_ASSERT.

◆ TestDomainInterfaces() [1/2]

template<typename TDomain >
static bool ug::TestDomainInterfaces ( TDomain *  dom)
static

◆ TestDomainInterfaces() [2/2]

template<typename TDomain >
static bool ug::TestDomainInterfaces ( TDomain *  dom,
bool  verbose 
)
static

References ug::TestGridLayoutMap(), and verbose.

◆ TranslateDomain()

template<typename TDomain >
static void ug::TranslateDomain ( TDomain &  dom,
number  tx,
number  ty,
number  tz 
)
static

References UG_ASSERT.