Commit bd488753 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Possibility to remove null space of rhs vectors in parallel computations.

parent 430cb57b
......@@ -151,6 +151,13 @@ namespace AMDiS {
VecAssemblyBegin(petscRhsVec);
VecAssemblyEnd(petscRhsVec);
if (removeRhsNullSpace) {
MatNullSpace sp;
MatNullSpaceCreate(PETSC_COMM_WORLD, PETSC_TRUE, 0, PETSC_NULL, &sp);
MatNullSpaceRemove(sp, petscRhsVec, PETSC_NULL);
MatNullSpaceDestroy(&sp);
}
}
......
......@@ -88,11 +88,14 @@ namespace AMDiS {
o_nnz(NULL),
lastMeshNnz(0),
zeroStartVector(false),
alwaysCreateNnzStructure(false)
alwaysCreateNnzStructure(false),
removeRhsNullSpace(false)
{
Parameters::get("parallel->use zero start vector", zeroStartVector);
Parameters::get("parallel->always create nnz structure",
alwaysCreateNnzStructure);
Parameters::get("parallel->remove rhs null space",
removeRhsNullSpace);
}
void fillPetscMatrix(Matrix<DOFMatrix*> *mat);
......@@ -141,6 +144,9 @@ namespace AMDiS {
/// Mapping from global DOF indices to global matrix indices under
/// consideration of possibly multiple components.
DofToMatIndex dofToMatIndex;
/// If true, the constant null space is projected out of the RHS vector.
bool removeRhsNullSpace;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment