[petsc-users] Meaning of the order of PETSC_VIEWER_ASCII_INDEX format in PETSc

2018-02-07 Thread Paula Sanematsu
I am using PETSc 3.7.6 and Fortran. I am trying to output a PETSc vector that contains the solution of a linear system. I am using VecView with the PETSC_VIEWER_ASCII_INDEX format as follows: call PetscViewerASCIIOpen(PETSC_COMM_WORLD,"output.dat",viewer,ierr) call

Re: [petsc-users] Meaning of the order of PETSC_VIEWER_ASCII_INDEX format in PETSc

2018-02-07 Thread Matthew Knepley
On Wed, Feb 7, 2018 at 2:08 PM, Paula Sanematsu wrote: > I am using PETSc 3.7.6 and Fortran. > > I am trying to output a PETSc vector that contains the solution of a > linear system. I am using VecView with the PETSC_VIEWER_ASCII_INDEX format > as follows: > > call

Re: [petsc-users] Meaning of the order of PETSC_VIEWER_ASCII_INDEX format in PETSc

2018-02-07 Thread Paula Sanematsu
I see. Thanks for the explanation. Yes, that's the stage I'm in now. I am developing the code and only testing+validating small samples, so I am trying to visualize the results in Matlab. But in the future, Matlab will probably not be feasible so I will probably need to use the binary format and

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Matthew Knepley
On Wed, Feb 7, 2018 at 1:45 PM, Marco Cisternino < marco.cistern...@optimad.it> wrote: > I'm sorry Matt but I cannot understand what flexible gmres computes when > no null space is created. > Could you give me some hints, please? Even in very simple cases... > I don't think I can clear it up any

Re: [petsc-users] Meaning of the order of PETSC_VIEWER_ASCII_INDEX format in PETSc

2018-02-07 Thread Smith, Barry F.
Here is the code VecView_MPI_ASCII() if (format == PETSC_VIEWER_ASCII_INDEX) { ierr = PetscViewerASCIIPrintf(viewer,"%D: ",cnt++);CHKERRQ(ierr); } #if defined(PETSC_USE_COMPLEX) if (PetscImaginaryPart(xarray[i]) > 0.0) { ierr =

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Matthew Knepley
On Thu, Feb 8, 2018 at 4:43 AM, Marco Cisternino < marco.cistern...@optimad.it> wrote: > Hi everybody, > I would like to ask what solution is computed if I try to solve the linear > system relative to the problem in subject without creating the null space. > I tried with and without the call to >

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Matthew Knepley
On Thu, Feb 8, 2018 at 5:29 AM, Marco Cisternino < marco.cistern...@optimad.it> wrote: > Thanks Matt, > I'm using KSPFGMRES and I'm sorry but what do you mean with initial > residual? > I also force a non-zero initial guess. > If your initial residual has a component in the null space of the

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Marco Cisternino
I'm sorry Matt but I cannot understand what flexible gmres computes when no null space is created. Could you give me some hints, please? Even in very simple cases... Thanks Marco Cisternino, PhD marco.cistern...@optimad.it ___ OPTIMAD Engineering srl Via Giacinto

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Marco Cisternino
Thanks Matt, I'm using KSPFGMRES and I'm sorry but what do you mean with initial residual? I also force a non-zero initial guess. Thanks again Marco Cisternino, PhD marco.cistern...@optimad.it ___ OPTIMAD Engineering srl Via Giacinto Collegno 18, Torino, Italia.

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Smith, Barry F.
A square matrix with a null space results in an underdetermined system, that is a solution with more than one solution. The solutions can be written asx + alpha_1 v_1 + ... alpha_n v_n where the v_n form an orthonormal basis for the null space and x is orthogonal to the null space.

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Marco Cisternino
Barry, thanks a lot! Exactly what I wanted to understand and clearly explained. Again thank you very much. Marco Ottieni Outlook per Android From: Smith, Barry F. Sent: Wednesday, February 7, 2018 8:24:22 PM To: Marco

Re: [petsc-users] petsc and mumps for compute user-specified set of entries in inv(A)

2018-02-07 Thread Hong
Marius : I added MatMumpsGetInverse(), see https://bitbucket.org/petsc/petsc/commits/f5e16c35adb7810c6c977ea1c9cd95e4afb8512b It works in sequential and parallel. It is in the branch hzhang/mumps-invA, and will be merged to petsc-master after it passed our regression tests. Let me know if you

