ug4
|
Adjusts vertex coordinates during refinement. More...
#include <refinement_projector.h>
Public Member Functions | |
virtual SPIGeometry3d | geometry () 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... | |
virtual void | refinement_begins (const ISubGrid *sg) |
called before refinement begins More... | |
virtual bool | refinement_begins_requires_subgrid () const |
virtual void | refinement_ends () |
called when refinement is done More... | |
RefinementProjector () | |
RefinementProjector (SPElementCallback cb) | |
RefinementProjector (SPIGeometry3d geometry) | |
RefinementProjector (SPIGeometry3d geometry, SPElementCallback concernedElems) | |
virtual void | set_concerned_elements (SPElementCallback cb) |
virtual void | set_geometry (SPIGeometry3d geometry) |
virtual | ~RefinementProjector () |
Protected Member Functions | |
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) |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
SPElementCallback | m_concernedElementsCallback |
SPIGeometry3d | m_geometry |
Friends | |
class | boost::serialization::access |
Adjusts vertex coordinates during refinement.
The refinement projector serves as a base class for other refinement projectors and serves as a simple linear projector at the same time. I.E. new vertices are always placed at the center of their parent element.
Internally, refinement projectors are implemented for 3d coordinates. Geometries of lower dimension can still be treated since they are wrapped in a IGeometry3d class. While this adds a small overhead it simplifies implementation and usability considerably, since no additional template dependencies have to be considered.
|
inline |
|
inline |
References new().
|
inline |
|
inline |
|
inlinevirtual |
|
inlineprotected |
|
inlineprotected |
References m_geometry.
|
inlinevirtual |
References m_geometry.
Referenced by ug::NeuriteProjector::attach_surf_params(), ug::SomaProjector::attach_surf_params(), ug::bp_newton_start_pos(), ug::NeuriteProjector::IsElementInsideSphere(), ug::Refine(), ug::ProjectionHandler::refinement_begins(), ug::RasterLayersProjector::remove_attachments(), ug::RasterLayersProjector::set_geometry(), ug::NeuriteProjector::set_geometry(), ug::ProjectionHandler::set_geometry(), set_geometry(), ug::SomaProjector::set_geometry(), ug::SubdivisionProjector::set_geometry(), ug::ProjectionHandler::set_geometry_all(), and ug::ProjectionHandler::set_projector().
|
inlineprotected |
References m_concernedElementsCallback.
called when a new vertex was created from an old edge.
Reimplemented in ug::SubdivisionProjector, ug::SphereProjector, ug::SomaProjector, ug::SmoothProjector, ug::RasterLayersProjector, ug::ProjectionHandler, ug::PlaneCutProjector, ug::NeuriteProjector, ug::EllipticCylinderProjector, ug::CylinderProjector, and ug::CylinderCutProjector.
called when a new vertex was created from an old face.
Reimplemented in ug::SphereProjector, ug::SomaProjector, ug::SmoothProjector, ug::RasterLayersProjector, ug::ProjectionHandler, ug::NeuriteProjector, ug::EllipticCylinderProjector, and ug::CylinderProjector.
called when a new vertex was created from an old vertex.
Reimplemented in ug::RasterLayersProjector, ug::ProjectionHandler, and ug::NeuriteProjector.
References pos(), and set_pos().
Referenced by ug::CylinderCutProjector::new_vertex(), ug::PlaneCutProjector::new_vertex(), ug::SmoothProjector::new_vertex(), and ug::Refine().
called when a new vertex was created from an old volume.
Reimplemented in ug::SphereProjector, ug::SomaProjector, ug::SmoothProjector, ug::RasterLayersProjector, ug::ProjectionHandler, ug::NeuriteProjector, ug::EllipticCylinderProjector, and ug::CylinderProjector.
References m_geometry.
Referenced by ug::NeuriteProjector::average_params(), ug::NeuriteProjector::average_pos_from_parent(), ug::ProjectionHandler::handle_new_vertex(), ug::CylinderCutProjector::new_vertex(), ug::PlaneCutProjector::new_vertex(), ug::NeuriteProjector::new_vertex(), ug::RasterLayersProjector::new_vertex(), new_vertex(), ug::CylinderProjector::perform_projection(), ug::EllipticCylinderProjector::perform_projection(), ug::SomaProjector::perform_projection(), ug::SphereProjector::perform_projection(), ug::NeuriteProjector::position(), ug::SomaProjector::project_to_soma_surface(), ug::NeuriteProjector::push_into_place(), and ug::SmoothProjector::refinement_ends().
|
inlinevirtual |
called before refinement begins
if not NULL, the specified sub-grid will contains all elements that will be refined and are affected by the given projector.
If the specialized implementation of refinement_begins requires this subgrid, the method 'refinement_begins_requires_subgrid' should be specialized and should return 'true'. In this case the subgrid should always be provided by the caller. If you call 'RefinementProjector::refinement_begins(sg);' at the beginning of your specialization, an error will be thrown if this is not the case.
Reimplemented in ug::SubdivisionProjector, ug::SmoothProjector, and ug::ProjectionHandler.
References SmartPtr< T, FreePolicy >::invalid(), m_geometry, refinement_begins_requires_subgrid(), and UG_COND_THROW.
Referenced by ug::Refine(), ug::ProjectionHandler::refinement_begins(), and ug::SmoothProjector::refinement_begins().
|
inlinevirtual |
returns 'true' if a specialized projector requires the subgrid during its 'refinement_begins' method.
Reimplemented in ug::SubdivisionProjector, and ug::ProjectionHandler.
Referenced by ug::ProjectionHandler::refinement_begins(), and refinement_begins().
|
inlinevirtual |
called when refinement is done
Reimplemented in ug::SubdivisionProjector, ug::SmoothProjector, and ug::ProjectionHandler.
Referenced by ug::Refine(), and ug::ProjectionHandler::refinement_ends().
|
inlineprivate |
|
inlinevirtual |
Reimplemented in ug::SubdivisionProjector.
References m_concernedElementsCallback.
Referenced by ug::ProjectionHandler::refinement_begins(), ug::SubdivisionProjector::set_concerned_elements(), and ug::SubdivisionProjector::set_geometry().
|
inlinevirtual |
Reimplemented in ug::SubdivisionProjector, ug::SomaProjector, ug::ProjectionHandler, ug::NeuriteProjector, and ug::RasterLayersProjector.
References geometry(), and m_geometry.
Referenced by ug::Refine(), ug::ProjectionHandler::refinement_begins(), ug::RasterLayersProjector::set_geometry(), ug::NeuriteProjector::set_geometry(), ug::ProjectionHandler::set_geometry(), ug::SomaProjector::set_geometry(), ug::SubdivisionProjector::set_geometry(), and ug::IDomain< TGrid, TSubsetHandler >::set_refinement_projector().
References m_geometry, and p.
Referenced by ug::ProjectionHandler::handle_new_vertex(), ug::CylinderCutProjector::new_vertex(), ug::PlaneCutProjector::new_vertex(), ug::NeuriteProjector::new_vertex(), ug::RasterLayersProjector::new_vertex(), new_vertex(), ug::RasterLayersProjector::new_vertex_impl(), ug::CylinderProjector::perform_projection(), ug::EllipticCylinderProjector::perform_projection(), ug::SomaProjector::perform_projection(), ug::SphereProjector::perform_projection(), ug::SomaProjector::project_to_soma_surface(), ug::NeuriteProjector::push_into_place(), and ug::SmoothProjector::refinement_ends().
|
friend |
|
private |
Referenced by is_concerned(), and set_concerned_elements().
|
private |
Referenced by geom(), geometry(), pos(), refinement_begins(), set_geometry(), and set_pos().