Skip to content
Snippets Groups Projects
Commit 2969c018 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Added bddc_download_solution to bddcml code.

parent 5c44035b
No related branches found
No related tags found
No related merge requests found
...@@ -199,7 +199,7 @@ namespace AMDiS { ...@@ -199,7 +199,7 @@ namespace AMDiS {
double rhs[ndofs]; double rhs[ndofs];
for (int i = 0; i < nComponents; i++) { for (int i = 0; i < nComponents; i++) {
DOFVector<double>& dofvec = *(rhsVec->getDOFVector(i)); DOFVector<double>& dofvec = *(rhsVec->getDOFVector(i));
for (int j = 0; j < ndofs; j++) for (int j = 0; j < nnods; j++)
rhs[j * nComponents + i] = dofvec[j]; rhs[j * nComponents + i] = dofvec[j];
} }
...@@ -340,7 +340,7 @@ namespace AMDiS { ...@@ -340,7 +340,7 @@ namespace AMDiS {
int method = 1; int method = 1;
double tol = 1.e-6; double tol = 1.e-6;
int maxit = 1000; int maxit = 10;
int ndecrmax = 30; int ndecrmax = 30;
int num_iter = 0; int num_iter = 0;
int converged_reason = 0; int converged_reason = 0;
...@@ -358,6 +358,14 @@ namespace AMDiS { ...@@ -358,6 +358,14 @@ namespace AMDiS {
MSG("BDDCML converged reason: %d within %d iterations \n", MSG("BDDCML converged reason: %d within %d iterations \n",
converged_reason, num_iter); converged_reason, num_iter);
bddcml_download_local_solution(&isub, rhs, &ndofs);
for (int i = 0; i < nComponents; i++) {
DOFVector<double>& dofvec = *(vec.getDOFVector(i));
for (int j = 0; j < nnods; j++)
dofvec[j] = rhs[j * nComponents + i];
}
bddcml_finalize(); bddcml_finalize();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment