Debug.h 2.54 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  TU Dresden                                                            ==
// ==                                                                        ==
// ==  Institut fr Wissenschaftliches Rechnen                               ==
// ==  Zellescher Weg 12-14                                                  ==
// ==  01069 Dresden                                                         ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  https://gforge.zih.tu-dresden.de/projects/amdis/                      ==
// ==                                                                        ==
// ============================================================================

/** \file Debug.h */

#ifndef AMDIS_DEBUG_H
#define AMDIS_DEBUG_H

#include "AMDiS_fwd.h"
#include "Global.h"

namespace AMDiS {
  
  namespace debug {
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
    void writeLocalElementDofs(int rank, int elIdx, FiniteElemSpace *feSpace);
    
    void writeMesh(FiniteElemSpace *feSpace, int rank, std::string filename);
    
    void writeDofMesh(int rank, DegreeOfFreedom dof, FiniteElemSpace *feSpace);
#endif
    
    void colorDofVectorByLocalElementDofs(DOFVector<double>& vec, Element *el);
    
    bool colorDofVectorByLocalElementDofs(DOFVector<double>& vec, 
					  Mesh *mesh, 
					  int elIndex);
    
    Element* getDofIndexElement(FiniteElemSpace *feSpace, DegreeOfFreedom dof);
    
    Element* getLevel0ParentElement(Mesh *mesh, Element *el);
    
    void printInfoByDof(FiniteElemSpace *feSpace, DegreeOfFreedom dof);
Thomas Witkowski's avatar
Thomas Witkowski committed
50
51

    void printMatValuesStatistics(Matrix<DOFMatrix*> *mat);
52
53

    void writeElementIndexMesh(FiniteElemSpace *feSpace, std::string filename);
54
55
56
57

    void writeMatlabMatrix(DOFMatrix &mat, std::string filename);

    void writeMatlabVector(DOFVector<double> &vec, std::string filename);
58
59
60
61
  }
}

#endif