Sierra Toolkit  Version of the Day
GeomDecomp.hpp
Go to the documentation of this file.
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2001, 2002, 2010 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 // Copyright 2001, 2002 Sandia Corporation, Albuquerque, NM.
10 
11 #ifndef stk_rebalance_GeomDecomp_hpp
12 #define stk_rebalance_GeomDecomp_hpp
13 
14 // STL components
15 #include <vector>
16 #include <string>
17 #include <utility>
18 #include <map>
19 
21 #include <stk_mesh/base/Types.hpp>
22 #include <stk_mesh/base/Field.hpp>
23 #include <stk_mesh/base/Entity.hpp>
24 
25 namespace stk_classic {
28 namespace rebalance {
29 
71 class GeomDecomp: public Partition {
72 public:
74 public:
75 
76  GeomDecomp(ParallelMachine comm): Partition(comm) {}
77 
78  virtual ~GeomDecomp(){}
79 
96  static void entity_to_point( const mesh::Entity & entity,
97  const VectorField & ref,
98  std::vector<double> & coor);
99 
112  static std::vector<const mesh::Entity *> entity_coordinates(const mesh::Entity & entity,
113  const VectorField & ref,
114  std::vector<std::vector<double> > & coordinates);
115 
130  static std::vector<std::vector<double> > compute_entity_centroid( const mesh::Entity & entity,
131  const VectorField & ref,
132  std::vector<double> & coor);
137  static bool confirm ( const std::string &param_set_name );
138 
139 };
140 
143 }
144 } // namespace stk_classic
145 
146 #endif
bool rebalance(mesh::BulkData &bulk_data, const mesh::Selector &selector, const VectorField *coord_ref, const ScalarField *elem_weight_ref, Partition &partition, const stk_classic::mesh::EntityRank rank=stk_classic::mesh::InvalidEntityRank)
Rebalance with a Partition object.
Definition: Rebalance.cpp:164
Partition(stk_classic::ParallelMachine comm)
Constructors.
Definition: Partition.cpp:20
static std::vector< const mesh::Entity * > entity_coordinates(const mesh::Entity &entity, const VectorField &ref, std::vector< std::vector< double > > &coordinates)
Used to return the nodal entities that compute_entity_centroid averages.
Definition: GeomDecomp.cpp:34
Field with defined data type and multi-dimensions (if any)
Definition: Field.hpp:118
A fundamental unit within the discretization of a problem domain, including but not limited to nodes...
Definition: Entity.hpp:120
Initialized with a list of mesh entities unique to each processor.
Definition: Partition.hpp:81
Sierra Toolkit.
MPI_Comm ParallelMachine
Definition: Parallel.hpp:32
For partitioning of mesh entities over a processing grid.
static void entity_to_point(const mesh::Entity &entity, const VectorField &ref, std::vector< double > &coor)
Convert a single mesh entity to a single point.
Definition: GeomDecomp.cpp:133
Class for determining the optimal partitioning of mesh entities.
Definition: GeomDecomp.hpp:71
static std::vector< std::vector< double > > compute_entity_centroid(const mesh::Entity &entity, const VectorField &ref, std::vector< double > &coor)
Returns a vector of vectors containing the coordinates of the nodes that were used to compute the cen...
Definition: GeomDecomp.cpp:70
static bool confirm(const std::string &param_set_name)
Check existence of library entry name on domain library. This is a simple one line convenience functi...