Re: [petsc-users] Solve Linear System with Field Split Preconditioner

2022-09-26 Thread Matthew Knepley
Another option are the PCPATCH solvers for multigrid, as shown in this paper: https://arxiv.org/abs/1912.08516 which I believe solves incompressible elasticity. There is an example in PETSc for Stokes I believe. Thanks, Matt On Mon, Sep 26, 2022 at 5:20 AM 晓峰 何 wrote: > Are there other

Re: [petsc-users] Slepc, shell matrix, parallel, halo exchange

2022-09-21 Thread Matthew Knepley
what you mean? > Yes Matt > Thanks, > Feng > > -- > *From:* Jose E. Roman > *Sent:* 21 September 2022 13:07 > *To:* feng wang > *Cc:* Matthew Knepley ; petsc-users@mcs.anl.gov < > petsc-users@mcs.anl.gov> > *Subject:* Re: [petsc-users] Slepc, shell matrix

Re: [petsc-users] Slepc, shell matrix, parallel, halo exchange

2022-09-21 Thread Matthew Knepley
On Wed, Sep 21, 2022 at 7:41 AM feng wang wrote: > Hello, > > I am using Slepc with a shell matrix. The sequential version seems working > and now I am trying to make it run in parallel. > > The partition of the domain is done, I am not sure how to do the halo > exchange in the shell matrix in Sl

Re: [petsc-users] Read and write HDF5 files

2022-09-08 Thread Matthew Knepley
On Thu, Sep 8, 2022 at 7:44 AM Quentin Chevalier < quentin.cheval...@polytechnique.edu> wrote: > Hello PETSc users ! > > I'm trying to use PETSc routine to read and write complex vectors to > binary files in parallel. > > I'm using dolfinx and petsc4py inside a docker container. My end goal is > t

Re: [petsc-users] DMLabel Synchronize

2022-09-07 Thread Matthew Knepley
ell, with the rule that face labels cause any cell in the support to be labeled, and labeling a cell also labels its faces 2) Partition with a cell overlap Thanks, Matt > [image: image.png] > > > Sincerely > Nicholas > > > > On Fri, Sep 2, 2022 at 7:27 AM Mat

Re: [petsc-users] DMLabel Synchronize

