moab
MeshRefiner.hpp
Go to the documentation of this file.
00001 /*
00002  * MOAB, a Mesh-Oriented datABase, is a software component for creating,
00003  * storing and accessing finite element mesh data.
00004  * 
00005  * Copyright 2007 Sandia Corporation.  Under the terms of Contract
00006  * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
00007  * retains certain 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  */
00015 
00026 #ifndef MOAB_MESH_REFINER_HPP
00027 #define MOAB_MESH_REFINER_HPP
00028 
00029 #include "moab/Compiler.hpp" // for MB_DLL_EXPORT
00030 #include "moab/Range.hpp"
00031 
00032 #include <vector>
00033 
00034 namespace moab {
00035 
00036 class Interface;
00037 class EntityRefiner;
00038 class ParallelComm;
00039 class RefinerTagManager;
00040 class MeshOutputFunctor;
00041 
00042 class MB_DLL_EXPORT MeshRefiner
00043 {
00044 public:
00045   MeshRefiner( Interface* imesh, Interface* omesh );
00046   virtual ~MeshRefiner();
00047 
00048   bool set_entity_refiner( EntityRefiner* );
00049   EntityRefiner* get_entity_refiner() { return this->entity_refiner; }
00050 
00051   bool set_comm( ParallelComm* c ) { if ( ! c || this->comm == c ) return false; this->comm = c; return true; }
00052   ParallelComm* get_comm() { return this->comm; }
00053 
00054   RefinerTagManager* get_tag_manager() { return this->tag_manager; }
00055   const RefinerTagManager* get_tag_manager() const { return this->tag_manager; }
00056   void reset_vertex_tags();
00057   int add_vertex_tag( Tag tag_handle );
00058 
00059   virtual bool refine( Range& );
00060 
00061 protected:
00062   Interface* mesh_in;
00063   Interface* mesh_out;
00064   EntityRefiner* entity_refiner;
00065   RefinerTagManager* tag_manager;
00066   MeshOutputFunctor* output_functor;
00067   ParallelComm* comm;
00068 };
00069 
00070 } // namespace moab
00071 
00072 #endif // MOAB_MESH_REFINER_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines