Poster of Linux kernelThe best gift for a Linux geek
MeshBase

MeshBase

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

MeshBase -  

SYNOPSIS


#include <mesh_base.h>

Inherited by UnstructuredMesh.  

Classes


struct const_element_iterator

struct const_node_iterator

struct element_iterator

struct node_iterator
 

Public Types


typedef Predicates::multi_predicate Predicate
 

Public Member Functions


MeshBase (unsigned int d)

MeshBase (const MeshBase &other_mesh)

virtual AutoPtr< MeshBase > clone () const =0

virtual ~MeshBase ()

virtual AutoPtr< Partitioner > & partitioner ()

virtual void clear ()

bool is_prepared () const

virtual bool is_serial () const

virtual void allgather ()

virtual void delete_remote_elements ()

unsigned int mesh_dimension () const

void set_mesh_dimension (unsigned int d)

unsigned int spatial_dimension () const

virtual unsigned int n_nodes () const =0

unsigned int n_nodes_on_proc (const unsigned int proc) const

unsigned int n_local_nodes () const

unsigned int n_unpartitioned_nodes () const

virtual unsigned int max_node_id () const =0

virtual void reserve_nodes (const unsigned int nn)=0

virtual unsigned int n_elem () const =0

virtual unsigned int max_elem_id () const =0

virtual void reserve_elem (const unsigned int ne)=0

virtual void update_parallel_id_counts ()=0

virtual unsigned int n_active_elem () const =0

unsigned int n_elem_on_proc (const unsigned int proc) const

unsigned int n_local_elem () const

unsigned int n_unpartitioned_elem () const

unsigned int n_active_elem_on_proc (const unsigned int proc) const

unsigned int n_active_local_elem () const

unsigned int n_sub_elem () const

unsigned int n_active_sub_elem () const

virtual const Point & point (const unsigned int i) const =0

virtual const Node & node (const unsigned int i) const =0

virtual Node & node (const unsigned int i)=0

virtual const Node * node_ptr (const unsigned int i) const =0

virtual Node *& node_ptr (const unsigned int i)=0

virtual Elem * elem (const unsigned int i) const =0

virtual Node * add_point (const Point &p, const unsigned int id=DofObject::invalid_id, const unsigned int proc_id=DofObject::invalid_processor_id)=0

virtual Node * add_node (Node *n)=0

virtual void delete_node (Node *n)=0

virtual void renumber_node (unsigned int old_id, unsigned int new_id)=0

virtual Elem * add_elem (Elem *e)=0

virtual Elem * insert_elem (Elem *e)=0

virtual void delete_elem (Elem *e)=0

virtual void renumber_elem (unsigned int old_id, unsigned int new_id)=0

virtual void find_neighbors (const bool reset_remote_elements=false, const bool reset_current_list=true)=0

virtual void renumber_nodes_and_elements ()=0

virtual bool contract ()=0

void prepare_for_use (const bool skip_renumber_nodes_and_elements=false)

void partition (const unsigned int n_parts=libMesh::n_processors())

unsigned int n_subdomains () const

unsigned int n_partitions () const

unsigned int n_processors () const

unsigned int processor_id () const

std::string get_info () const

void print_info (std::ostream &os=std::cout) const

virtual void read (const std::string &name, MeshData *mesh_data=NULL, bool skip_renumber_nodes_and_elements=false)=0

virtual void write (const std::string &name, MeshData *mesh_data=NULL)=0

virtual void all_first_order ()=0

virtual void all_second_order (const bool full_ordered=true)=0

unsigned int recalculate_n_partitions ()

const PointLocatorBase & point_locator () const

void clear_point_locator ()

virtual element_iterator elements_begin ()=0

virtual element_iterator elements_end ()=0

virtual element_iterator active_elements_begin ()=0

virtual element_iterator active_elements_end ()=0

virtual element_iterator ancestor_elements_begin ()=0

virtual element_iterator ancestor_elements_end ()=0

virtual element_iterator subactive_elements_begin ()=0

virtual element_iterator subactive_elements_end ()=0

virtual element_iterator not_active_elements_begin ()=0

virtual element_iterator not_active_elements_end ()=0

virtual element_iterator not_ancestor_elements_begin ()=0

virtual element_iterator not_ancestor_elements_end ()=0

virtual element_iterator not_subactive_elements_begin ()=0

virtual element_iterator not_subactive_elements_end ()=0

virtual element_iterator local_elements_begin ()=0

virtual element_iterator local_elements_end ()=0

virtual element_iterator not_local_elements_begin ()=0

virtual element_iterator not_local_elements_end ()=0

virtual element_iterator active_local_elements_begin ()=0

virtual element_iterator active_local_elements_end ()=0

virtual element_iterator active_not_local_elements_begin ()=0

virtual element_iterator active_not_local_elements_end ()=0

virtual element_iterator level_elements_begin (const unsigned int level)=0

virtual element_iterator level_elements_end (const unsigned int level)=0

virtual element_iterator not_level_elements_begin (const unsigned int level)=0

virtual element_iterator not_level_elements_end (const unsigned int level)=0

virtual element_iterator local_level_elements_begin (const unsigned int level)=0

virtual element_iterator local_level_elements_end (const unsigned int level)=0

virtual element_iterator local_not_level_elements_begin (const unsigned int level)=0

virtual element_iterator local_not_level_elements_end (const unsigned int level)=0

virtual element_iterator pid_elements_begin (const unsigned int proc_id)=0

virtual element_iterator pid_elements_end (const unsigned int proc_id)=0

virtual element_iterator type_elements_begin (const ElemType type)=0

virtual element_iterator type_elements_end (const ElemType type)=0

virtual element_iterator active_type_elements_begin (const ElemType type)=0

virtual element_iterator active_type_elements_end (const ElemType type)=0

virtual element_iterator active_pid_elements_begin (const unsigned int proc_id)=0

virtual element_iterator active_pid_elements_end (const unsigned int proc_id)=0

virtual element_iterator unpartitioned_elements_begin ()=0

virtual element_iterator unpartitioned_elements_end ()=0

virtual element_iterator active_local_subdomain_elements_begin (const unsigned int subdomain_id)=0

virtual element_iterator active_local_subdomain_elements_end (const unsigned int subdomain_id)=0

virtual const_element_iterator elements_begin () const =0

virtual const_element_iterator elements_end () const =0

virtual const_element_iterator active_elements_begin () const =0

virtual const_element_iterator active_elements_end () const =0

virtual const_element_iterator ancestor_elements_begin () const =0

virtual const_element_iterator ancestor_elements_end () const =0

virtual const_element_iterator subactive_elements_begin () const =0

virtual const_element_iterator subactive_elements_end () const =0

virtual const_element_iterator not_active_elements_begin () const =0

virtual const_element_iterator not_active_elements_end () const =0

virtual const_element_iterator not_ancestor_elements_begin () const =0

virtual const_element_iterator not_ancestor_elements_end () const =0

virtual const_element_iterator not_subactive_elements_begin () const =0

virtual const_element_iterator not_subactive_elements_end () const =0

virtual const_element_iterator local_elements_begin () const =0

virtual const_element_iterator local_elements_end () const =0

virtual const_element_iterator not_local_elements_begin () const =0

virtual const_element_iterator not_local_elements_end () const =0

virtual const_element_iterator active_local_elements_begin () const =0

virtual const_element_iterator active_local_elements_end () const =0

virtual const_element_iterator active_not_local_elements_begin () const =0

virtual const_element_iterator active_not_local_elements_end () const =0

virtual const_element_iterator level_elements_begin (const unsigned int level) const =0

virtual const_element_iterator level_elements_end (const unsigned int level) const =0

virtual const_element_iterator not_level_elements_begin (const unsigned int level) const =0

virtual const_element_iterator not_level_elements_end (const unsigned int level) const =0

virtual const_element_iterator local_level_elements_begin (const unsigned int level) const =0

virtual const_element_iterator local_level_elements_end (const unsigned int level) const =0

virtual const_element_iterator local_not_level_elements_begin (const unsigned int level) const =0

virtual const_element_iterator local_not_level_elements_end (const unsigned int level) const =0

virtual const_element_iterator pid_elements_begin (const unsigned int proc_id) const =0

virtual const_element_iterator pid_elements_end (const unsigned int proc_id) const =0

virtual const_element_iterator type_elements_begin (const ElemType type) const =0

virtual const_element_iterator type_elements_end (const ElemType type) const =0

virtual const_element_iterator active_type_elements_begin (const ElemType type) const =0

virtual const_element_iterator active_type_elements_end (const ElemType type) const =0

virtual const_element_iterator active_pid_elements_begin (const unsigned int proc_id) const =0

virtual const_element_iterator active_pid_elements_end (const unsigned int proc_id) const =0

virtual const_element_iterator unpartitioned_elements_begin () const =0

virtual const_element_iterator unpartitioned_elements_end () const =0

virtual const_element_iterator active_local_subdomain_elements_begin (const unsigned int subdomain_id) const =0

virtual const_element_iterator active_local_subdomain_elements_end (const unsigned int subdomain_id) const =0

virtual node_iterator nodes_begin ()=0

virtual node_iterator nodes_end ()=0

virtual node_iterator active_nodes_begin ()=0

virtual node_iterator active_nodes_end ()=0

virtual node_iterator local_nodes_begin ()=0

virtual node_iterator local_nodes_end ()=0

virtual node_iterator pid_nodes_begin (const unsigned int proc_id)=0

virtual node_iterator pid_nodes_end (const unsigned int proc_id)=0

virtual const_node_iterator nodes_begin () const =0

virtual const_node_iterator nodes_end () const =0

virtual const_node_iterator active_nodes_begin () const =0

virtual const_node_iterator active_nodes_end () const =0

virtual const_node_iterator local_nodes_begin () const =0

virtual const_node_iterator local_nodes_end () const =0

virtual const_node_iterator pid_nodes_begin (const unsigned int proc_id) const =0

virtual const_node_iterator pid_nodes_end (const unsigned int proc_id) const =0

unsigned int & set_n_subdomains ()
 

Public Attributes


AutoPtr< BoundaryInfo > boundary_info
 

Protected Member Functions


unsigned int & set_n_partitions ()
 

Protected Attributes


unsigned int _n_sbd

unsigned int _n_parts

unsigned int _dim

bool _is_prepared

AutoPtr< PointLocatorBase > _point_locator

AutoPtr< Partitioner > _partitioner
 

Friends


class Partitioner

class BoundaryInfo

std::ostream & operator<< (std::ostream &os, const MeshBase &m)
 

Detailed Description

This is the MeshBase class. This class provides all the data necessary to describe a geometric entity. It allows for the description of a dim dimensional object that lives in LIBMESH_DIM-dimensional space.

A mesh is made of nodes and elements, and this class provides data structures to store and access both. A mesh may be partitioned into a number of subdomains, and this class provides that functionality. Furthermore, this class provides functions for reading and writing a mesh to disk in various formats.

Author:

Benjamin S. Kirk

Date:

Date:

2009-09-03 11:59:40 -0500 (Thu, 03 Sep 2009)

Version:

Revision:

3454

Definition at line 69 of file mesh_base.h.  

Member Typedef Documentation

 

typedef Predicates::multi_predicate MeshBase::PredicateWe need an empty, generic class to act as a predicate for this and derived mesh classes.

Definition at line 496 of file mesh_base.h.  

Constructor & Destructor Documentation

 

