Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iwr
amdis
Commits
f06082db
Commit
f06082db
authored
13 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Work on BDDCML integration, still not working.
parent
10141fab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AMDiS/src/parallel/BddcMlSolver.cc
+37
-14
37 additions, 14 deletions
AMDiS/src/parallel/BddcMlSolver.cc
AMDiS/src/parallel/BddcMlSolver.h
+3
-3
3 additions, 3 deletions
AMDiS/src/parallel/BddcMlSolver.h
with
40 additions
and
17 deletions
AMDiS/src/parallel/BddcMlSolver.cc
+
37
−
14
View file @
f06082db
...
...
@@ -66,27 +66,35 @@ namespace AMDiS {
int
nLevel
=
1
;
int
nSubdomains
=
meshDistributor
->
getMpiSize
();
int
length
=
1
;
int
nLevel
=
2
;
int
nSubdomains
[
nLevel
];
nSubdomains
[
0
]
=
meshDistributor
->
getMpiSize
();
nSubdomains
[
1
]
=
1
;
int
nSubPerProc
=
1
;
MPI_Fint
c2f
=
MPI_Comm_c2f
(
meshDistributor
->
getMpiComm
());
int
verboseLevel
=
2
;
int
numbase
=
0
;
bddcml_init
(
&
nLevel
,
&
nSubdomains
,
&
length
,
&
nSubPerProc
,
bddcml_init
(
&
nLevel
,
nSubdomains
,
&
nLevel
,
&
nSubPerProc
,
&
c2f
,
&
verboseLevel
,
&
numbase
);
// global number of elements
int
nelem
=
mesh
->
getNumberOfLeaves
();
mpi
::
globalAdd
(
nelem
);
MSG
(
"nelem = %d
\n
"
,
nelem
);
// global number of nodes
int
nnod
=
meshDistributor
->
getNumberOverallDofs
(
feSpace
);
MSG
(
"nnod = %d
\n
"
,
nnod
);
// global number of dofs
int
ndof
=
nnod
*
nComponents
;
MSG
(
"ndof = %d
\n
"
,
ndof
);
// space dimenstion
int
ndim
=
2
;
...
...
@@ -99,12 +107,16 @@ namespace AMDiS {
// local number of elements
int
nelems
=
nLeafEls
;
MSG
(
"nelems = %d
\n
"
,
nelems
);
// local number of nodes
int
nnods
=
feSpace
->
getAdmin
()
->
getUsedSize
();
// local number of dofs
int
ndofs
=
nnods
*
nComponents
;
MSG
(
"local nnods %d ndofs %d
\n
"
,
nnods
,
ndofs
);
// Length of array inet
int
linet
=
nelems
*
3
;
...
...
@@ -112,6 +124,9 @@ namespace AMDiS {
int
inet
[
linet
];
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_LEAF_EL
);
while
(
elInfo
)
{
TEST_EXIT_DBG
(
mapElIndex
.
count
(
elInfo
->
getElement
()
->
getIndex
()))
(
"Should not happen!
\n
"
);
int
localElIndex
=
mapElIndex
[
elInfo
->
getElement
()
->
getIndex
()];
for
(
int
i
=
0
;
i
<
3
;
i
++
)
inet
[
localElIndex
*
3
+
i
]
=
elInfo
->
getElement
()
->
getDof
(
i
,
0
);
...
...
@@ -135,7 +150,7 @@ namespace AMDiS {
isngn
[
i
]
=
meshDistributor
->
mapLocalToGlobal
(
feSpace
,
i
);
// array of indices of subdomain variables in global numbering
int
isvgvn
[
ndof
];
int
isvgvn
[
ndof
s
];
for
(
int
j
=
0
;
j
<
nnods
;
j
++
)
for
(
int
i
=
0
;
i
<
nComponents
;
i
++
)
isvgvn
[
j
*
nComponents
+
i
]
=
...
...
@@ -146,6 +161,7 @@ namespace AMDiS {
int
rStartEl
,
nOverallEl
;
mpi
::
getDofNumbering
(
meshDistributor
->
getMpiComm
(),
nelems
,
rStartEl
,
nOverallEl
);
MSG
(
"rStartEl = %d
\n
"
,
rStartEl
);
for
(
int
i
=
0
;
i
<
nelems
;
i
++
)
isegn
[
i
]
=
rStartEl
+
i
;
...
...
@@ -168,10 +184,12 @@ namespace AMDiS {
// local array of indices denoting dirichlet boundary data
int
ifix
[
ndofs
];
for
(
int
i
=
0
;
i
<
ndofs
;
i
++
)
ifix
[
ndofs
]
=
-
1
;
ifix
[
i
]
=
0
;
// local array of values for dirichlet boundary data
double
fixv
[
ndofs
];
for
(
int
i
=
0
;
i
<
ndofs
;
i
++
)
fixv
[
i
]
=
0.0
;
// local rhs data
double
rhs
[
ndofs
];
...
...
@@ -182,7 +200,7 @@ namespace AMDiS {
}
// Completenes of the rhs vector on subdomains
int
is_rhs_complete
=
1
;
int
is_rhs_complete
=
0
;
// Local array with initial solution guess
double
sol
[
ndofs
];
...
...
@@ -206,9 +224,11 @@ namespace AMDiS {
// Number of non-zero entries in matrix
int
la
=
i_sparse
.
size
();
MSG
(
"LOCAL LA = %d
\n
"
,
la
);
// Matrix is assembled
int
is_assembled_int
=
1
;
int
is_assembled_int
=
0
;
bddcml_upload_subdomain_data
(
&
nelem
,
...
...
@@ -229,7 +249,7 @@ namespace AMDiS {
isngn
,
&
nnods
,
isvgvn
,
&
ndof
,
&
ndof
s
,
isegn
,
&
nelems
,
xyz
,
...
...
@@ -255,13 +275,14 @@ namespace AMDiS {
int
use_defaults_int
=
1
;
int
parallel_division_int
=
1
;
int
use_arithmetic_int
=
1
;
int
use_adaptive_int
=
1
;
int
use_adaptive_int
=
0
;
MSG
(
"BDDC POINT A
\n
"
);
bddcml_setup_preconditioner
(
&
matrixtype
,
&
use_defaults_int
,
&
parallel_division_int
,
&
use_arithmetic_int
,
&
use_adaptive_int
);
MSG
(
"BDDC POINT B
\n
"
);
int
method
=
1
;
double
tol
=
1.e-6
;
...
...
@@ -280,6 +301,8 @@ namespace AMDiS {
&
converged_reason
,
&
condition_number
);
MSG
(
"BDDC POINT C
\n
"
);
MSG
(
"BDDCML converged reason: %d within %d iterations
\n
"
,
converged_reason
,
num_iter
);
...
...
@@ -294,9 +317,9 @@ namespace AMDiS {
void
BddcMlSolver
::
addDofMatrix
(
DOFMatrix
*
dmat
,
vector
<
int
>
i_sparse
,
vector
<
int
>
j_sparse
,
vector
<
double
>
a_sparse
,
vector
<
int
>
&
i_sparse
,
vector
<
int
>
&
j_sparse
,
vector
<
double
>
&
a_sparse
,
int
nComponents
,
int
ithRowComponent
,
int
ithColComponent
)
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/parallel/BddcMlSolver.h
+
3
−
3
View file @
f06082db
...
...
@@ -51,9 +51,9 @@ namespace AMDiS {
protected
:
void
addDofMatrix
(
DOFMatrix
*
mat
,
vector
<
int
>
i_sparse
,
vector
<
int
>
j_sparse
,
vector
<
double
>
a_sparse
,
vector
<
int
>
&
i_sparse
,
vector
<
int
>
&
j_sparse
,
vector
<
double
>
&
a_sparse
,
int
nComponents
,
int
ithRowComponent
,
int
ithColComponent
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment