47 template<
class TConfigure>
85 mObjects.push_back(ThisObject);
90 mObjects.erase(
std::remove(mObjects.begin(),mObjects.end(),ThisObject),mObjects.end());
96 std::swap(mObjects[
Index], mObjects.back());
108 mObjects.reserve(size);
115 mObjects = rOther.mObjects;
122 mObjects(rOther.mObjects)
130 if(TConfigure::Intersection(rThisObject, *i_object))
132 ResultIteratorType repeated_object = std::find(Result-NumberOfResults, Result, *i_object);
133 if(repeated_object==Result)
147 if(TConfigure::Intersection(rThisObject, *i_object))
149 ResultIteratorType repeated_object = std::find(Result.begin(), Result.end(), *i_object);
150 if(repeated_object==Result.end())
152 Result.push_back(*i_object);
162 if( rThisObject != *i_object )
164 if(TConfigure::Intersection(rThisObject, *i_object))
166 ResultIteratorType repeated_object = std::find(Result-NumberOfResults, Result, *i_object);
167 if(repeated_object==Result)
182 if( rThisObject != *i_object )
184 if(TConfigure::Intersection(rThisObject, *i_object))
186 ResultIteratorType repeated_object = std::find(Result.begin(), Result.end(), *i_object);
187 if(repeated_object==Result.end())
189 Result.push_back(*i_object);
200 if(TConfigure::Intersection(rThisObject, *i_object, Radius))
202 ResultIteratorType repeated_object = std::find(Result-NumberOfResults, Result, *i_object);
203 if(repeated_object==Result)
217 if( rThisObject != *i_object )
219 if(TConfigure::Intersection(rThisObject, *i_object, Radius))
221 ResultIteratorType repeated_object = std::find(Result-NumberOfResults, Result, *i_object);
222 if(repeated_object==Result)
237 if(TConfigure::Intersection(rThisObject, *i_object, Radius))
239 ResultIteratorType repeated_object = std::find(Result-NumberOfResults, Result, *i_object);
240 if(repeated_object==Result)
243 TConfigure::Distance(rThisObject,*i_object,distance);
246 *Distances = distance;
258 if( rThisObject != *i_object )
260 if(TConfigure::Intersection(rThisObject, *i_object, Radius))
262 ResultIteratorType repeated_object = std::find(Result-NumberOfResults, Result, *i_object);
263 if(repeated_object==Result)
266 TConfigure::Distance(rThisObject,*i_object,distance);
269 *Distances = distance;
280 return mObjects.begin();
285 return mObjects.end();
290 return mObjects.size();
295 return mObjects.begin();
300 return mObjects.end();
305 return mObjects.size();
310 return mObjects[
Index];
334 virtual std::string
Info()
const
336 return "Cell Class ";
393 std::vector<PointerType> mObjects;
431 template<
class TConfigure>
439 template<
class TConfigure>
444 rOStream << std::endl;
void SearchObjectsExclusive(PointerType &rThisObject, ResultContainerType &Result)
Definition: cell.h:178
Cell(Cell const &rOther)
Copy constructor.
Definition: cell.h:121
void SearchObjectsInRadiusExclusive(PointerType &rThisObject, double const &Radius, ResultIteratorType &Result, SizeType &NumberOfResults, const SizeType &MaxNumberOfResults)
Definition: cell.h:213
void Add(const PointerType &ThisObject)
Definition: cell.h:83
std::size_t SizeType
configure types
Definition: cell.h:55
virtual std::string Info() const
Turn back information as a string.
Definition: cell.h:334
SizeType Size() const
Definition: cell.h:303
TConfigure::ContainerType ContainerType
Definition: cell.h:58
TConfigure::PointType PointType
Definition: cell.h:56
void SearchObjects(PointerType &rThisObject, ResultIteratorType &Result, SizeType &NumberOfResults, const SizeType &MaxNumberOfResults)
Definition: cell.h:126
TConfigure::DistanceIteratorType DistanceIteratorType
Definition: cell.h:62
LocalContainerType::iterator LocalIteratorType
Definition: cell.h:65
void SearchObjectsInRadiusExclusive(PointerType &rThisObject, double const &Radius, ResultIteratorType &Result, DistanceIteratorType &Distances, SizeType &NumberOfResults, const SizeType &MaxNumberOfResults)
Definition: cell.h:254
void Remove(const PointerType &ThisObject)
Definition: cell.h:88
void Remove(const std::size_t Index)
Definition: cell.h:94
TConfigure::IteratorType IteratorType
Definition: cell.h:59
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: cell.h:346
TConfigure::ResultContainerType ResultContainerType
Definition: cell.h:60
void SearchObjectsExclusive(PointerType &rThisObject, ResultIteratorType &Result, SizeType &NumberOfResults, const SizeType &MaxNumberOfResults)
Definition: cell.h:158
LocalIteratorType End()
Definition: cell.h:283
void SearchObjectsInRadius(PointerType &rThisObject, double const &Radius, ResultIteratorType &Result, DistanceIteratorType &Distances, SizeType &NumberOfResults, const SizeType &MaxNumberOfResults)
Definition: cell.h:233
virtual ~Cell()
Destructor.
Definition: cell.h:80
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: cell.h:340
void AllocateCell(const std::size_t size)
Definition: cell.h:106
TConfigure::PointerType PointerType
Definition: cell.h:57
std::vector< PointerType > LocalContainerType
Definition: cell.h:64
Cell()
Default constructor.
Definition: cell.h:75
LocalIteratorType Begin()
Definition: cell.h:278
LocalIteratorType End() const
Definition: cell.h:298
Cell & operator=(Cell const &rOther)
Assignment operator.
Definition: cell.h:113
SizeType Size()
Definition: cell.h:288
KRATOS_CLASS_POINTER_DEFINITION(Cell)
Pointer definition of Cell.
PointerType GetObject(std::size_t Index)
Definition: cell.h:308
void SearchObjects(PointerType &rThisObject, ResultContainerType &Result)
Definition: cell.h:143
LocalIteratorType Begin() const
Definition: cell.h:293
TConfigure::ResultIteratorType ResultIteratorType
Definition: cell.h:61
void SearchObjectsInRadius(PointerType &rThisObject, double const &Radius, ResultIteratorType &Result, SizeType &NumberOfResults, const SizeType &MaxNumberOfResults)
Definition: cell.h:196
void Clear()
Definition: cell.h:100
bool remove(const std::string &rPath)
Definition: kratos_filesystem.cpp:57
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
Configure::ResultIteratorType ResultIteratorType
Definition: transfer_utility.h:252
Configure::IteratorType IteratorType
Definition: transfer_utility.h:249
Configure::PointType PointType
Definition: transfer_utility.h:245
Configure::ResultContainerType ResultContainerType
Definition: transfer_utility.h:250
Configure::ContainerType ContainerType
Definition: transfer_utility.h:247