Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
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 Corporation, 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 
00016 /**\class moab::MeshRefiner
00017  *\brief Refine a mesh using a streaming operation.
00018  *
00019  * This is an class that contains the method used for mesh refinement.
00020  *
00021  * \author Philippe Pebay
00022  * \author David Thompson
00023  *
00024  * \date 19 November 2007
00025  */
00026 #ifndef MOAB_MESH_REFINER_HPP
00027 #define MOAB_MESH_REFINER_HPP
00028 
00029 #include "moab/MOABConfig.h"
00030 #include "moab/Compiler.hpp"  // for MB_DLL_EXPORT
00031 #include "moab/Range.hpp"
00032 
00033 #include <vector>
00034 
00035 namespace moab
00036 {
00037 
00038 class Interface;
00039 class EntityRefiner;
00040 class ParallelComm;
00041 class RefinerTagManager;
00042 class MeshOutputFunctor;
00043 
00044 class MeshRefiner
00045 {
00046   public:
00047     MeshRefiner( Interface* imesh, Interface* omesh );
00048     virtual ~MeshRefiner();
00049 
00050     bool set_entity_refiner( EntityRefiner* );
00051     EntityRefiner* get_entity_refiner()
00052     {
00053         return this->entity_refiner;
00054     }
00055 
00056     bool set_comm( ParallelComm* c )
00057     {
00058         if( !c || this->comm == c ) return false;
00059         this->comm = c;
00060         return true;
00061     }
00062     ParallelComm* get_comm()
00063     {
00064         return this->comm;
00065     }
00066 
00067     RefinerTagManager* get_tag_manager()
00068     {
00069         return this->tag_manager;
00070     }
00071     const RefinerTagManager* get_tag_manager() const
00072     {
00073         return this->tag_manager;
00074     }
00075     void reset_vertex_tags();
00076     int add_vertex_tag( Tag tag_handle );
00077 
00078     virtual bool refine( Range& );
00079 
00080   protected:
00081     Interface* mesh_in;
00082     Interface* mesh_out;
00083     EntityRefiner* entity_refiner;
00084     RefinerTagManager* tag_manager;
00085     MeshOutputFunctor* output_functor;
00086     ParallelComm* comm;
00087 };
00088 
00089 }  // namespace moab
00090 
00091 #endif  // MOAB_MESH_REFINER_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines