MeshDistributor.h 20.5 KB
 Thomas Witkowski committed Apr 03, 2009 1 2 3 4 5 6 // ============================================================================ // == == // == AMDiS - Adaptive multidimensional simulations == // == == // ============================================================================ // == ==  Thomas Witkowski committed Sep 28, 2009 7 // == TU Dresden ==  Thomas Witkowski committed Apr 03, 2009 8 // == ==  Thomas Witkowski committed Sep 28, 2009 9 10 11 // == Institut für Wissenschaftliches Rechnen == // == Zellescher Weg 12-14 == // == 01069 Dresden ==  Thomas Witkowski committed Apr 03, 2009 12 13 14 15 // == germany == // == == // ============================================================================ // == ==  Thomas Witkowski committed Sep 28, 2009 16 // == https://gforge.zih.tu-dresden.de/projects/amdis/ ==  Thomas Witkowski committed Apr 03, 2009 17 18 19 // == == // ============================================================================  20 /** \file MeshDistributor.h */  Thomas Witkowski committed Jul 09, 2009 21   22 23 #ifndef AMDIS_MESHDISTRIBUTOR_H #define AMDIS_MESHDISTRIBUTOR_H  Thomas Witkowski committed Apr 03, 2009 24 25 26  #include  Thomas Witkowski committed Jun 11, 2009 27 #include  Thomas Witkowski committed Apr 03, 2009 28 #include  Thomas Witkowski committed Feb 08, 2010 29 #include  Thomas Witkowski committed Apr 03, 2009 30   Thomas Witkowski committed Feb 08, 2010 31 #include "Global.h"  Thomas Witkowski committed Apr 03, 2009 32 33 #include "ProblemTimeInterface.h" #include "ProblemIterationInterface.h"  Thomas Witkowski committed Apr 15, 2009 34 #include "FiniteElemSpace.h"  Thomas Witkowski committed Apr 03, 2009 35 #include "AdaptInfo.h"  Thomas Witkowski committed Feb 08, 2010 36 #include "parallel/InteriorBoundary.h"  Thomas Witkowski committed Sep 29, 2009 37 #include "Serializer.h"  Thomas Witkowski committed Feb 08, 2010 38 #include "BoundaryManager.h"  Thomas Witkowski committed Jun 12, 2009 39 40 #include "AMDiS_fwd.h"  Thomas Witkowski committed Apr 03, 2009 41 namespace AMDiS {  42   Thomas Witkowski committed Apr 03, 2009 43 44  class ParMetisPartitioner;  Thomas Witkowski committed Jun 08, 2010 45  class MeshDistributor  Thomas Witkowski committed Apr 03, 2009 46  {  Thomas Witkowski committed Feb 09, 2010 47  protected:  Thomas Witkowski committed Jun 29, 2009 48 49 50 51 52 53 54 55 56 57 58 59  /// Defines a mapping type from DOFs to rank numbers. typedef std::map DofToRank; /// Defines a mapping type from DOFs to a set of rank numbers. typedef std::map > DofToPartitions; /// Defines a mapping type from rank numbers to sets of DOFs. typedef std::map RankToDofContainer; /// Defines a mapping type from DOF indices to DOF indices. typedef std::map DofMapping;  Thomas Witkowski committed Aug 13, 2009 60 61 62  /// Defines a mapping type from DOFs to boolean values. typedef std::map DofToBool;  Thomas Witkowski committed Jun 29, 2009 63  /// Defines a mapping type from DOF indices to boolean values.  Thomas Witkowski committed Aug 13, 2009 64  typedef std::map DofIndexToBool;  Thomas Witkowski committed Jun 29, 2009 65   Thomas Witkowski committed Jul 01, 2009 66 67 68  /// Forward type (it maps rank numbers to the interior boundary objects). typedef InteriorBoundary::RankToBoundMap RankToBoundMap;  Thomas Witkowski committed Jul 07, 2009 69 70  typedef std::map DofIndexMap;  71 72 73  /// Mapps a boundar type, i.e., a boundary identifier index, to a periodic /// dof mapping. typedef std::map PeriodicDofMap;  Thomas Witkowski committed Jan 19, 2010 74 75  typedef std::vector MeshCodeVec;  Thomas Witkowski committed Oct 14, 2009 76   Thomas Witkowski committed Apr 03, 2009 77  public:  Thomas Witkowski committed Jun 08, 2010 78 79 80  MeshDistributor(std::string str); virtual ~MeshDistributor() {}  Thomas Witkowski committed Apr 03, 2009 81   Thomas Witkowski committed Jun 08, 2010 82  void initParallelization(AdaptInfo *adaptInfo);  Thomas Witkowski committed Apr 03, 2009 83   Thomas Witkowski committed Jun 08, 2010 84 85 86  void exitParallelization(AdaptInfo *adaptInfo); void addProblemStat(ProblemVec *probVec);  Thomas Witkowski committed Jun 26, 2009 87   Thomas Witkowski committed Jan 29, 2010 88 89 90 91 92 93 94 95 96  /** \brief * This function checks if the mesh has changed on at least on rank. In this case, * the interior boundaries are adapted on all ranks such that they fit together on * all ranks. Furthermore the function \ref updateLocalGlobalNumbering() is called * to update the dof numberings and mappings on all rank due to the new mesh * structure. */ void checkMeshChange();  Thomas Witkowski committed Oct 14, 2009 97  void updateDofAdmins();  Thomas Witkowski committed Jul 08, 2009 98   Thomas Witkowski committed Jun 26, 2009 99 100 101 102 103 104 105  /** \brief * Test, if the mesh consists of macro elements only. The mesh partitioning of * the parallelization works for macro meshes only and would fail, if the mesh * is already refined in some way. Therefore, this function will exit the program * if it finds a non macro element in the mesh. */ void testForMacroMesh();  Thomas Witkowski committed Apr 03, 2009 106 107 108 109 110 111  /// Set for each element on the partitioning level the number of leaf elements. double setElemWeights(AdaptInfo *adaptInfo); void partitionMesh(AdaptInfo *adaptInfo);  Thomas Witkowski committed Jun 08, 2010 112 113 114 115 116 117 118  inline virtual std::string getName() { return name; } /// Returns \ref nRankDOFs, the number of DOFs in the rank mesh. inline int getNumberRankDofs()  Thomas Witkowski committed Jul 10, 2009 119  {  Thomas Witkowski committed Jun 08, 2010 120  return nRankDofs;  Thomas Witkowski committed Jul 10, 2009 121  }  Thomas Witkowski committed Apr 03, 2009 122   123  /// Returns \ref nOverallDofs, the global number of DOFs.  Thomas Witkowski committed Jun 08, 2010 124  inline int getNumberOverallDofs()  Thomas Witkowski committed Jul 10, 2009 125  {  Thomas Witkowski committed Jun 08, 2010 126  return nOverallDofs;  Thomas Witkowski committed Jul 10, 2009 127  }  Thomas Witkowski committed Apr 03, 2009 128   129  /// Maps a local dof to its global index.  Thomas Witkowski committed Jun 08, 2010 130  inline DegreeOfFreedom mapLocalToGlobal(DegreeOfFreedom dof)  Thomas Witkowski committed Jul 10, 2009 131  {  Thomas Witkowski committed Jun 08, 2010 132  return mapLocalGlobalDofs[dof];  Thomas Witkowski committed Jul 10, 2009 133  }  Thomas Witkowski committed Apr 03, 2009 134   135  /// Maps a local dof to its local index.  Thomas Witkowski committed Jun 09, 2010 136 137 138 139 140  inline DegreeOfFreedom mapLocalToDofIndex(DegreeOfFreedom dof) { return mapLocalDofIndex[dof]; }  141 142  /// Returns for a global dof index its periodic mapping for a given boundary type. inline int getPeriodicMapping(BoundaryType type, int globalDofIndex)  Thomas Witkowski committed Jul 10, 2009 143  {  Thomas Witkowski committed Jul 08, 2010 144 145 146 147 148 149  TEST_EXIT_DBG(periodicDof[type].count(globalDofIndex) == 1) ("Should not happen!\n"); return periodicDof[type][globalDofIndex]; }  150 151 152  /// For a given global DOF index, this function returns the set of periodic /// associations, i.e., the boundary types the DOF is associated to, for this DOF. inline std::set& getPerDofAssociations(int globalDofIndex)  Thomas Witkowski committed Jul 08, 2010 153  {  154  return periodicDofAssociations[globalDofIndex];  Thomas Witkowski committed Jul 10, 2009 155  }  Thomas Witkowski committed Apr 03, 2009 156   157  /// Returns true, if the DOF (global index) is a periodic DOF.  Thomas Witkowski committed Jul 08, 2010 158  inline bool isPeriodicDof(int globalDofIndex)  Thomas Witkowski committed Jun 10, 2009 159  {  160  return (periodicDofAssociations.count(globalDofIndex) > 0);  Thomas Witkowski committed Jul 08, 2010 161 162  }  163 164 165  /// Returns true, if the DOF (global index) is a periodic DOF for the given /// boundary type. inline bool isPeriodicDof(int globalDofIndex, BoundaryType type)  Thomas Witkowski committed Jul 08, 2010 166 167  { return (periodicDof[type].count(globalDofIndex) > 0);  Thomas Witkowski committed Apr 07, 2009 168 169  }  170 171  /// Return true, if the given DOF is owned by the rank. If false, the DOF is in /// rank's partition, but is owned by some other rank.  Thomas Witkowski committed Jun 08, 2010 172 173 174 175  inline bool getIsRankDof(DegreeOfFreedom dof) { return isRankDof[dof]; }  Thomas Witkowski committed Dec 08, 2009 176   Thomas Witkowski committed Jun 08, 2010 177  inline long getLastMeshChangeIndex()  Thomas Witkowski committed Jun 10, 2009 178  {  Thomas Witkowski committed Jun 08, 2010 179  return lastMeshChangeIndex;  Thomas Witkowski committed Apr 07, 2009 180  }  Thomas Witkowski committed Apr 03, 2009 181   Thomas Witkowski committed Jun 08, 2010 182 183 184 185  inline int getRstart() { return rstart; }  Thomas Witkowski committed Jul 09, 2009 186   Thomas Witkowski committed Jun 08, 2010 187  inline int getMpiRank()  Thomas Witkowski committed Jun 11, 2009 188  {  Thomas Witkowski committed Jun 08, 2010 189  return mpiRank;  Thomas Witkowski committed Jun 11, 2009 190  }  Thomas Witkowski committed Apr 03, 2009 191   Thomas Witkowski committed Jun 08, 2010 192 193 194  inline MPI::Intracomm& getMpiComm() { return mpiComm;  Thomas Witkowski committed Apr 03, 2009 195 196  }  Thomas Witkowski committed Jun 08, 2010 197  inline RankToDofContainer& getSendDofs()  Thomas Witkowski committed Jun 10, 2009 198  {  Thomas Witkowski committed Jun 08, 2010 199  return sendDofs;  Thomas Witkowski committed Apr 07, 2009 200 201  }  Thomas Witkowski committed Jun 08, 2010 202  inline RankToDofContainer& getRecvDofs()  Thomas Witkowski committed Jun 11, 2009 203  {  Thomas Witkowski committed Jun 08, 2010 204  return recvDofs;  Thomas Witkowski committed Jun 11, 2009 205  }  206   Thomas Witkowski committed Sep 28, 2009 207  // Writes all data of this object to an output stream.  Thomas Witkowski committed Jun 08, 2010 208  void serialize(std::ostream &out);  Thomas Witkowski committed Jun 11, 2009 209   Thomas Witkowski committed Sep 28, 2009 210  // Reads the object data from an input stream.  Thomas Witkowski committed Jun 08, 2010 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231  void deserialize(std::istream &in); /** \brief * This function must be used if the values of a DOFVector must be synchronised * over all ranks. That means, that each rank sends the values of the DOFs, which * are owned by the rank and lie on an interior bounday, to all other ranks also * having these DOFs. * * This function must be used, for example, after the lineary system is solved, or * after the DOFVector is set by some user defined functions, e.g., initial * solution functions. */ void synchVector(DOFVector &vec); /** \brief * Works in the same way as the function above defined for DOFVectors. Due to * performance, this function does not call \ref synchVector for each DOFVector, * but instead sends all values of all DOFVectors all at once. */ void synchVector(SystemVector &vec);  Thomas Witkowski committed Jun 11, 2009 232  protected:  Thomas Witkowski committed Jun 11, 2009 233  /** \brief  Thomas Witkowski committed Jan 26, 2010 234  * Determines the interior boundaries, i.e. boundaries between ranks, and stores  Thomas Witkowski committed Jun 11, 2009 235 236  * all information about them in \ref interiorBoundary. */  Thomas Witkowski committed Oct 19, 2009 237  void createInteriorBoundaryInfo();  Thomas Witkowski committed Jun 11, 2009 238   Thomas Witkowski committed Jan 26, 2010 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254  /** \brief * Deterimes the interior boundaries between ranks, that are based on the * neighbourhood information of the macro elements. That means that in 2d the * function search for all edge based interior boundaries and in 3d for all face * based interior boundaries. This function cannot find boundaries of substructure * elements, i.e. vertex boundaries in 2d and vertex and edge boundaries in 3d. */ void createMacroElementInteriorBoundaryInfo(); /** \brief * Determines all interior boundaries between rank that consist of element's * substructures. In 2d these may be only vertices. In 3d there may be also * interior boundaries consisting of either a whole edge or of a single vertex. */ void createSubstructureInteriorBoundaryInfo();  Thomas Witkowski committed Jun 11, 2009 255 256 257  /// Removes all macro elements from the mesh that are not part of ranks partition. void removeMacroElements();  258 259  /// Creates from a macro mesh a correct local and global DOF index numbering. void createLocalGlobalNumbering();  Thomas Witkowski committed Jun 16, 2009 260   261 262  /// Updates the local and global DOF numbering after the mesh has been changed. void updateLocalGlobalNumbering();  Thomas Witkowski committed Jun 11, 2009 263   264 265 266 267 268  /** \brief * Creates to all dofs in rank's partition that are on a periodic boundary the * mapping from dof index to the other periodic dof indices. This information * is stored in \ref periodicDof. */  Thomas Witkowski committed Oct 14, 2009 269 270  void createPeriodicMap();  Thomas Witkowski committed Jul 09, 2009 271 272  /** \brief * This function create new mappings from local to global indices,  Thomas Witkowski committed Jun 09, 2010 273  * \ref mapLocalGlobalDofs, and from local to dof indices, \ref mapLocalDofIndex.  Thomas Witkowski committed Jul 09, 2009 274 275 276 277 278 279 280 281 282 283 284 285 286 287  * Furthermore, using the first argument the dof indices in ranks partition are * changed. * * \param[in] rankDofsNewLocalIndex Map from dof pointers of all dofs in rank * to new dof indices. * \param[in] rankOwnedDofsNewLocalIndex Map from dof pointers of dofs owned by * the rank to the new local index. * \param[in] rankDofsNewGlobalIndex Map from dof pointers of all dofs in rank * to the new global index. */ void createLocalMappings(DofIndexMap &rankDofsNewLocalIndex, DofIndexMap &rankOwnedDofsNewLocalIndex, DofIndexMap &rankDofsNewGlobalIndex);  Thomas Witkowski committed Jun 11, 2009 288 289  /** \brief * This function traverses the whole mesh, i.e. before it is really partitioned,  Thomas Witkowski committed Jun 15, 2009 290 291 292  * and collects information about which DOF corresponds to which rank. Can only * be used, if \ref partitionVec is set correctly. This is only the case, when * the macro mesh is partitioned.  Thomas Witkowski committed Jun 11, 2009 293  *  Thomas Witkowski committed Jan 19, 2010 294 295 296 297 298  * \param[out] partitionDOFs Stores to each DOF pointer the set of ranks the DOF * is part of. * \param[out] rankDOFs Stores all rank DOFs. * \param[out] boundaryDOFs Stores all DOFs in ranks partition that are on an * interior boundary but correspond to another rank.  Thomas Witkowski committed Jun 11, 2009 299  */  Thomas Witkowski committed Oct 02, 2009 300  void createDofMemberInfo(DofToPartitions& partitionDofs,  Thomas Witkowski committed Jul 03, 2009 301 302  DofContainer& rankOwnedDofs, DofContainer& rankAllDofs,  Thomas Witkowski committed Aug 13, 2009 303  DofToRank& boundaryDofs,  Thomas Witkowski committed Jun 18, 2010 304  DofToBool& isVertexDof);  Thomas Witkowski committed Jun 22, 2009 305   Thomas Witkowski committed Jan 19, 2010 306 307 308 309 310 311 312 313 314 315 316 317 318  /** \brief * Checks for all given interior boundaries if the elements fit together on both * sides of the boundaries. If this is not the case, the mesh is adapted. Because * refinement of a certain element may forces the refinement of other elements, * it is not guaranteed that all rank's meshes fit together after this function * terminates. Hence, it must be called until a stable mesh refinement is reached. * If the mesh has been changed by this function, it returns true. Otherwise, it * returns false, i.e., the given interior boundaries fit together on both sides. * * \param[in] allBound Defines a map from rank to interior boundaries which * should be checked. */ bool checkAndAdaptBoundary(RankToBoundMap &allBound);  Thomas Witkowski committed Jul 01, 2009 319   Thomas Witkowski committed Aug 17, 2009 320 321 322 323 324 325 326  /** \brief * This functions create a Paraview file with the macro mesh where the elements * are colored by the partition they are part of. This function can be used for * debugging. */ void writePartitioningMesh(std::string filename);  Thomas Witkowski committed Jul 18, 2010 327 328 329  /// Sets \ref isRankDof to all matrices and rhs vectors in all stationary problems. void setRankDofs();  Thomas Witkowski committed Jun 29, 2010 330 331 332 333  /// Removes all periodic boundary condition information from all matrices and /// vectors of all stationary problems and from the mesh itself. void removePeriodicBoundaryConditions();  Thomas Witkowski committed Feb 08, 2010 334  // Removes all periodic boundaries from a given boundary map.  Thomas Witkowski committed Jun 29, 2010 335  void removePeriodicBoundaryConditions(BoundaryIndexMap& boundaryMap);  Thomas Witkowski committed Feb 08, 2010 336   Thomas Witkowski committed Jan 29, 2010 337 338  bool fitElementToMeshCode(MeshStructure &code, Element *el,  Thomas Witkowski committed May 21, 2010 339 340  GeoIndex subObj, int ithObj,  Thomas Witkowski committed Jun 18, 2010 341 342  int elType, bool reverseMode);  Thomas Witkowski committed Jan 29, 2010 343 344  bool fitElementToMeshCode2(MeshStructure &code,  Thomas Witkowski committed May 11, 2010 345  TraverseStack &stack,  Thomas Witkowski committed May 21, 2010 346 347  GeoIndex subObj, int ithObj,  Thomas Witkowski committed Jun 18, 2010 348 349  int elType, bool reverseMode);  Thomas Witkowski committed Jan 29, 2010 350   Thomas Witkowski committed Sep 28, 2009 351 352 353 354 355 356 357 358 359 360 361 362 363  /// Writes a vector of dof pointers to an output stream. void serialize(std::ostream &out, DofContainer &data); /// Reads a vector of dof pointers from an input stream. void deserialize(std::istream &in, DofContainer &data, std::map &dofMap); /// Writes a \ref RankToDofContainer to an output stream. void serialize(std::ostream &out, RankToDofContainer &data); /// Reads a \ref RankToDofContainer from an input stream. void deserialize(std::istream &in, RankToDofContainer &data, std::map &dofMap);  Thomas Witkowski committed Sep 29, 2009 364   Thomas Witkowski committed Oct 26, 2009 365 366 367  /// Writes a periodic dof mapping to an output stream. void serialize(std::ostream &out, PeriodicDofMap &data);  Thomas Witkowski committed Jul 08, 2010 368 369  void serialize(std::ostream &out, std::map >& data);  Thomas Witkowski committed Oct 26, 2009 370 371 372  /// Reads a periodic dof mapping from an input stream. void deserialize(std::istream &in, PeriodicDofMap &data);  Thomas Witkowski committed Jul 08, 2010 373 374  void deserialize(std::istream &in, std::map >& data);  Thomas Witkowski committed Sep 29, 2009 375 376 377 378  /// Writes a mapping from dof pointers to some values to an output stream. template void serialize(std::ostream &out, std::map &data) {  379 380  FUNCNAME("ParallelDomainBase::serialize()");  Thomas Witkowski committed Sep 29, 2009 381  int mapSize = data.size();  382  SerUtil::serialize(out, mapSize);  Thomas Witkowski committed Sep 29, 2009 383 384 385 386  for (typename std::map::iterator it = data.begin(); it != data.end(); ++it) { int v1 = (*(it->first)); T v2 = it->second;  387 388  SerUtil::serialize(out, v1); SerUtil::serialize(out, v2);  Thomas Witkowski committed Sep 29, 2009 389 390 391 392 393 394 395 396  } } /// Reads a mapping from dof pointer to some values from an input stream. template void deserialize(std::istream &in, std::map &data, std::map &dofMap) {  Thomas Witkowski committed Oct 02, 2009 397 398  FUNCNAME("ParallelDomainBase::deserialize()");  Thomas Witkowski committed Sep 29, 2009 399  int mapSize = 0;  400  SerUtil::deserialize(in, mapSize);  Thomas Witkowski committed Sep 29, 2009 401 402 403  for (int i = 0; i < mapSize; i++) { int v1 = 0; T v2;  404 405  SerUtil::deserialize(in, v1); SerUtil::deserialize(in, v2);  Thomas Witkowski committed Oct 02, 2009 406 407 408  TEST_EXIT_DBG(dofMap.count(v1) != 0)("Cannot find DOF %d in map!\n", v1);  Thomas Witkowski committed Sep 29, 2009 409 410 411 412  data[dofMap[v1]] = v2; } }  Thomas Witkowski committed Apr 03, 2009 413  protected:  Thomas Witkowski committed Feb 08, 2010 414  ///  Thomas Witkowski committed Jun 08, 2010 415  std::vector probStat;  Thomas Witkowski committed Feb 08, 2010 416   Thomas Witkowski committed Apr 03, 2009 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432  /// The rank of the current process. int mpiRank; /// Overall number of processes. int mpiSize; /** \brief * MPI communicator collected all processes, which should * be used for calculation. The Debug procces is not included * in this communicator. */ MPI::Intracomm mpiComm; /// Name of the problem (as used in the init files) std::string name;  Thomas Witkowski committed Apr 15, 2009 433 434 435  /// Finite element space of the problem. FiniteElemSpace *feSpace;  Thomas Witkowski committed Apr 03, 2009 436 437 438  /// Mesh of the problem. Mesh *mesh;  439 440 441 442 443 444 445  /** \brief * A refinement manager that should be used on the mesh. It is used to refine * elements at interior boundaries in order to fit together with elements on the * other side of the interior boundary. */ RefinementManager *refineManager;  Thomas Witkowski committed Jun 26, 2009 446 447 448  /// Info level. int info;  Thomas Witkowski committed Apr 03, 2009 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468  /// Pointer to the paritioner which is used to devide a mesh into partitions. ParMetisPartitioner *partitioner; /// Weights for the elements, i.e., the number of leaf elements within this element. std::map elemWeights; /// Is true, if the mesh was not partitioned before, otherwise it's false. bool initialPartitionMesh; /** \brief * Stores to every coarse element index the number of the partition it * corresponds to. */ std::map partitionVec; /** \brief * Stores an old partitioning of elements. To every element index the number * of the parition it corresponds to is stored. */ std::map oldPartitionVec;  Thomas Witkowski committed Feb 09, 2010 469   Thomas Witkowski committed Apr 07, 2009 470  /// Number of DOFs in the rank mesh.  Thomas Witkowski committed Sep 25, 2009 471  int nRankDofs;  Thomas Witkowski committed Apr 27, 2009 472   473  /// Number of DOFs in the whole domain.  Thomas Witkowski committed Jun 08, 2010 474 475  int nOverallDofs;  Thomas Witkowski committed Apr 27, 2009 476  /** \brief  Thomas Witkowski committed Jun 15, 2009 477 478 479 480 481 482 483 484 485 486 487 488  * Defines the interior boundaries of the domain that result from partitioning * the whole mesh. Contains only the boundaries, which are owned by the rank, i.e., * the object gives for every neighbour rank i the boundaries this rank owns and * shares with rank i. */ InteriorBoundary myIntBoundary; /** \brief * Defines the interior boundaries of the domain that result from partitioning * the whole mesh. Contains only the boundaries, which are not owned by the rank, * i.e., the object gives for every neighbour rank i the boundaries that are * owned by rank i and are shared with this rank.  Thomas Witkowski committed Apr 27, 2009 489  */  Thomas Witkowski committed Jun 15, 2009 490  InteriorBoundary otherIntBoundary;  Thomas Witkowski committed Apr 27, 2009 491   Thomas Witkowski committed Oct 14, 2009 492  /** \brief  493 494  * Defines the periodic boundaries with other ranks. Periodic boundaries have * no owner, as it is the case of interior boundaries.  Thomas Witkowski committed Oct 14, 2009 495 496 497  */ InteriorBoundary periodicBoundary;  Thomas Witkowski committed Jun 10, 2009 498 499 500 501  /** \brief * This map contains for each rank the list of dofs the current rank must send * to exchange solution dofs at the interior boundaries. */  Thomas Witkowski committed Jun 29, 2009 502  RankToDofContainer sendDofs;  Thomas Witkowski committed Jun 10, 2009 503 504  /** \brief  Thomas Witkowski committed Jan 19, 2010 505 506 507  * This map contains for each rank the list of DOFs from which the current rank * will receive DOF values (i.e., this are all DOFs at an interior boundary). The * DOF indices are given in rank's local numbering.  Thomas Witkowski committed Jun 10, 2009 508  */  Thomas Witkowski committed Jun 29, 2009 509  RankToDofContainer recvDofs;  Thomas Witkowski committed Jun 11, 2009 510 511  /// Maps local to global dof indices.  Thomas Witkowski committed Jan 19, 2010 512  DofMapping mapLocalGlobalDofs;  Thomas Witkowski committed Jun 11, 2009 513   Thomas Witkowski committed Jul 20, 2009 514  /// Maps local dof indices to real dof indices.  Thomas Witkowski committed Jun 09, 2010 515  DofMapping mapLocalDofIndex;  Thomas Witkowski committed Jun 11, 2009 516 517 518 519 520 521  /** \brief * Maps all DOFs in ranks partition to a bool value. If it is true, the DOF is * owned by the rank. Otherwise, its an interior boundary DOF that is owned by * another rank. */  Thomas Witkowski committed Aug 13, 2009 522 523  DofIndexToBool isRankDof;  Thomas Witkowski committed Oct 02, 2009 524 525  /** \brief * Maps every dof pointer in ranks macro mesh to a boolean variable indicating  Thomas Witkowski committed Apr 29, 2010 526  * whether this dof is a vertex dof (true) or not (false).  Thomas Witkowski committed Oct 02, 2009 527  */  Thomas Witkowski committed Aug 13, 2009 528  DofToBool vertexDof;  Thomas Witkowski committed Jul 03, 2009 529   530  /** \brief  531 532 533 534  * If periodic boundaries are used, this map stores, for each periodic boundary * type, for all DOFs in rank's partition (that are on periodic boundaries), the * corresponding mapped periodic DOFs. The mapping is defined by using global * dof indices.  535  */  Thomas Witkowski committed Oct 14, 2009 536  PeriodicDofMap periodicDof;  537 538 539 540 541 542 543 544  /** \brief * If periodic boundaries are used, this map stores to each periodic DOF in rank's * partition the set of periodic boundaries the DOF is associated to. In 2D, most * DOFs are only on one periodic boundary. Only, e.g., in a box with all boundaries * being periodic, the for corners are associated by two different boundaries. */ std::map > periodicDofAssociations;  Thomas Witkowski committed Jul 08, 2010 545   Thomas Witkowski committed Sep 25, 2009 546  /// Is the index of the first row of the linear system, which is owned by the rank.  Thomas Witkowski committed Jul 03, 2009 547  int rstart;  Thomas Witkowski committed Jul 09, 2009 548   549 550 551 552 553 554 555  /** \brief * If the problem definition has been read from a serialization file, this * variable is true, otherwise it is false. This variable is used to stop the * initialization function, if the problem definition has already been read from * a serialization file. */ bool deserialized;  Thomas Witkowski committed Dec 08, 2009 556   557 558 559  /// Denotes whether there exists a filewriter for this object. bool writeSerializationFile;  Thomas Witkowski committed Dec 08, 2009 560 561 562 563 564  /** \brief * Stores the mesh change index. This is used to recognize changes in the mesh * structure (e.g. through refinement or coarsening managers). */ long lastMeshChangeIndex;  565   Thomas Witkowski committed Jun 18, 2010 566 567 568 569 570  /// This variable is true, if the macro elements are consistent with all other /// data structures. Within the initialization and during mesh redistribution this /// may not be the case. bool macroElementStructureConsisten;  571  friend class ParallelDebug;  Thomas Witkowski committed Apr 03, 2009 572 573 574  }; }  575 #endif // AMDIS_MESHDISTRIBUTOR_H