[petsc-users] DMPlex Interpolation

2022-08-25 Thread Mike Michell
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 field defined on cell-centroid(DMPlex-1) into vertex(DMPlex-2)

Re: [petsc-users] DMPlex in Fortran

2022-08-25 Thread Mike Michell
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/ex1f90.F90, but could you please detail the meaning of Nc? If

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-metis (Linux, 32 bits). This question is

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

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

Re: [petsc-users] DMPlex in Fortran

2022-08-25 Thread Mike Michell
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? Thanks, > On Fri, Jul 8, 2022 at 11:26 PM Mike Michell > wrote: > >> I am using DMPlex for a code with written in Fortran

Re: [petsc-users] Slepc Question, shell-matrix

2022-08-25 Thread Jose E. Roman
Your formula (R(q+epsilon*v) - R(q-epsilon*v))/(2*epsilon). is not linear, it cannot be expressed as a constant matrix times a vector, A*v. If you want to solve a nonlinear eigenvector problem A(x)*x=lambda*x then have a look at ex34.c

Re: [petsc-users] Slepc Question, shell-matrix

2022-08-25 Thread feng wang
Hi Jose, Following my previous email, just some update, the epsilon actually does not change in my shell matrix to compute the finite difference Jacobian. I don't have an iterative procedure in the shell matrix. It simply computes the non-linear residuals twice with perturbed flow variables.

Re: [petsc-users] unable to build petsc with cuda / superlu-dist enabled

2022-08-25 Thread Jacob Faibussowitsch
> Sadly each one makes different -std=c++11 vs -std=c++14 choices as well. Main should hopefully *also* warn about this, but unless you really really want -std=c++11 or -std=c++14, it is better to leave out this configure flag (--with-cxx-dialect). If --with-cxx-dialect is unspecified (or

Re: [petsc-users] unable to build petsc with cuda / superlu-dist enabled

2022-08-25 Thread Barry Smith
Oh yes, my mistake I misinterpreted the error message. It is actually the nvcc compiler complaining about multiple command line arguments related to optimization (which it is really picky about even if the two arguments are identical.) I reformatted some of the configure output to show this

Re: [petsc-users] unable to build petsc with cuda / superlu-dist enabled

2022-08-25 Thread byron
Hi Barry There doesn't appear to be any reference to 'optimize' in the only copy of superlu_gpu_utils.cu I could find, I've attached a copy. Thanks On Thu, Aug 25, 2022 at 1:44 PM Barry Smith wrote: > > nvcc fatal : redefinition of argument 'optimize' > make[2]: ***

Re: [petsc-users] unable to build petsc with cuda / superlu-dist enabled

2022-08-25 Thread Barry Smith
nvcc fatal : redefinition of argument 'optimize' make[2]: *** [SRC/CMakeFiles/superlu_dist.dir/build.make:499: SRC/CMakeFiles/superlu_dist.dir/superlu_gpu_utils.cu.o] Error 1 make[2]: *** Waiting for unfinished jobs nvcc fatal : redefinition of argument 'optimize' make[2]: ***

Re: [petsc-users] Slepc Question, shell-matrix

2022-08-25 Thread feng wang
Hi Jose, Thanks for your explanation. It's very helpful! In my shell matrix, I am using finite difference to approximate the matrix-vector product. such as A*v = (R(q+epsilon*v) - R(q-epsilon*v))/(2*epsilon). q is my base flow variable and is held constant. epsilon is a variable and its

Re: [petsc-users] Slepc Question, shell-matrix

2022-08-25 Thread Jose E. Roman
Probably the explanation is the following. Your shell matrix runs an iterative procedure that computes the action of the matrix to a certain accuracy. This is equivalent to multiplying by the exact matrix plus a perturbation, A+E. But every time you apply the shell matrix, the perturbation E is

Re: [petsc-users] Slepc Question, shell-matrix

2022-08-25 Thread feng wang
Hi Jose, Thanks for your reply. I have fixed one thing in my shell matrix. Now the conversion seems working. If I use the converted dense matrix and give it to EPSSetOperators, it actually converges! 50 EPS nconv=0 first unconverged value (error) 2.89521e-06+2.13473e-06i (7.73051721e-08)

Re: [petsc-users] Slepc Question, shell-matrix

2022-08-25 Thread Jose E. Roman
This works for simple examples such as ex9.c It may be an indication that there is a problem with your shell matrix. Jose > El 24 ago 2022, a las 19:35, feng wang escribió: > > Hi Jose, > > Thanks for your reply. > > I have tried >