[petsc-users] Problems imposing boundary conditions

2017-03-03 Thread Maximilian Hartig
Hello, I am working on a transient structural FEM code with PETSc. I managed to create a slow but functioning program with the use of petscFE and a TS solver. The code runs fine until I try to restrict movement in all three spatial directions for one face. I then get the error which is attached

Re: [petsc-users] Problems imposing boundary conditions

2017-03-03 Thread Lukas van de Wiel
You have apparently preallocated the non-zeroes of you matrix, and the room was insufficient to accommodate all your equations. What happened after you tried: MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) Cheers Lukas On Fri, Mar 3, 2017 at 6:37 PM, Maximilian Hartig wrote: >

Re: [petsc-users] Problems imposing boundary conditions

2017-03-03 Thread Sander Arens
Max, I'm assuming you use DMPlex for your mesh? If so, did you only specify the faces in the DMLabel (and not vertices or edges). Do you get this error only in parallel? If so, I can confirm this bug. I submitted a pull request for this yesterday. On 3 March 2017 at 18:43, Lukas van de Wiel wro

Re: [petsc-users] Problems imposing boundary conditions

2017-03-03 Thread Matthew Knepley
On Fri, Mar 3, 2017 at 12:56 PM, Sander Arens wrote: > Max, > > I'm assuming you use DMPlex for your mesh? If so, did you only specify the > faces in the DMLabel (and not vertices or edges). Do you get this error > only in parallel? > > If so, I can confirm this bug. I submitted a pull request fo

Re: [petsc-users] Problems imposing boundary conditions

2017-03-03 Thread Maximilian Hartig
Yes Sander, your assessment is correct. I use DMPlex and specify the BC using DMLabel. I do however get this error also when running in serial. Thanks, Max > On 3 Mar 2017, at 22:14, Matthew Knepley wrote: > > On Fri, Mar 3, 2017 at 12:56 PM, Sander Arens > wrote

Re: [petsc-users] Problems imposing boundary conditions

2017-03-04 Thread Sander Arens
Hmm, strange you also get the error in serial. Can you maybe send a minimal working which demonstrates the error? Thanks, Sander On 3 March 2017 at 23:07, Maximilian Hartig wrote: > Yes Sander, your assessment is correct. I use DMPlex and specify the BC > using DMLabel. I do however get this er

Re: [petsc-users] Problems imposing boundary conditions

2017-03-06 Thread Matthew Knepley
On Mon, Mar 6, 2017 at 8:38 AM, Maximilian Hartig wrote: > Of course, please find the source as well as the mesh attached below. I > run with: > > -def_petscspace_order 2 -vel_petscspace_order 2 -snes_monitor > -snes_converged_reason -ksp_converged_reason -ksp_monitor _true_residual > -ksp_type f

Re: [petsc-users] Problems imposing boundary conditions

2017-03-07 Thread Maximilian Hartig
It seems you are correct. In theory, the problem should not be over constrained. It is 1/4 of a simple hollow cylinder geometry with rotational symmetry around the z-axis. I restrict movement completely on the upper and lower (z) end as well as movement in x- and y- direction respectively on the

Re: [petsc-users] Problems imposing boundary conditions

2017-03-07 Thread Matthew Knepley
On Tue, Mar 7, 2017 at 3:28 AM, Maximilian Hartig wrote: > It seems you are correct. In theory, the problem should not be over > constrained. It is 1/4 of a simple hollow cylinder geometry with rotational > symmetry around the z-axis. I restrict movement completely on the upper and > lower (z) en

Re: [petsc-users] Problems imposing boundary conditions

2017-03-07 Thread Maximilian Hartig
> On 7 Mar 2017, at 16:29, Matthew Knepley wrote: > > On Tue, Mar 7, 2017 at 3:28 AM, Maximilian Hartig > wrote: > It seems you are correct. In theory, the problem should not be over > constrained. It is 1/4 of a simple hollow cylinder geometry with rotational

Re: [petsc-users] Problems imposing boundary conditions

2017-03-07 Thread Matthew Knepley
On Tue, Mar 7, 2017 at 11:11 AM, Maximilian Hartig wrote: > > On 7 Mar 2017, at 16:29, Matthew Knepley wrote: > > On Tue, Mar 7, 2017 at 3:28 AM, Maximilian Hartig com> wrote: > >> It seems you are correct. In theory, the problem should not be over >> constrained. It is 1/4 of a simple hollow c

Re: [petsc-users] Problems imposing boundary conditions

2017-03-09 Thread Maximilian Hartig
Ok thank you, so can I just do something along the lines of: PetscSectionGetFieldConstraintDof(…) to find the overconstrained vertices and then correct them manually with PetscSectionSetFieldConstraintDof() PetscSectionSetFieldConstraintIndices() ? Or will this mess up the Ja

Re: [petsc-users] Problems imposing boundary conditions

2017-03-09 Thread Matthew Knepley
On Thu, Mar 9, 2017 at 7:45 AM, Maximilian Hartig wrote: > Ok thank you, so can I just do something along the lines of: > PetscSectionGetFieldConstraintDof(…) > to find the overconstrained vertices and then correct them manually with > PetscSectionSetFieldConstraintDof() > PetscSectionSetFieldCon

Re: [petsc-users] Problems imposing boundary conditions

2017-03-14 Thread Sander Arens
I updated my pull request with a fix. If Matt approves and merges to master, the problem should be solved. Thanks, Sander On 9 March 2017 at 15:00, Matthew Knepley wrote: > On Thu, Mar 9, 2017 at 7:45 AM, Maximilian Hartig < > imilian.har...@gmail.com> wrote: > >> Ok thank you, so can I just do

Re: [petsc-users] Problems imposing boundary conditions

2017-03-17 Thread Sander Arens
I think there might still be another problem, this time it has to do with DMPlexInsertBoundaryValues. Say we have a simple mesh like this: 4 5 | \ 1 | |\| | 0 \ | 2 3 and we constrain the left face to be 0 and the right face to be 1. The way it is now, DMPlexInsertBoundary