Skip to content
Snippets Groups Projects
Commit 036e4161 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Provide a nicer initial iterate; on S_F as well

parent a0707c16
No related branches found
No related tags found
No related merge requests found
......@@ -356,10 +356,24 @@ int main(int argc, char *argv[]) {
// Choose an initial iterate that is admissable
// and non-zero in as many places as possible
if (run == 1)
for (size_t i = 0; i < ignoreNodes.size(); ++i)
if (!ignoreNodes[i][1]) // Leave out partial DOF-restrictions as
// well
u4_diff[i] = 1;
for (size_t i = 0; i < ignoreNodes.size(); ++i) {
size_t const count = ignoreNodes[i].count();
if (count == dim)
continue;
if (count == 0) {
u4_diff[i] = 1e-4;
continue;
}
assert(count == 1);
assert(ignoreNodes[i][1]); // Only the y coordinate is allowed to be
// fixed
for (int j = 0; j < dim; ++j)
if (j != 1)
u4_diff[i][j] = 1e-4;
}
MyBlockProblemType myBlockProblem(parset, myConvexProblem);
multigridStep->setProblem(u4_diff, myBlockProblem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment