Newer
Older
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==
// ============================================================================
// == ==
// == TU Dresden ==
// == ==
// == Institut für Wissenschaftliches Rechnen ==
// == Zellescher Weg 12-14 ==
// == 01069 Dresden ==
// == germany ==
// == ==
// ============================================================================
// == ==
// == https://gforge.zih.tu-dresden.de/projects/amdis/ ==
// == ==
// ============================================================================
/** \file ParallelDomainDbg.h */
#ifndef AMDIS_PARALLELDOMAINDBG_H
#define AMDIS_PARALLELDOMAINDBG_H
#include "parallel/ParallelDomainBase.h"
namespace AMDiS {
class ParallelDomainDbg
{
protected:
typedef ParallelDomainBase::RankToDofContainer RankToDofContainer;
public:
/** \brief
* Tests the interior boundaries on all ranks if their order fits together.
*
* \param[in] pdb Parallel problem definition used for debugging.
*/
static void testInteriorBoundary(ParallelDomainBase &pdb);
/** \brief
* This function is used for debugging only. It traverses all interior boundaries
* and compares the dof indices on them with the dof indices of the boundarys
* neighbours. The function fails, when dof indices on an interior boundary do
* not fit together.
*
* \param[in] pdb Parallel problem definition used for debugging.
* \param[in] printCoords If true, the coords of all common dofs are printed
* to the screen.
*/
static void testCommonDofs(ParallelDomainBase &pdb, bool printCoords = false);
/** \brief
* Tests if all elements in the macro mesh are memeber of exactly one rank.
*
* \param[in] pdb Parallel problem definition used for debugging.
*/
static void testAllElements(ParallelDomainBase &pdb);
/** \brief
* Tests for all ranks simultaneously, if the number of all send and received
* DOFs fits together for all communication partners.
*
* \param[in] pdb Parallel problem definition used for debugging.
* \param[in] sendDofs The map of all DOFs the rank will send.
* \param[in] recvDofs The map of all DOFs the rank will receive.
*/
static void testDofContainerCommunication(ParallelDomainBase &pdb,
RankToDofContainer &sendDofs,
RankToDofContainer &recvDofs);
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/** \brief
* This function is used for debugging only. It prints all information from
* the local to global dof mapping, see \ref mapLocalGlobalDofs.
*
* \param[in] pdb Parallel problem definition used for debugging.
* \param[in] rank If specified, only the information from the given rank
* is printed.
*/
static void printMapLocalGlobal(ParallelDomainBase &pdb, int rank = -1);
/** \brief
* This function is used for debugging only. It prints all information about
* the periodic mapping of dofs, that are on periodic boundaries.
*
* \param[in] pdb Parallel problem definition used for debugging.
* \param[in] rank If specified, only the information from the given rank
* is printed.
*/
static void printMapPeriodic(ParallelDomainBase &pdb, int rank = -1);
/** \brief
* This function is used for debugging only. It prints information about dofs
* in rank's partition.
*
* \param[in] pdb Parallel problem definition used for debugging.
* \param[in] rank If specified, only the information from the given
* rank is printed.
* \param[in] rankDofs List of all dofs in ranks partition that are owned
* by rank.
* \param[in] rankAllDofs List of all dofs in ranks partition.
*/
static void printRankDofs(ParallelDomainBase &pdb,
int rank,
DofContainer& rankDofs,
DofContainer& rankAllDofs);
/** \brief
* This functions prints all information about all interior boundaries on all ranks.
*
* \param[in] pdb Parallel problem definition used for debugging.
*/
static void printBoundaryInfo(ParallelDomainBase &pdb);