MOAB: Mesh Oriented datABase  (version 5.2.1)
ParallelMeshInterface.hpp
Go to the documentation of this file.
00001 /* *****************************************************************
00002     MESQUITE -- The Mesh Quality Improvement Toolkit
00003 
00004     Copyright 2004 Sandia Corporation and Argonne National
00005     Laboratory.  Under the terms of Contract DE-AC04-94AL85000
00006     with Sandia Corporation, the U.S. Government retains certain
00007     rights in this software.
00008 
00009     This library is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU Lesser General Public
00011     License as published by the Free Software Foundation; either
00012     version 2.1 of the License, or (at your option) any later version.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public License
00020     (lgpl.txt) along with this library; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023     diachin2@llnl.gov, djmelan@sandia.gov, mbrewer@sandia.gov,
00024     pknupp@sandia.gov, tleurent@mcs.anl.gov, tmunson@mcs.anl.gov,
00025     kraftche@cae.wisc.edu
00026 
00027   ***************************************************************** */
00028 /*!
00029   \file   ParallelMeshInterface.hpp
00030   \brief  This file contains the parallel Mesquite mesh interface.
00031           Many users will want to implement a concrete class derived from
00032           the ParallelMeshInterface class to access their mesh.
00033 
00034 */
00035 #ifndef MESQUITE_PARALLEL_MESH_INTERFACE_HPP
00036 #define MESQUITE_PARALLEL_MESH_INTERFACE_HPP
00037 
00038 #include "MeshInterface.hpp"
00039 
00040 namespace MBMesquite
00041 {
00042 class ParallelHelper;
00043 
00044 /*! \class ParallelMesh \brief MBMesquite::ParallelMesh is an abstract class
00045  *  which defines required methods required for using Mesquite in parallel.
00046  *  It derives from the MBMesquite::Mesh interface so the user must provide
00047  *  implementations of the pure virtual methods in both MBMesquite::Mesh as
00048  *  well as those defined here.
00049  */
00050 class MESQUITE_EXPORT ParallelMesh : virtual public Mesh
00051 {
00052   public:
00053     /*! Get global ids for given vertices.
00054      */
00055     virtual void vertices_get_global_id( const VertexHandle vert_array[], size_t global_id[], size_t num_vtx,
00056                                          MsqError& err ) = 0;
00057 
00058     /*! Get processor ids for given vertices.
00059      */
00060     virtual void vertices_get_processor_id( const VertexHandle vert_array[], int proc_id[], size_t num_vtx,
00061                                             MsqError& err ) = 0;
00062 
00063     /*! Set parallel helper
00064      */
00065     virtual void set_parallel_helper( ParallelHelper* p_helper )
00066     {
00067         this->helper = p_helper;
00068     }
00069 
00070     /*! Get parallel helper
00071      */
00072     virtual ParallelHelper* get_parallel_helper()
00073     {
00074         return helper;
00075     }
00076 
00077   protected:
00078     ParallelHelper* helper;
00079     //! Don't allow a ParallelMesh to be deleted directly.
00080     virtual ~ParallelMesh() {}
00081 };
00082 }  // namespace MBMesquite
00083 
00084 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines