-
Notifications
You must be signed in to change notification settings - Fork 0
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
richards_driver crashing for parallel run #93
Comments
|
The error can be reproduced on a smaller domain via:
|
The error is because DMPlex is using a star stencil, but we need to use a box stencil. @knepley How can I tell DMPlex to use box stencil instead of star stencil? Here is the code that I'm using to set 1 DOF at cell centers:
|
On Thu, Oct 8, 2020 at 12:46 PM Gautam Bisht ***@***.***> wrote:
The error is because DMPlex is using a star stencil, but we need to use a
box stencil.
@knepley <https://github.com/knepley> How can I tell DMPlex to use box
stencil instead of star stencil? Here is the code that I'm using to set 1
DOF at cell centers:
ierr = PetscSectionCreate(comm, &sec); CHKERRQ(ierr);
ierr = PetscSectionSetNumFields(sec, 1); CHKERRQ(ierr);
ierr = PetscSectionSetFieldName(sec, 0, "LiquidPressure"); CHKERRQ(ierr);
ierr = PetscSectionSetFieldComponents(sec, 0, 1); CHKERRQ(ierr);
ierr = DMPlexGetHeightStratum(dm,0,&pStart,&pEnd); CHKERRQ(ierr);
ierr = PetscSectionSetChart(sec,pStart,pEnd); CHKERRQ(ierr);
for(p=pStart; p<pEnd; p++) {
ierr = PetscSectionSetFieldDof(sec,p,0,1); CHKERRQ(ierr);
ierr = PetscSectionSetDof(sec,p,1); CHKERRQ(ierr);
}
ierr = PetscSectionSetUp(sec); CHKERRQ(ierr);
ierr = DMSetSection(dm,sec); CHKERRQ(ierr);
ierr = PetscSectionViewFromOptions(sec, NULL, "-layout_view"); CHKERRQ(ierr);
ierr = PetscSectionDestroy(&sec); CHKERRQ(ierr);
ierr = DMSetBasicAdjacency(dm,PETSC_TRUE,PETSC_TRUE); CHKERRQ(ierr);
This is a box stencil. A star would be TRUE: FALSE.
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMSetBasicAdjacency.html
You can see the sparsity pattern using
-mat_view draw -draw_pause -1
Thanks,
Matt
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#93 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEORCMX222QOG7KBEX4COLSJXUH3ANCNFSM4SHZH7QQ>
.
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
|
Thanks @knepley. You were correct that the existing stencil was a box stencil. The error was because the code wasn't skipping non-local vertices. |
@jeff-cohere reported the model failure here
The text was updated successfully, but these errors were encountered: