Re: [petsc-users] DMPlex with spring elements

2014-09-30 Thread Matthew Knepley
...@jedbrown.org, Shri abhy...@mcs.anl.gov, petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements On Fri, Sep 26, 2014 at 10:26 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Yeah, but doesn't it only work with the local vectors localX

Re: [petsc-users] DMPlex with spring elements

2014-09-30 Thread Abhyankar, Shrirang G.
From: Miguel Angel Salazar de Troya salazardetr...@gmail.com Date: Mon, 29 Sep 2014 16:55:14 -0500 To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Hi all I'm bumping this post because I have more

Re: [petsc-users] DMPlex with spring elements

2014-09-30 Thread Matthew Knepley
Knepley knep...@gmail.com Date: Fri, 26 Sep 2014 10:28:26 -0500 To: Miguel Angel Salazar de Troya salazardetr...@gmail.com Cc: Jed Brown j...@jedbrown.org, Shri abhy...@mcs.anl.gov, petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements

Re: [petsc-users] DMPlex with spring elements

2014-09-30 Thread Miguel Angel Salazar de Troya
, Shrirang G. abhy...@mcs.anl.gov wrote: From: Miguel Angel Salazar de Troya salazardetr...@gmail.com Date: Mon, 29 Sep 2014 16:55:14 -0500 To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Hi all

Re: [petsc-users] DMPlex with spring elements

2014-09-30 Thread Abhyankar, Shrirang G.
DMLocalToGlobal with the flag ADD_VALUES. Shri From: Miguel Angel Salazar de Troya salazardetr...@gmail.com Date: Tue, 30 Sep 2014 11:35:31 -0500 To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements No worries. Thanks

Re: [petsc-users] DMPlex with spring elements

2014-09-29 Thread Miguel Angel Salazar de Troya
To: Miguel Angel Salazar de Troya salazardetr...@gmail.com Cc: Jed Brown j...@jedbrown.org, Shri abhy...@mcs.anl.gov, petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements On Fri, Sep 26, 2014 at 10:26 AM, Miguel Angel Salazar de Troya

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Miguel Angel Salazar de Troya
Thanks. I had another question about the DM and SNES and TS. There are similar routines to assign the residual and jacobian evaluation to both objects. For the SNES case are: DMSNESSetFunctionLocal DMSNESSetJacobianLocal What are the differences of these with: SNESSetFunction SNESSetJacobian

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Matthew Knepley
On Fri, Sep 26, 2014 at 9:31 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Thanks. I had another question about the DM and SNES and TS. There are similar routines to assign the residual and jacobian evaluation to both objects. For the SNES case are:

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Miguel Angel Salazar de Troya
That means that if we call SNESSetFunction() we don't build the residual vector in parallel? In the pflow example ( http://www.mcs.anl.gov/petsc/petsc-as/petsc-current/src/snes/examples/tutorials/network/pflow/pf.c.html) the function FormFunction() (Input for SNESSetFunction() works with the local

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Matthew Knepley
On Fri, Sep 26, 2014 at 10:06 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: That means that if we call SNESSetFunction() we don't build the residual vector in parallel? In the pflow example (

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Abhyankar, Shrirang G.
] DMPlex with spring elements On Thu, Sep 25, 2014 at 5:15 PM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: If you need a symmetric Jacobian, you can use the BC facility in PetscSection, which eliminates the variables completely. This is how the FEM examples, like ex12, work

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Miguel Angel Salazar de Troya
Yeah, but doesn't it only work with the local vectors localX and localF? Miguel On Fri, Sep 26, 2014 at 10:10 AM, Matthew Knepley knep...@gmail.com wrote: On Fri, Sep 26, 2014 at 10:06 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: That means that if we call

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Matthew Knepley
On Fri, Sep 26, 2014 at 10:26 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Yeah, but doesn't it only work with the local vectors localX and localF? I am telling you what the interface for the functions is. You can do whatever you want inside. Matt Miguel On Fri,

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Miguel Angel Salazar de Troya
Ok thanks. Miguel On Fri, Sep 26, 2014 at 10:28 AM, Matthew Knepley knep...@gmail.com wrote: On Fri, Sep 26, 2014 at 10:26 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Yeah, but doesn't it only work with the local vectors localX and localF? I am telling you what the

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Abhyankar, Shrirang G.
de Troya salazardetr...@gmail.com Cc: Jed Brown j...@jedbrown.org, Shri abhy...@mcs.anl.gov, petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements On Fri, Sep 26, 2014 at 10:26 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote

Re: [petsc-users] DMPlex with spring elements

