[petsc-users] PC HYPRE BoomerAMG options for nodal

2017-02-14 Thread Bernardo Rocha
Dear Petsc users, I would like to use BoomerAMG preconditioner for a system of PDEs, but we are interested in setting some of BoomerAMG options to use the nodal systems coarsening. >From the HYPRE/BoomerAMG manual, I found out that I have to use the following functions: HYPRE_BoomerAMGSetNodal HY

Re: [petsc-users] PC HYPRE BoomerAMG options for nodal

2017-02-14 Thread Bernardo Rocha
Thanks a lot for the reply. ​From my understanding and specifically for my problem I would have to use the AMGSetDofFunc as follows:​ ​nsyseq = 3;​ for (i=0; i HYPRE_BoomerAMGSetDofFunc > >I could not find an indication of that this is suppose to be setting; > it is mentioned in the users ma

Re: [petsc-users] PC HYPRE BoomerAMG options for nodal

2017-02-14 Thread Bernardo Rocha
rlaced and non-interlaced. > > Anyways we strongly recommend using the interlaced version; for most > calculations it gives much better locality for cache lines and cache. We > always use interlaced. Any particular reason you use non-interlaced? > > Barry > > > On Feb

Re: [petsc-users] PC HYPRE BoomerAMG options for nodal

2017-02-15 Thread Bernardo Rocha
Thanks a lot. I'm going to change to the interlaced version. It is easier and more efficient. Best regards. Bernardo On Wed, Feb 15, 2017 at 12:07 AM, Barry Smith wrote: > > > On Feb 14, 2017, at 7:57 PM, Bernardo Rocha com> wrote: > > > > No particular reaso

[petsc-users] Performance of Fieldsplit PC

2017-11-07 Thread Bernardo Rocha
Hello everyone, I have a general question about the performance of the PCFieldSplit that I'm not sure if I understood properly. Consider a simple Poisson problem discretized by FEM into a system Ax=b which is then solved by CG and Jacobi. Then, I create a "vectorial Poisson" problem by simply ad

Re: [petsc-users] Performance of Fieldsplit PC

2017-11-07 Thread Bernardo Rocha
Thanks for the reply. 1) This is block-Jacobi, why not use PCBJACOBI? Is it because you want to > select rows? > I'm only using it to understand the performance behavior of PCFieldSplit since I'm also having the same issue in a large and more complex problem. ​ > 2) We cannot tell anything witho

Re: [petsc-users] Performance of Fieldsplit PC

2017-11-08 Thread Bernardo Rocha
OK I see what you mean now. Thanks a lot for the help, playing with the inner tolerances was the key to improve the performance of the PCFieldSplit preconditioner. The only question which still remains is when should one use preonly for the inner solves. You could try to play games with the inner

[petsc-users] DMPlexGetCone in Fortran

2018-04-05 Thread Bernardo Rocha
Hello everyone, I've been trying to use DMPlex in a Fortran 77 application (unfortunately this is legacy code and I can't move to F90). Is there a way to use DMPlexGetCone on it? Although the documentation online says it is only available for F90, I'm wondering if there is a trick like the ones i

Re: [petsc-users] DMPlexGetCone in Fortran

2018-04-05 Thread Bernardo Rocha
OK, thanks a lot. I had to rename the files and add -ffixed-form as argument to the compiler. Best regards, Bernardo On Thu, Apr 5, 2018 at 8:21 PM, Matthew Knepley wrote: > On Thu, Apr 5, 2018 at 7:16 PM, Bernardo Rocha < > bernardomartinsro...@gmail.com> wrote: > >> Hello

Re: [petsc-users] DMPlexGetCone in Fortran

2018-04-06 Thread Bernardo Rocha
Apr 5, 2018 at 10:57 PM, Bernardo Rocha < bernardomartinsro...@gmail.com> wrote: > OK, thanks a lot. > I had to rename the files and add -ffixed-form as argument to the compiler. > Best regards, > Bernardo > > On Thu, Apr 5, 2018 at 8:21 PM, Matthew Knepley wrote: > >

Re: [petsc-users] DMPlexGetCone in Fortran

2018-04-07 Thread Bernardo Rocha
wrote: > If you send the whole code, we can try it here. I am assuming that the > examples run for you. > > Matt > > On Fri, Apr 6, 2018 at 5:47 PM, Bernardo Rocha < > bernardomartinsro...@gmail.com> wrote: > >> Hello, >> >> I can't get

Re: [petsc-users] DMPlexGetCone in Fortran