2022-09-02 Thread Matthew Knepley
noldm/code/solver-playground/version_upgrade/version_debug.cpp:35 > application called MPI_Abort(MPI_COMM_SELF, 77) - process 0 > [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=77 > : > system msg for write_line failure : Bad file descriptor > > > > On Thu, Se

Re: [petsc-users] DMLabel Synchronize

2022-09-01 Thread Matthew Knepley
lopment work. Thanks, Matt > Thanks > Nicholas > > On Wed, Aug 31, 2022 at 7:45 AM Matthew Knepley wrote: > >> On Tue, Aug 30, 2022 at 6:37 PM Nicholas Arnold-Medabalimi < >> narno...@umich.edu> wrote: >> >>> Hi >>> >>> Tha

Re: [petsc-users] Problem about optimized version

2022-08-31 Thread Matthew Knepley
On Wed, Aug 31, 2022 at 9:40 AM wangxq2020--- via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi > I run the program on the debuged version of PETSC successfuly. Then I want > using the optimized version. And configure by ./configure > --with-debugging=no --with-packages-download-dir=~/package

Re: [petsc-users] DMLabel Synchronize

2022-08-31 Thread Matthew Knepley
On Tue, Aug 30, 2022 at 6:37 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi > > Thanks for all the help. I'm looking to tag several cells based on metrics > occurring at run time. In addition to the metric-defined cells I also want > to label the surrounding cells. This is no prob

Re: [petsc-users] DMPlex Interpolation

2022-08-29 Thread Matthew Knepley
On Mon, Aug 29, 2022 at 10:22 AM Lawrence Mitchell wrote: > On Mon, 29 Aug 2022 at 14:55, Matthew Knepley wrote: > > > > On Sun, Aug 28, 2022 at 7:17 PM Matthew Knepley > wrote: > >> > >> On Sun, Aug 28, 2022 at 5:36 PM Mike Michell > wrote: > >&g

Re: [petsc-users] Passive DM Variables

2022-08-29 Thread Matthew Knepley
On Sun, Aug 28, 2022 at 12:44 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi > > I'm working on a finite volume implementation using DMPlex. I was > wondering what the best-considered way to add cell variables to the DM that > we don't want to be part of the ksp/snes solve. As far

Re: [petsc-users] DMPlex Interpolation

2022-08-28 Thread Matthew Knepley
On Sun, Aug 28, 2022 at 5:36 PM Mike Michell wrote: > Thank you for the reply. > > I think it can be more helpful for me if the attached sample code > (DMInterpolation_Mod.tar) could be checked by you. > Okay, you are right. I will run it tomorrow. Thanks, Matt > If you run the sample

Re: [petsc-users] DMPlex Interpolation

2022-08-28 Thread Matthew Knepley
On Sun, Aug 28, 2022 at 12:11 PM Mike Michell wrote: > Thank you for the reply. > > *I cannot quite understand. Are you saying that you have inhomogeneous > Dirichlet conditions on the boundary, and a 0 guess in the interior, and > you get all zeros from interpolation? Yes, we have no way of gett

Re: [petsc-users] DMPlex Interpolation

2022-08-28 Thread Matthew Knepley
On Sun, Aug 28, 2022 at 8:51 AM Mike Michell wrote: > Hi, thank you for the reply. > > I was able to manage mapping from cell-center to vertex. Basically, in > Fortran, it seems DMCreateInterpolation() requires the optional scaling > vector as a mandatory argument, which is strange. > It needs a

Re: [petsc-users] ./test1: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directory.

2022-08-27 Thread Matthew Knepley
On Sat, Aug 27, 2022 at 7:17 AM wangxq2020--- via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi > > Submitting a program fails by srun using slurm. This is my command > srun -n 8 --partition=test --qos=testqos ./test1 -options_file > options/test1.opts > and returns > ./test1: error while loa

Re: [petsc-users] DMPlex Interpolation

2022-08-26 Thread Matthew Knepley
On Thu, Aug 25, 2022 at 7:12 PM Mike Michell wrote: > Hi, this is a duplication of > https://lists.mcs.anl.gov/pipermail/petsc-users/2022-August/046746.html > for in-depth question. > > I wrote a short code as attached to test interpolation between two DMPlex > objects. Goal is to map solution fi

Re: [petsc-users] DMPlex in Fortran

2022-08-26 Thread Matthew Knepley
On Thu, Aug 25, 2022 at 4:25 PM Mike Michell wrote: > Thank you for the quick note. > To use PetscFECreateLagrange(), it is unclear about the meaning of "Nc", > which is explained as 'number of components' on the manual page. > I looked at an example with Nc=1 in > src/dm/impls/swarm/tutorials/ex

Re: [petsc-users] [petsc-maint] metis version of petsc - segmentation fault

2022-08-25 Thread Matthew Knepley
On Thu, Aug 25, 2022 at 1:08 PM Matthew Knepley wrote: > On Thu, Aug 25, 2022 at 12:38 PM Alexandre Halbach < > alexandre.halb...@gmail.com> wrote: > >> Hello, >> >> I am using the metis package provided by the latest petsc version, using >> --download-m

Re: [petsc-users] [petsc-maint] metis version of petsc - segmentation fault

2022-08-25 Thread Matthew Knepley
On Thu, Aug 25, 2022 at 12:38 PM Alexandre Halbach < alexandre.halb...@gmail.com> wrote: > Hello, > > I am using the metis package provided by the latest petsc version, using > --download-metis (Linux, 32 bits). This question is arguably more a metis > issue but since metis is used in petsc and mu

Re: [petsc-users] DMPlex in Fortran

2022-08-25 Thread Matthew Knepley
On Thu, Aug 25, 2022 at 12:52 PM Mike Michell wrote: > Hi, I am trying to find the function you commented, > DMPlexCreateInterpolator(), from DMPlex manual page, but I do not think > this function is visible. Any comment about this? > Sorry, it is DMCreateInterpolation(), which in turn calls DMP

Re: [petsc-users] PETSc on fedora 36

2022-08-23 Thread Matthew Knepley
otection -fcf-protection -O3 > -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches > -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 > -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 > -fstack-protector-strong -specs=/usr/

Re: [petsc-users] PETSc on fedora 36

2022-08-23 Thread Matthew Knepley
R}/lib/petsc/conf/rules Thanks, Matt > Best regards, > > Rafel Amer > > > > > El 23/8/22 a les 14:46, Matthew Knepley ha escrit: > > Can you run anything in parallel? Say the small sample code that > calculates pi? > > > https://www.cs.usfca.edu/

Re: [petsc-users] PETSc on fedora 36

2022-08-23 Thread Matthew Knepley
Can you run anything in parallel? Say the small sample code that calculates pi? https://www.cs.usfca.edu/~mmalensek/cs220/schedule/code/week09/pi-mpi.c.html Thanks, Matt On Tue, Aug 23, 2022 at 6:34 AM Rafel Amer Ramon wrote: > > Hi, > > mpicc and mpirun are from the package openmpi-

Re: [petsc-users] Preallocating a matrix with the d_nnz and o_nnz arrays

