ug4
|
Associates different projectors with individual subsets. More...
#include <projection_handler.h>
Public Member Functions | |
void | clear () |
SPRefinementProjector | default_projector () |
ConstSmartPtr< RefinementProjector > | default_projector () const |
virtual number | new_vertex (Vertex *vrt, Edge *parent) |
called when a new vertex was created from an old edge. More... | |
virtual number | new_vertex (Vertex *vrt, Face *parent) |
called when a new vertex was created from an old face. More... | |
virtual number | new_vertex (Vertex *vrt, Vertex *parent) |
called when a new vertex was created from an old vertex. More... | |
virtual number | new_vertex (Vertex *vrt, Volume *parent) |
called when a new vertex was created from an old volume. More... | |
size_t | num_projectors () const |
ProjectionHandler () | |
template<class TGeomProvider > | |
ProjectionHandler (const TGeomProvider &geometry, SmartPtr< ISubsetHandler > psh) | |
ProjectionHandler (ISubsetHandler *psh) | |
ProjectionHandler (SmartPtr< ISubsetHandler > psh) | |
ProjectionHandler (SPIGeometry3d geometry, ISubsetHandler *psh) | |
SPRefinementProjector | projector (size_t i) |
ConstSmartPtr< RefinementProjector > | projector (size_t i) const |
virtual void | refinement_begins (const ISubGrid *psg) |
prepares associated projectors for refinement More... | |
virtual bool | refinement_begins_requires_subgrid () const |
virtual void | refinement_ends () |
called when refinement is done More... | |
void | set_default_projector (SPRefinementProjector projector) |
virtual void | set_geometry (SPIGeometry3d geometry) |
virtual void | set_geometry_all (SPIGeometry3d geometry) |
Sets the geometry of the ProjectionHandler and of all associated projectors. More... | |
void | set_projector (const char *subsetName, SPRefinementProjector projector) |
associate a projector with a subset of the given name. More... | |
void | set_projector (int subsetIndex, SPRefinementProjector projector) |
associate a projector with a given subsetIndex. Note that '-1' is a valid index, too. More... | |
void | set_subset_handler (ISubsetHandler *psh) |
void | set_subset_handler (SmartPtr< ISubsetHandler > psh) |
const ISubsetHandler * | subset_handler () const |
return the subset handler that the projection handler is based on More... | |
virtual | ~ProjectionHandler () |
Public Member Functions inherited from ug::RefinementProjector | |
virtual SPIGeometry3d | geometry () const |
RefinementProjector () | |
RefinementProjector (SPElementCallback cb) | |
RefinementProjector (SPIGeometry3d geometry) | |
RefinementProjector (SPIGeometry3d geometry, SPElementCallback concernedElems) | |
virtual void | set_concerned_elements (SPElementCallback cb) |
virtual | ~RefinementProjector () |
Private Member Functions | |
template<class TParent > | |
number | handle_new_vertex (Vertex *vrt, TParent *parent) |
void | projector_required (int index) |
Private Attributes | |
SmartPtr< RefinementProjector > | m_defaultProjector |
std::vector< SmartPtr< RefinementProjector > > | m_projectors |
ISubsetHandler * | m_sh |
SmartPtr< ISubsetHandler > | m_spSH |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Protected Member Functions inherited from ug::RefinementProjector | |
IGeometry3d & | geom () |
const IGeometry3d & | geom () const |
template<class TElem > | |
bool | is_concerned (TElem *e) |
vector3 | pos (Vertex *v) const |
void | set_pos (Vertex *v, const vector3 &p) |
Associates different projectors with individual subsets.
In many cases it is useful to use different RefinementProjectors on different parts of a grid. To do so one may use a SubsetHandler to partition the grid into different parts. This SubsetHandler can then be passed to the ProjectionHandler and different RefinementProjectors can be associated with each subset through 'set_projector'.
ug::ProjectionHandler::ProjectionHandler | ( | ) |
References m_defaultProjector, and make_sp().
ug::ProjectionHandler::ProjectionHandler | ( | ISubsetHandler * | psh | ) |
Please makre sure that the given subset-handler outlives the ProjectionHandler. Please note that an alternative constructor taking a smart-pointer to a SubsetHandler exists.
References m_defaultProjector, and make_sp().
ug::ProjectionHandler::ProjectionHandler | ( | SmartPtr< ISubsetHandler > | psh | ) |
References m_defaultProjector, and make_sp().
ug::ProjectionHandler::ProjectionHandler | ( | SPIGeometry3d | geometry, |
ISubsetHandler * | psh | ||
) |
Please makre sure that the given subset-handler outlives the ProjectionHandler. Please note that an alternative constructor taking a smart-pointer to a SubsetHandler exists.
References m_defaultProjector, and make_sp().
|
inline |
References m_defaultProjector, and make_sp().
|
virtual |
void ug::ProjectionHandler::clear | ( | ) |
References m_defaultProjector, m_projectors, and make_sp().
Referenced by ug::DeserializeProjectionHandler().
|
inline |
|
inline |
References m_defaultProjector.
|
private |
References ug::ISubsetHandler::get_subset_index(), m_defaultProjector, m_projectors, m_sh, p, ug::RefinementProjector::pos(), ug::RefinementProjector::set_pos(), and UG_ASSERT.
Referenced by new_vertex().
called when a new vertex was created from an old edge.
Reimplemented from ug::RefinementProjector.
References handle_new_vertex().
called when a new vertex was created from an old face.
Reimplemented from ug::RefinementProjector.
References handle_new_vertex().
called when a new vertex was created from an old vertex.
Reimplemented from ug::RefinementProjector.
References handle_new_vertex().
called when a new vertex was created from an old volume.
Reimplemented from ug::RefinementProjector.
References handle_new_vertex().
|
inline |
|
inline |
|
inline |
References m_projectors.
|
private |
References m_projectors.
Referenced by projector(), refinement_begins(), and set_projector().
|
virtual |
prepares associated projectors for refinement
If an associated projector hasn't got an associated geometry, the geometry of the ProjectionHandler will automatically be assigned.
Reimplemented from ug::RefinementProjector.
References ug::Selector::assign_grid(), ug::Selector::clear(), ug::RefinementProjector::geom(), ug::RefinementProjector::geometry(), ug::Selector::get_grid_objects(), ug::ISubsetHandler::get_grid_objects_in_subset(), ug::ISubsetHandler::get_subset_index(), ug::ISubGrid::goc(), ug::IGeometry< dim >::grid(), ug::ISelector::grid(), ug::ISubGrid::is_contained(), lg_end_for, lg_for_each_const, m_defaultProjector, m_projectors, m_sh, make_sp(), ug::GridObjectCollection::num_edges(), ug::GridObjectCollection::num_faces(), ug::ISubsetHandler::num_subsets(), ug::GridObjectCollection::num_vertices(), ug::GridObjectCollection::num_volumes(), projector_required(), ug::RefinementProjector::refinement_begins(), ug::RefinementProjector::refinement_begins_requires_subgrid(), ug::ISelector::select(), ug::RefinementProjector::set_concerned_elements(), ug::RefinementProjector::set_geometry(), UG_COND_THROW, and SmartPtr< T, FreePolicy >::valid().
|
virtual |
returns 'true' if a specialized projector requires the subgrid during its 'refinement_begins' method.
Reimplemented from ug::RefinementProjector.
References m_projectors.
|
virtual |
called when refinement is done
Reimplemented from ug::RefinementProjector.
References m_projectors, and ug::RefinementProjector::refinement_ends().
void ug::ProjectionHandler::set_default_projector | ( | SPRefinementProjector | projector | ) |
|
virtual |
Reimplemented from ug::RefinementProjector.
References ug::RefinementProjector::geometry(), m_defaultProjector, and ug::RefinementProjector::set_geometry().
Referenced by set_geometry_all(), and set_projector().
|
virtual |
Sets the geometry of the ProjectionHandler and of all associated projectors.
References ug::RefinementProjector::geometry(), m_defaultProjector, m_projectors, and set_geometry().
void ug::ProjectionHandler::set_projector | ( | const char * | subsetName, |
SPRefinementProjector | projector | ||
) |
associate a projector with a subset of the given name.
References ug::ISubsetHandler::get_subset_index(), m_sh, projector(), set_projector(), and UG_COND_THROW.
void ug::ProjectionHandler::set_projector | ( | int | subsetIndex, |
SPRefinementProjector | projector | ||
) |
associate a projector with a given subsetIndex. Note that '-1' is a valid index, too.
References ug::RefinementProjector::geometry(), m_projectors, projector(), projector_required(), set_geometry(), UG_COND_THROW, and SmartPtr< T, FreePolicy >::valid().
Referenced by ug::IDomain< TGrid, TSubsetHandler >::broadcast_refinement_projector(), ug::DeserializeProjectionHandler(), ug::GridReaderUGX::projection_handler(), and set_projector().
void ug::ProjectionHandler::set_subset_handler | ( | ISubsetHandler * | psh | ) |
Please make sure that the given subset-handler outlives the ProjectionHandler. Please note that an alternative 'set_subset_handler' exists, which takes a smart-pointer to a SubsetHandler.
void ug::ProjectionHandler::set_subset_handler | ( | SmartPtr< ISubsetHandler > | psh | ) |
References SmartPtr< T, FreePolicy >::get(), m_sh, and m_spSH.
|
inline |
return the subset handler that the projection handler is based on
References m_sh.
Referenced by ug::GridWriterUGX::add_projection_handler(), ug::IDomain< TGrid, TSubsetHandler >::broadcast_refinement_projector(), and ug::SaveGridToLGB().
|
friend |
|
private |
|
private |
|
private |
Referenced by handle_new_vertex(), refinement_begins(), set_projector(), set_subset_handler(), and subset_handler().
|
private |
Referenced by set_subset_handler().