MOAB: Mesh Oriented datABase  (version 5.2.1)
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 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::MeshOutputFunctor
00017  *\brief Implements the abstract EntityRefinerOutputFunctor class.
00018  *
00019  * This class is a concrete implementation of the EntityRefinerOutputFunctor.
00020  * It creates new vertices and regions in a new or existing mesh as
00021  * the input entities are streamed through the refiner.
00022  *
00023  * \author David Thompson
00024  * \author Philippe Pebay
00025  *
00026  * \date 28 July 2008
00027  */
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 
00043 class SplitVerticesBase;
00044 class EntitySource;
00045 class ParallelComm;
00046 
00047 class MeshOutputFunctor : public EntityRefinerOutputFunctor
00048 {
00049   public:
00050     MeshOutputFunctor( RefinerTagManager* tag_mgr );
00051     ~MeshOutputFunctor();
00052 
00053     void print_vert_crud( EntityHandle vout, int nvhash, EntityHandle* vhash, const double* vcoords,
00054                           const void* vtags );
00055     void assign_global_ids( ParallelComm* comm );
00056     void exchange_handles( ParallelComm* comm );
00057 
00058     void assign_tags( EntityHandle vhandle, const void* vtags );
00059 
00060     virtual EntityHandle map_vertex( EntityHandle vhash, const double* vcoords, const void* vtags );
00061     using EntityRefinerOutputFunctor::operator();
00062     virtual EntityHandle operator()( int nvhash, EntityHandle* vhash, const double* vcoords, const void* vtags );
00063     virtual void operator()( EntityHandle h );
00064     virtual void operator()( EntityType etyp );
00065 
00066     Interface* mesh_in;
00067     Interface* mesh_out;
00068     bool input_is_output;
00069     SplitVerticesBase* vertex_map;
00070     std::vector< SplitVerticesBase* > split_vertices;
00071     std::vector< EntitySource* > new_entities;
00072     std::vector< EntityHandle > elem_vert;
00073     RefinerTagManager* tag_manager;
00074     EntityHandle destination_set;
00075     std::map< ProcessSet, int > proc_partition_counts;
00076 };
00077 
00078 }  // namespace moab
00079 
00080 #endif  // MOAB_MESH_OUTPUT_FUNCTOR_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines