Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
amdis
Commits
1908148a
Commit
1908148a
authored
Nov 29, 2012
by
Thomas Witkowski
Browse files
Fixed some issues for multi level tests.
parent
4e34df55
Changes
11
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/Lagrange.cc
View file @
1908148a
...
...
@@ -1223,7 +1223,7 @@ namespace AMDiS {
if
(
list
->
getNeighbourElement
(
i
,
1
)
&&
list
->
getNeighbourNr
(
i
,
1
)
<
i
)
lr_set
+=
2
;
TEST_EXIT
(
lr_set
>
0
)
(
"No values set on both neighbours of element %d
\n
"
,
el
->
getIndex
());
...
...
AMDiS/src/Marker.cc
View file @
1908148a
...
...
@@ -123,6 +123,23 @@ namespace AMDiS {
}
void
MSMarker
::
initMarking
(
AdaptInfo
*
adaptInfo
,
Mesh
*
mesh
)
{
FUNCNAME
(
"MSMarker::initMarking()"
);
Marker
::
initMarking
(
adaptInfo
,
mesh
);
double
MSGammaP
=
pow
(
MSGamma
,
p
);
double
MSGammaCP
=
pow
(
MSGammaC
,
p
);
markRLimit
=
MSGammaP
*
adaptInfo
->
getEstMax
(
row
==
-
1
?
0
:
row
);
markCLimit
=
MSGammaCP
*
adaptInfo
->
getEstMax
(
row
==
-
1
?
0
:
row
);
MSG
(
"start max_est: %.3le mark_limits: %.3le %.3le
\n
"
,
adaptInfo
->
getEstMax
(
row
==
-
1
?
0
:
row
),
markRLimit
,
markCLimit
);
}
void
ESMarker
::
initMarking
(
AdaptInfo
*
adaptInfo
,
Mesh
*
mesh
)
{
FUNCNAME
(
"ESMarker::initMarking()"
);
...
...
AMDiS/src/Marker.h
View file @
1908148a
...
...
@@ -217,16 +217,7 @@ namespace AMDiS {
}
/// Implementation of MarkScal::initMarking().
virtual
void
initMarking
(
AdaptInfo
*
adaptInfo
,
Mesh
*
mesh
)
{
Marker
::
initMarking
(
adaptInfo
,
mesh
);
double
MSGammaP
=
pow
(
MSGamma
,
p
);
double
MSGammaCP
=
pow
(
MSGammaC
,
p
);
markRLimit
=
MSGammaP
*
adaptInfo
->
getEstMax
(
row
==
-
1
?
0
:
row
);
markCLimit
=
MSGammaCP
*
adaptInfo
->
getEstMax
(
row
==
-
1
?
0
:
row
);
}
void
initMarking
(
AdaptInfo
*
adaptInfo
,
Mesh
*
mesh
);
protected:
/// Marking parameter.
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
1908148a
...
...
@@ -133,6 +133,9 @@ namespace AMDiS {
Parameters
::
get
(
name
+
"->print timings"
,
printTimings
);
TEST_EXIT
(
partitioner
)(
"Could not create partitioner
\"
%s
\"
!
\n
"
,
partStr
.
c_str
());
// If required, create hierarchical mesh level structure.
createMeshLevelStructure
();
}
...
...
@@ -179,15 +182,11 @@ namespace AMDiS {
elObjDb
.
setFeSpace
(
feSpaces
[
0
]);
// If required, create hierarchical mesh level structure.
createMeshLevelStructure
();
// If the problem has been already read from a file, we need only to set
// isRankDofs to all matrices and rhs vector and to remove periodic
// boundary conditions (if there are some).
if
(
deserialized
)
{
createMeshLevelStructure
();
updateMacroElementInfo
();
removePeriodicBoundaryConditions
();
...
...
@@ -569,7 +568,7 @@ namespace AMDiS {
dofMaps
.
end
())
(
"Parallel DOF mapping already registerd in mesh distributor object!
\n
"
);
dofMaps
.
push_back
(
&
dofMap
);
dofMaps
.
push_back
(
&
dofMap
);
}
...
...
AMDiS/src/parallel/MeshLevelData.h
View file @
1908148a
...
...
@@ -72,7 +72,10 @@ namespace AMDiS {
MPI
::
Intracomm
&
getMpiComm
(
int
level
)
{
TEST_EXIT_DBG
(
level
<
nLevel
)(
"Should not happen!
\n
"
);
FUNCNAME
(
"MeshLevelData::getMpiComm()"
);
TEST_EXIT_DBG
(
level
<
nLevel
)
(
"Asked for level %d, but defined only for %d levels!
\n
"
,
level
,
nLevel
);
return
mpiComms
[
level
];
}
...
...
AMDiS/src/parallel/ParallelDebug.cc
View file @
1908148a
...
...
@@ -927,6 +927,9 @@ namespace AMDiS {
Mesh
*
mesh
=
feSpace
->
getMesh
();
if
(
mesh
->
getDim
()
!=
3
)
return
;
stringstream
filename
;
filename
<<
prefix
<<
"-"
<<
MPI
::
COMM_WORLD
.
Get_rank
()
<<
"."
<<
postfix
;
...
...
AMDiS/src/parallel/PetscSolver.cc
View file @
1908148a
...
...
@@ -48,8 +48,9 @@ namespace AMDiS {
PetscSolver
::~
PetscSolver
()
{
if
(
parallelDofMappingsRegistered
)
{
meshDistributor
->
removeDofMap
(
dofMap
);
int
nLevels
=
meshDistributor
->
getMeshLevelData
().
getLevelNumber
();
meshDistributor
->
removeDofMap
(
dofMap
);
if
(
nLevels
>
1
)
meshDistributor
->
removeDofMap
(
dofMapSd
);
}
...
...
AMDiS/src/parallel/PetscSolver.h
View file @
1908148a
...
...
@@ -150,6 +150,11 @@ namespace AMDiS {
return
dofMap
;
}
ParallelDofMapping
&
getDofMapSd
()
{
return
dofMapSd
;
}
vector
<
const
FiniteElemSpace
*>&
getComponentSpaces
()
{
return
componentSpaces
;
...
...
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
1908148a
...
...
@@ -331,11 +331,13 @@ namespace AMDiS {
// === Calculate the number of primals that are owned by the rank and ===
// === create local indices of the primals starting at zero. ===
for
(
DofIndexSet
::
iterator
it
=
primals
.
begin
();
it
!=
primals
.
end
();
++
it
)
for
(
DofIndexSet
::
iterator
it
=
primals
.
begin
();
it
!=
primals
.
end
();
++
it
)
{
if
(
dofMap
[
feSpace
].
isRankDof
(
*
it
))
{
primalDofMap
[
component
].
insertRankDof
(
*
it
);
}
else
}
else
{
primalDofMap
[
component
].
insertNonRankDof
(
*
it
);
}
}
}
...
...
@@ -1047,7 +1049,7 @@ namespace AMDiS {
MatMatMult
(
subdomain
->
getMatCoarseInterior
(),
matK
,
MAT_INITIAL_MATRIX
,
PETSC_DEFAULT
,
&
mat_schur_primal
);
MatAYPX
(
mat_schur_primal
,
-
1.0
,
subdomain
->
getMatCoarse
(),
DIFFERENT_NONZERO_PATTERN
);
MatDestroy
(
&
matK
);
}
else
{
Mat
tmp
;
...
...
AMDiS/src/parallel/PetscSolverFeti.h
View file @
1908148a
...
...
@@ -57,6 +57,11 @@ namespace AMDiS {
/// Constructor of FETI-DP solver class.
PetscSolverFeti
(
string
name
);
/// After mesh changes, or if the solver is called the first time, this
/// function creates all information about primal nodes, dual nodes and
/// lagrange constraints.
void
createFetiData
();
/// Assemble the sequentially created matrices to the global matrices
/// required by the FETI-DP method.
void
fillPetscMatrix
(
Matrix
<
DOFMatrix
*>
*
mat
);
...
...
@@ -115,11 +120,6 @@ namespace AMDiS {
///
void
createDirichletData
(
Matrix
<
DOFMatrix
*>
&
mat
);
/// After mesh changes, or if the solver is called the first time, this
/// function creates all information about primal nodes, dual nodes and
/// lagrange constraints.
void
createFetiData
();
/// Defines which boundary nodes are primal. Creates global index of
/// the primal variables.
void
createPrimals
(
int
component
);
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
1908148a
...
...
@@ -203,8 +203,8 @@ namespace AMDiS {
rStartInterior
;
MatSetValues
(
getMatCoarseInteriorByComponent
(
rowComponent
),
1
,
&
rowIndex
,
colsOther
.
size
(),
&
(
colsOther
[
0
]),
&
(
valuesOther
[
0
]),
ADD_VALUES
);
1
,
&
rowIndex
,
colsOther
.
size
(),
&
(
colsOther
[
0
]),
&
(
valuesOther
[
0
]),
ADD_VALUES
);
}
}
else
{
if
((
*
interiorMap
)[
rowComponent
].
isSet
(
*
cursor
)
==
false
)
...
...
@@ -222,8 +222,8 @@ namespace AMDiS {
cols
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
cols
[
i
]);
}
MatSetValues
(
getMatInterior
(),
1
,
&
localRowIndex
,
cols
.
size
(),
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
MatSetValues
(
getMatInterior
(),
1
,
&
localRowIndex
,
cols
.
size
(),
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
if
(
colsOther
.
size
())
{
int
globalRowIndex
=
...
...
@@ -234,8 +234,8 @@ namespace AMDiS {
colCoarseSpace
->
getMatIndex
(
colComponent
,
colsOther
[
i
]);
MatSetValues
(
getMatInteriorCoarseByComponent
(
colComponent
),
1
,
&
globalRowIndex
,
colsOther
.
size
(),
&
(
colsOther
[
0
]),
&
(
valuesOther
[
0
]),
ADD_VALUES
);
1
,
&
globalRowIndex
,
colsOther
.
size
(),
&
(
colsOther
[
0
]),
&
(
valuesOther
[
0
]),
ADD_VALUES
);
}
}
}
...
...
@@ -244,6 +244,7 @@ namespace AMDiS {
matAssembly
();
// === Create solver for the non primal (thus local) variables. ===
KSPCreate
(
mpiCommLocal
,
&
kspInterior
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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