33 #ifndef __H__UG__grid_objects_0d__
34 #define __H__UG__grid_objects_0d__
36 #include "../grid/grid.h"
118 if(m_constrainingObj)
119 m_constrainingObj->remove_constraint_link(
this);
131 if(m_constrainingObj ==
static_cast<const GridObject*
>(e)){
132 m_constrainingObj = NULL;
138 if(m_constrainingObj ==
static_cast<const GridObject*
>(f)){
139 m_constrainingObj = NULL;
145 m_constrainingObj = constrObj;
154 if((m_parentBaseObjectId != -1) && (m_parentBaseObjectId !=
id)){
155 UG_THROW(
"Bad parent base object id specified! The given id"
156 " has to match the id of the constraining object if that"
157 " is present. Call this method only, if no constraining"
158 " object has been set!");
160 m_parentBaseObjectId = id;
Use this class as a tool to create const_iterators to your own geometric objects.
Definition: generic_grid_object_iterator.h:70
A vertex appearing on edges or faces.
Definition: grid_objects_0d.h:110
void set_local_coordinate_2(number coord)
Definition: grid_objects_0d.h:170
ConstrainedVertex()
Definition: grid_objects_0d.h:115
number get_local_coordinate_1() const
Definition: grid_objects_0d.h:164
virtual ~ConstrainedVertex()
Definition: grid_objects_0d.h:116
GridObject * m_constrainingObj
Definition: grid_objects_0d.h:173
virtual GridObject * create_empty_instance() const
create an instance of the derived type
Definition: grid_objects_0d.h:122
virtual ReferenceObjectID reference_object_id() const
Definition: grid_objects_0d.h:125
virtual bool is_constrained() const
returns true if the object is constrained by other objects.
Definition: grid_objects_0d.h:127
virtual void remove_constraint_link(const Edge *e)
removes a constraint link to the grid object.
Definition: grid_objects_0d.h:129
void set_constraining_object(GridObject *constrObj)
Definition: grid_objects_0d.h:143
int m_parentBaseObjectId
Definition: grid_objects_0d.h:175
GridObject * get_constraining_object()
Definition: grid_objects_0d.h:150
int get_parent_base_object_id()
Definition: grid_objects_0d.h:151
virtual int container_section() const
Definition: grid_objects_0d.h:124
vector2 m_localCoord
Definition: grid_objects_0d.h:174
static bool type_match(GridObject *pObj)
Definition: grid_objects_0d.h:113
number get_local_coordinate_2() const
Definition: grid_objects_0d.h:165
void set_local_coordinates(number x, number y)
Definition: grid_objects_0d.h:167
virtual void remove_constraint_link(const Face *f)
removes a constraint link to the grid object.
Definition: grid_objects_0d.h:136
void set_local_coordinates(const vector2 &coords)
Definition: grid_objects_0d.h:168
void set_parent_base_object_id(int id)
Definition: grid_objects_0d.h:152
const vector2 & get_local_coordinates() const
Definition: grid_objects_0d.h:163
void set_local_coordinate_1(number coord)
Definition: grid_objects_0d.h:169
Base-class for edges.
Definition: grid_base_objects.h:397
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
Use this class as a tool to create iterators to your own geometric objects.
Definition: generic_grid_object_iterator.h:44
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
virtual int base_object_id() const =0
A basic vertex-type.
Definition: grid_objects_0d.h:62
virtual int container_section() const
Definition: grid_objects_0d.h:71
virtual ~RegularVertex()
Definition: grid_objects_0d.h:67
virtual GridObject * create_empty_instance() const
create an instance of the derived type
Definition: grid_objects_0d.h:69
static bool type_match(GridObject *pObj)
Definition: grid_objects_0d.h:65
virtual ReferenceObjectID reference_object_id() const
Definition: grid_objects_0d.h:72
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
GenericGridObjectIterator< ConstrainedVertex *, VertexIterator > iterator
Definition: grid_objects_0d.h:182
Vertex grid_base_object
Definition: grid_objects_0d.h:186
ConstGenericGridObjectIterator< ConstrainedVertex *, VertexIterator, ConstVertexIterator > const_iterator
Definition: grid_objects_0d.h:184
GenericGridObjectIterator< RegularVertex *, VertexIterator > iterator
Definition: grid_objects_0d.h:79
ConstGenericGridObjectIterator< RegularVertex *, VertexIterator, ConstVertexIterator > const_iterator
Definition: grid_objects_0d.h:81
Vertex grid_base_object
Definition: grid_objects_0d.h:83
Definition: grid_base_object_traits.h:68
#define UG_THROW(msg)
Definition: error.h:57
#define UG_API
Definition: ug_config.h:65
double number
Definition: types.h:124
ElementStorage< Vertex >::SectionContainer::iterator VertexIterator
This Iterator will be used as base-class for iterators of specialized geometric objects.
Definition: grid_base_object_traits.h:73
ReferenceObjectID
these ids are used to identify the shape of a geometric object.
Definition: grid_base_objects.h:74
@ ROID_VERTEX
Definition: grid_base_objects.h:76
geometry_traits< ConstrainedVertex >::const_iterator ConstConstrainedVertexIterator
Definition: grid_objects_0d.h:197
geometry_traits< RegularVertex >::iterator RegularVertexIterator
Definition: grid_objects_0d.h:94
@ VERTEX
Definition: grid_base_objects.h:60
geometry_traits< ConstrainedVertex >::iterator ConstrainedVertexIterator
Definition: grid_objects_0d.h:196
geometry_traits< RegularVertex >::const_iterator ConstRegularVertexIterator
Definition: grid_objects_0d.h:95
VertexContainerSections
These numbers define where in the vertex-section-container a vertex will be stored.
Definition: grid_objects_0d.h:46
@ CSVRT_NONE
Definition: grid_objects_0d.h:47
@ CSVRT_REGULAR_VERTEX
Definition: grid_objects_0d.h:48
@ CSVRT_CONSTRAINED_VERTEX
Definition: grid_objects_0d.h:49
ElementStorage< Vertex >::SectionContainer::const_iterator ConstVertexIterator
Definition: grid_base_object_traits.h:74