|
Sierra Toolkit
Version of the Day
|
00001 /*--------------------------------------------------------------------*/ 00002 /* Copyright 2001, 2002, 2010 Sandia Corporation. */ 00003 /* Under the terms of Contract DE-AC04-94AL85000, there is a */ 00004 /* non-exclusive license for use of this work by or on behalf */ 00005 /* of the U.S. Government. Export of this program may require */ 00006 /* a license from the United States Government. */ 00007 /*--------------------------------------------------------------------*/ 00008 00009 // Copyright 2001, 2002 Sandia Corporation, Albuquerque, NM. 00010 00011 #ifndef stk_rebalance_GeomDecomp_hpp 00012 #define stk_rebalance_GeomDecomp_hpp 00013 00014 // STL components 00015 #include <vector> 00016 #include <string> 00017 #include <utility> 00018 #include <map> 00019 00020 #include <stk_rebalance/Partition.hpp> 00021 #include <stk_mesh/base/Types.hpp> 00022 #include <stk_mesh/base/Field.hpp> 00023 #include <stk_mesh/base/Entity.hpp> 00024 00025 namespace stk_classic { 00028 namespace rebalance { 00029 00071 class GeomDecomp: public Partition { 00072 public: 00073 typedef mesh::Field<double,mesh::Cartesian> VectorField ; 00074 public: 00075 00076 GeomDecomp(ParallelMachine comm): Partition(comm) {} 00077 00078 virtual ~GeomDecomp(){} 00079 00096 static void entity_to_point( const mesh::Entity & entity, 00097 const VectorField & ref, 00098 std::vector<double> & coor); 00099 00112 static std::vector<const mesh::Entity *> entity_coordinates(const mesh::Entity & entity, 00113 const VectorField & ref, 00114 std::vector<std::vector<double> > & coordinates); 00115 00130 static std::vector<std::vector<double> > compute_entity_centroid( const mesh::Entity & entity, 00131 const VectorField & ref, 00132 std::vector<double> & coor); 00137 static bool confirm ( const std::string ¶m_set_name ); 00138 00139 }; 00140 00143 } 00144 } // namespace stk_classic 00145 00146 #endif