ug4
|
Debugging tool for function that do have no direct access to the grid. More...
#include <grid_debug.h>
Static Public Member Functions | |
template<typename TAssElem > | |
static bool | ass_elem_in_subset (GridObject *elem, int si) |
checks if one of the associated elements is in a given subset More... | |
template<typename TAssElem > | |
static bool | ass_elem_in_subsets (GridObject *elem, std::vector< int > si_ar, bool in_all=false) |
checks if one of the associated elements is in (all or some of the) given subsets More... | |
static void | create (grid_type &rGrid, ISubsetHandler &rSH) |
creates the object (if it did not exist) More... | |
static bool | elem_in_subset (GridObject *elem, int si) |
checks if an element is in a subset More... | |
static bool | elem_in_subsets (GridObject *elem, std::vector< int > si_ar) |
checks if an element is in subsets from a list More... | |
Protected Member Functions | |
grid_global_debug_info_provider (grid_type &rGrid, ISubsetHandler &rSH) | |
(protected) constructor More... | |
Private Types | |
typedef Grid | grid_type |
typedef grid_global_debug_info_provider | this_type |
Private Attributes | |
grid_type * | m_pGrid |
current grid More... | |
ISubsetHandler * | m_pSH |
current SubsetHandler to use More... | |
Static Private Attributes | |
static std::unique_ptr< grid_global_debug_info_provider > | the_object |
Pointer to the single (if any) object of the grid debug info provider. More... | |
Debugging tool for function that do have no direct access to the grid.
This class provides access to grid data in functions that have no direct access to the grid (e.g. get only a pointer to an element but need the subsets of the corners etc.).
This is the class for the base Grid class.
REMARK: THIS IS A PURELY DEBUGGING TOOL! IT MAY NOT BE USED IN THE NORMAL ROUTINES FOR THE "EVERY-DAY" USE! THIS CLASS CAN BE PATCHED AND CHANGED ANY TIME, THERE NO STABLE IMPLEMENTATION MAY BE ASSUMED!
This class provides a global pointer (which is static in the class) referencing its single object (only if it is created - otherwise the pointer is NULL).
|
private |
|
inlineprotected |
(protected) constructor
|
inlinestatic |
checks if one of the associated elements is in a given subset
elem | the element to check |
si | subset index to check |
References ug::PointerConstArray< TPtr >::size(), and the_object.
|
inlinestatic |
checks if one of the associated elements is in (all or some of the) given subsets
elem | the element to check |
si_ar | subset indices to check |
in_all | if to check all the subsets of the list |
References ug::PointerConstArray< TPtr >::size(), the_object, and UG_THROW.
|
inlinestatic |
creates the object (if it did not exist)
This function creates the single object of the class. If the object exists, this function throws and exception (to prevent the undesired reinitialization during the debugging process).
rGrid | the grid to use |
rSH | the subset handler to use |
References the_object, and UG_THROW.
|
inlinestatic |
checks if an element is in a subset
elem | the element to check |
si | subset index to check |
References the_object.
|
inlinestatic |
checks if an element is in subsets from a list
elem | the element to check |
si_ar | subset indices to check |
References the_object.
|
private |
current grid
|
private |
current SubsetHandler to use
|
staticprivate |
Pointer to the single (if any) object of the grid debug info provider.
Referenced by ass_elem_in_subset(), ass_elem_in_subsets(), create(), elem_in_subset(), and elem_in_subsets().