MeshBase::MeshBase (unsigned intd)Constructor. Requires d, the dimension of the mesh.

Definition at line 43 of file mesh_base.C.

References _dim, and libMesh::initialized().

                                  :
  boundary_info  (new BoundaryInfo(*this)),
  _n_sbd         (1),
  _n_parts       (1),
  _dim           (d),
  _is_prepared   (false),
  _point_locator (NULL),
  _partitioner   (NULL)
{
  libmesh_assert (LIBMESH_DIM <= 3);
  libmesh_assert (LIBMESH_DIM >= _dim);
  libmesh_assert (libMesh::initialized());
}
 

MeshBase::MeshBase (const MeshBase &other_mesh)Copy-constructor.

Definition at line 59 of file mesh_base.C.

                                              :
  boundary_info  (new BoundaryInfo(*this)), // no copy constructor defined for BoundaryInfo?
  _n_sbd         (other_mesh._n_sbd),
  _n_parts       (other_mesh._n_parts),
  _dim           (other_mesh._dim),
  _is_prepared   (other_mesh._is_prepared),
  _point_locator (NULL),
  _partitioner   (other_mesh._partitioner->clone())
{
}
 

MeshBase::~MeshBase () [virtual]Destructor.

Definition at line 72 of file mesh_base.C.

References clear(), and libMesh::closed().

{
  this->clear();

  libmesh_assert (!libMesh::closed());
}
 

Member Function Documentation

 

virtual element_iterator MeshBase::active_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by SFCPartitioner::_do_partition(), MetisPartitioner::_do_partition(), LinearPartitioner::_do_partition(), DofMap::add_neighbors_to_send_list(), ParmetisPartitioner::assign_partitioning(), EquationSystems::build_discontinuous_solution_vector(), InfElemBuilder::build_inf_elem(), DofMap::compute_sparsity(), MeshTools::correct_node_proc_ids(), MeshTools::Modification::distort(), MeshRefinement::eliminate_unrefined_patches(), PointLocatorTree::enable_out_of_mesh_mode(), LocationMap< T >::fill(), MeshTools::find_boundary_nodes(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), MeshRefinement::flag_elements_by_nelem_target(), MeshTools::Modification::flatten(), PointLocatorList::init(), LaplaceMeshSmoother::init(), ParmetisPartitioner::initialize(), DofMap::invalidate_dofs(), MeshTools::libmesh_assert_valid_elem_ids(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshCommunication::make_elems_parallel_consistent(), MeshRefinement::make_refinement_compatible(), FEMSystem::mesh_position_set(), n_active_sub_elem(), PointLocatorTree::operator()(), System::read_legacy_data(), GmshIO::read_mesh(), VariationalMeshSmoother::readgr(), recalculate_n_partitions(), DofMap::reinit(), Partitioner::set_node_processor_ids(), Partitioner::set_parent_processor_ids(), LaplaceMeshSmoother::smooth(), BoundaryInfo::sync(), Tree< N >::Tree(), MeshRefinement::uniformly_coarsen(), MeshRefinement::uniformly_p_coarsen(), MeshRefinement::uniformly_p_refine(), MeshRefinement::uniformly_refine(), TetGenIO::write(), PostscriptIO::write(), FroIO::write(), TecplotIO::write_ascii(), MEDITIO::write_ascii(), GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), TecplotIO::write_binary(), GMVIO::write_discontinuous_gmv(), GmshIO::write_mesh(), GmshIO::write_post(), and GnuPlotIO::write_solution().  

virtual const_element_iterator MeshBase::active_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by SFCPartitioner::_do_partition(), MetisPartitioner::_do_partition(), LinearPartitioner::_do_partition(), DofMap::add_neighbors_to_send_list(), ParmetisPartitioner::assign_partitioning(), EquationSystems::build_discontinuous_solution_vector(), InfElemBuilder::build_inf_elem(), DofMap::compute_sparsity(), MeshTools::correct_node_proc_ids(), MeshTools::Modification::distort(), MeshRefinement::eliminate_unrefined_patches(), PointLocatorTree::enable_out_of_mesh_mode(), LocationMap< T >::fill(), MeshTools::find_boundary_nodes(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), MeshRefinement::flag_elements_by_nelem_target(), MeshTools::Modification::flatten(), PointLocatorList::init(), LaplaceMeshSmoother::init(), ParmetisPartitioner::initialize(), DofMap::invalidate_dofs(), MeshTools::libmesh_assert_valid_elem_ids(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshCommunication::make_elems_parallel_consistent(), MeshRefinement::make_refinement_compatible(), FEMSystem::mesh_position_set(), n_active_sub_elem(), PointLocatorTree::operator()(), System::read_legacy_data(), GmshIO::read_mesh(), VariationalMeshSmoother::readgr(), recalculate_n_partitions(), DofMap::reinit(), Partitioner::set_node_processor_ids(), Partitioner::set_parent_processor_ids(), LaplaceMeshSmoother::smooth(), BoundaryInfo::sync(), Tree< N >::Tree(), MeshRefinement::uniformly_coarsen(), MeshRefinement::uniformly_p_coarsen(), MeshRefinement::uniformly_p_refine(), MeshRefinement::uniformly_refine(), TetGenIO::write(), PostscriptIO::write(), FroIO::write(), TecplotIO::write_ascii(), MEDITIO::write_ascii(), GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), TecplotIO::write_binary(), GMVIO::write_discontinuous_gmv(), GmshIO::write_mesh(), GmshIO::write_post(), and GnuPlotIO::write_solution().  

virtual const_element_iterator MeshBase::active_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_local_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by ExactSolution::_compute_error(), UniformRefinementEstimator::_estimate_error(), DofMap::add_neighbors_to_send_list(), FEMSystem::assemble_qoi(), FEMSystem::assemble_qoi_derivative(), FEMSystem::assembly(), ParmetisPartitioner::build_graph(), EquationSystems::build_solution_vector(), System::calculate_norm(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), PatchRecoveryErrorEstimator::estimate_error(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), MeshTools::find_hanging_nodes_and_parents(), MeshRefinement::flag_elements_by_error_fraction(), ParmetisPartitioner::initialize(), MeshTools::libmesh_assert_valid_node_procids(), System::local_dof_indices(), DofMap::max_constraint_error(), FEMSystem::mesh_position_get(), MeshTools::n_active_local_levels(), ErrorVector::plot_error(), FEMSystem::postprocess(), HPSingularity::select_refinement(), HPCoarsenTest::select_refinement(), MeshRefinement::test_level_one(), MeshRefinement::test_unflagged(), EnsightIO::write_geometry_ascii(), EnsightIO::write_scalar_ascii(), GnuPlotIO::write_solution(), EnsightIO::write_vector_ascii(), and System::zero_variable().  

virtual const_element_iterator MeshBase::active_local_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_local_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by ExactSolution::_compute_error(), UniformRefinementEstimator::_estimate_error(), DofMap::add_neighbors_to_send_list(), FEMSystem::assemble_qoi(), FEMSystem::assemble_qoi_derivative(), FEMSystem::assembly(), ParmetisPartitioner::build_graph(), EquationSystems::build_solution_vector(), System::calculate_norm(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), PatchRecoveryErrorEstimator::estimate_error(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), MeshTools::find_hanging_nodes_and_parents(), MeshRefinement::flag_elements_by_error_fraction(), ParmetisPartitioner::initialize(), MeshTools::libmesh_assert_valid_node_procids(), System::local_dof_indices(), DofMap::max_constraint_error(), FEMSystem::mesh_position_get(), MeshTools::n_active_local_levels(), ErrorVector::plot_error(), FEMSystem::postprocess(), HPSingularity::select_refinement(), HPCoarsenTest::select_refinement(), MeshRefinement::test_level_one(), MeshRefinement::test_unflagged(), EnsightIO::write_geometry_ascii(), EnsightIO::write_scalar_ascii(), GnuPlotIO::write_solution(), EnsightIO::write_vector_ascii(), and System::zero_variable().  

