moab
MeshOutputFunctor.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 
00028 #ifndef MOAB_MESH_OUTPUT_FUNCTOR_HPP
00029 #define MOAB_MESH_OUTPUT_FUNCTOR_HPP
00030 
00031 #include "moab/Types.hpp"
00032 #include "EntityRefiner.hpp"
00033 #include "ProcessSet.hpp"
00034 
00035 #include <vector>
00036 #include <map>
00037 
00038 #include <string.h>
00039 
00040 namespace moab {
00041 
00042 class SplitVerticesBase;
00043 class EntitySource;
00044 class ParallelComm;
00045 
00046 class MeshOutputFunctor : public EntityRefinerOutputFunctor
00047 {
00048 public:
00049   MeshOutputFunctor( RefinerTagManager* tag_mgr );
00050   ~MeshOutputFunctor();
00051 
00052   void print_vert_crud( EntityHandle vout, int nvhash, EntityHandle* vhash, const double* vcoords, const void* vtags );
00053   void assign_global_ids( ParallelComm* comm );
00054   void exchange_handles( ParallelComm* comm );
00055 
00056   void assign_tags( EntityHandle vhandle, const void* vtags );
00057 
00058   virtual EntityHandle map_vertex( EntityHandle vhash, const double* vcoords, const void* vtags );
00059   virtual EntityHandle operator () ( int nvhash, EntityHandle* vhash, const double* vcoords, const void* vtags );
00060   virtual void operator () ( EntityHandle h );
00061   virtual void operator () ( EntityType etyp );
00062 
00063   Interface* mesh_in;
00064   Interface* mesh_out;
00065   bool input_is_output;
00066   SplitVerticesBase* vertex_map;
00067   std::vector<SplitVerticesBase*> split_vertices;
00068   std::vector<EntitySource*> new_entities;
00069   std::vector<EntityHandle> elem_vert;
00070   RefinerTagManager* tag_manager;
00071   EntityHandle destination_set;
00072   std::map<ProcessSet,int> proc_partition_counts;
00073 };
00074 
00075 } // namespace moab 
00076 
00077 #endif // MOAB_MESH_OUTPUT_FUNCTOR_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines