Skip to content

Commit

Permalink
Merge Pull Request #10018 from iyamazaki/Trilinos/muelu-unit-test
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: MueLu : fix NullspaceFactor unit test
PR Author: iyamazaki
  • Loading branch information
trilinos-autotester authored Dec 16, 2021
2 parents d961612 + 7cc6bbd commit 9732a48
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/muelu/test/unit_tests/NullspaceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,18 @@ namespace MueLuTests {
size_t nullDim = 6;
RCP<MultiVector> handCompNullSpace = MultiVectorFactory::Build(Op->getRowMap(), nullDim);
handCompNullSpace->putScalar(0.0);
ArrayRCP<Scalar> nsValues;
nsValues = handCompNullSpace->getDataNonConst(0); for (int j = 0; j < nsValues.size(); j +=3) nsValues[j] = 1.;
nsValues = handCompNullSpace->getDataNonConst(1); for (int j = 1; j < nsValues.size(); j +=3) nsValues[j] = 1.;
nsValues = handCompNullSpace->getDataNonConst(2); for (int j = 2; j < nsValues.size(); j +=3) nsValues[j] = 1.;
nsValues = handCompNullSpace->getDataNonConst(3); for (int j = 0; j < nsValues.size(); j +=3) nsValues[j] = -(yvals[j/3]-.5);
for (int j = 1; j < nsValues.size(); j +=3) nsValues[j] = (xvals[j/3]-.5);
nsValues = handCompNullSpace->getDataNonConst(4); for (int j = 1; j < nsValues.size(); j +=3) nsValues[j] = -(zvals[j/3]-.5);
for (int j = 2; j < nsValues.size(); j +=3) nsValues[j] = (yvals[j/3]-.5);
nsValues = handCompNullSpace->getDataNonConst(5); for (int j = 0; j < nsValues.size(); j +=3) nsValues[j] = -(zvals[j/3]-.5);
for (int j = 2; j < nsValues.size(); j +=3) nsValues[j] = (xvals[j/3]-.5);
{
ArrayRCP<Scalar> nsValues;
nsValues = handCompNullSpace->getDataNonConst(0); for (int j = 0; j < nsValues.size(); j +=3) nsValues[j] = 1.;
nsValues = handCompNullSpace->getDataNonConst(1); for (int j = 1; j < nsValues.size(); j +=3) nsValues[j] = 1.;
nsValues = handCompNullSpace->getDataNonConst(2); for (int j = 2; j < nsValues.size(); j +=3) nsValues[j] = 1.;
nsValues = handCompNullSpace->getDataNonConst(3); for (int j = 0; j < nsValues.size(); j +=3) nsValues[j] = -(yvals[j/3]-.5);
for (int j = 1; j < nsValues.size(); j +=3) nsValues[j] = (xvals[j/3]-.5);
nsValues = handCompNullSpace->getDataNonConst(4); for (int j = 1; j < nsValues.size(); j +=3) nsValues[j] = -(zvals[j/3]-.5);
for (int j = 2; j < nsValues.size(); j +=3) nsValues[j] = (yvals[j/3]-.5);
nsValues = handCompNullSpace->getDataNonConst(5); for (int j = 0; j < nsValues.size(); j +=3) nsValues[j] = -(zvals[j/3]-.5);
for (int j = 2; j < nsValues.size(); j +=3) nsValues[j] = (xvals[j/3]-.5);
}

RCP<MultiVector> diff = MultiVectorFactory::Build(Op->getRowMap(),6);
diff->putScalar(0.0);
Expand Down

0 comments on commit 9732a48

Please sign in to comment.