2014-09-26 Thread Miguel Angel Salazar de Troya
: Re: [petsc-users] DMPlex with spring elements On Fri, Sep 26, 2014 at 10:26 AM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Yeah, but doesn't it only work with the local vectors localX and localF? I am telling you what the interface for the functions is. You can do

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Miguel Angel Salazar de Troya
To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Thanks for your response. I'm attaching a pdf with a description of the model. The description of the PetscSection is necessary for the DMNetwork? It looks like

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Abhyankar, Shrirang G.
...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Thanks for your response. I'm attaching a pdf with a description of the model. The description of the PetscSection is necessary for the DMNetwork? It looks like DMNetwork does not use

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Miguel Angel Salazar de Troya
Troya salazardetr...@gmail.com Date: Wed, 24 Sep 2014 17:38:11 -0500 To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Thanks for your response. I'm attaching a pdf with a description of the model

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Abhyankar, Shrirang G.
:16 -0500 To: Shri abhy...@mcs.anl.govmailto:abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.govmailto:petsc-users@mcs.anl.gov petsc-users@mcs.anl.govmailto:petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Thanks. Once I have marked the nodes that are fixed nodes using

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Miguel Angel Salazar de Troya
To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Thanks. Once I have marked the nodes that are fixed nodes using the component data structure, how can I process it later? I mean, at what point does the solver

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Abhyankar, Shrirang G.
...@gmail.commailto:salazardetr...@gmail.com Date: Thu, 25 Sep 2014 10:52:16 -0500 To: Shri abhy...@mcs.anl.govmailto:abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.govmailto:petsc-users@mcs.anl.gov petsc-users@mcs.anl.govmailto:petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements Thanks. Once I have

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Miguel Angel Salazar de Troya
...@gmail.com Date: Thu, 25 Sep 2014 11:43:13 -0500 To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements I see, and I guess I would have to assign a value of one to the diagonal entry of that degree of freedom in the Jacobian right

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Abhyankar, Shrirang G.
: Re: [petsc-users] DMPlex with spring elements Why not? Wouldn't we have a row of zeros except for the diagonal term? The column that corresponds to that degree of from doesn't have to be zero, right? Thanks Miguel On Sep 25, 2014 12:38 PM, Abhyankar, Shrirang G. abhy...@mcs.anl.gov wrote

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Matthew Knepley
Salazar de Troya salazardetr...@gmail.com Date: Thu, 25 Sep 2014 11:43:13 -0500 To: Shri abhy...@mcs.anl.gov Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements I see, and I guess I would have to assign a value of one to the diagonal entry of that degree

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: On Thu, Sep 25, 2014 at 1:46 PM, Abhyankar, Shrirang G. abhy...@mcs.anl.gov wrote: You are right. The Jacobian for the power grid application is indeed non-symmetric. Is that a problem for your application? If you need a symmetric Jacobian, you

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Miguel Angel Salazar de Troya
If you need a symmetric Jacobian, you can use the BC facility in PetscSection, which eliminates the variables completely. This is how the FEM examples, like ex12, work. Would that be with PetscSectionSetConstraintDof ? For that I will need the PetscSection, DofSection, within DMNetwork, how

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Matthew Knepley
On Thu, Sep 25, 2014 at 5:15 PM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: If you need a symmetric Jacobian, you can use the BC facility in PetscSection, which eliminates the variables completely. This is how the FEM examples, like ex12, work. Would that be with

Re: [petsc-users] DMPlex with spring elements

2014-09-24 Thread Miguel Angel Salazar de Troya
: Matthew Knepley knep...@gmail.com Date: Tue, 23 Sep 2014 22:40:52 -0400 To: Miguel Angel Salazar de Troya salazardetr...@gmail.com Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements On Tue, Sep 23, 2014 at 4:01 PM, Miguel Angel

Re: [petsc-users] DMPlex with spring elements

2014-09-24 Thread Matthew Knepley
Subject: Re: [petsc-users] DMPlex with spring elements On Tue, Sep 23, 2014 at 4:01 PM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Hi all I was wondering if it could be possible to build a model similar to the example snes/ex12.c, but with spring elements (for elasticity

Re: [petsc-users] DMPlex with spring elements

2014-09-24 Thread Matthew Knepley
Subject: Re: [petsc-users] DMPlex with spring elements On Tue, Sep 23, 2014 at 4:01 PM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Hi all I was wondering if it could be possible to build a model similar to the example snes/ex12.c, but with spring elements

Re: [petsc-users] DMPlex with spring elements

2014-09-24 Thread Abhyankar, Shrirang G.
salazardetr...@gmail.commailto:salazardetr...@gmail.com Cc: petsc-users@mcs.anl.govmailto:petsc-users@mcs.anl.gov petsc-users@mcs.anl.govmailto:petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements On Tue, Sep 23, 2014 at 4:01 PM, Miguel Angel Salazar de Troya salazardetr

[petsc-users] DMPlex with spring elements

2014-09-23 Thread Miguel Angel Salazar de Troya
Hi all I was wondering if it could be possible to build a model similar to the example snes/ex12.c, but with spring elements (for elasticity) instead of simplicial elements. Spring elements in a grid, therefore each element would have two nodes and each node two components. There would be more

Re: [petsc-users] DMPlex with spring elements

2014-09-23 Thread Matthew Knepley
On Tue, Sep 23, 2014 at 4:01 PM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Hi all I was wondering if it could be possible to build a model similar to the example snes/ex12.c, but with spring elements (for elasticity) instead of simplicial elements. Spring elements in a

Re: [petsc-users] DMPlex with spring elements

2014-09-23 Thread Abhyankar, Shrirang G.
Sep 2014 22:40:52 -0400 To: Miguel Angel Salazar de Troya salazardetr...@gmail.com Cc: petsc-users@mcs.anl.gov petsc-users@mcs.anl.gov Subject: Re: [petsc-users] DMPlex with spring elements On Tue, Sep 23, 2014 at 4:01 PM, Miguel Angel Salazar de Troya salazardetr...@gmail.com wrote: Hi all I