2018-04-09 Thread Bernardo Rocha
n Segmentation Fault. It would be nice to give some warning when compiling to Fortran 90 and including the wrong header files. Anyway, thanks. Best regards, Bernardo On Sat, Apr 7, 2018 at 4:13 PM, Bernardo Rocha < bernardomartinsro...@gmail.com> wrote: > OK, here is the entire code.

[petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-10 Thread Bernardo Rocha
Hi everyone, I have two questions. (Q1) The first one is related to the new PETSc 3.9. I've been using Fortran and using the "userctx" to wrap some data for the function calls within my program. Just like : call func(...,userctx) and retrieving data as: PetscFortranAddr userctx(*) b = userctx(2)

Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-10 Thread Bernardo Rocha
Found my way to the answer of the first question: ksp/ksp/examples/tutorials/ex13f90.F90 With respect to question 2... I'm still confused about this behaviour of the DMPlex; or I am missing something. Best regards. Bernardo On Tue, Apr 10, 2018 at 3:19 PM, Bernardo Rocha < bernardom

Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-11 Thread Bernardo Rocha
ge has some impact in other parts of the code. I hope not. Best regards, Bernardo M. Rocha On Tue, Apr 10, 2018 at 5:14 PM, Matthew Knepley wrote: > On Tue, Apr 10, 2018 at 2:19 PM, Bernardo Rocha < > bernardomartinsro...@gmail.com> wrote: > >> Hi everyone, >> >> I

Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-11 Thread Bernardo Rocha
Uhmmm. Indeed. Sorry for the mistake. Just fixed my ordering before sending them to DMPlexCreateFromCellList and it worked fine. Thanks. On Wed, Apr 11, 2018 at 10:15 AM, Matthew Knepley wrote: > On Wed, Apr 11, 2018 at 9:06 AM, Bernardo Rocha < > bernardomartinsro...@gmail.com> wr

[petsc-users] SNESSetUpdate function

2012-01-20 Thread Bernardo Rocha
Hi everyone, I'm using SNES but I would like to update my data after each successful step computation within the nonlinear solver using a different function. I mean, after the solution of each linear system I would like to get \Delta x_k to update x_{k+1} which is stored somewhere in my applicatio

[petsc-users] SNESSetUpdate function

2012-01-20 Thread Bernardo Rocha
OK, thanks... On Fri, Jan 20, 2012 at 12:33 PM, Matthew Knepley wrote: > On Fri, Jan 20, 2012 at 8:28 AM, Bernardo Rocha < > bernardomartinsrocha at gmail.com> wrote: > >> Hi everyone, >> >> I'm using SNES but I would like to update my data after each suc

[petsc-users] SNESSetUpdate function

2012-01-20 Thread Bernardo Rocha
e function that considers if a degree of freedom is fixed or not, in order to update *x *to continue the nonlinear iteration. That's why I think I need to do this. Is it clear? On Fri, Jan 20, 2012 at 12:55 PM, Jed Brown wrote: > On Fri, Jan 20, 2012 at 08:28, Bernardo Rocha < > bern

[petsc-users] MatAssemblyBegin-End

2012-06-29 Thread Bernardo Rocha
Hi everyone, I've a simple question: I'm solving successive linear systems, and the way I've implemented my problem it calls MatAssemblyBegin and MatAssemblyEnd every time before the call to KSPSolve. The sparsity pattern of my matrix does not change between the calls. Is it necessary to call the

[petsc-users] Sparse matrix vector multiplication performance

2010-05-01 Thread Bernardo Rocha
Hi everyone, I?m wondering if it is possible to measure the CPU time of the sparse matrix vector multiplications within a iterative solver such as the CG in PETSc? I?ve been reading the manual, but it seems that the options -log_summary and similar ones only track the convergence behaviour. So, h

[petsc-users] SNES Form FunctionAndJacobian

2013-02-22 Thread Bernardo Rocha
Hi everyone, I?m using SNES to solve nonlinear problems in elasticity. I was wondering if it is possible to configure SNES for calling a single function like FormFunctionAndJacobian to compute the residual and jacobian at the same time since this is the way I was doing before using SNES in my fini

memory usage of a SeqAIJ matrix

2009-09-15 Thread Bernardo Rocha
Hi everyone, I need to know the number of nonzero element of the matrix in an application using PETSc. How can I do it? What is the best way to do it? As far as I'm concerned with PETSc, running on a single processor, I'm using the command line argument "-info" and then I get this information in

memory usage of a SeqAIJ matrix

2009-09-15 Thread Bernardo Rocha
Thanks a lot! =) 2009/9/15 Matthew Knepley > You can use the output of -ksp_view, which gives the matrix information. > >Matt > > > On Tue, Sep 15, 2009 at 2:01 PM, Bernardo Rocha gmail.com>wrote: > >> Hi everyone, >> >> I need to know the num