This is the base class for point locators. They locate points in space: given a mesh they return the element and local coordinates for a given point in global coordinates.
Author:
Daniel Dreyer, 2003
Definition at line 57 of file point_locator_base.h.
Member Typedef Documentation
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > ReferenceCounter::Counts [protected, inherited]Data structure to log the information. The log is identified by the class name.
Definition at line 105 of file reference_counter.h.
Constructor & Destructor Documentation
PointLocatorBase::PointLocatorBase (const MeshBase &mesh, const PointLocatorBase *master) [protected]Constructor. Protected so that this base class cannot be explicitly instantiated. Takes a master PointLocator that helps in saving memory.
Definition at line 35 of file point_locator_base.C.
Definition at line 47 of file point_locator_base.C.
{
}
Member Function Documentation
AutoPtr< PointLocatorBase > PointLocatorBase::build (const PointLocatorTypet, const MeshBase &mesh, const PointLocatorBase *master = NULL) [static]Builds an PointLocator for the mesh mesh. Optionally takes a master PointLocator to save memory. An AutoPtr<PointLocatorBase> is returned to prevent memory leak. This way the user need not remember to delete the object.
Definition at line 55 of file point_locator_base.C.
virtual void PointLocatorBase::clear () [pure virtual]Clears the PointLocator.
Implemented in PointLocatorList, and PointLocatorTree.
virtual void PointLocatorBase::disable_out_of_mesh_mode (void) [pure virtual]Disables out-of-mesh mode (default). If asked to find a point that is contained in no mesh at all, the point locator will now crash.
Implemented in PointLocatorList, and PointLocatorTree.
Referenced by MeshFunction::disable_out_of_mesh_mode().
virtual void PointLocatorBase::enable_out_of_mesh_mode (void) [pure virtual]Enables out-of-mesh mode. In this mode, if asked to find a point that is contained in no mesh at all, the point locator will return a NULL pointer instead of crashing. Per default, this mode is off.
Implemented in PointLocatorList, and PointLocatorTree.
Referenced by MeshFunction::enable_out_of_mesh_mode().
std::string ReferenceCounter::get_info () [static, inherited]Gets a string containing the reference information.
Definition at line 45 of file reference_counter.C.
References ReferenceCounter::_counts, and Quality::name().
Referenced by ReferenceCounter::print_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::ostringstream out;
out << '
<< ' ----------------------------------------------------------------------------
<< '| Reference count information |
<< ' ---------------------------------------------------------------------------- ;
for (Counts::iterator it = _counts.begin();
it != _counts.end(); ++it)
{
const std::string name(it->first);
const unsigned int creations = it->second.first;
const unsigned int destructions = it->second.second;
out << '| ' << name << ' reference count information:
<< '| Creations: ' << creations << '
<< '| Destructions: ' << destructions << ';
}
out << ' ---------------------------------------------------------------------------- ;
return out.str();
#else
return '';
#endif
}
void ReferenceCounter::increment_constructor_count (const std::string &name) [inline, protected, inherited]Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.
Definition at line 149 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::ReferenceCountedObject().
void ReferenceCounter::increment_destructor_count (const std::string &name) [inline, protected, inherited]Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.
Definition at line 167 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::~ReferenceCountedObject().
true when this object is properly initialized and ready for use, false otherwise.
Definition at line 150 of file point_locator_base.h.
References _initialized.
Referenced by PointLocatorTree::init(), and PointLocatorList::init().
{
return (this->_initialized);
}
static unsigned int ReferenceCounter::n_objects () [inline, static, inherited]Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 76 of file reference_counter.h.
References ReferenceCounter::_n_objects.
Referenced by System::read_serialized_blocked_dof_objects(), and System::write_serialized_blocked_dof_objects().
{ return _n_objects; }
virtual const Elem* PointLocatorBase::operator() (const Point &p) const [pure virtual]Locates the element in which the point with global coordinates p is located. Pure virtual.
Implemented in PointLocatorList, and PointLocatorTree.
void ReferenceCounter::print_info () [static, inherited]Prints the reference information to std::cout.
Definition at line 83 of file reference_counter.C.
ReferenceCounter::CountsReferenceCounter::_counts [static, protected, inherited]Actually holds the data.
Definition at line 110 of file reference_counter.h.
Referenced by ReferenceCounter::get_info(), ReferenceCounter::increment_constructor_count(), and ReferenceCounter::increment_destructor_count().
bool PointLocatorBase::_initialized [protected]true when properly initialized, false otherwise.
Definition at line 142 of file point_locator_base.h.
Referenced by PointLocatorTree::init(), PointLocatorList::init(), initialized(), PointLocatorTree::operator()(), and PointLocatorList::operator()().
const PointLocatorBase* PointLocatorBase::_master [protected]Const pointer to our master, initialized to NULL if none given. When using multiple PointLocators, one can be assigned master and be in charge of something that all can have access to.
Definition at line 132 of file point_locator_base.h.
Referenced by PointLocatorTree::clear(), PointLocatorList::clear(), PointLocatorTree::init(), and PointLocatorList::init().
const MeshBase& PointLocatorBase::_mesh [protected]constant reference to the mesh in which the point is looked for.
Definition at line 137 of file point_locator_base.h.
Referenced by PointLocatorTree::enable_out_of_mesh_mode(), PointLocatorTree::init(), PointLocatorList::init(), and PointLocatorTree::operator()().
Definition at line 123 of file reference_counter.h.
Threads::atomic< unsigned int > ReferenceCounter::_n_objects [static, protected, inherited]The number of objects. Print the reference count information when the number returns to 0.
Definition at line 118 of file reference_counter.h.
Referenced by ReferenceCounter::n_objects(), ReferenceCounter::ReferenceCounter(), and ReferenceCounter::~ReferenceCounter().
Author
Generated automatically by Doxygen for libMesh from the source code.