2022-08-23 Thread Matthew Knepley
On Mon, Aug 22, 2022 at 12:12 PM Patrick Alken wrote: > Thank you, I have read that document. I have changed my criteria to: > > > if (j >= first && (j - first) < m) { > As Barry says, this should be if ((j >= first) && (j < last)) { > /*diagonal*/ > > else > > /*off-diagonal*/ > > > It se

Re: [petsc-users] DMPlex Transitive closure

2022-08-18 Thread Matthew Knepley
On Wed, Aug 17, 2022 at 8:31 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Good Morning > > I have been working with the transitive closure to check to see if a node > point has a cell that is rooted on a process. However, I think I am having > a more fundamental issue. Even just ca

Re: [petsc-users] Configure error with PETSc 3.17.4 on Ubuntu 22.04

2022-08-12 Thread Matthew Knepley
try removing and reconfiguring? Then I can see everything. Thanks, Matt > Regarding 2.: We need --with-clanguage=cxx since we're also using an > external C++ library (libMesh). We've been using --with-clanguage=cxx in > PETSc with libMesh for years... > > > >

Re: [petsc-users] Configure error with PETSc 3.17.4 on Ubuntu 22.04

2022-08-12 Thread Matthew Knepley
On Fri, Aug 12, 2022 at 1:14 PM David Knezevic via petsc-users < petsc-users@mcs.anl.gov> wrote: > I get a configure error when building PETSc 3.17.4 on Ubuntu 22.04. The > configure.log is attached. > > This error seems to only occur when we use --with-clanguage=cxx. We need > to use that object

Re: [petsc-users] DMDA ghosted boundary

2022-08-12 Thread Matthew Knepley
On Fri, Aug 12, 2022 at 9:27 AM David Scott wrote: > On 12/08/2022 11:26, Matthew Knepley wrote: > > This email was sent to you by someone outside the University. > You should only click on links or attachments if you are certain that the > email is genuine and the content is safe

Re: [petsc-users] DMDA ghosted boundary

2022-08-12 Thread Matthew Knepley
On Fri, Aug 12, 2022 at 2:21 AM Quynh Nguyen wrote: > Dear petsc developers and users, > > I am a new petsc user ^_^. > I have some questions about using DMDA_BOUNDARY_GHOSTED. > > 1. I have 2D Poisson code with domain (nx, ny), and I used > DMDA_BOUNDARY_NONE, then the size of the matrix is (nx*

Re: [petsc-users] PetscSF leaf ordering behaviour

2022-08-11 Thread Matthew Knepley
On Wed, Aug 10, 2022 at 10:00 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi > > I have been working on writing an output of a DMPlex object to interface > with an existing code that has some strict requirements. I need each > process to output its partition vertices and cell map

Re: [petsc-users] Issue to set values to a matrix in parallel in python

2022-08-09 Thread Matthew Knepley
On Tue, Aug 9, 2022 at 11:12 AM Stefano Zampini wrote: > PETSc distributes matrices and vectors in parallel. Take a look at > https://petsc.org/release/docs/manualpages/Vec/VecGetOwnershipRange.html Longer explanation: Vectors are distributed by giving a stretch of contiguous rows to each proc

Re: [petsc-users] Some issues about DMDA and MatSetValuesStencil

2022-08-03 Thread Matthew Knepley
On Wed, Aug 3, 2022 at 9:17 AM wangxq2020--- via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hello! > I am a beginner about petsc,and I'm studing the DMDA recently. I hava a > exercise code below, i run it with 4 processes, why is the size of A matrix > is 15×15? > Are you sure it is not 16x1

Re: [petsc-users] DMPlex total point counts

2022-08-03 Thread Matthew Knepley
On Tue, Aug 2, 2022 at 4:00 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi > > Currently, in my distributed DMPlex object, every so often, I want to look > at total cell counts. To do this in my current implementation, I get the > cell stratum from the DMplex and search through th

Re: [petsc-users] DMPlex PETSCViewer for Surface Component

2022-08-02 Thread Matthew Knepley
Yes, you can use DMPlexCreateSubmesh() (and friends depending on exactly what kind of submesh you want). This will allow you to create a vector over only this mesh, and map your volumetric solution to that subvector. Then you can view the subvector (which pulls in the submesh). Thanks, Mat

Re: [petsc-users] About Preallocation for MPI matrix

2022-08-01 Thread Matthew Knepley
On Mon, Aug 1, 2022 at 11:45 AM E. Ekici wrote: > Hi, > > I would like to preallocate my highly sparse matrices to get speed up > during assembling. > > Up to 7x7, it works fine in parallel. > > But when I exceed around 7 rows/columns, I receive following error at > preallocation line

Re: [petsc-users] Newton line search options

2022-07-29 Thread Matthew Knepley
On Thu, Jul 28, 2022 at 6:16 PM Tang, Qi wrote: > Hi, > > Is there some in depth review on different options related to line search > of snes newtonls? Our solvers are sensitive to the choices there, and I > could not understand why one works better than the other or how to tune > those options.

Re: [petsc-users] DMPlex Reordering

2022-07-25 Thread Matthew Knepley
On Mon, Jul 25, 2022 at 10:11 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Petsc users, > > I have been working on how to read in meshes into a DMPlex object. The > process of building the cones has been relatively straightforward. The mesh > files in question have sets of faces

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-25 Thread Matthew Knepley
> DMPlexDistribute in your case) to a natural Vec (before DMPlexDistribute) >> including constraint dofs. >> Best, >> Alexis >> --- >> Alexis Marboeuf >> Postdoctoral fellow, Department of Mathematics &a

Re: [petsc-users] Adding more dofs to the coordinate DM crashes with either PetscSectionSetDof or PetscSectionFieldDof

2022-07-24 Thread Matthew Knepley
On Sun, Jul 24, 2022 at 8:46 AM Duan Junming via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear all, > > > I want to add more dofs to the coordinate DM to represent a curved mesh. > > I first create a simple box mesh with one cell: > > > PetscCall(DMCreate(comm, &dm)); > PetscCall(DMSetT

Re: [petsc-users] Please Help Petsc, HDF5, MATLAB

2022-07-22 Thread Matthew Knepley
On Fri, Jul 22, 2022 at 1:32 PM Ahmed Mansur wrote: > I configured PETSC by downloading the HDF5 library but in my project the > functions that this library has are not recognized. > I am trying to use this library to import sparse matrices from MATLAB. > Thank you very much for the help. > Send

Re: [petsc-users] Install PETSc with other libraries via package manager

2022-07-21 Thread Matthew Knepley
in that case. > Can you build in scratch and install to user space? Thanks, Matt > On Thu, 21 Jul 2022 at 5:34 PM, Matthew Knepley wrote: > >> On Thu, Jul 21, 2022 at 5:16 AM Prateek Gupta >> wrote: >> >>> Hi, >>> I have a restriction of ins

Re: [petsc-users] Install PETSc with other libraries via package manager

2022-07-21 Thread Matthew Knepley
On Thu, Jul 21, 2022 at 5:16 AM Prateek Gupta wrote: > Hi, > I have a restriction of installing petsc on a community cluster only via > package manager (APT). But it needs to be configured with lapack and > parmetis. Is there a way to do this without building from source? > Can you just install

Re: [petsc-users] Efficiently build a matrix from two asymmetric diagonal block matrices

2022-07-21 Thread Matthew Knepley
On Thu, Jul 21, 2022 at 6:28 AM Emile Soutter wrote: > Dear all, > > I am struggling with the simple following problem : Having a first matrix > B1 of size n1xm1, a second matrix B2 of size n2 x m2, build a matrix M of > size (n1+n2)x(m1+m2) where the blocks B1 and B2 are the "diagonal" of M > (M

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-20 Thread Matthew Knepley
reation of the natural SF raises >> an error (duplicate leave entries) when the section includes constraint >> dofs. I will submit a MR very soon about that. But it will be merged to >> main. >> >> Does this help? >> >> Best >> --- >> Alexis Marboeuf >> Postdocto

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-18 Thread Matthew Knepley
mber of roots is the number of local dofs in the global vector. So there would not be 15, which you say is the global number of unknowns, but rather the local number of unknowns, which it seems here is 10. Thanks, Matt > Best > > On Mon, Jul 18, 2022 at 6:50 PM Matthew Knepley wrot

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-18 Thread Matthew Knepley
fining your Section now? Thanks, Matt > Best > > On Mon, Jul 18, 2022 at 3:50 PM Matthew Knepley wrote: > >> On Mon, Jul 18, 2022 at 12:14 PM Bora Jeong wrote: >> >>> Thank you for the corrections. It works. >>> >>> However, I stil

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-18 Thread Matthew Knepley
understand your question. I am not sure what you are using the set of vertices or cell for. Thanks, Matt > Best > > On Sun, Jul 17, 2022 at 9:59 AM Matthew Knepley wrote: > >> On Fri, Jul 15, 2022 at 7:05 PM Bora Jeong wrote: >> >>> I found that iroots()

Re: [petsc-users] [DMCreate from a Gmsh with mixed mesh crash for DMPlex]

2022-07-18 Thread Matthew Knepley
On Thu, Jul 14, 2022 at 6:33 PM Mike Michell wrote: > VTK format itself supports pyramids for sure. But I do not think PETSc > output part through VTK format does not. Is there any possibility to debug > this issue? > VTK output now works with pyramids in https://gitlab.com/petsc/petsc/-/merg

Re: [petsc-users] Generating data on dmplex with varying DOFs

2022-07-17 Thread Matthew Knepley
hD > > > On Sun, Jul 17, 2022 at 7:59 PM Matthew Knepley wrote: > >> On Sun, Jul 17, 2022 at 7:41 AM Prateek Gupta >> wrote: >> >>> Thanks! >>> On a similar note, is it possible to define data on faces of a parallel >>> (distributed) dmplex? I

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-17 Thread Matthew Knepley
tely, Fortran is not very good at reporting declaration errors. The problem is that you did not include or use the Vec module. I have done this and your example runs for me. I have included the modified code. Thanks, Matt > Best > > On Fri, Jul 15, 2022 at 3:53 PM Matthew Knepley w

Re: [petsc-users] Generating data on dmplex with varying DOFs

2022-07-17 Thread Matthew Knepley
erence), where finite volume implementation is the zeroth order special > case. > How is SD different from a spectral element method, with respect to data layout and communication? Thanks, Matt > Thank you. > Sincerely, > Prateek Gupta, PhD > > > On Fri, Jul 15, 202

Re: [petsc-users] Nodes coordinates in distributed dmplex

2022-07-16 Thread Matthew Knepley
ion that you get from DMGetGlobalSection(). You can put any mesh point into the Section and get back an index using PetscSectionGetOffset(). Maybe give me a more specific example and I can help write some code. Thanks, Matt On Fri, Jul 10, 2015 at 11:14 AM Matthew Knepley wrote: > >

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-15 Thread Matthew Knepley
ssors? or the number of vertex? > Since we need to pass back arrays, you need to pass us in F90 pointers. Here is an example of doing such a thing: https://gitlab.com/petsc/petsc/-/blob/main/src/vec/is/sf/tutorials/ex1f.F90#L94 Thanks, Matt > Best > > On Fri, Jul 15, 2022

Re: [petsc-users] PETSc / AMRex

2022-07-15 Thread Matthew Knepley
On Fri, Jul 15, 2022 at 2:12 PM Randall Mackie wrote: > > > On Jul 15, 2022, at 11:58 AM, Matthew Knepley wrote: > > On Fri, Jul 15, 2022 at 1:46 PM Randall Mackie > wrote: > >> On Jul 15, 2022, at 11:20 AM, Matthew Knepley wrote: >> >> On Fri,

Re: [petsc-users] PETSc / AMRex

2022-07-15 Thread Matthew Knepley
On Fri, Jul 15, 2022 at 1:46 PM Randall Mackie wrote: > On Jul 15, 2022, at 11:20 AM, Matthew Knepley wrote: > > On Fri, Jul 15, 2022 at 11:01 AM Randall Mackie > wrote: > >> I am also interested in converting my DMDA code to DMPlex so that I can >> use OcTree gri

Re: [petsc-users] PETSc / AMRex

2022-07-15 Thread Matthew Knepley
On Fri, Jul 15, 2022 at 11:01 AM Randall Mackie wrote: > I am also interested in converting my DMDA code to DMPlex so that I can > use OcTree grids. > > Is there a simple example that would show how to do a box grid in DMPlex, > or more information about how to convert a DMDA grid to DMPlex? > H

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-15 Thread Matthew Knepley
point distribution, which is in the same order as the file, to the redistributed points, which are determined by the mesh partitioner. Thanks, Matt > Best > > > On Fri, Jul 15, 2022 at 8:07 AM Matthew Knepley wrote: > >> On Fri, Jul 15, 2022 at 7:17 AM Bora Jeong wr

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-15 Thread Matthew Knepley
I do not see a simpler way to do things. Thanks, Matt > Best > > On Fri, Jul 15, 2022 at 6:39 AM Matthew Knepley wrote: > >> On Thu, Jul 14, 2022 at 8:25 PM Bora Jeong wrote: >> >>> Okay, I checked it and you are correct. In my case, simply, natural node &

Re: [petsc-users] Generating data on dmplex with varying DOFs

2022-07-15 Thread Matthew Knepley
On Fri, Jul 15, 2022 at 7:08 AM Prateek Gupta wrote: > Hi, > Is it possible to generate data using PetscSection with varying degrees of > freedom? I am building a sample example on a mixed grid (with both > hexahedra and tetrahedra) and thinking if it is possible to generate the > face data using

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-15 Thread Matthew Knepley
guarantee > of consistency in this weird behavior. > I can't tell what is going on in your code unless I can run it. Do you have a simple example? Thanks, Matt > Best, > > On Thu, Jul 14, 2022 at 6:43 PM Matthew Knepley wrote: > >> On Thu, Jul 14, 2022

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-14 Thread Matthew Knepley
PetscSFView(sf_nat, PETSC_VIEWER_STDOUT_WORLD, ierr);CHKERRA(ierr) > The natural SF is created during mesh distribution. That has not happened here. This means that the order of cells is identical to the file it was read from. Thanks, Matt > Best > > On Thu, Jul 14, 2022 at

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-14 Thread Matthew Knepley
On Wed, Jul 13, 2022 at 10:17 PM Bora Jeong wrote: > Dear petsc team, > > I am a user of DMPlex for a finite volume code and there is a necessity to > know global index of each cell. Here the global index means the indexing > that can be found from a mesh file itself without distribution over > p

Re: [petsc-users] [DMCreate from a Gmsh with mixed mesh crash for DMPlex]

2022-07-13 Thread Matthew Knepley
On Wed, Jul 13, 2022 at 4:18 PM Mike Michell wrote: > Before your pull request merged to main, I copied your change to my local > /src/dm/impls/plex/plexgmsh.c to test pyramids. > > Loading DMPlex with the mesh including pyramids works okay, but printing > out the solution field to .vtk or .vtu f

Re: [petsc-users] [DMCreate from a Gmsh with mixed mesh crash for DMPlex]

2022-07-13 Thread Matthew Knepley
On Wed, Jul 13, 2022 at 11:18 AM Mike Michell wrote: > Attached is a mixed mesh file that I am testing. I cannot see any special > marker for pyramid cells. Version of gmsh is 4.9.0. > You are correct. Pyramids were disabled. I have activated them here: https://gitlab.com/petsc/petsc/-/merge_

Re: [petsc-users] [DMCreate from a Gmsh with mixed mesh crash for DMPlex]

2022-07-13 Thread Matthew Knepley
On Wed, Jul 13, 2022 at 10:41 AM Mike Michell wrote: > Thank you for the quick response. Below is the full error message I get. > > > [0]PETSC ERROR: - Error Message > -- > [0]PETSC ERROR: Argument out of range > [0]P

Re: [petsc-users] DMPlexCreateSection crashed with larger number of processors

2022-07-13 Thread Matthew Knepley
MGetStratumIS(). >>> The petscsection building part is >>> from src/dm/impls/plex/tutorials/ex1f90.F90 (See line 72). >>> >> >> That looks like you are putting all cells in the IS. Is that what you >> want? >> >> Thanks, >> >> M

Re: [petsc-users] [DMCreate from a Gmsh with mixed mesh crash for DMPlex]

2022-07-13 Thread Matthew Knepley
On Wed, Jul 13, 2022 at 10:30 AM Mike Michell wrote: > Hi, DMCreate() is used to load/distribute grid built from gmsh, and the > function crashes when a mixed mesh of tetra and pyramids in 3D. It looks > PETSc can handle the cell types of > Tetra/Hexa/Prism/Pyramids/Polygon/Polyhedra in 3D. Thus

Re: [petsc-users] DMPlex in Fortran

2022-07-13 Thread Matthew Knepley
On Wed, Jul 13, 2022 at 10:13 AM Mike Michell wrote: > Thank you for updating. In the latest release, where can I find that > specific Fortran binding file? > It is auto-generated src/dm/interface/ftn-auto/dmf.c Thanks, Matt > Thanks, > Mike > > >> On Fri, Jul 8, 2022 at 10:26 PM Mik

Re: [petsc-users] DMPlexCreateSection crashed with larger number of processors

2022-07-13 Thread Matthew Knepley
etscsection building part is > from src/dm/impls/plex/tutorials/ex1f90.F90 (See line 72). > That looks like you are putting all cells in the IS. Is that what you want? Thanks, Matt > >> On Sat, Jul 9, 2022 at 8:34 AM Matthew Knepley wrote: >> >>> On Fri,

Re: [petsc-users] Strange strong scaling result

2022-07-12 Thread Matthew Knepley
Rate (MB/s) 9.81453 > 32 84097.0813 Rate (MB/s) 10.1426 > > > Best, > Ce > > Mark Adams 于2022年7月12日周二 22:11写道: > >> You may get more memory bandwidth with 32 processors vs 1, as Ce >> mentioned. >> Depends on the architecture. >> Do you get the whole

Re: [petsc-users] DMPlexCreateSection crashed with larger number of processors

2022-07-12 Thread Matthew Knepley
On Sat, Jul 9, 2022 at 8:34 AM Matthew Knepley wrote: > On Fri, Jul 8, 2022 at 7:41 PM Mike Michell wrote: > >> As a follow-up, just "depth" default label was provided to avoid NULL >> PETScIS, and it seems working. >> > > Ah, "depth" is def

Re: [petsc-users] DMPlex in Fortran

2022-07-12 Thread Matthew Knepley
On Fri, Jul 8, 2022 at 10:26 PM Mike Michell wrote: > I am using DMPlex for a code with written in Fortran in 2D and 3D. There > were two questions. > > - As a follow up of the previous inquiry: > https://www.mail-archive.com/petsc-users@mcs.anl.gov/msg43856.html > Is the local-to-local halo exch

Re: [petsc-users] Strange strong scaling result

2022-07-12 Thread Matthew Knepley
On Tue, Jul 12, 2022 at 7:32 AM Ce Qin wrote: > > The linear system is complex-valued. We rewrite it into its real form and solve it using FGMRES and an optimal block-diagonal preconditioner. We use CG and the AMS preconditioner implemented in HYPRE to solve the smaller real l

Re: [petsc-users] Solving singular system via direct solvers

2022-07-12 Thread Matthew Knepley
On Tue, Jul 12, 2022 at 4:34 AM Ye Changqing wrote: > Dear all, > > I have a linear system constructed from discretizing a Neumann boundary > value problem, and I want to solve it with a direct solver (to build up my > own preconditioner). Usually, KSP returns a good solution without '-inf', > wh

Re: [petsc-users] Strange strong scaling result

2022-07-12 Thread Matthew Knepley
M DoFs on one core/thread is huge. >> 37x on assembly is probably cache effects. >> >> On Mon, Jul 11, 2022 at 1:09 PM Matthew Knepley >> wrote: >> >>> On Mon, Jul 11, 2022 at 10:34 AM Ce Qin wrote: >>> >>>> Dear all, >>>&

Re: [petsc-users] Creating dmplex in every rank and redistributing

2022-07-11 Thread Matthew Knepley
an see from the khash docs what those functions do. GetElems() reads out everything in the hash set, updating the offset into the given array. Thanks, Matt > Thank you. > Sincerely, > Prateek Gupta, PhD > > > On Mon, Jul 11, 2022 at 5:19 PM Matthew Knepley wrote: >

Re: [petsc-users] Strange strong scaling result

2022-07-11 Thread Matthew Knepley
On Mon, Jul 11, 2022 at 10:34 AM Ce Qin wrote: > Dear all, > > I want to analyze the strong scaling of our in-house FEM code. > The test problem has about 20M DoFs. I ran the problem using > various settings. The speedups for the assembly and solving > procedures are as follows: >

Re: [petsc-users] Creating dmplex in every rank and redistributing

2022-07-11 Thread Matthew Knepley
ecause they are made by the preprocessor from a 3rd party package. We broke the links when we moved all the documentation to Sphinx. I will see if I can fix them. Thanks, Matt > Thank you. > Sincerely, > Prateek Gupta > > > On Mon, Jul 4, 2022 at 6:09 PM Matthew Knepley

Re: [petsc-users] DMPlex in Fortran

2022-07-09 Thread Matthew Knepley
On Fri, Jul 8, 2022 at 11:26 PM Mike Michell wrote: > I am using DMPlex for a code with written in Fortran in 2D and 3D. There > were two questions. > > - As a follow up of the previous inquiry: > https://www.mail-archive.com/petsc-users@mcs.anl.gov/msg43856.html > Is the local-to-local halo exch

Re: [petsc-users] DMPlexCreateSection crashed with larger number of processors

2022-07-09 Thread Matthew Knepley
On Fri, Jul 8, 2022 at 7:41 PM Mike Michell wrote: > As a follow-up, just "depth" default label was provided to avoid NULL > PETScIS, and it seems working. > Ah, "depth" is definitely required and is produced by DMPlexStratify(). I will put in a check for this so that you get a good error messag

Re: [petsc-users] DMPlexCreateSection crashed with larger number of processors

2022-07-06 Thread Matthew Knepley
On Wed, Jul 6, 2022 at 3:42 PM Mike Michell wrote: > I am passing NULL for IS Permutation as; > > call > DMPlexCreateSection(dm_geom,nolabel,pNumComp,pNumDof,numBC,pBcField,pBcCompIS,pBcPointIS,PETSC_NULL_IS,section,ierr) > > Should I define non-NULL IS Permutation before I call > DMPlexCreateSec

Re: [petsc-users] DMPlexCreateSection crashed with larger number of processors

2022-07-06 Thread Matthew Knepley
On Wed, Jul 6, 2022 at 12:57 PM Mike Michell wrote: > Hi, I am using DMPlex for a FVM code written in Fortran that uses > DMPlexCreateSection() to prepare an output file in vtu format. A domain of > interest has around 5000 node points and with small number of processors > (such as nproc=3), the

Re: [petsc-users] [PCGAMG + AGG + GMRES] Non-Exact Dirichlet Boundary Conditions

2022-07-06 Thread Matthew Knepley
On Wed, Jul 6, 2022 at 7:46 AM Karabelas, Elias (elias.karabe...@uni-graz.at) wrote: > Dear all, > > I don't know if this is a bug, but I observed that when using GMRES with > AGG-PCGAMG as preconditioner Dirichlet boundary conditions don't seem to be > exactly fulfilled. > > My Matrix has zero r

Re: [petsc-users] Creating dmplex in every rank and redistributing

2022-07-04 Thread Matthew Knepley
On Mon, Jul 4, 2022 at 2:29 AM Prateek Gupta wrote: > Hi, > > Using dmplex, I am trying to create an example where I can start with a > poor distribution of an unstructured mesh (reading from a file in parallel) > and then use redistribution to optimize it. > You can call DMPlexDistribute() on a

Re: [petsc-users] Solving Laplacian on complicated domain

2022-07-04 Thread Matthew Knepley
On Mon, Jul 4, 2022 at 1:29 AM BOYD Andrew via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear PETSc users, > > > > I am a PhD student looking to solve a Laplacian on a 3D domain which > consists of a volume with ellipsoid “holes” in it. I am a newcomer to > PETSc, and would like advice on ho

Re: [petsc-users] DMPlex ghost cell indexing

2022-07-03 Thread Matthew Knepley
&g0, &g1); > PetscViewerASCIIPrintf(viewerstdout, "Cells:p0:%d ,p1:%d \n", c0, > c1); > PetscViewerASCIIPrintf(viewerstdout, "Faces:p0:%d ,p1:%d \n", f0, > f1); > PetscViewerASCIIPrintf(viewerstdout, "Edges:p0:%d ,p1:%d \n",

Re: [petsc-users] DMPlex ghost cell indexing

2022-07-02 Thread Matthew Knepley
On Sat, Jul 2, 2022 at 6:20 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Dear PETSc users, > > I have some general novice questions regarding how to properly access a > distributed DMPLEX vector that has ghost cells for a finite volume use case. > > My process for setup > 1) genera

Re: [petsc-users] DMPlexInterpolate error nonconforming object sizes

2022-07-02 Thread Matthew Knepley
On Sat, Jul 2, 2022 at 7:34 AM Matthew Knepley wrote: > On Sat, Jul 2, 2022 at 7:15 AM Prateek Gupta > wrote: > >> Hi Matt, >> you are right about the first DM being invalid. I wasn't reading the >> cells properly. But now that I have fixed it, the code seems t

Re: [petsc-users] DMPlexInterpolate error nonconforming object sizes

2022-07-02 Thread Matthew Knepley
gt; Sincerely, > Prateek Gupta, PhD > > > On Sat, Jul 2, 2022 at 4:37 PM Matthew Knepley wrote: > >> On Sat, Jul 2, 2022 at 3:11 AM Prateek Gupta >> wrote: >> >>> Hi, >>> I am trying to create a minimal example of reading nodes and elements >&g

Re: [petsc-users] DMPlexInterpolate error nonconforming object sizes

2022-07-02 Thread Matthew Knepley
On Sat, Jul 2, 2022 at 3:11 AM Prateek Gupta wrote: > Hi, > I am trying to create a minimal example of reading nodes and elements from > a text file and creating dmplex mesh. So far I am following the procedure > as in plexfluent.c. However, while trying to interpolate the mesh, I get > the error

Re: [petsc-users] KPS and linear complex equation system

2022-06-29 Thread Matthew Knepley
On Wed, Jun 29, 2022 at 2:24 PM Tu, Jiannan wrote: > I have a quick question. Petsc can be configured with complex number. can > KSP then be used to solve linear equations of complex number, that is, both > the matrix elements and solutions are complex, directly without separation > real and imag

Re: [petsc-users] List of points with dof>0 in a PetscSection

2022-06-28 Thread Matthew Knepley
On Fri, Jun 10, 2022 at 4:06 PM Blaise Bourdin wrote: > Hi, > > Given a PetscSection, is there an easy way to get a list of point at which > the number of dof is >0? > For instance, when projecting over a FE space, I’d rather do a loop over > such points than do a loop over all points in a DM, ge

Re: [petsc-users] Load mesh as DMPlex along with Solution Fields obtained from External Codes

2022-06-28 Thread Matthew Knepley
On Wed, Jun 8, 2022 at 12:15 AM Mike Michell wrote: > Dear PETSc developer team, > > I am a user of PETSc DMPlex for a finite-volume solver. So far, I have > loaded a mesh file made by Gmsh as a DMPlex object without pre-computed > solution field. > But what if I need to load the mesh as well as

Re: [petsc-users] PETSc / AMRex

2022-06-21 Thread Matthew Knepley
On Tue, Jun 21, 2022 at 10:01 AM Mark Adams wrote: > Hi Bernigaud, > > To be clear, you have SNES working with DMDA in AMRex, but > without adapting dynamically and you want to know what to do next. > > Is that right? > I will let Mark answer the AMReX question since he is more knowledgeable. I

Re: [petsc-users] How to find the map between the high order coordinates of DMPlex and vertex numbering?

2022-06-18 Thread Matthew Knepley
: sum component (sumcomp_) 1 MPI processes >> type: poly >> Space in 3 variables with 1 components, size 10 >> Polynomial space of degree 2 >> PetscDualSpace Object: P2 1 MPI processes >> type: lagrange >> Dual space with 3 components

Re: [petsc-users] Customizing NASM subsnes

2022-06-17 Thread Matthew Knepley
shes object to a Unix socket > (PetscOptionsGetViewer) > -sub_0_snes_view_solution saws[:communicatorname]: Publishes object to > SAWs (PetscOptionsGetViewer) > Option left: name:-sub_0_ksp_type value: gmres > > > Do you know what could be causing this? > > On Fri, Jun 17, 202

Re: [petsc-users] Customizing NASM subsnes

2022-06-17 Thread Matthew Knepley
is error doesn't occur when I run this without MPI. However, I tried to > change the prefix of the subdomain to `sub_0_` but I am not able to change > the snes_type using this prefix. Running ./test1 -snes_view -help | grep > sub_0_snes_type prints nothing. > > On Thu, Jun 16, 2022 at 6:

Re: [petsc-users] Customizing NASM subsnes

2022-06-16 Thread Matthew Knepley
On Thu, Jun 16, 2022 at 5:57 PM tt73 wrote: > > Hi, > > I am using NASM as the outer solver for a nonlinear problem. For one of > the subdomains, I want to run the local solve with a different set of > options form the others. Is there any way to set options for each > subdomain? > I can see tw

Re: [petsc-users] How to find the map between the high order coordinates of DMPlex and vertex numbering?

2022-06-16 Thread Matthew Knepley
On Thu, Jun 16, 2022 at 12:06 PM Zongze Yang wrote: > > > 在 2022年6月16日,23:22,Matthew Knepley 写道: > >  > On Thu, Jun 16, 2022 at 11:11 AM Zongze Yang wrote: > >> Hi, if I load a `gmsh` file with second-order elements, the coordinates >> will be stored in a

Re: [petsc-users] How to find the map between the high order coordinates of DMPlex and vertex numbering?

2022-06-16 Thread Matthew Knepley
On Thu, Jun 16, 2022 at 11:11 AM Zongze Yang wrote: > Hi, if I load a `gmsh` file with second-order elements, the coordinates > will be stored in a DG-P2 space. After obtaining the coordinates of a cell, > how can I map the coordinates to vertex and edge? > By default, they are stored as P2, not

<    3   4   5   6   7   8   9   10   11   12   >