virtual const_element_iterator MeshBase::active_local_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::active_local_subdomain_elements_begin (const unsigned intsubdomain_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_local_subdomain_elements_begin (const unsigned intsubdomain_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::active_local_subdomain_elements_end (const unsigned intsubdomain_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_local_subdomain_elements_end (const unsigned intsubdomain_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual node_iterator MeshBase::active_nodes_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_node_iterator MeshBase::active_nodes_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual node_iterator MeshBase::active_nodes_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_node_iterator MeshBase::active_nodes_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_not_local_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::active_not_local_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_not_local_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::active_not_local_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::active_pid_elements_begin (const unsigned intproc_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_pid_elements_begin (const unsigned intproc_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::create_pid_mesh(), ParmetisPartitioner::initialize(), and n_active_elem_on_proc().  

virtual const_element_iterator MeshBase::active_pid_elements_end (const unsigned intproc_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_pid_elements_end (const unsigned intproc_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::create_pid_mesh(), ParmetisPartitioner::initialize(), and n_active_elem_on_proc().  

virtual const_element_iterator MeshBase::active_type_elements_begin (const ElemTypetype) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_type_elements_begin (const ElemTypetype) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::n_active_elem_of_type().  

virtual const_element_iterator MeshBase::active_type_elements_end (const ElemTypetype) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::active_type_elements_end (const ElemTypetype) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::n_active_elem_of_type().  

virtual Elem* MeshBase::add_elem (Elem *e) [pure virtual]Add elem e to the end of the element array. To add an element locally, set e->processor_id() before adding it. To ensure a specific element id, call e->set_id() before adding it; only do this in parallel if you are manually keeping ids consistent.

Implemented in ParallelMesh, and SerialMesh.

Referenced by GMVIO::_read_one_cell(), MeshRefinement::add_elem(), MeshTools::Modification::all_tri(), MeshTools::Generation::build_cube(), InfElemBuilder::build_inf_elem(), Triangle::copy_tri_to_mesh(), UnstructuredMesh::create_submesh(), UNVIO::element_in(), MeshTools::Modification::flatten(), TetGenMeshInterface::pointset_convexhull(), VTKIO::read(), ExodusII_IO::read(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), OFFIO::read_stream(), MatlabIO::read_stream(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().  

virtual Node* MeshBase::add_node (Node *n) [pure virtual]Add Node n to the end of the vertex array.

Implemented in ParallelMesh, and SerialMesh.  

virtual Node* MeshBase::add_point (const Point &p, const unsigned intid = DofObject::invalid_id, const unsigned intproc_id = DofObject::invalid_processor_id) [pure virtual]Add a new Node at Point p to the end of the vertex array, with processor_id procid. Use DofObject::invalid_processor_id (default) to add a node to all processors, or libMesh::processor_id() to add a node to the local processor only. If adding a node locally, passing an id other than DofObject::invalid_id will set that specific node id. Only do this in parallel if you are manually keeping ids consistent.

Implemented in ParallelMesh, and SerialMesh.

Referenced by GMVIO::_read_nodes(), MeshRefinement::add_point(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), InfElemBuilder::build_inf_elem(), Triangle::copy_tri_to_mesh(), UnstructuredMesh::create_submesh(), UNVIO::node_in(), VTKIO::read(), ExodusII_IO::read(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), OFFIO::read_stream(), MatlabIO::read_stream(), TriangleInterface::triangulate(), and TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().  

virtual void MeshBase::all_first_order () [pure virtual]Converts a mesh with higher-order elements into a mesh with linear elements. For example, a mesh consisting of Tet10 will be converted to a mesh with Tet4 etc.

Implemented in UnstructuredMesh.

Referenced by ErrorVector::plot_error().  

virtual void MeshBase::all_second_order (const boolfull_ordered = true) [pure virtual]Converts a (conforming, non-refined) mesh with linear elements into a mesh with second-order elements. For example, a mesh consisting of Tet4 will be converted to a mesh with Tet10 etc. Note that for some elements like Hex8 there exist two higher order equivalents, Hex20 and Hex27. When full_ordered is true (default), then Hex27 is built. Otherwise, Hex20 is built. The same holds obviously for Quad4, Prism6 ...

Implemented in UnstructuredMesh.  

virtual void MeshBase::allgather () [inline, virtual]all elements and nodes of the mesh onto every processor

Reimplemented in ParallelMesh.

Definition at line 128 of file mesh_base.h.

Referenced by EquationSystems::allgather().

{}
 

virtual element_iterator MeshBase::ancestor_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by Partitioner::set_parent_processor_ids().  

virtual const_element_iterator MeshBase::ancestor_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::ancestor_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by Partitioner::set_parent_processor_ids().  

virtual const_element_iterator MeshBase::ancestor_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

void MeshBase::clear () [virtual]Deletes all the data that are currently stored.

Reimplemented in ParallelMesh, and SerialMesh.

Definition at line 117 of file mesh_base.C.

References _is_prepared, _n_parts, _n_sbd, boundary_info, and clear_point_locator().

Referenced by MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), Triangle::copy_tri_to_mesh(), UnstructuredMesh::create_submesh(), VTKIO::read(), GMVIO::read(), ExodusII_IO::read(), LegacyXdrIO::read_ascii(), LegacyXdrIO::read_binary(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), OFFIO::read_stream(), MatlabIO::read_stream(), TriangleInterface::triangulate(), and ~MeshBase().

{
  
  // Reset the number of subdomains
  _n_sbd  = 1;

  // Reset the number of partitions
  _n_parts = 1;

  // Reset the _is_prepared flag
  _is_prepared = false;

  // Clear boundary information
  this->boundary_info->clear();

  // Clear our point locator.
  this->clear_point_locator();
}
 

void MeshBase::clear_point_locator ()Releases the current PointLocator object.

Definition at line 277 of file mesh_base.C.

References _point_locator, and AutoPtr< Tp >::reset().

Referenced by clear(), and prepare_for_use().

{
  _point_locator.reset(NULL);
}
 

virtual AutoPtr<MeshBase> MeshBase::clone () const [pure virtual]Virtual 'copy constructor'

Implemented in ParallelMesh, and SerialMesh.

Referenced by ErrorVector::plot_error().  

virtual bool MeshBase::contract () [pure virtual]Delete subactive (i.e. children of coarsened) elements. This removes all elements descended from currently active elements in the mesh.

Implemented in UnstructuredMesh.

Referenced by EquationSystems::reinit().  

virtual void MeshBase::delete_elem (Elem *e) [pure virtual]Removes element e from the mesh. Note that calling this method may produce isolated nodes, i.e. nodes not connected to any element. This method must be implemented in derived classes in such a way that it does not invalidate element iterators.

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::Modification::all_tri(), MeshTools::Generation::build_cube(), UnstructuredMesh::contract(), MeshTools::Modification::flatten(), and TetGenMeshInterface::pointset_convexhull().  

virtual void MeshBase::delete_node (Node *n) [pure virtual]Removes the Node n from the mesh.

Implemented in ParallelMesh, and SerialMesh.  

virtual void MeshBase::delete_remote_elements () [inline, virtual]supported, deletes all nonlocal elements of the mesh except for 'ghosts' which touch a local element, and deletes all nodes which are not part of a local or ghost element

Reimplemented in ParallelMesh.

Definition at line 135 of file mesh_base.h.

Referenced by EquationSystems::init(), and prepare_for_use().

{}
 

virtual Elem* MeshBase::elem (const unsigned inti) const [pure virtual]Return a pointer to the $ i^{th} $ element.

Implemented in ParallelMesh, and SerialMesh.

Referenced by GMVIO::_read_materials(), BoundaryInfo::add_side(), InfElemBuilder::build_inf_elem(), VTKIO::cells_to_vtk(), UnstructuredMesh::contract(), DofMap::elem_ptr(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_nelem_target(), MeshData::foreign_id_to_elem(), ExodusII_IO_Helper::initialize(), ErrorVector::is_active_elem(), ExodusII_IO::read(), XdrIO::read_serialized_connectivity(), MeshTools::subdomain_bounding_box(), Parallel::sync_element_data_by_parent_id(), TetGenMeshInterface::triangulate_conformingDelaunayMesh(), FroIO::write(), ExodusII_IO_Helper::write_elements(), LegacyXdrIO::write_mesh(), ExodusII_IO_Helper::write_sidesets(), and DivaIO::write_stream().  

virtual const_element_iterator MeshBase::elements_begin () const [pure virtual]const Elem iterator accessor functions.

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::elements_begin () [pure virtual]Elem iterator accessor functions. These must be defined in Concrete base classes.

Implemented in ParallelMesh, and SerialMesh.

Referenced by EquationSystems::_add_system_to_nodes_and_elems(), MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), MeshRefinement::add_p_to_h_refinement(), VariationalMeshSmoother::adjust_adapt_data(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), EquationSystems::allgather(), MeshData::assign(), MeshCommunication::assign_global_indices(), MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), MeshTools::build_nodes_to_elem_map(), MeshRefinement::clean_refinement_flags(), MeshRefinement::coarsen_elements(), CentroidPartitioner::compute_centroids(), UnstructuredMesh::contract(), UnstructuredMesh::copy_nodes_and_elements(), DofMap::create_dof_constraints(), DofMap::distribute_dofs(), MeshTools::elem_types(), UNVIO::element_out(), UnstructuredMesh::find_neighbors(), MeshTools::Modification::flatten(), MeshTools::get_not_subactive_node_ids(), EquationSystems::init(), MeshTools::libmesh_assert_no_links_to_elem(), MeshTools::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_refinement_flags(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), n_sub_elem(), TetGenMeshInterface::pointset_convexhull(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), EquationSystems::reinit(), DofMap::reinit(), Partitioner::set_node_processor_ids(), Partitioner::single_partition(), MeshRefinement::switch_h_to_p_refinement(), MeshTools::total_weight(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and LegacyXdrIO::write_mesh().  

virtual const_element_iterator MeshBase::elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by EquationSystems::_add_system_to_nodes_and_elems(), MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), MeshRefinement::add_p_to_h_refinement(), VariationalMeshSmoother::adjust_adapt_data(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), EquationSystems::allgather(), MeshData::assign(), MeshCommunication::assign_global_indices(), MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), MeshTools::build_nodes_to_elem_map(), MeshRefinement::clean_refinement_flags(), MeshRefinement::coarsen_elements(), CentroidPartitioner::compute_centroids(), UnstructuredMesh::contract(), UnstructuredMesh::copy_nodes_and_elements(), DofMap::create_dof_constraints(), DofMap::distribute_dofs(), MeshTools::elem_types(), UNVIO::element_out(), UnstructuredMesh::find_neighbors(), MeshTools::Modification::flatten(), MeshTools::get_not_subactive_node_ids(), EquationSystems::init(), MeshTools::libmesh_assert_no_links_to_elem(), MeshTools::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_refinement_flags(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), n_sub_elem(), TetGenMeshInterface::pointset_convexhull(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), EquationSystems::reinit(), DofMap::reinit(), Partitioner::set_node_processor_ids(), Partitioner::single_partition(), MeshRefinement::switch_h_to_p_refinement(), MeshTools::total_weight(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and LegacyXdrIO::write_mesh().  

virtual void MeshBase::find_neighbors (const boolreset_remote_elements = false, const boolreset_current_list = true) [pure virtual]Locate element face (edge in 2D) neighbors. This is done with the help of a std::map that functions like a hash table. After this routine is called all the elements with a NULL neighbor pointer are guaranteed to be on the boundary. Thus this routine is useful for automatically determining the boundaries of the domain. If reset_remote_elements is left to false, remote neighbor links are not reset and searched for in the local mesh. If reset_current_list is left as true, then any existing links will be reset before initiating the algorithm, while honoring the value of the reset_remote_elements flag.

Implemented in UnstructuredMesh.

Referenced by InfElemBuilder::build_inf_elem(), and prepare_for_use().  

std::string MeshBase::get_info () constReturns:

a string containing relevant information about the mesh.

Definition at line 203 of file mesh_base.C.

References mesh_dimension(), n_active_elem(), n_elem(), n_local_elem(), n_local_nodes(), n_nodes(), n_processors(), n_subdomains(), processor_id(), and spatial_dimension().

Referenced by print_info().

{
  std::ostringstream out;

  out << ' Mesh Information:'                                  << '
      << '  mesh_dimension()='    << this->mesh_dimension()    << '
      << '  spatial_dimension()=' << this->spatial_dimension() << '
      << '  n_nodes()='           << this->n_nodes()           << '
      << '    n_local_nodes()='   << this->n_local_nodes()     << '
      << '  n_elem()='            << this->n_elem()            << '
      << '    n_local_elem()='    << this->n_local_elem()      << '
#ifdef LIBMESH_ENABLE_AMR
      << '    n_active_elem()='   << this->n_active_elem()     << '
#endif
      << '  n_subdomains()='      << this->n_subdomains()      << '
      << '  n_processors()='      << this->n_processors()      << '
      << '  processor_id()='      << this->processor_id()      << ';

  return out.str();
}
 

virtual Elem* MeshBase::insert_elem (Elem *e) [pure virtual]Insert elem e to the element array, preserving its id and replacing/deleting any existing element with the same id.

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::all_first_order(), and UnstructuredMesh::all_second_order().  

bool MeshBase::is_prepared () const [inline]Returns:

true if the mesh has been prepared via a call to prepare_for_use, false otherwise.

Definition at line 114 of file mesh_base.h.

References _is_prepared.

Referenced by DofMap::compute_sparsity(), DofMap::create_dof_constraints(), DofMap::distribute_dofs(), and DofMap::reinit().

  { return _is_prepared; }
 

virtual bool MeshBase::is_serial () const [inline, virtual]Returns:

true if all elements and nodes of the mesh exist on the current processor, false otherwise

Reimplemented in ParallelMesh.

Definition at line 121 of file mesh_base.h.

Referenced by MeshRefinement::_coarsen_elements(), MetisPartitioner::_do_partition(), ParmetisPartitioner::_do_repartition(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_second_order(), EquationSystems::allgather(), InfElemBuilder::build_inf_elem(), MeshRefinement::coarsen_elements(), DofMap::create_dof_constraints(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_mean_stddev(), MeshRefinement::flag_elements_by_nelem_target(), LocationMap< T >::init(), MeshRefinement::make_coarsening_compatible(), FEMSystem::mesh_position_set(), BoundaryInfo::n_boundary_conds(), Partitioner::partition(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), Partitioner::set_parent_processor_ids(), MeshTools::total_weight(), GMVIO::write_ascii_old_impl(), and LegacyXdrIO::write_mesh().

  { return true; }
 

virtual element_iterator MeshBase::level_elements_begin (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::Modification::change_boundary_id(), UnstructuredMesh::find_neighbors(), MeshRefinement::make_coarsening_compatible(), and MeshTools::Modification::smooth().  

virtual const_element_iterator MeshBase::level_elements_begin (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::level_elements_end (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::Modification::change_boundary_id(), UnstructuredMesh::find_neighbors(), MeshRefinement::make_coarsening_compatible(), and MeshTools::Modification::smooth().  

virtual const_element_iterator MeshBase::level_elements_end (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::local_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshCommunication::assign_global_indices(), DofMap::create_dof_constraints(), MeshTools::libmesh_assert_valid_remote_elems(), MeshTools::n_local_levels(), and MeshTools::n_p_levels().  

virtual const_element_iterator MeshBase::local_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::local_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshCommunication::assign_global_indices(), DofMap::create_dof_constraints(), MeshTools::libmesh_assert_valid_remote_elems(), MeshTools::n_local_levels(), MeshTools::n_p_levels(), and XdrIO::write_serialized_connectivity().  

virtual const_element_iterator MeshBase::local_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::local_level_elements_begin (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::local_level_elements_begin (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by XdrIO::write_serialized_bcs(), and XdrIO::write_serialized_connectivity().  

virtual const_element_iterator MeshBase::local_level_elements_end (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::local_level_elements_end (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by XdrIO::write_serialized_bcs(), and XdrIO::write_serialized_connectivity().  

virtual node_iterator MeshBase::local_nodes_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshCommunication::assign_global_indices(), MeshTools::bounding_box(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), MeshTools::libmesh_assert_valid_node_procids(), XdrIO::write_serialized_nodes(), and System::zero_variable().  

virtual const_node_iterator MeshBase::local_nodes_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual node_iterator MeshBase::local_nodes_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshCommunication::assign_global_indices(), MeshTools::bounding_box(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), MeshTools::libmesh_assert_valid_node_procids(), XdrIO::write_serialized_nodes(), and System::zero_variable().  

virtual const_node_iterator MeshBase::local_nodes_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::local_not_level_elements_begin (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::local_not_level_elements_begin (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::local_not_level_elements_end (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::local_not_level_elements_end (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual unsigned int MeshBase::max_elem_id () const [pure virtual]Returns a number greater than or equal to the maximum element id in the mesh.

Implemented in ParallelMesh, and SerialMesh.

Referenced by UniformRefinementEstimator::_estimate_error(), InfElemBuilder::build_inf_elem(), PatchRecoveryErrorEstimator::estimate_error(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), MeshTools::libmesh_assert_valid_refinement_flags(), ParallelMesh::ParallelMesh(), and Partitioner::set_parent_processor_ids().  

virtual unsigned int MeshBase::max_node_id () const [pure virtual]Returns a number greater than or equal to the maximum node id in the mesh.

Implemented in ParallelMesh, and SerialMesh.

Referenced by DofMap::add_neighbors_to_send_list(), InfElemBuilder::build_inf_elem(), EquationSystems::build_solution_vector(), MeshTools::libmesh_assert_valid_node_procids(), ParallelMesh::ParallelMesh(), and GMVIO::write_ascii_old_impl().  

unsigned int MeshBase::mesh_dimension () const [inline]Returns the logical dimension of the mesh.

Definition at line 140 of file mesh_base.h.

References _dim.

Referenced by ExactSolution::_compute_error(), UniformRefinementEstimator::_estimate_error(), HPCoarsenTest::add_projection(), UnstructuredMesh::all_second_order(), MeshTools::Generation::build_cube(), EquationSystems::build_discontinuous_solution_vector(), EquationSystems::build_solution_vector(), System::calculate_norm(), DofMap::create_dof_constraints(), MeshTools::Modification::distort(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_nelem_target(), get_info(), MeshFunction::gradient(), MeshFunction::hessian(), PointLocatorTree::init(), LaplaceMeshSmoother::init(), System::ProjectVector::operator()(), PatchRecoveryErrorEstimator::EstimateError::operator()(), MeshFunction::operator()(), Nemesis_IO::read(), ExodusII_IO::read(), System::read_header(), GmshIO::read_mesh(), OFFIO::read_stream(), MatlabIO::read_stream(), MeshTools::Modification::rotate(), HPCoarsenTest::select_refinement(), MeshTools::Modification::smooth(), DofMap::use_coupled_neighbor_dofs(), PostscriptIO::write(), TecplotIO::write_ascii(), GMVIO::write_ascii_old_impl(), TecplotIO::write_binary(), GMVIO::write_discontinuous_gmv(), EnsightIO::write_scalar_ascii(), GnuPlotIO::write_solution(), DivaIO::write_stream(), and EnsightIO::write_vector_ascii().

  { return static_cast<unsigned int>(_dim); }
 

virtual unsigned int MeshBase::n_active_elem () const [pure virtual]Returns the number of active elements in the mesh. Implemented in terms of active_element_iterators.

Implemented in ParallelMesh, and SerialMesh.

Referenced by SFCPartitioner::_do_partition(), MetisPartitioner::_do_partition(), LinearPartitioner::_do_partition(), GMVIO::add_cell_centered_data(), MeshTools::Modification::all_tri(), VTKIO::cells_to_vtk(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_nelem_target(), MeshTools::Modification::flatten(), get_info(), PointLocatorList::init(), Partitioner::partition(), Partitioner::repartition(), VariationalMeshSmoother::smooth(), VTKIO::write(), GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), GMVIO::write_discontinuous_gmv(), VTKIO::write_equation_systems(), GmshIO::write_mesh(), and GnuPlotIO::write_solution().  

unsigned int MeshBase::n_active_elem_on_proc (const unsigned intproc) constReturns the number of active elements on processor proc.

Definition at line 164 of file mesh_base.C.

References active_pid_elements_begin(), active_pid_elements_end(), and libMesh::n_processors().

Referenced by n_active_local_elem().

{
  libmesh_assert (proc_id < libMesh::n_processors());
  return static_cast<unsigned int>(std::distance (this->active_pid_elements_begin(proc_id),
                                                  this->active_pid_elements_end  (proc_id)));
}
 

unsigned int MeshBase::n_active_local_elem () const [inline]Returns the number of active elements on the local processor.

Definition at line 253 of file mesh_base.h.

References n_active_elem_on_proc(), and libMesh::processor_id().

Referenced by ParmetisPartitioner::assign_partitioning(), ParmetisPartitioner::build_graph(), and ParmetisPartitioner::initialize().

  { return this->n_active_elem_on_proc (libMesh::processor_id()); }
 

unsigned int MeshBase::n_active_sub_elem () constSame, but only counts active elements.

Definition at line 188 of file mesh_base.C.

References active_elements_begin(), and active_elements_end().

Referenced by TecplotIO::write_ascii(), GMVIO::write_ascii_old_impl(), and TecplotIO::write_binary().

{
  unsigned int ne=0;

  const_element_iterator       el  = this->active_elements_begin();
  const const_element_iterator end = this->active_elements_end(); 

  for (; el!=end; ++el)
    ne += (*el)->n_sub_elem(); 

  return ne;
}
 

virtual unsigned int MeshBase::n_elem () const [pure virtual]Returns the number of elements in the mesh.

Implemented in ParallelMesh, and SerialMesh.

Referenced by SFCPartitioner::_do_partition(), CentroidPartitioner::_do_partition(), UniformRefinementEstimator::_estimate_error(), UnstructuredMesh::all_second_order(), MeshCommunication::assign_global_indices(), MeshTools::Generation::build_cube(), InfElemBuilder::build_inf_elem(), MeshTools::build_nodes_to_elem_map(), CentroidPartitioner::compute_centroids(), UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::create_submesh(), MeshTools::Modification::distort(), MeshRefinement::flag_elements_by_elem_fraction(), get_info(), ExodusII_IO_Helper::initialize(), ParallelMesh::ParallelMesh(), ExodusII_IO::read(), HPCoarsenTest::select_refinement(), set_mesh_dimension(), MeshTools::subdomain_bounding_box(), TetGenMeshInterface::triangulate_conformingDelaunayMesh(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), XdrIO::write(), TetGenIO::write(), FroIO::write(), UNVIO::write_implementation(), LegacyXdrIO::write_mesh(), XdrIO::write_serialized_connectivity(), and DivaIO::write_stream().  

unsigned int MeshBase::n_elem_on_proc (const unsigned intproc) constReturns the number of elements on processor proc.

Definition at line 151 of file mesh_base.C.

References DofObject::invalid_processor_id, libMesh::n_processors(), pid_elements_begin(), and pid_elements_end().

Referenced by n_local_elem(), and n_unpartitioned_elem().

{
  // We're either counting a processor's elements or unpartitioned
  // elements
  libmesh_assert (proc_id < libMesh::n_processors() ||
          proc_id == DofObject::invalid_processor_id);
  
  return static_cast<unsigned int>(std::distance (this->pid_elements_begin(proc_id),
                                                  this->pid_elements_end  (proc_id)));
}
 

unsigned int MeshBase::n_local_elem () const [inline]Returns the number of elements on the local processor.

Definition at line 236 of file mesh_base.h.

References n_elem_on_proc(), and libMesh::processor_id().

Referenced by get_info(), ParallelMesh::parallel_n_elem(), and ParallelMesh::update_parallel_id_counts().

  { return this->n_elem_on_proc (libMesh::processor_id()); }
 

unsigned int MeshBase::n_local_nodes () const [inline]Returns the number of nodes on the local processor.

Definition at line 172 of file mesh_base.h.

References n_nodes_on_proc(), and libMesh::processor_id().

Referenced by get_info(), ParallelMesh::parallel_n_nodes(), and ParallelMesh::update_parallel_id_counts().

  { return this->n_nodes_on_proc (libMesh::processor_id()); }
 

virtual unsigned int MeshBase::n_nodes () const [pure virtual]Returns the number of nodes in the mesh. This function and others must be defined in derived classes since the MeshBase class has no specific storage for nodes or elements.

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::all_second_order(), MeshCommunication::assign_global_indices(), MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), MeshTools::build_nodes_to_elem_map(), EquationSystems::build_solution_vector(), GMVIO::copy_nodal_solution(), UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::create_submesh(), MeshTools::Modification::distort(), MeshTools::find_boundary_nodes(), get_info(), TetGenMeshInterface::get_node_index(), LaplaceMeshSmoother::init(), ExodusII_IO_Helper::initialize(), MeshRefinement::limit_level_mismatch_at_node(), VTKIO::nodes_to_vtk(), ParallelMesh::ParallelMesh(), TetGenMeshInterface::pointset_convexhull(), ExodusII_IO::read(), MeshTools::Modification::rotate(), MeshTools::Modification::scale(), VariationalMeshSmoother::smooth(), LaplaceMeshSmoother::smooth(), MeshTools::Modification::smooth(), VTKIO::solution_to_vtk(), MeshTools::subdomain_bounding_box(), BoundaryInfo::sync(), VTKIO::system_vectors_to_vtk(), MeshTools::Modification::translate(), MeshData::translate(), TriangleInterface::triangulate(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), TetGenMeshInterface::triangulate_pointset(), XdrIO::write(), TetGenIO::write(), FroIO::write(), TecplotIO::write_ascii(), MEDITIO::write_ascii(), GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), TecplotIO::write_binary(), UNVIO::write_implementation(), GmshIO::write_mesh(), GmshIO::write_post(), XdrIO::write_serialized_nodes(), LegacyXdrIO::write_soln(), DivaIO::write_stream(), and VariationalMeshSmoother::writegr().  

unsigned int MeshBase::n_nodes_on_proc (const unsigned intproc) constReturns the number of nodes on processor proc.

Definition at line 138 of file mesh_base.C.

References DofObject::invalid_processor_id, libMesh::n_processors(), pid_nodes_begin(), and pid_nodes_end().

Referenced by n_local_nodes(), and n_unpartitioned_nodes().

{
  // We're either counting a processor's nodes or unpartitioned
  // nodes
  libmesh_assert (proc_id < libMesh::n_processors() ||
          proc_id == DofObject::invalid_processor_id);
  
  return static_cast<unsigned int>(std::distance (this->pid_nodes_begin(proc_id),
                                                  this->pid_nodes_end  (proc_id)));
}
 

unsigned int MeshBase::n_partitions () const [inline]Returns the number of partitions which have been defined via a call to either mesh.partition() or by building a Partitioner object and calling partition. Note that the partitioner objects are responsible for setting this value.

Definition at line 429 of file mesh_base.h.

References _n_parts.

Referenced by Partitioner::set_node_processor_ids(), BoundaryInfo::sync(), UnstructuredMesh::write(), GMVIO::write_ascii_new_impl(), and GMVIO::write_ascii_old_impl().

  { return _n_parts; }
 

unsigned int MeshBase::n_processors () const [inline]Returns:

the number of processors used in the current simulation.

Definition at line 436 of file mesh_base.h.

Referenced by ParallelMesh::add_elem(), ParallelMesh::add_node(), ParallelMesh::clear(), UnstructuredMesh::create_pid_mesh(), get_info(), ParallelMesh::renumber_dof_objects(), ParallelMesh::renumber_nodes_and_elements(), and GMVIO::write_discontinuous_gmv().

  { return libMesh::n_processors(); }
 

unsigned int MeshBase::n_sub_elem () constThis function returns the number of elements that will be written out in the Tecplot format. For example, a 9-noded quadrilateral will be broken into 4 linear sub-elements for plotting purposes. Thus, for a mesh of 2 QUAD9 elements n_tecplot_elem() will return 8. Implemented in terms of element_iterators.

Definition at line 173 of file mesh_base.C.

References elements_begin(), and elements_end().

{
  unsigned int ne=0;

  const_element_iterator       el  = this->elements_begin();
  const const_element_iterator end = this->elements_end(); 

  for (; el!=end; ++el)
    ne += (*el)->n_sub_elem(); 

  return ne;
}
 

unsigned int MeshBase::n_subdomains () const [inline]Returns the number of subdomains in the global mesh. Subdomains correspond to separate subsets of the mesh which could correspond e.g. to different materials in a solid mechanics application, or regions where different physical processes are important. The subdomain mapping is independent from the parallel decomposition.

Definition at line 420 of file mesh_base.h.

References _n_sbd.

Referenced by get_info(), BoundaryInfo::sync(), XdrIO::write(), and UnstructuredMesh::write().

  { return _n_sbd; }
 

unsigned int MeshBase::n_unpartitioned_elem () const [inline]Returns the number of elements owned by no processor.

Definition at line 242 of file mesh_base.h.

References DofObject::invalid_processor_id, and n_elem_on_proc().

Referenced by ParallelMesh::parallel_n_elem(), and ParallelMesh::update_parallel_id_counts().

  { return this->n_elem_on_proc (DofObject::invalid_processor_id); }
 

unsigned int MeshBase::n_unpartitioned_nodes () const [inline]Returns the number of nodes owned by no processor.

Definition at line 178 of file mesh_base.h.

References DofObject::invalid_processor_id, and n_nodes_on_proc().

Referenced by ParallelMesh::parallel_n_nodes(), and ParallelMesh::update_parallel_id_counts().

  { return this->n_nodes_on_proc (DofObject::invalid_processor_id); }
 

virtual Node& MeshBase::node (const unsigned inti) [pure virtual]Return a reference to the $ i^{th} $ node.

Implemented in ParallelMesh, and SerialMesh.  

virtual const Node& MeshBase::node (const unsigned inti) const [pure virtual]Return a constant reference (for reading only) to the $ i^{th} $ node.

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), MeshTools::Generation::build_cube(), InfElemBuilder::build_inf_elem(), MeshTools::Modification::distort(), TetGenMeshInterface::get_node_index(), MeshTools::Modification::rotate(), MeshTools::Modification::scale(), LaplaceMeshSmoother::smooth(), MeshTools::Modification::smooth(), VTKIO::solution_to_vtk(), MeshTools::Modification::translate(), LegacyXdrIO::write_mesh(), and GmshIO::write_mesh().  

virtual const Node* MeshBase::node_ptr (const unsigned inti) const [pure virtual]Return a pointer to the $ i^{th} $ node.

Implemented in ParallelMesh, and SerialMesh.

Referenced by GMVIO::_read_one_cell(), BoundaryInfo::add_node(), MeshTools::Generation::build_cube(), GMVIO::copy_nodal_solution(), Triangle::copy_tri_to_mesh(), UnstructuredMesh::create_submesh(), UNVIO::element_in(), MeshData::foreign_id_to_node(), DofMap::node_ptr(), TetGenMeshInterface::pointset_convexhull(), VTKIO::read(), ExodusII_IO::read(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), OFFIO::read_stream(), MatlabIO::read_stream(), Partitioner::set_node_processor_ids(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), TetGenMeshInterface::triangulate_pointset(), and ExodusII_IO_Helper::write_nodal_coordinates().  

virtual Node* & MeshBase::node_ptr (const unsigned inti) [pure virtual]Return a pointer to the $ i^{th} $ node.

Implemented in ParallelMesh, and SerialMesh.  

virtual node_iterator MeshBase::nodes_begin () [pure virtual]non-const Node iterator accessor functions.

Implemented in ParallelMesh, and SerialMesh.

Referenced by EquationSystems::_add_system_to_nodes_and_elems(), EquationSystems::allgather(), MeshCommunication::assign_global_indices(), UnstructuredMesh::copy_nodes_and_elements(), MeshTools::correct_node_proc_ids(), DofMap::distribute_dofs(), LocationMap< Node >::fill(), LocationMap< T >::init(), EquationSystems::init(), DofMap::invalidate_dofs(), MeshCommunication::make_node_ids_parallel_consistent(), MeshCommunication::make_node_proc_ids_parallel_consistent(), MeshCommunication::make_nodes_parallel_consistent(), UNVIO::node_out(), VTKIO::nodes_to_vtk(), TetGenMeshInterface::pointset_convexhull(), System::read_legacy_data(), VariationalMeshSmoother::readgr(), EquationSystems::reinit(), DofMap::reinit(), Partitioner::set_node_processor_ids(), Partitioner::single_partition(), LaplaceMeshSmoother::smooth(), BoundaryInfo::sync(), MeshData::translate(), Tree< N >::Tree(), TriangleInterface::triangulate(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), TetGenMeshInterface::triangulate_pointset(), and VariationalMeshSmoother::writegr().  

virtual const_node_iterator MeshBase::nodes_begin () const [pure virtual]const Node iterator accessor functions.

Implemented in ParallelMesh, and SerialMesh.  

virtual node_iterator MeshBase::nodes_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by EquationSystems::_add_system_to_nodes_and_elems(), EquationSystems::allgather(), MeshCommunication::assign_global_indices(), UnstructuredMesh::copy_nodes_and_elements(), MeshTools::correct_node_proc_ids(), DofMap::distribute_dofs(), LocationMap< Node >::fill(), LocationMap< T >::init(), EquationSystems::init(), DofMap::invalidate_dofs(), MeshCommunication::make_node_ids_parallel_consistent(), MeshCommunication::make_node_proc_ids_parallel_consistent(), MeshCommunication::make_nodes_parallel_consistent(), UNVIO::node_out(), VTKIO::nodes_to_vtk(), TetGenMeshInterface::pointset_convexhull(), System::read_legacy_data(), VariationalMeshSmoother::readgr(), EquationSystems::reinit(), DofMap::reinit(), Partitioner::set_node_processor_ids(), Partitioner::single_partition(), LaplaceMeshSmoother::smooth(), BoundaryInfo::sync(), MeshData::translate(), Tree< N >::Tree(), TriangleInterface::triangulate(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), TetGenMeshInterface::triangulate_pointset(), and VariationalMeshSmoother::writegr().  

virtual const_node_iterator MeshBase::nodes_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_active_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by Partitioner::set_node_processor_ids().  

virtual const_element_iterator MeshBase::not_active_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_active_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by Partitioner::set_node_processor_ids().  

virtual const_element_iterator MeshBase::not_active_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_ancestor_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_ancestor_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_ancestor_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_ancestor_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_level_elements_begin (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_level_elements_begin (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_level_elements_end (const unsigned intlevel) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_level_elements_end (const unsigned intlevel) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_local_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_local_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_local_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_local_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_subactive_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_subactive_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::not_subactive_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::not_subactive_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

void MeshBase::partition (const unsigned intn_parts = libMesh::n_processors())Call the default partitioner (currently metis_partition()).

Definition at line 241 of file mesh_base.C.

References partitioner().

Referenced by prepare_for_use().

{
  if (partitioner().get()) // 'NULL' means don't partition
    partitioner()->partition (*this, n_parts);
}
 

virtual AutoPtr<Partitioner>& MeshBase::partitioner () [inline, virtual]A partitioner to use at each prepare_for_use()

Definition at line 103 of file mesh_base.h.

References _partitioner.

Referenced by UniformRefinementEstimator::_estimate_error(), partition(), and BoundaryInfo::sync().

{ return _partitioner; }
 

virtual element_iterator MeshBase::pid_elements_begin (const unsigned intproc_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by n_elem_on_proc(), MeshTools::processor_bounding_box(), and MeshTools::weight().  

virtual const_element_iterator MeshBase::pid_elements_begin (const unsigned intproc_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::pid_elements_end (const unsigned intproc_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::pid_elements_end (const unsigned intproc_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by n_elem_on_proc(), MeshTools::processor_bounding_box(), and MeshTools::weight().  

virtual node_iterator MeshBase::pid_nodes_begin (const unsigned intproc_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::bounding_box(), and n_nodes_on_proc().  

virtual const_node_iterator MeshBase::pid_nodes_begin (const unsigned intproc_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual node_iterator MeshBase::pid_nodes_end (const unsigned intproc_id) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::bounding_box(), and n_nodes_on_proc().  

virtual const_node_iterator MeshBase::pid_nodes_end (const unsigned intproc_id) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const Point& MeshBase::point (const unsigned inti) const [pure virtual]Return a constant reference (for reading only) to the $ i^{th} $ point.

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::all_second_order(), InfElemBuilder::build_inf_elem(), LaplaceMeshSmoother::smooth(), MeshTools::subdomain_bounding_box(), TriangleInterface::triangulate(), TetGenIO::write(), FroIO::write(), TecplotIO::write_ascii(), MEDITIO::write_ascii(), GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), TecplotIO::write_binary(), GnuPlotIO::write_solution(), and DivaIO::write_stream().  

const PointLocatorBase & MeshBase::point_locator () constreturns a reference to a PointLocatorBase object for this mesh.

Definition at line 267 of file mesh_base.C.

References _point_locator, PointLocatorBase::build(), AutoPtr< Tp >::get(), AutoPtr< Tp >::release(), AutoPtr< Tp >::reset(), and MeshEnums::TREE.

Referenced by PeriodicBoundaries::neighbor().

{
  if (_point_locator.get() == NULL)
    _point_locator.reset (PointLocatorBase::build(TREE, *this).release());

  return *_point_locator;
}
 

void MeshBase::prepare_for_use (const boolskip_renumber_nodes_and_elements = false)Prepare a newly created (or read) mesh for use. This involves 3 steps: 1.) call find_neighbors() 2.) call partition() 3.) call renumber_nodes_and_elements()

The read_xda_file boolean flag is true when prepare_for_use is called from Mesh::read after reading an xda file. It prevents the renumbering of nodes and elements. In general, leave this at the default value of false.

Definition at line 81 of file mesh_base.C.

References _is_prepared, clear_point_locator(), delete_remote_elements(), find_neighbors(), partition(), and renumber_nodes_and_elements().

Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), MeshTools::Generation::build_cube(), InfElemBuilder::build_inf_elem(), MeshRefinement::coarsen_elements(), Triangle::copy_tri_to_mesh(), UnstructuredMesh::create_submesh(), MeshTools::Modification::flatten(), UnstructuredMesh::read(), GMVIO::read(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), BoundaryInfo::sync(), MeshRefinement::uniformly_coarsen(), and MeshRefinement::uniformly_refine().

{  
  // Renumber the nodes and elements so that they in contiguous
  // blocks.  By default, skip_renumber_nodes_and_elements is false,
  // however we may skip this step by passing
  // skip_renumber_nodes_and_elements==true to this function.
  //
  // Instances where you if prepare_for_use() should not renumber the nodes
  // and elements include reading in e.g. an xda/r or gmv file. In
  // this case, the ordering of the nodes may depend on an accompanying
  // solution, and the node ordering cannot be changed.
  if(!skip_renumber_nodes_and_elements)
    this->renumber_nodes_and_elements();
  
  // Let all the elements find their neighbors
  this->find_neighbors();

  // Partition the mesh.
  this->partition();
  
  // If we're using ParallelMesh, we'll want it parallelized.
  this->delete_remote_elements();

  if(!skip_renumber_nodes_and_elements)
    this->renumber_nodes_and_elements();

  // Reset our PointLocator.  This needs to happen any time the elements
  // in the underlying elements in the mesh have changed, so we do it here.
  this->clear_point_locator();

  // The mesh is now prepared for use.
  _is_prepared = true;
}
 

void MeshBase::print_info (std::ostream &os = std::cout) constPrints relevant information about the mesh.

Definition at line 225 of file mesh_base.C.

References get_info().

Referenced by InfElemBuilder::build_inf_elem(), and operator<<().

{
  os << this->get_info()
     << std::endl;
}
 

unsigned int MeshBase::processor_id () const [inline]Returns:

the subdomain id for this processor.

Definition at line 442 of file mesh_base.h.

Referenced by UnstructuredMesh::all_second_order(), EquationSystems::build_discontinuous_solution_vector(), ParallelMesh::clear(), DofMap::compute_sparsity(), UnstructuredMesh::find_neighbors(), get_info(), SparsityPattern::Build::operator()(), MeshData::read_xdr(), ParallelMesh::renumber_dof_objects(), ParallelMesh::renumber_nodes_and_elements(), GMVIO::write_discontinuous_gmv(), and System::write_header().

  { return libMesh::processor_id(); }
 

virtual void MeshBase::read (const std::string &name, MeshData *mesh_data = NULL, boolskip_renumber_nodes_and_elements = false) [pure virtual]Interfaces for reading/writing a mesh to/from a file. Must be implemented in derived classes.

Implemented in UnstructuredMesh.  

unsigned int MeshBase::recalculate_n_partitions ()In a few (very rare) cases, the user may have manually tagged the elements with specific processor IDs by hand, without using a partitioner. In this case, the Mesh will not know that the total number of partitions, _n_parts, has changed, unless you call this function. This is an O(N active elements) calculation. The return value is the number of partitions, and _n_parts is also set by this function.

Definition at line 249 of file mesh_base.C.

References _n_parts, active_elements_begin(), active_elements_end(), and std::max().

{
  const_element_iterator       el  = this->active_elements_begin();
  const const_element_iterator end = this->active_elements_end(); 

  unsigned int max_proc_id=0;
  
  for (; el!=end; ++el)
    max_proc_id = std::max(max_proc_id, static_cast<unsigned int>((*el)->processor_id()));

  // The number of partitions is one more than the max processor ID.
  _n_parts = max_proc_id+1;

  return _n_parts;
}
 

virtual void MeshBase::renumber_elem (unsigned intold_id, unsigned intnew_id) [pure virtual]Changes the id of element old_id, both by changing elem(old_id)->id() and by moving elem(old_id) in the mesh's internal container. No element with the id new_id should already exist.

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshCommunication::make_elems_parallel_consistent().  

virtual void MeshBase::renumber_node (unsigned intold_id, unsigned intnew_id) [pure virtual]Changes the id of node old_id, both by changing node(old_id)->id() and by moving node(old_id) in the mesh's internal container. No element with the id new_id should already exist.

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshCommunication::make_node_ids_parallel_consistent().  

virtual void MeshBase::renumber_nodes_and_elements () [pure virtual]After partitoning a mesh it is useful to renumber the nodes and elements so that they lie in contiguous blocks on the processors. This method does just that.

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), UnstructuredMesh::contract(), and prepare_for_use().  

virtual void MeshBase::reserve_elem (const unsigned intne) [pure virtual]Reserves space for a known number of elements. Note that this method may or may not do anything, depending on the actual Mesh implementation. If you know the number of elements you will add and call this method before repeatedly calling add_point() the implementation will be more efficient.

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::Generation::build_cube(), XdrIO::read(), ExodusII_IO::read(), LegacyXdrIO::read_mesh(), and GmshIO::read_mesh().  

virtual void MeshBase::reserve_nodes (const unsigned intnn) [pure virtual]Reserves space for a known number of nodes. Note that this method may or may not do anything, depending on the actual Mesh implementation. If you know the number of nodes you will add and call this method before repeatedly calling add_point() the implementation will be more efficient.

Implemented in ParallelMesh, and SerialMesh.

Referenced by UnstructuredMesh::all_second_order(), MeshTools::Generation::build_cube(), XdrIO::read(), ExodusII_IO::read(), LegacyXdrIO::read_mesh(), and GmshIO::read_mesh().  

void MeshBase::set_mesh_dimension (unsigned intd) [inline]Resets the logical dimension of the mesh. Should only be called on an empty mesh.

Definition at line 147 of file mesh_base.h.

References _dim, and n_elem().

Referenced by MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), Triangle::copy_tri_to_mesh(), and TriangleInterface::triangulate().

  { libmesh_assert(!this->n_elem()); _dim = d; }
 

unsigned int& MeshBase::set_n_partitions () [inline, protected]Returns a writeable reference to the number of partitions.

Definition at line 685 of file mesh_base.h.

References _n_parts.

Referenced by Partitioner::partition(), Partitioner::repartition(), and BoundaryInfo::sync().

  { return _n_parts; }
 

unsigned int& MeshBase::set_n_subdomains () [inline]Returns a writeable reference to the number of subdomains.

Definition at line 671 of file mesh_base.h.

References _n_sbd.

Referenced by BoundaryInfo::sync().

  { return _n_sbd; }
 

unsigned int MeshBase::spatial_dimension () const [inline]Returns the spatial dimension of the mesh. Note that this is defined at compile time in the header libmesh_common.h.

Definition at line 154 of file mesh_base.h.

Referenced by get_info(), ExodusII_IO_Helper::initialize(), UNVIO::node_out(), LegacyXdrIO::read_mesh(), MeshTools::Modification::scale(), MeshTools::subdomain_bounding_box(), and LegacyXdrIO::write_mesh().

  { return static_cast<unsigned int>(LIBMESH_DIM); }
 

virtual element_iterator MeshBase::subactive_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by Partitioner::set_node_processor_ids().  

virtual const_element_iterator MeshBase::subactive_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::subactive_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::subactive_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by Partitioner::set_node_processor_ids().  

virtual element_iterator MeshBase::type_elements_begin (const ElemTypetype) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::n_elem_of_type(), and MeshTools::n_non_subactive_elem_of_type_at_level().  

virtual const_element_iterator MeshBase::type_elements_begin (const ElemTypetype) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::type_elements_end (const ElemTypetype) [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::n_elem_of_type(), and MeshTools::n_non_subactive_elem_of_type_at_level().  

virtual const_element_iterator MeshBase::type_elements_end (const ElemTypetype) const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::unpartitioned_elements_begin () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::n_active_levels(), MeshTools::n_levels(), MeshTools::n_p_levels(), Partitioner::partition_unpartitioned_elements(), Partitioner::set_node_processor_ids(), and Partitioner::set_parent_processor_ids().  

virtual const_element_iterator MeshBase::unpartitioned_elements_begin () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual const_element_iterator MeshBase::unpartitioned_elements_end () const [pure virtual]

Implemented in ParallelMesh, and SerialMesh.  

virtual element_iterator MeshBase::unpartitioned_elements_end () [pure virtual]

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshTools::n_active_levels(), MeshTools::n_levels(), MeshTools::n_p_levels(), Partitioner::partition_unpartitioned_elements(), Partitioner::set_node_processor_ids(), and Partitioner::set_parent_processor_ids().  

virtual void MeshBase::update_parallel_id_counts () [pure virtual]Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors

Implemented in ParallelMesh, and SerialMesh.

Referenced by MeshRefinement::_coarsen_elements(), and MeshRefinement::_refine_elements().  

virtual void MeshBase::write (const std::string &name, MeshData *mesh_data = NULL) [pure virtual]

Implemented in UnstructuredMesh.  

Friends And Related Function Documentation

 

friend class BoundaryInfo [friend]Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh.

Definition at line 746 of file mesh_base.h.  

std::ostream& operator<< (std::ostream &os, const MeshBase &m) [friend]Equivalent to calling print_info() above, but now you can write: Mesh mesh; std::cout << mesh << std::endl;

Definition at line 232 of file mesh_base.C.

{
  m.print_info(os);
  return os;
}
 

friend class Partitioner [friend]The partitioner class is a friend so that it can set the number of partitions.

Definition at line 740 of file mesh_base.h.  

Member Data Documentation

 

unsigned int MeshBase::_dim [protected]The logical dimension of the mesh.

Definition at line 712 of file mesh_base.h.

Referenced by UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::find_neighbors(), mesh_dimension(), MeshBase(), and set_mesh_dimension().  

bool MeshBase::_is_prepared [protected]Flag indicating if the mesh has been prepared for use.

Definition at line 717 of file mesh_base.h.

Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), clear(), UnstructuredMesh::copy_nodes_and_elements(), is_prepared(), and prepare_for_use().  

unsigned int MeshBase::_n_parts [protected]The number of partitions the mesh has. This is set by the partitioners, and may not be changed directly by the user. **NOTE** The number of partitions *need not* equal libMesh::n_processors(), consider for example the case where you simply want to partition a mesh on one processor and view the result in GMV.

Definition at line 707 of file mesh_base.h.

Referenced by clear(), UnstructuredMesh::copy_nodes_and_elements(), n_partitions(), recalculate_n_partitions(), and set_n_partitions().  

unsigned int MeshBase::_n_sbd [protected]The number of subdomains the mesh has. **NOTE** Not to be confused with the number of paritions! The definition of subdomain can be anything the user wants, e.g. a solid region bounded by a liquid region could be referred to as subdomains 1 and 2, but those subdomains could be partitioned over many processors.

Definition at line 696 of file mesh_base.h.

Referenced by clear(), UnstructuredMesh::copy_nodes_and_elements(), n_subdomains(), and set_n_subdomains().  

AutoPtr<Partitioner> MeshBase::_partitioner [protected]A partitioner to use at each prepare_for_use().

This will be built in the constructor of each derived class, but can be replaced by the user through the partitioner() accessor.

Definition at line 734 of file mesh_base.h.

Referenced by ParallelMesh::ParallelMesh(), partitioner(), and SerialMesh::SerialMesh().  

AutoPtr<PointLocatorBase> MeshBase::_point_locator [mutable, protected]A PointLocator class for this mesh. This will not actually be built unless needed. Further, since we want our point_locator() method to be const (yet do the dynamic allocating) this needs to be mutable. Since the PointLocatorBase::build() member is used, and it operates on a constant reference to the mesh, this is OK.

Definition at line 726 of file mesh_base.h.

Referenced by clear_point_locator(), and point_locator().  

AutoPtr<BoundaryInfo> MeshBase::boundary_infoThis class holds the boundary information. It can store nodes, edges, and faces with a corresponding id that facilitates setting boundary conditions.

Definition at line 98 of file mesh_base.h.

Referenced by MeshRefinement::_coarsen_elements(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), MeshCommunication::allgather(), MeshCommunication::broadcast(), MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), MeshTools::Modification::change_boundary_id(), clear(), FEBase::compute_periodic_constraints(), UnstructuredMesh::create_submesh(), SerialMesh::delete_elem(), ParallelMesh::delete_elem(), SerialMesh::delete_node(), ParallelMesh::delete_node(), MeshTools::Modification::flatten(), ExodusII_IO_Helper::initialize(), ExodusII_IO::read(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), SerialMesh::renumber_nodes_and_elements(), ParallelMesh::renumber_nodes_and_elements(), XdrIO::write(), FroIO::write(), LegacyXdrIO::write_mesh(), ExodusII_IO_Helper::write_nodesets(), XdrIO::write_serialized_bcs(), ExodusII_IO_Helper::write_sidesets(), LegacyXdrIO::write_soln(), and DivaIO::write_stream().

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Classes
Public Types
Public Member Functions
Public Attributes
Protected Member Functions
Protected Attributes
Friends
Detailed Description
Member Typedef Documentation
typedef Predicates::multi_predicate MeshBase::PredicateWe need an empty, generic class to act as a predicate for this and derived mesh classes.
Constructor & Destructor Documentation
MeshBase::MeshBase (unsigned intd)Constructor. Requires d, the dimension of the mesh.
MeshBase::MeshBase (const MeshBase &other_mesh)Copy-constructor.
MeshBase::~MeshBase () [virtual]Destructor.
Member Function Documentation
virtual element_iterator MeshBase::active_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::active_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::active_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::active_elements_end () const [pure virtual]
virtual element_iterator MeshBase::active_local_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::active_local_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::active_local_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::active_local_elements_end () const [pure virtual]
virtual const_element_iterator MeshBase::active_local_subdomain_elements_begin (const unsigned intsubdomain_id) const [pure virtual]
virtual element_iterator MeshBase::active_local_subdomain_elements_begin (const unsigned intsubdomain_id) [pure virtual]
virtual const_element_iterator MeshBase::active_local_subdomain_elements_end (const unsigned intsubdomain_id) const [pure virtual]
virtual element_iterator MeshBase::active_local_subdomain_elements_end (const unsigned intsubdomain_id) [pure virtual]
virtual node_iterator MeshBase::active_nodes_begin () [pure virtual]
virtual const_node_iterator MeshBase::active_nodes_begin () const [pure virtual]
virtual node_iterator MeshBase::active_nodes_end () [pure virtual]
virtual const_node_iterator MeshBase::active_nodes_end () const [pure virtual]
virtual element_iterator MeshBase::active_not_local_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::active_not_local_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::active_not_local_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::active_not_local_elements_end () const [pure virtual]
virtual const_element_iterator MeshBase::active_pid_elements_begin (const unsigned intproc_id) const [pure virtual]
virtual element_iterator MeshBase::active_pid_elements_begin (const unsigned intproc_id) [pure virtual]
virtual const_element_iterator MeshBase::active_pid_elements_end (const unsigned intproc_id) const [pure virtual]
virtual element_iterator MeshBase::active_pid_elements_end (const unsigned intproc_id) [pure virtual]
virtual const_element_iterator MeshBase::active_type_elements_begin (const ElemTypetype) const [pure virtual]
virtual element_iterator MeshBase::active_type_elements_begin (const ElemTypetype) [pure virtual]
virtual const_element_iterator MeshBase::active_type_elements_end (const ElemTypetype) const [pure virtual]
virtual element_iterator MeshBase::active_type_elements_end (const ElemTypetype) [pure virtual]
virtual Elem* MeshBase::add_elem (Elem *e) [pure virtual]Add elem e to the end of the element array. To add an element locally, set e->processor_id() before adding it. To ensure a specific element id, call e->set_id() before adding it; only do this in parallel if you are manually keeping ids consistent.
virtual Node* MeshBase::add_node (Node *n) [pure virtual]Add Node n to the end of the vertex array.
virtual Node* MeshBase::add_point (const Point &p, const unsigned intid = DofObject::invalid_id, const unsigned intproc_id = DofObject::invalid_processor_id) [pure virtual]Add a new Node at Point p to the end of the vertex array, with processor_id procid. Use DofObject::invalid_processor_id (default) to add a node to all processors, or libMesh::processor_id() to add a node to the local processor only. If adding a node locally, passing an id other than DofObject::invalid_id will set that specific node id. Only do this in parallel if you are manually keeping ids consistent.
virtual void MeshBase::all_first_order () [pure virtual]Converts a mesh with higher-order elements into a mesh with linear elements. For example, a mesh consisting of Tet10 will be converted to a mesh with Tet4 etc.
virtual void MeshBase::all_second_order (const boolfull_ordered = true) [pure virtual]Converts a (conforming, non-refined) mesh with linear elements into a mesh with second-order elements. For example, a mesh consisting of Tet4 will be converted to a mesh with Tet10 etc. Note that for some elements like Hex8 there exist two higher order equivalents, Hex20 and Hex27. When full_ordered is true (default), then Hex27 is built. Otherwise, Hex20 is built. The same holds obviously for Quad4, Prism6 ...
virtual void MeshBase::allgather () [inline, virtual]all elements and nodes of the mesh onto every processor
virtual element_iterator MeshBase::ancestor_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::ancestor_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::ancestor_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::ancestor_elements_end () const [pure virtual]
void MeshBase::clear () [virtual]Deletes all the data that are currently stored.
void MeshBase::clear_point_locator ()Releases the current PointLocator object.
virtual AutoPtr<MeshBase> MeshBase::clone () const [pure virtual]Virtual 'copy constructor'
virtual bool MeshBase::contract () [pure virtual]Delete subactive (i.e. children of coarsened) elements. This removes all elements descended from currently active elements in the mesh.
virtual void MeshBase::delete_elem (Elem *e) [pure virtual]Removes element e from the mesh. Note that calling this method may produce isolated nodes, i.e. nodes not connected to any element. This method must be implemented in derived classes in such a way that it does not invalidate element iterators.
virtual void MeshBase::delete_node (Node *n) [pure virtual]Removes the Node n from the mesh.
virtual void MeshBase::delete_remote_elements () [inline, virtual]supported, deletes all nonlocal elements of the mesh except for 'ghosts' which touch a local element, and deletes all nodes which are not part of a local or ghost element
virtual Elem* MeshBase::elem (const unsigned inti) const [pure virtual]Return a pointer to the $ i^{th} $ element.
virtual const_element_iterator MeshBase::elements_begin () const [pure virtual]const Elem iterator accessor functions.
virtual element_iterator MeshBase::elements_begin () [pure virtual]Elem iterator accessor functions. These must be defined in Concrete base classes.
virtual const_element_iterator MeshBase::elements_end () const [pure virtual]
virtual element_iterator MeshBase::elements_end () [pure virtual]
virtual void MeshBase::find_neighbors (const boolreset_remote_elements = false, const boolreset_current_list = true) [pure virtual]Locate element face (edge in 2D) neighbors. This is done with the help of a std::map that functions like a hash table. After this routine is called all the elements with a NULL neighbor pointer are guaranteed to be on the boundary. Thus this routine is useful for automatically determining the boundaries of the domain. If reset_remote_elements is left to false, remote neighbor links are not reset and searched for in the local mesh. If reset_current_list is left as true, then any existing links will be reset before initiating the algorithm, while honoring the value of the reset_remote_elements flag.
std::string MeshBase::get_info () constReturns:
virtual Elem* MeshBase::insert_elem (Elem *e) [pure virtual]Insert elem e to the element array, preserving its id and replacing/deleting any existing element with the same id.
bool MeshBase::is_prepared () const [inline]Returns:
virtual bool MeshBase::is_serial () const [inline, virtual]Returns:
virtual element_iterator MeshBase::level_elements_begin (const unsigned intlevel) [pure virtual]
virtual const_element_iterator MeshBase::level_elements_begin (const unsigned intlevel) const [pure virtual]
virtual element_iterator MeshBase::level_elements_end (const unsigned intlevel) [pure virtual]
virtual const_element_iterator MeshBase::level_elements_end (const unsigned intlevel) const [pure virtual]
virtual element_iterator MeshBase::local_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::local_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::local_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::local_elements_end () const [pure virtual]
virtual const_element_iterator MeshBase::local_level_elements_begin (const unsigned intlevel) const [pure virtual]
virtual element_iterator MeshBase::local_level_elements_begin (const unsigned intlevel) [pure virtual]
virtual const_element_iterator MeshBase::local_level_elements_end (const unsigned intlevel) const [pure virtual]
virtual element_iterator MeshBase::local_level_elements_end (const unsigned intlevel) [pure virtual]
virtual node_iterator MeshBase::local_nodes_begin () [pure virtual]
virtual const_node_iterator MeshBase::local_nodes_begin () const [pure virtual]
virtual node_iterator MeshBase::local_nodes_end () [pure virtual]
virtual const_node_iterator MeshBase::local_nodes_end () const [pure virtual]
virtual element_iterator MeshBase::local_not_level_elements_begin (const unsigned intlevel) [pure virtual]
virtual const_element_iterator MeshBase::local_not_level_elements_begin (const unsigned intlevel) const [pure virtual]
virtual const_element_iterator MeshBase::local_not_level_elements_end (const unsigned intlevel) const [pure virtual]
virtual element_iterator MeshBase::local_not_level_elements_end (const unsigned intlevel) [pure virtual]
virtual unsigned int MeshBase::max_elem_id () const [pure virtual]Returns a number greater than or equal to the maximum element id in the mesh.
virtual unsigned int MeshBase::max_node_id () const [pure virtual]Returns a number greater than or equal to the maximum node id in the mesh.
unsigned int MeshBase::mesh_dimension () const [inline]Returns the logical dimension of the mesh.
virtual unsigned int MeshBase::n_active_elem () const [pure virtual]Returns the number of active elements in the mesh. Implemented in terms of active_element_iterators.
unsigned int MeshBase::n_active_elem_on_proc (const unsigned intproc) constReturns the number of active elements on processor proc.
unsigned int MeshBase::n_active_local_elem () const [inline]Returns the number of active elements on the local processor.
unsigned int MeshBase::n_active_sub_elem () constSame, but only counts active elements.
virtual unsigned int MeshBase::n_elem () const [pure virtual]Returns the number of elements in the mesh.
unsigned int MeshBase::n_elem_on_proc (const unsigned intproc) constReturns the number of elements on processor proc.
unsigned int MeshBase::n_local_elem () const [inline]Returns the number of elements on the local processor.
unsigned int MeshBase::n_local_nodes () const [inline]Returns the number of nodes on the local processor.
virtual unsigned int MeshBase::n_nodes () const [pure virtual]Returns the number of nodes in the mesh. This function and others must be defined in derived classes since the MeshBase class has no specific storage for nodes or elements.
unsigned int MeshBase::n_nodes_on_proc (const unsigned intproc) constReturns the number of nodes on processor proc.
unsigned int MeshBase::n_partitions () const [inline]Returns the number of partitions which have been defined via a call to either mesh.partition() or by building a Partitioner object and calling partition. Note that the partitioner objects are responsible for setting this value.
unsigned int MeshBase::n_processors () const [inline]Returns:
unsigned int MeshBase::n_sub_elem () constThis function returns the number of elements that will be written out in the Tecplot format. For example, a 9-noded quadrilateral will be broken into 4 linear sub-elements for plotting purposes. Thus, for a mesh of 2 QUAD9 elements n_tecplot_elem() will return 8. Implemented in terms of element_iterators.
unsigned int MeshBase::n_subdomains () const [inline]Returns the number of subdomains in the global mesh. Subdomains correspond to separate subsets of the mesh which could correspond e.g. to different materials in a solid mechanics application, or regions where different physical processes are important. The subdomain mapping is independent from the parallel decomposition.
unsigned int MeshBase::n_unpartitioned_elem () const [inline]Returns the number of elements owned by no processor.
unsigned int MeshBase::n_unpartitioned_nodes () const [inline]Returns the number of nodes owned by no processor.
virtual Node& MeshBase::node (const unsigned inti) [pure virtual]Return a reference to the $ i^{th} $ node.
virtual const Node& MeshBase::node (const unsigned inti) const [pure virtual]Return a constant reference (for reading only) to the $ i^{th} $ node.
virtual const Node* MeshBase::node_ptr (const unsigned inti) const [pure virtual]Return a pointer to the $ i^{th} $ node.
virtual Node* & MeshBase::node_ptr (const unsigned inti) [pure virtual]Return a pointer to the $ i^{th} $ node.
virtual node_iterator MeshBase::nodes_begin () [pure virtual]non-const Node iterator accessor functions.
virtual const_node_iterator MeshBase::nodes_begin () const [pure virtual]const Node iterator accessor functions.
virtual node_iterator MeshBase::nodes_end () [pure virtual]
virtual const_node_iterator MeshBase::nodes_end () const [pure virtual]
virtual element_iterator MeshBase::not_active_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::not_active_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::not_active_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::not_active_elements_end () const [pure virtual]
virtual const_element_iterator MeshBase::not_ancestor_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::not_ancestor_elements_begin () [pure virtual]
virtual element_iterator MeshBase::not_ancestor_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::not_ancestor_elements_end () const [pure virtual]
virtual element_iterator MeshBase::not_level_elements_begin (const unsigned intlevel) [pure virtual]
virtual const_element_iterator MeshBase::not_level_elements_begin (const unsigned intlevel) const [pure virtual]
virtual const_element_iterator MeshBase::not_level_elements_end (const unsigned intlevel) const [pure virtual]
virtual element_iterator MeshBase::not_level_elements_end (const unsigned intlevel) [pure virtual]
virtual element_iterator MeshBase::not_local_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::not_local_elements_begin () const [pure virtual]
virtual const_element_iterator MeshBase::not_local_elements_end () const [pure virtual]
virtual element_iterator MeshBase::not_local_elements_end () [pure virtual]
virtual element_iterator MeshBase::not_subactive_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::not_subactive_elements_begin () const [pure virtual]
virtual element_iterator MeshBase::not_subactive_elements_end () [pure virtual]
virtual const_element_iterator MeshBase::not_subactive_elements_end () const [pure virtual]
void MeshBase::partition (const unsigned intn_parts = libMesh::n_processors())Call the default partitioner (currently metis_partition()).
virtual AutoPtr<Partitioner>& MeshBase::partitioner () [inline, virtual]A partitioner to use at each prepare_for_use()
virtual element_iterator MeshBase::pid_elements_begin (const unsigned intproc_id) [pure virtual]
virtual const_element_iterator MeshBase::pid_elements_begin (const unsigned intproc_id) const [pure virtual]
virtual const_element_iterator MeshBase::pid_elements_end (const unsigned intproc_id) const [pure virtual]
virtual element_iterator MeshBase::pid_elements_end (const unsigned intproc_id) [pure virtual]
virtual node_iterator MeshBase::pid_nodes_begin (const unsigned intproc_id) [pure virtual]
virtual const_node_iterator MeshBase::pid_nodes_begin (const unsigned intproc_id) const [pure virtual]
virtual node_iterator MeshBase::pid_nodes_end (const unsigned intproc_id) [pure virtual]
virtual const_node_iterator MeshBase::pid_nodes_end (const unsigned intproc_id) const [pure virtual]
virtual const Point& MeshBase::point (const unsigned inti) const [pure virtual]Return a constant reference (for reading only) to the $ i^{th} $ point.
const PointLocatorBase & MeshBase::point_locator () constreturns a reference to a PointLocatorBase object for this mesh.
void MeshBase::prepare_for_use (const boolskip_renumber_nodes_and_elements = false)Prepare a newly created (or read) mesh for use. This involves 3 steps: 1.) call find_neighbors() 2.) call partition() 3.) call renumber_nodes_and_elements()
void MeshBase::print_info (std::ostream &os = std::cout) constPrints relevant information about the mesh.
unsigned int MeshBase::processor_id () const [inline]Returns:
virtual void MeshBase::read (const std::string &name, MeshData *mesh_data = NULL, boolskip_renumber_nodes_and_elements = false) [pure virtual]Interfaces for reading/writing a mesh to/from a file. Must be implemented in derived classes.
unsigned int MeshBase::recalculate_n_partitions ()In a few (very rare) cases, the user may have manually tagged the elements with specific processor IDs by hand, without using a partitioner. In this case, the Mesh will not know that the total number of partitions, _n_parts, has changed, unless you call this function. This is an O(N active elements) calculation. The return value is the number of partitions, and _n_parts is also set by this function.
virtual void MeshBase::renumber_elem (unsigned intold_id, unsigned intnew_id) [pure virtual]Changes the id of element old_id, both by changing elem(old_id)->id() and by moving elem(old_id) in the mesh's internal container. No element with the id new_id should already exist.
virtual void MeshBase::renumber_node (unsigned intold_id, unsigned intnew_id) [pure virtual]Changes the id of node old_id, both by changing node(old_id)->id() and by moving node(old_id) in the mesh's internal container. No element with the id new_id should already exist.
virtual void MeshBase::renumber_nodes_and_elements () [pure virtual]After partitoning a mesh it is useful to renumber the nodes and elements so that they lie in contiguous blocks on the processors. This method does just that.
virtual void MeshBase::reserve_elem (const unsigned intne) [pure virtual]Reserves space for a known number of elements. Note that this method may or may not do anything, depending on the actual Mesh implementation. If you know the number of elements you will add and call this method before repeatedly calling add_point() the implementation will be more efficient.
virtual void MeshBase::reserve_nodes (const unsigned intnn) [pure virtual]Reserves space for a known number of nodes. Note that this method may or may not do anything, depending on the actual Mesh implementation. If you know the number of nodes you will add and call this method before repeatedly calling add_point() the implementation will be more efficient.
void MeshBase::set_mesh_dimension (unsigned intd) [inline]Resets the logical dimension of the mesh. Should only be called on an empty mesh.
unsigned int& MeshBase::set_n_partitions () [inline, protected]Returns a writeable reference to the number of partitions.
unsigned int& MeshBase::set_n_subdomains () [inline]Returns a writeable reference to the number of subdomains.
unsigned int MeshBase::spatial_dimension () const [inline]Returns the spatial dimension of the mesh. Note that this is defined at compile time in the header libmesh_common.h.
virtual element_iterator MeshBase::subactive_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::subactive_elements_begin () const [pure virtual]
virtual const_element_iterator MeshBase::subactive_elements_end () const [pure virtual]
virtual element_iterator MeshBase::subactive_elements_end () [pure virtual]
virtual element_iterator MeshBase::type_elements_begin (const ElemTypetype) [pure virtual]
virtual const_element_iterator MeshBase::type_elements_begin (const ElemTypetype) const [pure virtual]
virtual element_iterator MeshBase::type_elements_end (const ElemTypetype) [pure virtual]
virtual const_element_iterator MeshBase::type_elements_end (const ElemTypetype) const [pure virtual]
virtual element_iterator MeshBase::unpartitioned_elements_begin () [pure virtual]
virtual const_element_iterator MeshBase::unpartitioned_elements_begin () const [pure virtual]
virtual const_element_iterator MeshBase::unpartitioned_elements_end () const [pure virtual]
virtual element_iterator MeshBase::unpartitioned_elements_end () [pure virtual]
virtual void MeshBase::update_parallel_id_counts () [pure virtual]Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors
virtual void MeshBase::write (const std::string &name, MeshData *mesh_data = NULL) [pure virtual]
Friends And Related Function Documentation
friend class BoundaryInfo [friend]Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh.
std::ostream& operator<< (std::ostream &os, const MeshBase &m) [friend]Equivalent to calling print_info() above, but now you can write: Mesh mesh; std::cout << mesh << std::endl;
friend class Partitioner [friend]The partitioner class is a friend so that it can set the number of partitions.
Member Data Documentation
unsigned int MeshBase::_dim [protected]The logical dimension of the mesh.
bool MeshBase::_is_prepared [protected]Flag indicating if the mesh has been prepared for use.
unsigned int MeshBase::_n_parts [protected]The number of partitions the mesh has. This is set by the partitioners, and may not be changed directly by the user. **NOTE** The number of partitions *need not* equal libMesh::n_processors(), consider for example the case where you simply want to partition a mesh on one processor and view the result in GMV.
unsigned int MeshBase::_n_sbd [protected]The number of subdomains the mesh has. **NOTE** Not to be confused with the number of paritions! The definition of subdomain can be anything the user wants, e.g. a solid region bounded by a liquid region could be referred to as subdomains 1 and 2, but those subdomains could be partitioned over many processors.
AutoPtr<Partitioner> MeshBase::_partitioner [protected]A partitioner to use at each prepare_for_use().
AutoPtr<PointLocatorBase> MeshBase::_point_locator [mutable, protected]A PointLocator class for this mesh. This will not actually be built unless needed. Further, since we want our point_locator() method to be const (yet do the dynamic allocating) this needs to be mutable. Since the PointLocatorBase::build() member is used, and it operates on a constant reference to the mesh, this is OK.
AutoPtr<BoundaryInfo> MeshBase::boundary_infoThis class holds the boundary information. It can store nodes, edges, and faces with a corresponding id that facilitates setting boundary conditions.
Author

This document was created by man2html, using the manual pages.
Time: 21:50:10 GMT, April 16, 2011