PLaSK library
Loading...
Searching...
No Matches
plask::details Namespace Reference

Classes

struct  VecDimConverter
 
struct  VecDimConverter< 2, T >
 
struct  VecDimConverter< 3, T >
 

Functions

bool getLineLo (std::size_t &line, const MeshAxis &axis, double box_lower, double box_upper)
 Helper used by getLeftOfBoundary, etc.
 
bool getLineHi (std::size_t &line, const MeshAxis &axis, double box_lower, double box_upper)
 Helper used by getRightOfBoundary, etc.
 
bool getIndexesInBounds (std::size_t &begInd, std::size_t &endInd, const MeshAxis &axis, double box_lower, double box_upper)
 Helper used by getLeftOfBoundary, etc.
 
void tryMakeLower (const MeshAxis &axis, std::size_t &index, double real_pos)
 Decrease index if real_pos is much closer to axis[index-1] than axis[index].
 
void tryMakeHigher (const MeshAxis &axis, std::size_t &index, double real_pos)
 Increase index if real_pos is much closer to axis[index] than axis[index-1].
 
bool getIndexesInBoundsExt (std::size_t &begInd, std::size_t &endInd, const MeshAxis &axis, double box_lower, double box_upper)
 Helper.
 
template<typename MeshType , typename GetBoxes , typename GetBoundaryForBox >
MeshType::Boundary getBoundaryForBoxes (GetBoxes getBoxes, GetBoundaryForBox getBoundaryForBox)
 Get boundary which lies on chosen edge of boxes.
 
template<typename Boundary , int DIM>
Boundary parseBoundaryFromXML (XMLReader &boundary_desc, Manager &manager, Boundary(*getXBoundary)(), Boundary(*getXOfBoundary)(shared_ptr< const GeometryObject >, const PathHints *))
 Parse boundary from XML tag in format: <place side="i.e. left" [object="object name" [path="path name"] [geometry="name of geometry which is used by the solver"]]/>
 

Function Documentation

◆ getBoundaryForBoxes()

MeshType::Boundary plask::details::getBoundaryForBoxes ( GetBoxes  getBoxes,
GetBoundaryForBox  getBoundaryForBox 
)
inline

Get boundary which lies on chosen edge of boxes.

Parameters
getBoxesfunctor which returns 0 or more boxes (vector of boxes)
getBoundaryForBoxfunctor which returns boundary for box given as parameter, it chooses edge of box (for example this may call getLeftOfBoundary, etc.)
Returns
boundary which represents sum of boundaries returned by getBoundaryForBox for all boxes returned by getBoxes
Template Parameters
MeshTypeRectangularMesh...

Definition at line 125 of file rectangular_common.hpp.

◆ getIndexesInBounds()

bool plask::details::getIndexesInBounds ( std::size_t &  begInd,
std::size_t &  endInd,
const MeshAxis axis,
double  box_lower,
double  box_upper 
)
inline

Helper used by getLeftOfBoundary, etc.

Parameters
[out]begInd,endIndrange [begInd, endInd) of indices in axis which show points which lie in bounds [box_lower, box_upper], undefined if false was returned
[in]axisaxis, 1D mesh
[in]box_lower,box_upperposition of lower and upper box edges
Returns
true only if some of axis points lies in bounds [box_lower, box_upper]

Definition at line 72 of file rectangular_common.hpp.

◆ getIndexesInBoundsExt()

bool plask::details::getIndexesInBoundsExt ( std::size_t &  begInd,
std::size_t &  endInd,
const MeshAxis axis,
double  box_lower,
double  box_upper 
)
inline

Helper.

Parameters
[out]begInd,endIndrange [begInd, endInd) of indices in axis which show points which lie or almost lie in bounds [box_lower, box_upper], undefined if false was returned
[in]axisaxis, 1D mesh
[in]box_lower,box_upperposition of lower and upper box edges
Returns
true only if some of axis points (almost) lies in bounds [box_lower, box_upper]

Definition at line 110 of file rectangular_common.hpp.

◆ getLineHi()

bool plask::details::getLineHi ( std::size_t &  line,
const MeshAxis axis,
double  box_lower,
double  box_upper 
)
inline

Helper used by getRightOfBoundary, etc.

Parameters
[out]lineindex of point in axis which lies in bound [box_lower, box_upper] and is nearest to box_upper, undefined if false was returned
[in]axisaxis, 1D mesh
[in]box_lower,box_upperposition of lower and upper box edges
Returns
true only if axis has point which lies in bounds [box_lower, box_upper]

Definition at line 55 of file rectangular_common.hpp.

◆ getLineLo()

bool plask::details::getLineLo ( std::size_t &  line,
const MeshAxis axis,
double  box_lower,
double  box_upper 
)
inline

Helper used by getLeftOfBoundary, etc.

Parameters
[out]lineindex of point in axis which lies in bound [box_lower, box_upper] and is the nearest to box_lower, undefined if false was returned
[in]axisaxis, 1D mesh
[in]box_lower,box_upperposition of lower and upper box edges
Returns
true only if axis has point which lies in bounds [box_lower, box_upper]

Definition at line 41 of file rectangular_common.hpp.

◆ parseBoundaryFromXML()

template<typename Boundary , int DIM>
Boundary plask::details::parseBoundaryFromXML ( XMLReader boundary_desc,
Manager manager,
Boundary(*)()  getXBoundary,
Boundary(*)(shared_ptr< const GeometryObject >, const PathHints *)  getXOfBoundary 
)
inline

Parse boundary from XML tag in format: <place side="i.e. left" [object="object name" [path="path name"] [geometry="name of geometry which is used by the solver"]]/>

Parameters
boundary_descXML reader which points to tag to read (after read it will be moved to end of this tag)
managergeometry manager
getXBoundaryfunction which creates simple boundary, with edge of mesh, i.e. getLeftBoundary
getXOfBoundaryfunction which creates simple boundary, with edge of object, i.e. getLeftOfBoundary
Returns
boundary which was read

Definition at line 175 of file rectangular_common.hpp.

◆ tryMakeHigher()

void plask::details::tryMakeHigher ( const MeshAxis axis,
std::size_t &  index,
double  real_pos 
)
inline

Increase index if real_pos is much closer to axis[index] than axis[index-1].

Parameters
[in]axisaxis of mesh
[in,out]indexindex such that axis[index-1] <= real_pos < axis[index], can be unchanged or increment by one by this method
[in]real_posposition

Definition at line 97 of file rectangular_common.hpp.

◆ tryMakeLower()

void plask::details::tryMakeLower ( const MeshAxis axis,
std::size_t &  index,
double  real_pos 
)
inline

Decrease index if real_pos is much closer to axis[index-1] than axis[index].

Parameters
[in]axisaxis of mesh
[in,out]indexindex such that axis[index] <= real_pos < axis[index+1], can be unchanged or decrement by one by this method
[in]real_posposition

Definition at line 86 of file rectangular_common.hpp.