Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
334a275f
Commit
334a275f
authored
Jan 19, 2010
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved all general debug functions to Debug.h and Debug.cc
parent
73afa800
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
360 additions
and
280 deletions
+360
-280
AMDiS/bin/Makefile.am
AMDiS/bin/Makefile.am
+1
-0
AMDiS/bin/Makefile.in
AMDiS/bin/Makefile.in
+13
-3
AMDiS/src/Debug.cc
AMDiS/src/Debug.cc
+139
-0
AMDiS/src/Debug.h
AMDiS/src/Debug.h
+53
-0
AMDiS/src/ParallelDomainBase.cc
AMDiS/src/ParallelDomainBase.cc
+116
-246
AMDiS/src/ParallelDomainBase.h
AMDiS/src/ParallelDomainBase.h
+21
-26
AMDiS/src/StdMpi.h
AMDiS/src/StdMpi.h
+17
-5
No files found.
AMDiS/bin/Makefile.am
View file @
334a275f
...
...
@@ -216,6 +216,7 @@ $(SOURCE_DIR)/SubElInfo.h $(SOURCE_DIR)/SubElInfo.cc \
$(SOURCE_DIR)
/SolutionDataStorage.h
$(SOURCE_DIR)
/SolutionDataStorage.hh
\
$(SOURCE_DIR)
/InteriorBoundary.h
$(SOURCE_DIR)
/InteriorBoundary.cc
\
$(SOURCE_DIR)
/ElementDofIteartor.h
$(SOURCE_DIR)
/ElementDofIterator.cc
\
$(SOURCE_DIR)
/Debug.h
$(SOURCE_DIR)
/Debug.cc
\
$(SOURCE_DIR)
/parareal/ProblemBase.h
\
$(SOURCE_DIR)
/parareal/AdaptParaReal.h
$(SOURCE_DIR)
/parareal/AdaptParaReal.cc
...
...
AMDiS/bin/Makefile.in
View file @
334a275f
...
...
@@ -225,8 +225,8 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ParallelDomainBase.h \
$(SOURCE_DIR)
/InteriorBoundary.h
\
$(SOURCE_DIR)
/InteriorBoundary.cc
\
$(SOURCE_DIR)
/ElementDofIteartor.h
\
$(SOURCE_DIR)
/ElementDofIterator.cc
\
$(SOURCE_DIR)
/parareal/ProblemBase.h
\
$(SOURCE_DIR)
/ElementDofIterator.cc
$(SOURCE_DIR)
/Debug.h
\
$(SOURCE_DIR)
/Debug.cc
$(SOURCE_DIR)
/parareal/ProblemBase.h
\
$(SOURCE_DIR)
/parareal/AdaptParaReal.h
\
$(SOURCE_DIR)
/parareal/AdaptParaReal.cc
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
am__objects_1
=
libamdis_la-ParallelDomainBase.lo
\
...
...
@@ -290,7 +290,8 @@ am_libamdis_la_OBJECTS = $(am__objects_2) libamdis_la-DOFIndexed.lo \
libamdis_la-PngWriter.lo libamdis_la-PovrayWriter.lo
\
libamdis_la-DataCollector.lo libamdis_la-ScalableQuadrature.lo
\
libamdis_la-SubElInfo.lo libamdis_la-InteriorBoundary.lo
\
libamdis_la-ElementDofIterator.lo libamdis_la-AdaptParaReal.lo
libamdis_la-ElementDofIterator.lo libamdis_la-Debug.lo
\
libamdis_la-AdaptParaReal.lo
libamdis_la_OBJECTS
=
$(am_libamdis_la_OBJECTS)
libcompositeFEM_la_LIBADD
=
am_libcompositeFEM_la_OBJECTS
=
libcompositeFEM_la-CFE_Integration.lo
\
...
...
@@ -629,6 +630,7 @@ $(SOURCE_DIR)/SubElInfo.h $(SOURCE_DIR)/SubElInfo.cc \
$(SOURCE_DIR)
/SolutionDataStorage.h
$(SOURCE_DIR)
/SolutionDataStorage.hh
\
$(SOURCE_DIR)
/InteriorBoundary.h
$(SOURCE_DIR)
/InteriorBoundary.cc
\
$(SOURCE_DIR)
/ElementDofIteartor.h
$(SOURCE_DIR)
/ElementDofIterator.cc
\
$(SOURCE_DIR)
/Debug.h
$(SOURCE_DIR)
/Debug.cc
\
$(SOURCE_DIR)
/parareal/ProblemBase.h
\
$(SOURCE_DIR)
/parareal/AdaptParaReal.h
$(SOURCE_DIR)
/parareal/AdaptParaReal.cc
...
...
@@ -747,6 +749,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-DOFMatrix.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-DOFVector.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-DataCollector.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-Debug.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-DirichletBC.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-DualTraverse.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-ElInfo.Plo@am__quote@
...
...
@@ -1532,6 +1535,13 @@ libamdis_la-ElementDofIterator.lo: $(SOURCE_DIR)/ElementDofIterator.cc
@AMDEP_TRUE@@am__fastdepCXX_FALSE@
DEPDIR
=
$(DEPDIR)
$(CXXDEPMODE)
$(depcomp)
@AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@
$(LIBTOOL)
--tag
=
CXX
--mode
=
compile
$(CXX)
$(DEFS)
$(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS)
$(CPPFLAGS)
$(libamdis_la_CXXFLAGS)
$(CXXFLAGS)
-c
-o
libamdis_la-ElementDofIterator.lo
`
test
-f
'
$(SOURCE_DIR)
/ElementDofIterator.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/ElementDofIterator.cc
libamdis_la-Debug.lo
:
$(SOURCE_DIR)/Debug.cc
@am__fastdepCXX_TRUE@
if
$(LIBTOOL)
--tag
=
CXX
--mode
=
compile
$(CXX)
$(DEFS)
$(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS)
$(CPPFLAGS)
$(libamdis_la_CXXFLAGS)
$(CXXFLAGS)
-MT
libamdis_la-Debug.lo
-MD
-MP
-MF
"
$(DEPDIR)
/libamdis_la-Debug.Tpo"
-c
-o
libamdis_la-Debug.lo
`
test
-f
'
$(SOURCE_DIR)
/Debug.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/Debug.cc
;
\
@am__fastdepCXX_TRUE@
then
mv
-f
"
$(DEPDIR)
/libamdis_la-Debug.Tpo"
"
$(DEPDIR)
/libamdis_la-Debug.Plo"
;
else
rm
-f
"
$(DEPDIR)
/libamdis_la-Debug.Tpo"
;
exit
1
;
fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@
source
=
'
$(SOURCE_DIR)
/Debug.cc'
object
=
'libamdis_la-Debug.lo'
libtool
=
yes
@AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@
DEPDIR
=
$(DEPDIR)
$(CXXDEPMODE)
$(depcomp)
@AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@
$(LIBTOOL)
--tag
=
CXX
--mode
=
compile
$(CXX)
$(DEFS)
$(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS)
$(CPPFLAGS)
$(libamdis_la_CXXFLAGS)
$(CXXFLAGS)
-c
-o
libamdis_la-Debug.lo
`
test
-f
'
$(SOURCE_DIR)
/Debug.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/Debug.cc
libamdis_la-AdaptParaReal.lo
:
$(SOURCE_DIR)/parareal/AdaptParaReal.cc
@am__fastdepCXX_TRUE@
if
$(LIBTOOL)
--tag
=
CXX
--mode
=
compile
$(CXX)
$(DEFS)
$(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS)
$(CPPFLAGS)
$(libamdis_la_CXXFLAGS)
$(CXXFLAGS)
-MT
libamdis_la-AdaptParaReal.lo
-MD
-MP
-MF
"
$(DEPDIR)
/libamdis_la-AdaptParaReal.Tpo"
-c
-o
libamdis_la-AdaptParaReal.lo
`
test
-f
'
$(SOURCE_DIR)
/parareal/AdaptParaReal.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/parareal/AdaptParaReal.cc
;
\
@am__fastdepCXX_TRUE@
then
mv
-f
"
$(DEPDIR)
/libamdis_la-AdaptParaReal.Tpo"
"
$(DEPDIR)
/libamdis_la-AdaptParaReal.Plo"
;
else
rm
-f
"
$(DEPDIR)
/libamdis_la-AdaptParaReal.Tpo"
;
exit
1
;
fi
...
...
AMDiS/src/Debug.cc
0 → 100644
View file @
334a275f
#include <boost/lexical_cast.hpp>
#include "Debug.h"
#include "DOFVector.h"
#include "MacroElement.h"
#include "VtkWriter.h"
namespace
AMDiS
{
namespace
debug
{
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
void
writeLocalElementDofs
(
int
rank
,
int
elIdx
,
FiniteElemSpace
*
feSpace
)
{
using
boost
::
lexical_cast
;
if
(
MPI
::
COMM_WORLD
.
Get_rank
()
==
rank
)
{
DOFVector
<
double
>
tmp
(
feSpace
,
"tmp"
);
colorDofVectorByLocalElementDofs
(
tmp
,
feSpace
->
getMesh
(),
elIdx
);
VtkWriter
::
writeFile
(
tmp
,
"tmp"
+
lexical_cast
<
std
::
string
>
(
elIdx
)
+
".vtu"
);
}
}
void
writeDofMesh
(
int
rank
,
DegreeOfFreedom
dof
,
FiniteElemSpace
*
feSpace
)
{
using
boost
::
lexical_cast
;
if
(
MPI
::
COMM_WORLD
.
Get_rank
()
==
rank
)
{
DOFVector
<
double
>
tmp
(
feSpace
,
"tmp"
);
tmp
.
set
(
0.0
);
tmp
[
dof
]
=
1.0
;
VtkWriter
::
writeFile
(
tmp
,
"dofmesh"
+
lexical_cast
<
std
::
string
>
(
rank
)
+
".vtu"
);
}
}
void
writeMesh
(
FiniteElemSpace
*
feSpace
,
int
rank
,
std
::
string
filename
)
{
using
boost
::
lexical_cast
;
int
myRank
=
MPI
::
COMM_WORLD
.
Get_rank
();
if
(
rank
==
-
1
||
myRank
==
rank
)
{
DOFVector
<
double
>
tmp
(
feSpace
,
"tmp"
);
VtkWriter
::
writeFile
(
tmp
,
filename
+
lexical_cast
<
std
::
string
>
(
myRank
)
+
".vtu"
);
}
}
#endif
void
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
Element
*
el
)
{
// === Get local indices of the given element. ===
const
BasisFunction
*
basisFcts
=
vec
.
getFESpace
()
->
getBasisFcts
();
int
nBasisFcts
=
basisFcts
->
getNumber
();
std
::
vector
<
DegreeOfFreedom
>
localDofs
(
nBasisFcts
);
basisFcts
->
getLocalIndices
(
el
,
vec
.
getFESpace
()
->
getAdmin
(),
localDofs
);
// === Set the values of the dof vector. ===
vec
.
set
(
0.0
);
for
(
int
i
=
0
;
i
<
nBasisFcts
;
i
++
)
vec
[
localDofs
[
i
]]
=
static_cast
<
double
>
(
i
);
}
bool
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
Mesh
*
mesh
,
int
elIndex
)
{
FUNCNAME
(
"colorDofVectorByLocalElementDofs()"
);
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_LEAF_EL
);
while
(
elInfo
)
{
if
(
elInfo
->
getElement
()
->
getIndex
()
==
elIndex
)
{
colorDofVectorByLocalElementDofs
(
vec
,
elInfo
->
getElement
());
return
true
;
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
return
false
;
}
Element
*
getDofIndexElement
(
FiniteElemSpace
*
feSpace
,
DegreeOfFreedom
dof
)
{
const
BasisFunction
*
basFcts
=
feSpace
->
getBasisFcts
();
int
nBasFcts
=
basFcts
->
getNumber
();
std
::
vector
<
DegreeOfFreedom
>
dofVec
(
nBasFcts
);
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
feSpace
->
getMesh
(),
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
basFcts
->
getLocalIndices
(
elInfo
->
getElement
(),
feSpace
->
getAdmin
(),
dofVec
);
for
(
int
i
=
0
;
i
<
nBasFcts
;
i
++
)
if
(
dofVec
[
i
]
==
dof
)
return
elInfo
->
getElement
();
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
return
NULL
;
}
Element
*
getLevel0ParentElement
(
Mesh
*
mesh
,
Element
*
el
)
{
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
if
(
elInfo
->
getElement
()
==
el
)
return
elInfo
->
getMacroElement
()
->
getElement
();
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
return
NULL
;
}
void
printInfoByDof
(
FiniteElemSpace
*
feSpace
,
DegreeOfFreedom
dof
)
{
Element
*
el
=
getDofIndexElement
(
feSpace
,
dof
);
Element
*
parEl
=
getLevel0ParentElement
(
feSpace
->
getMesh
(),
el
);
std
::
cout
<<
"DOF-INFO: dof = "
<<
dof
<<
" elidx = "
<<
el
->
getIndex
()
<<
" pelidx = "
<<
parEl
->
getIndex
()
<<
std
::
endl
;
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
feSpace
->
getMesh
(),
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
if
(
elInfo
->
getElement
()
->
getIndex
()
==
parEl
->
getIndex
())
std
::
cout
<<
"EL INFO TO "
<<
parEl
->
getIndex
()
<<
": "
<<
elInfo
->
getType
()
<<
std
::
endl
;
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
}
}
// namespace debug
}
// namespace AMDiS
AMDiS/src/Debug.h
0 → 100644
View file @
334a275f
// ============================================================================
// == ==
// == 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
);
}
}
#endif
AMDiS/src/ParallelDomainBase.cc
View file @
334a275f
This diff is collapsed.
Click to expand it.
AMDiS/src/ParallelDomainBase.h
View file @
334a275f
...
...
@@ -178,8 +178,6 @@ namespace AMDiS {
return
nRankDofs
;
}
void
fillPetscMatrix
(
Matrix
<
DOFMatrix
*>
*
mat
,
SystemVector
*
vec
);
void
solvePetscMatrix
(
SystemVector
&
vec
);
virtual
ProblemStatBase
*
getProblem
(
int
number
=
0
)
...
...
@@ -218,7 +216,7 @@ namespace AMDiS {
/** \brief
* This function create new mappings from local to global indices,
* \ref mapLocalGlobalD
OF
s, and from local to dof indices, \ref mapLocalToDofIndex.
* \ref mapLocalGlobalD
of
s, and from local to dof indices, \ref mapLocalToDofIndex.
* Furthermore, using the first argument the dof indices in ranks partition are
* changed.
*
...
...
@@ -239,11 +237,11 @@ namespace AMDiS {
* be used, if \ref partitionVec is set correctly. This is only the case, when
* the macro mesh is partitioned.
*
* \param[out] partionDOFs 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.
* \param[out] parti
ti
onDOFs 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.
*/
void
createDofMemberInfo
(
DofToPartitions
&
partitionDofs
,
DofContainer
&
rankOwnedDofs
,
...
...
@@ -251,6 +249,16 @@ namespace AMDiS {
DofToRank
&
boundaryDofs
,
DofToBool
&
vertexDof
);
/** \brief
* Create a PETSc matrix and PETSc vectors. The given DOF matrices are used to
* create the nnz structure of the PETSc matrix and the values are transfered to it.
* The given DOF vectors are used to the the values of the PETSc rhs vector.
*
* \param[in] mat
* \param[in] vec
*/
void
fillPetscMatrix
(
Matrix
<
DOFMatrix
*>
*
mat
,
SystemVector
*
vec
);
/// Takes a dof matrix and sends the values to the global petsc matrix.
void
setDofMatrix
(
DOFMatrix
*
mat
,
int
dispMult
=
1
,
int
dispAddRow
=
0
,
int
dispAddCol
=
0
);
...
...
@@ -301,7 +309,7 @@ namespace AMDiS {
/** \brief
* This function is used for debugging only. It prints all information from
* the local to global dof mapping, see \ref mapLocalGlobalD
OF
s.
* the local to global dof mapping, see \ref mapLocalGlobalD
of
s.
*
* \param rank If specified, only the information from the given rank is printed.
*/
...
...
@@ -537,13 +545,14 @@ namespace AMDiS {
RankToDofContainer
sendDofs
;
/** \brief
* This map contains for each rank the list of dofs from which the current rank
* must receive solution values of dofs at the interior boundaries.
* 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.
*/
RankToDofContainer
recvDofs
;
/// Maps local to global dof indices.
DofMapping
mapLocalGlobalD
OF
s
;
DofMapping
mapLocalGlobalD
of
s
;
/// Maps local dof indices to real dof indices.
DofMapping
mapLocalToDofIndex
;
...
...
@@ -597,20 +606,6 @@ namespace AMDiS {
*/
long
lastMeshChangeIndex
;
};
void
writeLocalElementDofs
(
int
rank
,
int
elIdx
,
FiniteElemSpace
*
feSpace
);
void
writeMesh
(
FiniteElemSpace
*
feSpace
,
int
rank
=
-
1
);
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
);
}
#endif // AMDIS_PARALLELDOMAINBASE_H
AMDiS/src/StdMpi.h
View file @
334a275f
...
...
@@ -47,6 +47,11 @@ namespace AMDiS {
return
data
.
size
()
*
Global
::
getGeo
(
WORLD
);
}
int
intSizeOf
(
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
data
)
{
return
data
.
size
()
*
2
;
}
void
makeBuf
(
std
::
map
<
const
DegreeOfFreedom
*
,
DegreeOfFreedom
>
&
data
,
int
*
buf
)
{
int
i
=
0
;
...
...
@@ -63,14 +68,13 @@ namespace AMDiS {
if
(
bufSize
==
0
)
return
;
TEST_EXIT
(
bufSize
%
2
==
0
)(
"This should not happen!
\n
"
);
data
.
clear
();
data
.
reserve
(
bufSize
/
2
);
int
i
=
0
;
do
{
data
.
push_back
(
std
::
make_pair
(
buf
[
i
],
buf
[
i
+
1
]));
i
+=
2
;
}
while
(
i
<
bufSize
);
for
(
int
i
=
0
;
i
<
(
bufSize
/
2
);
i
++
)
data
.
push_back
(
std
::
make_pair
(
buf
[
i
*
2
],
buf
[
i
*
2
+
1
]));
}
void
makeBuf
(
std
::
vector
<
MeshStructure
>
&
data
,
unsigned
long
int
*
buf
)
...
...
@@ -126,6 +130,14 @@ namespace AMDiS {
data
[
i
][
j
]
=
buf
[
pos
++
];
}
void
makeBuf
(
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
data
,
int
*
buf
)
{
for
(
unsigned
int
i
=
0
;
i
<
data
.
size
();
i
++
)
{
buf
[
i
*
2
]
=
data
[
i
].
first
;
buf
[
i
*
2
+
1
]
=
data
[
i
].
second
;
}
}
template
<
typename
SendT
,
typename
RecvT
>
class
StdMpi
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment