ug4
|
Functions | |
template<class TElem > | |
static bool | ug::CheckDistributedObjectConstraintTypes (MultiGrid &mg) |
Checks whether distributed objects have the same type on all processes. More... | |
bool | ug::CheckDistributedParentTypes (MultiGrid &mg) |
Check whether local parent types match the type of the actual parent element. More... | |
bool | ug::CheckHangingNodeConsistency (Grid &g) |
checks whether all constraining and constrained objects are correctly connected. More... | |
bool | ug::CheckHangingNodeConsistency (MultiGrid &mg) |
checks whether a multigrid is a valid haging vertex grid. More... | |
void | ug::CheckMultiGridConsistency (MultiGrid &mg) |
Checks whether parent child connections in a multi-grid are correct. More... | |
template<class TElem > | |
int | ug::GetGridObjectIndex (Grid &g, TElem *elem) |
returns the index of the given element in the given grid. More... | |
template<class TGeomObj > | |
void | ug::PrintAttachmentInfo (Grid &grid) |
prints information on all attachments of the specified grid More... | |
void | ug::PrintElementNumbers (const GridObjectCollection &goc) |
prints how many elements of each type exist in the goc. More... | |
void | ug::PrintGridElementNumbers (Grid &grid) |
prints how many elements of each type exist in the grid. More... | |
void | ug::PrintGridElementNumbers (GridSubsetHandler &sh) |
prints how many elements of each type exist in the subset handler. More... | |
void | ug::PrintGridElementNumbers (MultiGrid &mg) |
prints how many elements of each type exist in the multi grid. More... | |
template<class TElem , class TAValue > | |
void | ug::WriteDebugValuesToFile (const char *filename, Grid &grid, TAValue &aVal, bool levelWise) |
Writes level and center of each object together with a custom value to a file. More... | |
template<class TElem > | |
vector3 | ug::GetGridObjectCenter (Grid &g, TElem *elem) |
Returns the center of the given element (SLOW - for debugging only!) More... | |
vector3 | ug::GetGridObjectCenter (Grid &g, GridObject *elem) |
Returns the center of the given element (SLOW - for debugging only!) More... | |
bool | ug::CheckElementConsistency (MultiGrid &mg, Vertex *v) |
Checks whether associated elements and associated constrained/constraining objects are fine. More... | |
bool | ug::CheckElementConsistency (MultiGrid &mg, Edge *e) |
Checks whether associated elements and associated constrained/constraining objects are fine. More... | |
bool | ug::CheckElementConsistency (MultiGrid &mg, Face *f) |
Checks whether associated elements and associated constrained/constraining objects are fine. More... | |
std::string | ug::ElementDebugInfo (const Grid &grid, GridObject *e) |
Returns a string containing information on the given element. More... | |
Methods that log informations on grids, subset-handlers, ...
|
static |
Checks whether distributed objects have the same type on all processes.
Especially when constrained / constraining objects are present in a grid, it may be useful to check the types if errors occur during refinement / distribution.
References ug::Grid::attach_to(), ug::MultiGrid::begin(), pcl::InterfaceCommunicator< TLayout >::communicate(), ug::CT_CONSTRAINED, ug::CT_CONSTRAINING, ug::CT_NONE, ug::Grid::detach_from(), ug::Grid::distributed_grid_manager(), ug::MultiGrid::end(), pcl::InterfaceCommunicator< TLayout >::exchange_data(), ug::MultiGrid::get_level(), ug::GetGridObjectCenter(), ug::DistributedGridManager::grid_layout_map(), ug::INT_H_MASTER, ug::INT_H_SLAVE, ug::INT_V_MASTER, ug::INT_V_SLAVE, PCL_RO_BOR, and UG_LOG.
Referenced by ug::bridge::RegisterGridBridge_Debug().
bool ug::CheckDistributedParentTypes | ( | MultiGrid & | mg | ) |
Check whether local parent types match the type of the actual parent element.
References pcl::AllProcsTrue(), ug::ComPol_CheckDistributedParentStates< TLayout >::exchange_data(), and UG_LOG.
Referenced by ug::bridge::RegisterGridBridge_Debug().
Checks whether associated elements and associated constrained/constraining objects are fine.
References ug::CheckElementConsistency(), ug::ConstrainingEdge::constrained_edge(), ug::ConstrainingEdge::constrained_vertex(), ug::MultiGrid::get_child(), ug::MultiGrid::get_child_vertex(), ug::ConstrainedEdge::get_constraining_object(), ug::MultiGrid::get_parent(), ug::GetGridObjectCenter(), ug::GridObject::is_constrained(), ug::GridObject::is_constraining(), ug::MultiGrid::num_children(), ug::ConstrainingEdge::num_constrained_edges(), ug::EdgeVertices::num_vertices(), UG_ASSERT, UG_LOG, UG_THROW, and ug::EdgeVertices::vertex().
Checks whether associated elements and associated constrained/constraining objects are fine.
References ug::Grid::associated_elements(), ug::GetGridObjectCenter(), ug::GridObject::is_constrained(), ug::GridObject::is_constraining(), ug::PointerConstArray< TPtr >::size(), and UG_LOG.
Referenced by ug::CheckElementConsistency().
Checks whether associated elements and associated constrained/constraining objects are fine.
References ug::ConstrainedVertex::get_constraining_object(), ug::MultiGrid::get_parent(), ug::GetGridObjectCenter(), ug::GridObject::is_constrained(), UG_ASSERT, and UG_LOG.
Referenced by ug::bridge::RegisterGridBridge_Debug().
bool ug::CheckHangingNodeConsistency | ( | Grid & | g | ) |
checks whether all constraining and constrained objects are correctly connected.
References ug::Grid::begin(), ug::CheckHangingNodeConstrainingFace(), ug::Grid::end(), FAILED_CHECK, ug::ConstrainedVertex::get_constraining_object(), ug::ConstrainedEdge::get_constraining_object(), ug::GridObject::is_constrained(), ug::GridObject::is_constraining(), and ug::EdgeVertices::vertex().
Referenced by ug::bridge::RegisterGridBridge_Debug().
bool ug::CheckHangingNodeConsistency | ( | MultiGrid & | mg | ) |
checks whether a multigrid is a valid haging vertex grid.
This algorithm e.g. checks, whether adaptivity is represented by constrained / constraining objects.
Calls CheckHangingVertexConsistency(Grid&)
References ug::Grid::begin(), ug::MultiGrid::begin(), ug::ConstrainingEdge::constrained_edge(), ug::ConstrainingEdge::constrained_vertex(), ug::Grid::end(), ug::MultiGrid::end(), FAILED_CHECK, ug::MultiGrid::get_child(), ug::ConstrainedVertex::get_constraining_object(), ug::ConstrainedFace::get_constraining_object(), ug::MultiGrid::get_level(), ug::MultiGrid::get_parent(), ug::GetGridObjectCenter(), ug::MultiGrid::has_children(), ug::GridObject::is_constrained(), ug::ConstrainingFace::is_constrained_object(), ug::GridObject::is_constraining(), ug::MultiGrid::num_children(), ug::ConstrainingEdge::num_constrained_edges(), ug::ConstrainingFace::num_constrained_edges(), ug::ConstrainingFace::num_constrained_faces(), ug::ConstrainingEdge::num_constrained_vertices(), ug::ConstrainingFace::num_constrained_vertices(), ug::FaceVertices::num_vertices(), UG_ASSERT, UG_ERR_LOG, and ug::EdgeVertices::vertex().
void ug::CheckMultiGridConsistency | ( | MultiGrid & | mg | ) |
Checks whether parent child connections in a multi-grid are correct.
Referenced by ug::bridge::RegisterGridBridge_Debug().
std::string ug::ElementDebugInfo | ( | const Grid & | grid, |
GridObject * | e | ||
) |
Returns a string containing information on the given element.
The string contains the position and level of the element, whether it is normal, constrained or constraining, and its assigned and actual parent types. In parallel the interface states are also returned.
This method is intended for use in UG_ASSERT or UG_THROW to print additional information on an element for which a problem occurred.
References ug::GridObject::base_object_id(), ug::EDGE, ug::ElementDebugInfo_IMPL(), ug::FACE, ug::VERTEX, and ug::VOLUME.
Referenced by ug::AdaptionSurfaceGridFunction< TDomain >::ValueAccessor::access_closure(), ug::AdaptionSurfaceGridFunction< TDomain >::ValueAccessor::access_inner(), ug::StdTransfer< TDomain, TAlgebra >::assemble_prolongation_p1(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::calc_error(), ug::CalculateSmoothCreaseManifoldPosInParentLevelLoopScheme(), ug::CalculateSmoothManifoldPosInParentLevelButterflyScheme(), ug::CalculateSmoothManifoldPosInParentLevelLoopScheme(), ug::DoFDistribution::check_subsets(), ug::CheckForUnconnectedSidesIMPL(), ug::CheckGFValuesWithinBounds(), ug::CollectConstraining(), ug::AdaptionSurfaceGridFunction< TDomain >::copy_to_surface(), ug::CreateLayoutsFromDistInfos(), ug::GlobalGridFunctionGradientData< TGridFunction >::evaluate(), ug::ComPol_NewConstrainedVerticals< TLayout >::extract(), ug::interpolate_from_original_fct(), ug::ExpectedErrorMarkingStrategy< TDomain >::mark(), ug::SurfaceView::mark_shadowing(), ug::MultiEdgeSplit(), ug::HangingNodeRefiner_MultiGrid::perform_coarsening(), ug::PostProcessDistInfos(), ug::HangingNodeRefinerBase< TSelector >::refine_face_with_normal_vertex(), ug::SerializeMultiGridElements(), and ug::PeriodicBoundaryManager::validity_check().
|
inline |
Returns the center of the given element (SLOW - for debugging only!)
Caution: This method is pretty slow and should only be used for debugging purposes. It only works if one of the standard position attachments aPosition, aPosition2 or aPosition1 is attached to the vertices of g.
The method returns the center of the specified element in a vector3 structure, regardless of the actual dimension of the position attachment. Unused coordinates are set to 0.
TElem has to be derived from GridObject
References ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, ug::GetGridObjectCenter(), UG_THROW, ug::VERTEX, and ug::VOLUME.
Returns the center of the given element (SLOW - for debugging only!)
Caution: This method is pretty slow and should only be used for debugging purposes. It only works if one of the standard position attachments aPosition, aPosition2 or aPosition1 is attached to the vertices of g.
The method returns the center of the specified element in a vector3 structure, regardless of the actual dimension of the position attachment. Unused coordinates are set to 0.
TElem has to be derived from GridObject
References ug::aPosition, ug::aPosition1, ug::aPosition2, ug::CalculateCenter(), ug::Grid::has_vertex_attachment(), and UG_LOG.
Referenced by ug::GlobalFracturedMediaRefiner::assign_elem_and_side_marks(), ug::PeriodicBoundaryManager::check_elements_periodicity(), ug::CheckDistributedObjectConstraintTypes(), ug::CheckElementConsistency(), ug::CheckHangingNodeConsistency(), ug::CheckLocalParentTypes(), ug::ComPol_NewConstrainedVerticals< TLayout >::create_initial_hash_entry(), ug::ElementDebugInfo_IMPL(), ug::ComPol_CheckDistributedParentStates< TLayout >::extract(), ug::GetGridObjectCenter(), ug::PeriodicBoundaryManager::print_identification(), ug::StdHNodeAdjuster::ref_marks_changed(), ug::HangingNodeRefinerBase< TSelector >::refine_volume_with_normal_vertex(), and ug::WriteDebugValuesToFile().
int ug::GetGridObjectIndex | ( | Grid & | g, |
TElem * | elem | ||
) |
returns the index of the given element in the given grid.
Runtime O(n). Returns -1 if the element could not be found.
References ug::Grid::begin(), and ug::Grid::end().
void ug::PrintAttachmentInfo | ( | Grid & | grid | ) |
prints information on all attachments of the specified grid
References ug::AttachmentPipe< TElem, TElemHandler >::attachments_begin(), ug::AttachmentPipe< TElem, TElemHandler >::attachments_end(), ug::Grid::get_attachment_pipe(), ug::IAttachment::get_name(), ug::IAttachmentDataContainer::occupied_memory(), and UG_LOG.
Referenced by ug::bridge::RegisterGridBridge_Misc().
void ug::PrintElementNumbers | ( | const GridObjectCollection & | goc | ) |
prints how many elements of each type exist in the goc.
References ug::GridObjectCollection::num(), ug::GridObjectCollection::num_levels(), and UG_LOG.
Referenced by ug::PrintGridElementNumbers().
void ug::PrintGridElementNumbers | ( | Grid & | grid | ) |
prints how many elements of each type exist in the grid.
References ug::Grid::get_grid_objects(), and ug::PrintElementNumbers().
Referenced by ug::bridge::RegisterGridBridge_Misc().
void ug::PrintGridElementNumbers | ( | GridSubsetHandler & | sh | ) |
prints how many elements of each type exist in the subset handler.
References ug::GridSubsetHandler::get_grid_objects(), and ug::PrintElementNumbers().
void ug::PrintGridElementNumbers | ( | MultiGrid & | mg | ) |
prints how many elements of each type exist in the multi grid.
References ug::MultiGrid::get_grid_objects(), and ug::PrintElementNumbers().
void ug::WriteDebugValuesToFile | ( | const char * | filename, |
Grid & | grid, | ||
TAValue & | aVal, | ||
bool | levelWise | ||
) |
Writes level and center of each object together with a custom value to a file.
References ug::Grid::begin(), ug::GridObjectCollection::begin(), ug::Grid::end(), ug::GridObjectCollection::end(), ug::Grid::get_grid_objects(), ug::MultiGrid::get_level(), ug::GetGridObjectCenter(), ug::Grid::num(), and ug::GridObjectCollection::num_levels().