[petsc-users] TSMonitor: TSConvergedReason

2018-05-01 Thread Mohammad Hassan Baghaei
Hello Using the TSMonitorSet , I am trying to monitor the time-stepping solver. I use the TSSetConvergedReason() to set a limit on norm error. I found that even though the error is below the limit at the current step, the solver continues to solve that step. Then, in the next step, it will be

[petsc-users] TSPseudo Solution Algorithm

2018-03-30 Thread Mohammad Hassan Baghaei
Hello I am trying to solve system of equations using time stepping. I use TSSetIFunction() to define the DAEs. I tried to add the xdot[] term to all of variables. As a solution algorithm , I solved with newton line search with ASM as a preconditioner. In the case, I want to add the xdot[] term to

Re: [petsc-users] Global Numbering

2018-03-21 Thread Mohammad Hassan Baghaei
Yeah! I think! You are completely right! Thanks for your suggestion. I would definitely look at them! Thanks Amir From: Matthew Knepley [mailto:knep...@gmail.com] Sent: Thursday, March 22, 2018 2:25 AM To: Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn> Cc: PETSc <pe

Re: [petsc-users] Global Numbering

2018-03-21 Thread Mohammad Hassan Baghaei
To: Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn> Cc: PETSc <petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] Global Numbering On Wed, Mar 21, 2018 at 1:28 PM, Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn <mailto:mhbagh...@mail.sjtu.edu.cn> > wrote: I am tryin

Re: [petsc-users] Global Numbering

2018-03-21 Thread Mohammad Hassan Baghaei
, March 21, 2018 10:38 PM To: Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn> Cc: PETSc <petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] Global Numbering On Wed, Mar 21, 2018 at 8:18 AM, Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn <mailto:mhbagh...@mail.sj

[petsc-users] Global Numbering

2018-03-21 Thread Mohammad Hassan Baghaei
Hello I am trying to create a global vector of coordinates based on the parallelized dm. I find it really hard to work with the local numbering, how can I manage to create a kind of numbering on global level so that I could easily access to the nodes based on the new numbering. Thanks for your

[petsc-users] error regarding filling section fields

2018-03-11 Thread Mohammad Hassan Baghaei
Hi I am trying to fill the global vector . Using single processor, it works fine. However, switching to several processors, I get the error regarding the section offset out of range for several points. The short of error message is below. Can you let me know what causes the offset to become [0,0(

Re: [petsc-users] Dealing with DMPlexDistribute()

2018-02-15 Thread Mohammad Hassan Baghaei
Baghaei <mhbagh...@mail.sjtu.edu.cn> Cc: PETSc <petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] Dealing with DMPlexDistribute() On Thu, Feb 15, 2018 at 5:43 PM, Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn <mailto:mhbagh...@mail.sjtu.edu.cn> > wrote: Hi Matt In f

Re: [petsc-users] Dealing with DMPlexDistribute()

2018-02-15 Thread Mohammad Hassan Baghaei
the distribution in routine, with this two lines: DMPlexDistribute(*dm, 0, NULL, ); if (dmDist) {DMDestroy(dm); *dm = dmDist;} Thanks Amir From: Matthew Knepley [mailto:knep...@gmail.com] Sent: Friday, February 16, 2018 6:34 AM To: Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn&

[petsc-users] Dealing with DMPlexDistribute()

2018-02-15 Thread Mohammad Hassan Baghaei
Hi I am using DMPlex as interface for mesh generation. On single core, I got around 3 mesh cells. Whenever, I run on multiple core, say 3, in the output file for DM, VTK, I got 3 times mesh cell and point numbers. Does it mean that DMPlexDistribute() does not work properly! Thanks Amir

Re: [petsc-users] Accessing a field values of Staggered grid

2018-02-13 Thread Mohammad Hassan Baghaei
, February 14, 2018 5:37 AM To: Matthew Knepley <knep...@gmail.com> Cc: Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn>; PETSc <petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] Accessing a field values of Staggered grid On 13 February 2018 at 21:17, Matthew Knepley

[petsc-users] Accessing a field values of Staggered grid

2018-02-13 Thread Mohammad Hassan Baghaei
Hi I am filling the local vector from dm , has a section layout. The thing is I want to know how I can see the field variable values defined on edges, the staggered grid. In fact, Whenever I output to VTK in preview, I would be able to see the main grid. But the values which are defined on edges,

[petsc-users] pseudo-transient ?

2018-02-06 Thread Mohammad Hassan Baghaei
Hi I wanted to use my solve the system of equation using pseudo-transient continuation. I found that we can refer to this version for driven cavity example. However, I could not find it within files (src/snes/examples/tutorials/ex27.c). Would it be possible for you to share this file? Thanks

Re: [petsc-users] Using DMPlex

2017-12-25 Thread Mohammad Hassan Baghaei
Hello I want to know whether is it possible that a specific field in the section have been defined at some time on edges and other times on the vertices. This change in the dof , I think, may cause problem, especially in the global vector size of the dm. At times when the field changes to be

[petsc-users] Using DMPlex

2017-12-24 Thread Mohammad Hassan Baghaei
Hello I am using the DMPlex interface for the solving PDEs. A part of mesh, considering, is staggered grid, at the location of middle of each edge. After generation of main grid points, I find it hard to have the staggered grid at the prescribed location. I want to know how to deal with the

[petsc-users] Boundary condition IS

2017-12-06 Thread Mohammad Hassan Baghaei
Hello I am using DMPlex to construct a fully circular 2D domain for my PDEs. As I am discretizing the PDEs using finite difference method, I need to know , to define the layout of PetscSection, how I can find the boundary condition IS. I know the location of the boundaries in Sieve chart.

[petsc-users] tensor-product mesh

2017-11-25 Thread Mohammad Hassan Baghaei
Hi I am going to solve the PDEs on a domain of a circle, which I need to use the polar coordinates. As dm is supposed for Cartesian coordinate system. Is it possible to define a new coordinate system in that or I need to use dmplex for that. Thanks for your great time answering me.