-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createSubDM() returns inconsistent IS in petsc4py #280
Comments
@knepley petsc documentation says this I realize now that my understanding of |
In the earlier version of the code it looks like we originally only got the pressure indices and assume the rest are velocity underworld3/src/underworld3/cython/petsc_generic_snes_solvers.pyx Lines 2739 to 2762 in 92a94f5
I've written an update to the code using that approach and assuming the pressure field is from the first field, i.e.
|
Currently, there is no single PETSc or petsc4py function that returns both the constrained and unconstrained DOF indices for a given field in a Use Case: code: cdef DM dm = stokes.dm
cdef Vec clvec = stokes.dm.getLocalVec()
stokes.dm.globalToLocal(gvec, clvec) # gvec is the global vector
ierr = DMPlexSNESComputeBoundaryFEM(dm.dm, <void*>clvec.vec, NULL); CHKERRQ(ierr)
if verbose and uw.mpi.rank == 0:
print(f"SNES Compute Boundary FEM Successfull", flush=True)
# now use indice set of field with all DOFs to separately each field. |
First I need a definition of your words. I understand the words "local" and "global". Local indices are those indexing the serial local vector defined by the local section. Global indices index the parallel global vector defined by the global section. Local vectors contain all dofs specified in the problem, some redundantly. Global vectors omit the constrained dofs and are not redundant. I do not understand what you are asking for with "constrained and unconstrained DOF indices". |
Maybe we start with "What kind of vector do you want to index?" |
@knepley We are planning to run a few additional tests to help debug the issue. If these tests also fail, I will provide detailed information about my specific request. Thanks |
Hi @knepley,
I've noticed that
createSubDM()
in petsc4py seems to return an incorrect IS. Could it be that I'm misunderstanding howcreateSubDM()
is intended to work? Would you mind taking a look and helping us out? Thank you!Here is the script:
Here is the output from the section view:
I got following
IS
for the pressure field, which is correct and I can crosscheck from the petsc section info:For the velocity field, I got this:
Isn't the above line supposed to return following
IS
?The text was updated successfully, but these errors were encountered: