Re: [petsc-users] X-Viewer for complex numbers

2018-12-12 Thread Smith, Barry F. via petsc-users
The PETSc Vec viewer just plots the real part of the vector. VecView_Seq_Draw_LG() to plot the imaginary part or phase etc you would need to write your own plotter (though you can copy some of the code, for example for VecView_Seq_Draw_LG()) Barry > On Dec 12, 2018, at 9:38 AM, S

Re: [petsc-users] Solution "jumps" after setting timestep

2018-12-12 Thread Smith, Barry F. via petsc-users
> On Dec 12, 2018, at 4:09 AM, Moritz.Huck--- via petsc-users > wrote: > > Hi, > sorry I missed the last response. > > The system should be index 1 (being not a 100% certain I calculated > everything correct, it can be at most of index 2). > I cannot show the code easily, the code is quite

Re: [petsc-users] Check snes->domainerror for SNESComputeJacobian?

2018-12-12 Thread Smith, Barry F. via petsc-users
> On Dec 12, 2018, at 5:39 PM, Fande Kong via petsc-users > wrote: > > Hi PETSc Developers, > > If we hit some exceptions in function evaluations, we will try to call > SNESSetFunctionDomainError(), and then PETSc will gently ``stop" with > SNES_DIVERGED_FNORM_NAN. After PETSc stops, we

Re: [petsc-users] X-Viewer for complex numbers

2018-12-12 Thread Sajid Ali via petsc-users
Specifically in the context of drawing a vector using the X-viewer ( PetscDraw ). On Wed, Dec 12, 2018 at 9:33 AM Sajid Ali wrote: > Hi , > > Does petsc automatically convert complex valued vectors to absolute value > vectors before passing it to a viewer ? Is there a way to view the phase of >

[petsc-users] X-Viewer for complex numbers

2018-12-12 Thread Sajid Ali via petsc-users
Hi , Does petsc automatically convert complex valued vectors to absolute value vectors before passing it to a viewer ? Is there a way to view the phase of a vector ? Thank You, Sajid Ali Applied Physics Northwestern University

Re: [petsc-users] MUMPS Error

2018-12-12 Thread Zhang, Junchao via petsc-users
On Wed, Dec 12, 2018 at 7:14 AM Sal Am via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hi I am getting an error using MUMPS. How I run it: bash-4.2$ mpiexec -n 16 ./solveCSys -ksp_type richardson -pc_type lu -pc_factor_mat_solver_type mumps -ksp_max_it 1 -ksp_monitor_true_residual -log

Re: [petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Artur Palha Da Silva Clérigo - LR via petsc-users
Thank you for the explanation. My intent is to define periodicity from gmsh. With your tip I managed to do that! -artur palha On 12 Dec 2018, at 16:24, Stefano Zampini mailto:stefano.zamp...@gmail.com>> wrote: Il giorno mer 12 dic 2018 alle ore 17:45 Artur Palha Da Silva Clérigo - LR mailto

Re: [petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Artur Palha Da Silva Clérigo - LR via petsc-users
Dear Stefano, Your tip worked. In order to enable the periodic information in the gmsh file, I need to add: petsc4py.init('-dm_plex_gmsh_periodic’) Thanks a lot! -artur palha On 12 Dec 2018, at 15:45, Artur Palha Da Silva Clérigo - LR mailto:a.palhadasilvacler...@tudelft.nl>> wrote: On 1

Re: [petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Artur Palha Da Silva Clérigo - LR via petsc-users
On 12 Dec 2018, at 15:26, Stefano Zampini mailto:stefano.zamp...@gmail.com>> wrote: What do you mean by "I always get the first numbering”? I mean that if I use as input a periodic and a non-periodic mesh I get the following numbering in both cases: 135 X-

Re: [petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Artur Palha Da Silva Clérigo - LR via petsc-users
On 12 Dec 2018, at 15:14, Matthew Knepley mailto:knep...@gmail.com>> wrote: On Wed, Dec 12, 2018 at 9:12 AM Artur Palha Da Silva Clérigo - LR mailto:a.palhadasilvacler...@tudelft.nl>> wrote: Dear Matt, Thank you for your quick reply. As for your question: "why would there be a difference? T

Re: [petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Matthew Knepley via petsc-users
On Wed, Dec 12, 2018 at 9:12 AM Artur Palha Da Silva Clérigo - LR < a.palhadasilvacler...@tudelft.nl> wrote: > Dear Matt, > > Thank you for your quick reply. As for your question: "why would there be > a difference? They should be numbered in the same way.” > > I see the degrees of freedom living

Re: [petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Artur Palha Da Silva Clérigo - LR via petsc-users
Dear Matt, Thank you for your quick reply. As for your question: "why would there be a difference? They should be numbered in the same way.” I see the degrees of freedom living on the periodic domain as the ones living at boundaries between interior elements. This is what I expect for non-perio

Re: [petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Matthew Knepley via petsc-users
On Wed, Dec 12, 2018 at 9:01 AM Artur Palha Da Silva Clérigo - LR via petsc-users wrote: > Dear All, > > I having been trying to add periodic domain functionality to my code. I am > able to generate a periodic mesh with gmsh and load it using dmplex. The > problem is that I am unable to have a nu

[petsc-users] Periodic domains in DMPlex / petsc4py

2018-12-12 Thread Artur Palha Da Silva Clérigo - LR via petsc-users
Dear All, I having been trying to add periodic domain functionality to my code. I am able to generate a periodic mesh with gmsh and load it using dmplex. The problem is that I am unable to have a numbering of the degrees of freedom that reflects the periodicity (they are numbered as if there wa

Re: [petsc-users] Solution "jumps" after setting timestep

2018-12-12 Thread Moritz.Huck--- via petsc-users
Hi, sorry I missed the last response. The system should be index 1 (being not a 100% certain I calculated everything correct, it can be at most of index 2). I cannot show the code easily, the code is quite complex (the system arises from a FEM discretization). As additional information the s