Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
iwr
amdis
Commits
b376142c
Commit
b376142c
authored
Aug 09, 2010
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Basis for parallel MTL4.
parent
a3a5c94f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
156 additions
and
62 deletions
+156
-62
AMDiS/bin/Makefile.am
AMDiS/bin/Makefile.am
+2
-1
AMDiS/bin/Makefile.in
AMDiS/bin/Makefile.in
+12
-10
AMDiS/src/AMDiS.h
AMDiS/src/AMDiS.h
+7
-1
AMDiS/src/parallel/Mtl4Solver.h
AMDiS/src/parallel/Mtl4Solver.h
+51
-0
AMDiS/src/parallel/ParallelProblemStatBase.h
AMDiS/src/parallel/ParallelProblemStatBase.h
+59
-0
AMDiS/src/parallel/PetscSolver.cc
AMDiS/src/parallel/PetscSolver.cc
+15
-31
AMDiS/src/parallel/PetscSolver.h
AMDiS/src/parallel/PetscSolver.h
+10
-19
No files found.
AMDiS/bin/Makefile.am
View file @
b376142c
...
...
@@ -31,7 +31,8 @@ if USE_PARALLEL_DOMAIN_AMDIS
$(SOURCE_DIR)
/parallel/StdMpi.h
$(SOURCE_DIR)
/parallel/StdMpi.cc
\
$(SOURCE_DIR)
/parallel/MeshDistributor.h
$(SOURCE_DIR)
/parallel/MeshDistributor.cc
\
$(SOURCE_DIR)
/parallel/ParallelDebug.h
$(SOURCE_DIR)
/parallel/ParallelDebug.cc
\
$(SOURCE_DIR)
/parallel/GlobalMatrixSolver.h
$(SOURCE_DIR)
/parallel/GlobalMatrixSolver.cc
\
$(SOURCE_DIR)
/parallel/ParallelProblemStatBase.h
\
$(SOURCE_DIR)
/parallel/PetscSolver.h
$(SOURCE_DIR)
/parallel/PetscSolver.cc
\
$(SOURCE_DIR)
/parallel/MpiHelper.h
$(SOURCE_DIR)
/parallel/MpiHelper.cc
\
$(SOURCE_DIR)
/parallel/ElementObjectData.h
$(SOURCE_DIR)
/parallel/ElementObjectData.cc
libamdis_la_CXXFLAGS
+=
-DHAVE_PARALLEL_DOMAIN_AMDIS
=
1
...
...
AMDiS/bin/Makefile.in
View file @
b376142c
...
...
@@ -41,7 +41,8 @@ host_triplet = @host@
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
$(SOURCE_DIR)
/parallel/StdMpi.h
$(SOURCE_DIR)
/parallel/StdMpi.cc
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
$(SOURCE_DIR)
/parallel/MeshDistributor.h
$(SOURCE_DIR)
/parallel/MeshDistributor.cc
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
$(SOURCE_DIR)
/parallel/ParallelDebug.h
$(SOURCE_DIR)
/parallel/ParallelDebug.cc
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@ $(SOURCE_DIR)/parallel/GlobalMatrixSolver.h $(SOURCE_DIR)/parallel/GlobalMatrixSolver.cc \
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
$(SOURCE_DIR)
/parallel/ParallelProblemStatBase.h
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
$(SOURCE_DIR)
/parallel/PetscSolver.h
$(SOURCE_DIR)
/parallel/PetscSolver.cc
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
$(SOURCE_DIR)
/parallel/MpiHelper.h
$(SOURCE_DIR)
/parallel/MpiHelper.cc
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
$(SOURCE_DIR)
/parallel/ElementObjectData.h
$(SOURCE_DIR)
/parallel/ElementObjectData.cc
...
...
@@ -82,8 +83,9 @@ am__libamdis_la_SOURCES_DIST = $(SOURCE_DIR)/parallel/StdMpi.h \
$(SOURCE_DIR)
/parallel/MeshDistributor.cc
\
$(SOURCE_DIR)
/parallel/ParallelDebug.h
\
$(SOURCE_DIR)
/parallel/ParallelDebug.cc
\
$(SOURCE_DIR)/parallel/GlobalMatrixSolver.h \
$(SOURCE_DIR)/parallel/GlobalMatrixSolver.cc \
$(SOURCE_DIR)
/parallel/ParallelProblemStatBase.h
\
$(SOURCE_DIR)
/parallel/PetscSolver.h
\
$(SOURCE_DIR)
/parallel/PetscSolver.cc
\
$(SOURCE_DIR)
/parallel/MpiHelper.h
\
$(SOURCE_DIR)
/parallel/MpiHelper.cc
\
$(SOURCE_DIR)
/parallel/ElementObjectData.h
\
...
...
@@ -252,7 +254,7 @@ am__libamdis_la_SOURCES_DIST = $(SOURCE_DIR)/parallel/StdMpi.h \
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@
am__objects_1
=
libamdis_la-StdMpi.lo
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@ libamdis_la-MeshDistributor.lo
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@ libamdis_la-ParallelDebug.lo
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@ libamdis_la-
GlobalMatrix
Solver.lo \
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@ libamdis_la-
Petsc
Solver.lo
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@ libamdis_la-MpiHelper.lo
\
@USE_PARALLEL_DOMAIN_AMDIS_TRUE@ libamdis_la-ElementObjectData.lo
@USE_PARALLEL_AMDIS_FALSE@
am__objects_2
=
$(am__objects_1)
...
...
@@ -802,7 +804,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-FixVec.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-GNUPlotWriter.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-Global.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-GlobalMatrixSolver.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-InteriorBoundary.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-Lagrange.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-LeafData.Plo@am__quote@
...
...
@@ -824,6 +825,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-Parameters.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-Parametric.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-PeriodicBC.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-PetscSolver.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-PngWriter.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-PollutionError.Plo@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libamdis_la-PovrayWriter.Plo@am__quote@
...
...
@@ -920,12 +922,12 @@ libamdis_la-ParallelDebug.lo: $(SOURCE_DIR)/parallel/ParallelDebug.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-ParallelDebug.lo
`
test
-f
'
$(SOURCE_DIR)
/parallel/ParallelDebug.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/parallel/ParallelDebug.cc
libamdis_la-
GlobalMatrix
Solver.lo: $(SOURCE_DIR)/parallel/
GlobalMatrix
Solver.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-
GlobalMatrix
Solver.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-
GlobalMatrix
Solver.Tpo" -c -o libamdis_la-
GlobalMatrix
Solver.lo `test -f '$(SOURCE_DIR)/parallel/
GlobalMatrix
Solver.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/parallel/
GlobalMatrix
Solver.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-
GlobalMatrix
Solver.Tpo" "$(DEPDIR)/libamdis_la-
GlobalMatrix
Solver.Plo"; else rm -f "$(DEPDIR)/libamdis_la-
GlobalMatrix
Solver.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SOURCE_DIR)/parallel/
GlobalMatrix
Solver.cc' object='libamdis_la-
GlobalMatrix
Solver.lo' libtool=yes @AMDEPBACKSLASH@
libamdis_la-
Petsc
Solver.lo
:
$(SOURCE_DIR)/parallel/
Petsc
Solver.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-
Petsc
Solver.lo
-MD
-MP
-MF
"
$(DEPDIR)
/libamdis_la-
Petsc
Solver.Tpo"
-c
-o
libamdis_la-
Petsc
Solver.lo
`
test
-f
'
$(SOURCE_DIR)
/parallel/
Petsc
Solver.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/parallel/
Petsc
Solver.cc
;
\
@am__fastdepCXX_TRUE@
then
mv
-f
"
$(DEPDIR)
/libamdis_la-
Petsc
Solver.Tpo"
"
$(DEPDIR)
/libamdis_la-
Petsc
Solver.Plo"
;
else
rm
-f
"
$(DEPDIR)
/libamdis_la-
Petsc
Solver.Tpo"
;
exit
1
;
fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@
source
=
'
$(SOURCE_DIR)
/parallel/
Petsc
Solver.cc'
object
=
'libamdis_la-
Petsc
Solver.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-
GlobalMatrix
Solver.lo `test -f '$(SOURCE_DIR)/parallel/
GlobalMatrix
Solver.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/parallel/
GlobalMatrix
Solver.cc
@am__fastdepCXX_FALSE@
$(LIBTOOL)
--tag
=
CXX
--mode
=
compile
$(CXX)
$(DEFS)
$(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS)
$(CPPFLAGS)
$(libamdis_la_CXXFLAGS)
$(CXXFLAGS)
-c
-o
libamdis_la-
Petsc
Solver.lo
`
test
-f
'
$(SOURCE_DIR)
/parallel/
Petsc
Solver.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/parallel/
Petsc
Solver.cc
libamdis_la-MpiHelper.lo
:
$(SOURCE_DIR)/parallel/MpiHelper.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-MpiHelper.lo
-MD
-MP
-MF
"
$(DEPDIR)
/libamdis_la-MpiHelper.Tpo"
-c
-o
libamdis_la-MpiHelper.lo
`
test
-f
'
$(SOURCE_DIR)
/parallel/MpiHelper.cc'
||
echo
'
$(srcdir)
/'
`
$(SOURCE_DIR)
/parallel/MpiHelper.cc
;
\
...
...
AMDiS/src/AMDiS.h
View file @
b376142c
...
...
@@ -107,7 +107,13 @@
#if HAVE_PARALLEL_DOMAIN_AMDIS
#include "parallel/InteriorBoundary.h"
#include "parallel/MpiHelper.h"
#include "parallel/GlobalMatrixSolver.h"
#if HAVE_PARALLEL_MTL4
#include "parallel/Mtl4Solver.h"
#else
#include "parallel/PetscSolver.h"
#endif
#endif
#endif
AMDiS/src/parallel/Mtl4Solver.h
0 → 100644
View file @
b376142c
// ============================================================================
// == ==
// == 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 Mtl4Solver.h */
#ifndef AMDIS_MTL4_SOLVER_H
#define AMDIS_MTL4_SOLVER_H
#include "ParallelProblemStatBase.h"
namespace
AMDiS
{
class
Mtl4Solver
:
public
ParallelProblemStatBase
{
public:
Mtl4Solver
(
std
::
string
nameStr
,
ProblemIterationInterface
*
problemIteration
=
NULL
)
:
ParallelProblemStatBase
(
nameStr
,
problemIteration
)
{}
~
Mtl4Solver
()
{}
void
solve
(
AdaptInfo
*
adaptInfo
,
bool
fixedMatrix
=
false
)
{
ERROR_EXIT
(
"TO BE IMPLEMENTED!
\n
"
);
}
}
typedef
Mtl4Solver
ParallelProblemStat
;
}
#endif
AMDiS/src/parallel/ParallelProblemStatBase.h
0 → 100644
View file @
b376142c
// ============================================================================
// == ==
// == 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 ParallelProblemStatBase.h */
#ifndef AMDIS_PARALLEL_PROBLEM_STAT_BASE_H
#define AMDIS_PARALLEL_PROBLEM_STAT_BASE_H
#include "ProblemVec.h"
namespace
AMDiS
{
class
ParallelProblemStatBase
:
public
ProblemVec
{
public:
ParallelProblemStatBase
(
std
::
string
nameStr
,
ProblemIterationInterface
*
problemIteration
=
NULL
)
:
ProblemVec
(
nameStr
,
problemIteration
),
meshDistributor
(
NULL
)
{}
void
buildAfterCoarsen
(
AdaptInfo
*
adaptInfo
,
Flag
flag
,
bool
assembleMatrix
,
bool
assembleVector
)
{
meshDistributor
->
checkMeshChange
();
ProblemVec
::
buildAfterCoarsen
(
adaptInfo
,
flag
,
assembleMatrix
,
assembleVector
);
}
void
addToMeshDistributor
(
MeshDistributor
&
m
)
{
meshDistributor
=
&
m
;
m
.
addProblemStat
(
this
);
}
protected:
MeshDistributor
*
meshDistributor
;
};
}
#endif
AMDiS/src/parallel/
GlobalMatrix
Solver.cc
→
AMDiS/src/parallel/
Petsc
Solver.cc
View file @
b376142c
#include "parallel/
GlobalMatrix
Solver.h"
#include "parallel/
Petsc
Solver.h"
#include "parallel/StdMpi.h"
#include "parallel/ParallelDebug.h"
#include "DOFVector.h"
...
...
@@ -18,25 +18,9 @@ namespace AMDiS {
}
void
GlobalMatrixSolver
::
addToMeshDistributor
(
MeshDistributor
&
m
)
void
PetscSolver
::
solve
(
AdaptInfo
*
adaptInfo
,
bool
fixedMatrix
)
{
meshDistributor
=
&
m
;
m
.
addProblemStat
(
this
);
}
void
GlobalMatrixSolver
::
buildAfterCoarsen
(
AdaptInfo
*
adaptInfo
,
Flag
flag
,
bool
assembleMatrix
,
bool
assembleVector
)
{
meshDistributor
->
checkMeshChange
();
ProblemVec
::
buildAfterCoarsen
(
adaptInfo
,
flag
,
assembleMatrix
,
assembleVector
);
}
void
GlobalMatrixSolver
::
solve
(
AdaptInfo
*
adaptInfo
,
bool
fixedMatrix
)
{
FUNCNAME
(
"GlobalMatrixSolver::solve()"
);
FUNCNAME
(
"PetscSolver::solve()"
);
TEST_EXIT
(
meshDistributor
)(
"Should not happen!
\n
"
);
...
...
@@ -59,10 +43,10 @@ namespace AMDiS {
}
void
GlobalMatrix
Solver
::
setDofMatrix
(
DOFMatrix
*
mat
,
int
dispMult
,
int
dispAddRow
,
int
dispAddCol
)
void
Petsc
Solver
::
setDofMatrix
(
DOFMatrix
*
mat
,
int
dispMult
,
int
dispAddRow
,
int
dispAddCol
)
{
FUNCNAME
(
"
GlobalMatrix
Solver::setDofMatrix()"
);
FUNCNAME
(
"
Petsc
Solver::setDofMatrix()"
);
TEST_EXIT
(
mat
)(
"No DOFMatrix!
\n
"
);
...
...
@@ -188,10 +172,10 @@ namespace AMDiS {
}
void
GlobalMatrix
Solver
::
setDofVector
(
Vec
&
petscVec
,
DOFVector
<
double
>*
vec
,
int
dispMult
,
int
dispAdd
)
void
Petsc
Solver
::
setDofVector
(
Vec
&
petscVec
,
DOFVector
<
double
>*
vec
,
int
dispMult
,
int
dispAdd
)
{
FUNCNAME
(
"
GlobalMatrix
Solver::setDofVector()"
);
FUNCNAME
(
"
Petsc
Solver::setDofVector()"
);
// Traverse all used dofs in the dof vector.
DOFVector
<
double
>::
Iterator
dofIt
(
vec
,
USED_DOFS
);
...
...
@@ -221,9 +205,9 @@ namespace AMDiS {
}
void
GlobalMatrix
Solver
::
createPetscNnzStructure
(
Matrix
<
DOFMatrix
*>
*
mat
)
void
Petsc
Solver
::
createPetscNnzStructure
(
Matrix
<
DOFMatrix
*>
*
mat
)
{
FUNCNAME
(
"
GlobalMatrix
Solver::createPetscNnzStructure()"
);
FUNCNAME
(
"
Petsc
Solver::createPetscNnzStructure()"
);
TEST_EXIT_DBG
(
!
d_nnz
)(
"There is something wrong!
\n
"
);
TEST_EXIT_DBG
(
!
o_nnz
)(
"There is something wrong!
\n
"
);
...
...
@@ -383,9 +367,9 @@ namespace AMDiS {
}
void
GlobalMatrix
Solver
::
fillPetscMatrix
(
Matrix
<
DOFMatrix
*>
*
mat
,
SystemVector
*
vec
)
void
Petsc
Solver
::
fillPetscMatrix
(
Matrix
<
DOFMatrix
*>
*
mat
,
SystemVector
*
vec
)
{
FUNCNAME
(
"
GlobalMatrix
Solver::fillPetscMatrix()"
);
FUNCNAME
(
"
Petsc
Solver::fillPetscMatrix()"
);
clock_t
first
=
clock
();
int
nRankRows
=
meshDistributor
->
getNumberRankDofs
()
*
nComponents
;
...
...
@@ -472,9 +456,9 @@ namespace AMDiS {
}
void
GlobalMatrix
Solver
::
solvePetscMatrix
(
SystemVector
&
vec
,
AdaptInfo
*
adaptInfo
)
void
Petsc
Solver
::
solvePetscMatrix
(
SystemVector
&
vec
,
AdaptInfo
*
adaptInfo
)
{
FUNCNAME
(
"
GlobalMatrix
Solver::solvePetscMatrix()"
);
FUNCNAME
(
"
Petsc
Solver::solvePetscMatrix()"
);
#if 0
// Set old solution to be initiual guess for petsc solver.
...
...
AMDiS/src/parallel/
GlobalMatrix
Solver.h
→
AMDiS/src/parallel/
Petsc
Solver.h
View file @
b376142c
...
...
@@ -17,16 +17,17 @@
// == ==
// ============================================================================
/** \file
GlobalMatrix
Solver.h */
/** \file
Petsc
Solver.h */
#ifndef AMDIS_
GLOBALMATRIX
SOLVER_H
#define AMDIS_
GLOBALMATRIX
SOLVER_H
#ifndef AMDIS_
PETSC
SOLVER_H
#define AMDIS_
PETSC
SOLVER_H
#include "AMDiS_fwd.h"
#include "Global.h"
#include "MeshDistributor.h"
#include "ProblemVec.h"
#include "ProblemInstat.h"
#include "ParallelProblemStatBase.h"
#include "petsc.h"
#include "petscsys.h"
...
...
@@ -34,27 +35,20 @@
namespace
AMDiS
{
class
GlobalMatrix
Solver
:
public
P
roblemVec
class
Petsc
Solver
:
public
P
arallelProblemStatBase
{
public:
GlobalMatrixSolver
(
std
::
string
nameStr
,
ProblemIterationInterface
*
problemIteration
=
NULL
)
:
ProblemVec
(
nameStr
,
problemIteration
),
meshDistributor
(
NULL
),
PetscSolver
(
std
::
string
nameStr
,
ProblemIterationInterface
*
problemIteration
=
NULL
)
:
ParallelProblemStatBase
(
nameStr
,
problemIteration
),
d_nnz
(
NULL
),
o_nnz
(
NULL
),
lastMeshNnz
(
0
)
{}
~
GlobalMatrix
Solver
()
~
Petsc
Solver
()
{}
void
addToMeshDistributor
(
MeshDistributor
&
);
void
buildAfterCoarsen
(
AdaptInfo
*
adaptInfo
,
Flag
flag
,
bool
assembleMatrix
=
true
,
bool
assembleVector
=
true
);
void
solve
(
AdaptInfo
*
adaptInfo
,
bool
fixedMatrix
=
false
);
protected:
...
...
@@ -82,8 +76,6 @@ namespace AMDiS {
void
solvePetscMatrix
(
SystemVector
&
vec
,
AdaptInfo
*
adaptInfo
);
protected:
MeshDistributor
*
meshDistributor
;
/// Petsc's matrix structure.
Mat
petscMatrix
;
...
...
@@ -105,8 +97,7 @@ namespace AMDiS {
int
lastMeshNnz
;
};
typedef
GlobalMatrixSolver
ParallelProblemStat
;
typedef
PetscSolver
ParallelProblemStat
;
}
//namespace AMDiS
...
...
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