Re: [petsc-users] CMake and PETSc

2017-03-22 Thread Hom Nath Gharti
Thanks, Jed! I will try. I see that FindPETSc.cmake has following lines: set(PETSC_VALID_COMPONENTS C CXX) Should we add FC or similar? Thanks, Hom On Wed, Mar 22, 2017 at 9:09 PM, Jed Brown wrote: > Hom Nath Gharti writes: > >> Dear all, >> >> Does

Re: [petsc-users] CMake and PETSc

2017-03-22 Thread Jed Brown
Hom Nath Gharti writes: > Dear all, > > Does FindPETSc.cmake (https://github.com/jedbrown/cmake-modules) work > with Fortran as well? It should, but you need to be sure to use a compatible Fortran compiler. signature.asc Description: PGP signature

Re: [petsc-users] [petsc-maint] Question about DMDA BOUNDARY_CONDITION set

2017-03-22 Thread Barry Smith
> On Mar 21, 2017, at 8:46 AM, Wenbo Zhao wrote: > > Matt, > > Thanks. > > I want to solve neutron diffusion equations using finite difference method > and PETSc. > This rotation boundary condition is very common in my cases. > Though the mesh consists of ~ 10

Re: [petsc-users] Question about DMDA BOUNDARY_CONDITION set

2017-03-22 Thread Barry Smith
In the git repository branch barry/add-dmda-rotate-boundary-conditions-example I have provided an example that does this. It uses DM_BOUNDARY_GHOSTED to reserve ghost locations along the physical boundaries in the local vector and then creates two VecScatter that fill the appropriate

Re: [petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Austin Herrema
Makes sense, and definitely seems to be a more natural way to go now that I see it. When compiling using this rule it seems to get close but doesn't compile all the way. Here is the output (in reality, what I was referring to as "modname.so" is "iga_blade_py.so" and the "outer_driver.f90" is

Re: [petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Satish Balay
On Wed, 22 Mar 2017, Jose E. Roman wrote: > > > El 22 mar 2017, a las 19:23, Barry Smith escribió: > > > > > >> On Mar 22, 2017, at 1:08 PM, Austin Herrema wrote: > >> > >> Thank you for the suggestion! Seems like a reasonable way to go. Not > >>

Re: [petsc-users] Configure nested PCFIELDSPLIT with general index sets

2017-03-22 Thread Natacha BEREUX
Hello Matt, Thanks a lot for your answers. Since I am working on a large FEM Fortran code, I have to stick to Fortran. Do you know if someone plans to add this Fortran interface? Or may be I could do it myself ? Is this particular interface very hard to add ? Perhaps could I mimic some other

Re: [petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Jose E. Roman
> El 22 mar 2017, a las 19:23, Barry Smith escribió: > > >> On Mar 22, 2017, at 1:08 PM, Austin Herrema wrote: >> >> Thank you for the suggestion! Seems like a reasonable way to go. Not working >> for me, however, I suspect because I'm using

Re: [petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Barry Smith
> On Mar 22, 2017, at 1:08 PM, Austin Herrema wrote: > > Thank you for the suggestion! Seems like a reasonable way to go. Not working > for me, however, I suspect because I'm using homebrew installations of PETSc > and SLEPc (I don't think all the makefiles are kept).

Re: [petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Austin Herrema
Thank you for the suggestion! Seems like a reasonable way to go. Not working for me, however, I suspect because I'm using homebrew installations of PETSc and SLEPc (I don't think all the makefiles are kept). Any other way to do the same thing by chance? Worst case I could use a non-homebrew

Re: [petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Barry Smith
Lisandro, We've had a couple questions similar to this with f2py; is there a way we could add to the PETSc/SLEPc makefile rules something to allow people to trivially use f2py without having to make their own (often incorrect) manual command lines? Thanks Barry > On Mar

Re: [petsc-users] left and right preconditioning with a constant null space

2017-03-22 Thread Lawrence Mitchell
> On 22 Mar 2017, at 16:39, Matthew Knepley wrote: > > Hmm, I wonder if the problem is that A11 has the nullspace, but the PC pmat > is actually B^T diag(A)^{-1} B. I have > to look where the solver is actually taking the nullspace from. We need to > improve the -ksp_view

Re: [petsc-users] left and right preconditioning with a constant null space

2017-03-22 Thread Matthew Knepley
On Wed, Mar 22, 2017 at 4:04 PM, Klaij, Christiaan wrote: > Thanks Matt, I will try your suggestion and let you know. In the > meantime this is what I did to set the constant null space: > > call > MatNullSpaceCreate(MPI_COMM_WORLD,PETSC_TRUE,0,PETSC_NULL_OBJECT,nullsp,ierr);

Re: [petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Jose E. Roman
Try the following: $ cd $SLEPC_DIR $ make getlinklibs_slepc Then copy the output and paste it at the end of your f2py command. Jose > El 22 mar 2017, a las 16:38, Austin Herrema escribió: > > Hello all, > > I am trying to do as the subject line describes--use f2py to

Re: [petsc-users] left and right preconditioning with a constant null space

2017-03-22 Thread Klaij, Christiaan
Thanks Matt, I will try your suggestion and let you know. In the meantime this is what I did to set the constant null space: call MatNullSpaceCreate(MPI_COMM_WORLD,PETSC_TRUE,0,PETSC_NULL_OBJECT,nullsp,ierr); CHKERRQ(ierr) call MatSetNullSpace(aa_sub(4),nullsp,ierr); CHKERRQ(ierr) call

Re: [petsc-users] left and right preconditioning with a constant null space

2017-03-22 Thread Matthew Knepley
On Wed, Mar 22, 2017 at 2:58 PM, Klaij, Christiaan wrote: > I'm solving the Navier-Stokes equations using PCFieldSplit type > Schur and Selfp. This particular case has only Neumann conditions > for the pressure field. > > With left preconditioning and no nullspace, I see that

[petsc-users] How to use f2py on a PETSc/SLEPc-based fortran code

2017-03-22 Thread Austin Herrema
Hello all, I am trying to do as the subject line describes--use f2py to run a large PETSc/SLEPc fortran finite element code through python. I really only need to wrap the outermost function of the fortran code--don't need any access to subroutines. I'll describe what I'm doing, some of which I'm

[petsc-users] CMake and PETSc

2017-03-22 Thread Hom Nath Gharti
Dear all, Does FindPETSc.cmake (https://github.com/jedbrown/cmake-modules) work with Fortran as well? Thanks, Hom

[petsc-users] left and right preconditioning with a constant null space

2017-03-22 Thread Klaij, Christiaan
I'm solving the Navier-Stokes equations using PCFieldSplit type Schur and Selfp. This particular case has only Neumann conditions for the pressure field. With left preconditioning and no nullspace, I see that the KSP solver for S does not converge (attachment "left_nonullsp") in either norm.

Re: [petsc-users] Configure nested PCFIELDSPLIT with general index sets

2017-03-22 Thread Matthew Knepley
On Wed, Mar 22, 2017 at 10:03 AM, Natacha BEREUX wrote: > Hello, > if my understanding is correct, the approach proposed by Matt and Lawrence > is the following : > - create a DMShell (DMShellCreate) > - define my own CreateFieldDecomposition to return the index sets I

Re: [petsc-users] Configure nested PCFIELDSPLIT with general index sets

2017-03-22 Thread Natacha BEREUX
Hello, if my understanding is correct, the approach proposed by Matt and Lawrence is the following : - create a DMShell (DMShellCreate) - define my own CreateFieldDecomposition to return the index sets I need (for displacement, pressure and temperature degrees of freedom) :