Hi all!
I am currently fighting with some simulations that include laplace inversions with PETSC, specifically with frequent inversion fails when I want to run with the inner flag 2 (no local gradient) and the outer flag 16 (setting from value). I tried to look a little bit through the code and found the following code
|
// Set boundary conditions |
|
if (!isInnerBoundaryFlagSet(INVERT_RHS)) { |
|
BOUT_FOR_SERIAL(index, indexer->getRegionInnerX()) { |
|
rhs(index) = isInnerBoundaryFlagSet(INVERT_SET) ? x0[index] : 0.0; |
|
} |
|
} |
|
if (!isOuterBoundaryFlagSet(INVERT_RHS)) { |
|
BOUT_FOR_SERIAL(index, indexer->getRegionOuterX()) { |
|
rhs(index) = isInnerBoundaryFlagSet(INVERT_SET) ? x0[index] : 0.0; |
|
} |
|
} |
Does this work as intended? I have to look a little bit more through the code to understand if there is a reason for this, but I found it counter-intuitive that i check the inner boundary when setting the outer boundary
Hi all!
I am currently fighting with some simulations that include laplace inversions with PETSC, specifically with frequent inversion fails when I want to run with the inner flag 2 (no local gradient) and the outer flag 16 (setting from value). I tried to look a little bit through the code and found the following code
BOUT-dev/src/invert/laplace/impls/petsc/petsc_laplace.cxx
Lines 331 to 341 in 9eb94c7
Does this work as intended? I have to look a little bit more through the code to understand if there is a reason for this, but I found it counter-intuitive that i check the inner boundary when setting the outer boundary