Re: [petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Mark Adams
On Wed, Feb 7, 2018 at 2:24 PM, Smith, Barry F. wrote: > >A square matrix with a null space results in an underdetermined system, > that is a solution with more than one solution. The solutions can be > written asx + alpha_1 v_1 + ... alpha_n v_n where the v_n form an

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >> >> > I have structured cell-centered data and would like to visualize >> >> > this with >> >> Paraview. Up to now I use PetscViewerVTKOpen and VecView to write >> >> data in *.vts format. I would like to tell PETSc that the fieldtype

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Buesing, Henrik
> >> >> > I have structured cell-centered data and would like to visualize > >> >> > this with > >> >> Paraview. Up to now I use PetscViewerVTKOpen and VecView to write > >> >> data in *.vts format. I would like to tell PETSc that the > >> >> fieldtype is PETSC_VTK_CELL_FIELD. I have found >

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Buesing, Henrik
> >> > I have structured cell-centered data and would like to visualize > >> > this with > >> Paraview. Up to now I use PetscViewerVTKOpen and VecView to write > >> data in *.vts format. I would like to tell PETSc that the fieldtype > >> is PETSC_VTK_CELL_FIELD. I have found

[petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Buesing, Henrik
Dear all, I have structured cell-centered data and would like to visualize this with Paraview. Up to now I use PetscViewerVTKOpen and VecView to write data in *.vts format. I would like to tell PETSc that the fieldtype is PETSC_VTK_CELL_FIELD. I have found PetscViewerVTKAddField. Is this the

[petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Buesing, Henrik
Dear all, I would like to write HDF5 and VTK files in parallel. I found Vec example 19: "Parallel HDF5 Vec Viewing". But I do not understand how I tell PETSc to write a DMDA in parallel when doing VecView. At

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: > Dear all, > > I have structured cell-centered data and would like to visualize this with > Paraview. Up to now I use PetscViewerVTKOpen and VecView to write data in > *.vts format. I would like to tell PETSc that the fieldtype is >

[petsc-users] Elliptic operator with Neumann conditions

2018-02-07 Thread Marco Cisternino
Hi everybody, I would like to ask what solution is computed if I try to solve the linear system relative to the problem in subject without creating the null space. I tried with and without the call to MatNullSpaceCreate(m_communicator, PETSC_TRUE, 0, NULL, ); and I get zero averaged solution with

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: > Dear all, > > I would like to write HDF5 and VTK files in parallel. I found Vec example > 19: > "Parallel HDF5 Vec Viewing". But I do not understand

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Buesing, Henrik
>> Can PETSc use parallel HDF5? > Yeah, the implementation is in VecView_MPI_HDF5_DA and uses > H5FD_MPIO_COLLECTIVE if supported. Did you build your HDF5 with MPI? I just --download-hdf5. Do I need to do something else? > > > Regarding VTK: Is it possible that every process dumps his part of

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >> >>> Can PETSc use parallel HDF5? >> >> Yeah, the implementation is in VecView_MPI_HDF5_DA and uses >> >> H5FD_MPIO_COLLECTIVE if supported. Did you build your HDF5 with >> MPI? >> > >> > I just --download-hdf5. Do I need to do

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >> > I have structured cell-centered data and would like to visualize this with >> Paraview. Up to now I use PetscViewerVTKOpen and VecView to write data in >> *.vts format. I would like to tell PETSc that the fieldtype is >>

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Buesing, Henrik
> >>> Can PETSc use parallel HDF5? > >> Yeah, the implementation is in VecView_MPI_HDF5_DA and uses > >> H5FD_MPIO_COLLECTIVE if supported. Did you build your HDF5 with > MPI? > > > > I just --download-hdf5. Do I need to do something else? > > That should configure it with whichever MPI PETSc is

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Buesing, Henrik
> >> >>> Can PETSc use parallel HDF5? > >> >> Yeah, the implementation is in VecView_MPI_HDF5_DA and uses > >> >> H5FD_MPIO_COLLECTIVE if supported. Did you build your HDF5 with > >> MPI? > >> > > >> > I just --download-hdf5. Do I need to do something else? > >> > >> That should configure it with

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Buesing, Henrik
> > I have structured cell-centered data and would like to visualize this with > Paraview. Up to now I use PetscViewerVTKOpen and VecView to write data in > *.vts format. I would like to tell PETSc that the fieldtype is > PETSC_VTK_CELL_FIELD. I have found PetscViewerVTKAddField. > > > > Is this

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >>> Can PETSc use parallel HDF5? >> Yeah, the implementation is in VecView_MPI_HDF5_DA and uses >> H5FD_MPIO_COLLECTIVE if supported. Did you build your HDF5 with MPI? > > I just --download-hdf5. Do I need to do something else? That