Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-02-08 Thread Berend van Wachem
I am more than happy to share. On 1/22/24 20:30, Matthew Knepley wrote: On Mon, Jan 22, 2024 at 2:26 PM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, The problem is that I haven't figured out how to write a polyhedral DMplex in parallel. So, curren

Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-01-23 Thread Berend van Wachem
r? Thanks and best regards, Berend. On 1/22/24 20:30, Matthew Knepley wrote: On Mon, Jan 22, 2024 at 2:26 PM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, The problem is that I haven't figured out how to write a polyhedral DMplex in parallel. So, curren

Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-01-22 Thread Berend van Wachem
. Best, Berend. On 1/22/24 20:03, Matthew Knepley wrote: On Mon, Jan 22, 2024 at 1:57 PM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, Thanks for your quick response. I have a DMPlex with a polyhedral mesh, and have defined a number of vectors wit

Re: [petsc-users] Unique number in each element of a DMPlex mesh

2024-01-22 Thread Berend van Wachem
very often. But reading your response, this may not be a bad way of doing it? Thanks, Berend. On 1/22/24 18:58, Matthew Knepley wrote: On Mon, Jan 22, 2024 at 10:49 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Petsc-Team, Is there a good way to define a

[petsc-users] Unique number in each element of a DMPlex mesh

2024-01-22 Thread Berend van Wachem
Dear Petsc-Team, Is there a good way to define a unique integer number in each element (e.g. a cell) of a DMPlex mesh, which is in the same location, regardless of the number of processors or the distribution of the mesh over the processors? So, for instance, if I have a DMPlex box mesh,

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-22 Thread Berend van Wachem
wrote: > On Wed, May 17, 2023 at 11:20 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de> <mailto:berend.vanwac...@ovgu.de <mailto:berend.vanwac...@ovgu.de>>> wrote: > >     Dear Matt, > >     Is there a way to 'redo' the D

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Berend van Wachem
Knepley wrote: On Wed, May 17, 2023 at 11:20 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, Is there a way to 'redo' the DMLocalizeCoordinates() ? Or to undo it? Alternatively, can we make the calling of DMLocalizeCoordinates() in the  DMPlexCreate...() ro

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Berend van Wachem
() and DMGetCellCoordinatesLocal() before scaling them. Best regards, Berend. On 5/17/23 16:35, Matthew Knepley wrote: On Wed, May 17, 2023 at 10:21 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, Thanks for getting back to me so quickly. If I scal

Re: [petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Berend van Wachem
, Berend. On 5/17/23 16:10, Matthew Knepley wrote: On Wed, May 17, 2023 at 10:02 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear PETSc Team, We are using DMPlex, and we create a mesh using DMPlexCreateBoxMesh ( ); and get a uniform mesh. Th

[petsc-users] DMGetCoordinatesLocal and DMPlexGetCellCoordinates in PETSc > 3.18

2023-05-17 Thread Berend van Wachem
Dear PETSc Team, We are using DMPlex, and we create a mesh using DMPlexCreateBoxMesh ( ); and get a uniform mesh. The mesh is periodic. We typically want to "scale" the coordinates (vertices) of the mesh, and to achieve this, we call DMGetCoordinatesLocal(dm, ); and scale the entries

[petsc-users] Bug in DMLocalizeCoordinates/Periodic for PETSc versions >= 3.18?

2023-01-26 Thread Berend van Wachem
Dear Petsc-Team, Since Petsc-3.18 our code no longer runs successfully with periodic geometries. Since this version, the call to DMGetPeriodicity has changed arguments, but even after adapting our code, for some reason calling DMLocalizeCoordinates, at least the way we do, no longer works. To

Re: [petsc-users] reading and writing periodic DMPlex to file

2023-01-24 Thread Berend van Wachem
version? 3) This is strange, as it works fine for me. Thanks, best, Berend. On 12/15/22 18:56, Matthew Knepley wrote: On Wed, Dec 14, 2022 at 3:58 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear PETSc team and users, I have asked a few times about this

Re: [petsc-users] Write/read a DMForest to/from a file

2022-12-30 Thread Berend van Wachem
ERRQ(ierr); /*** End of writing / PetscFunctionReturn(0); } On 29/12/2022 21:54, Mark Adams wrote: Have you tried using the DMForest as you would use a DMPLex? That should work. Forst has extra stuff but it just makes a Plex and the end of the day. On Tue, Dec 27, 2022 at 5:21 AM Berend

[petsc-users] Write/read a DMForest to/from a file

2022-12-27 Thread Berend van Wachem
Dear Petsc-team/users, I am trying to save a DMForest which has been used for a calculation (so refined/coarsened in places) to a file and later read it from the file to continue a calculation with. My question is: how do I do this? I've tried a few things, such as using DMView and DMLoad,

[petsc-users] reading and writing periodic DMPlex to file

2022-12-14 Thread Berend van Wachem
Dear PETSc team and users, I have asked a few times about this before, but we haven't really gotten this to work yet. In our code, we use the DMPlex framework and are also interested in periodic geometries. As our simulations typically require many time-steps, we would like to be able to

[petsc-users] reading and writing periodic DMPlex to file

2022-12-14 Thread Berend van Wachem
Dear PETSc team and users, I have asked a few times about this before, but we haven't really gotten this to work yet. In our code, we use the DMPlex framework and are also interested in periodic geometries. As our simulations typically require many time-steps, we would like to be able to

Re: [petsc-users] DMCloning from a DMPlex has changed in Petsc-3.17.0?

2022-04-12 Thread Berend van Wachem
? Or is the best way to call DMPlexDistributeSetDefault(*NewDM, PETSC_FALSE), and call DMPlexDistribute() with the required value of the overlap? Thanks, best, Berend. On 4/12/22 12:49, Matthew Knepley wrote: On Tue, Apr 12, 2022 at 2:50 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de

Re: [petsc-users] DMCloning from a DMPlex has changed in Petsc-3.17.0?

2022-04-12 Thread Berend van Wachem
within the code (our code determines the overlap required)? Many thanks, best regards, Berend. On 4/11/22 16:23, Matthew Knepley wrote: On Wed, Apr 6, 2022 at 9:41 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, I have made a small working example of

Re: [petsc-users] DMCloning from a DMPlex has changed in Petsc-3.17.0?

2022-04-06 Thread Berend van Wachem
something wrong in the function CloneDMWithNewSection? Many thanks for looking into this, best regards, Berend. On 4/4/22 23:05, Matthew Knepley wrote: On Mon, Apr 4, 2022 at 3:36 PM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Petsc team, Since about 2 years w

[petsc-users] DMCloning from a DMPlex has changed in Petsc-3.17.0?

2022-04-04 Thread Berend van Wachem
Dear Petsc team, Since about 2 years we have been using Petsc with DMPlex, but since upgrading our code to Petsc-3.17.0 something has broken. First we generate a DM from a DMPlex with DMPlexCreateFromFile or creating one with DMPlexCreateBoxMesh. Then the DM is distributed with

Re: [petsc-users] DMView and DMLoad

2022-03-08 Thread Berend van Wachem
and see if it works. Thanks, Koki ------------ *From:* Berend van Wachem *Sent:* Thursday, February 17, 2022 9:06 AM *To:* Sagiyama, Koki ; Hapla Vaclav ; PETSc users list ; Lawrence Mitchell *Subject:* Re: [petsc-users] DMView and DMLoad Dear Koki, Many thanks for your help and sorry for the slow reply. I

[petsc-users] error in DMSetGlobalSection after update to v3.16.4

2022-02-23 Thread Berend van Wachem
Dear PETSc Team, We are currently having a problem with the function DMSetGlobalSection - this worked with v3.16.2 and 3.16.1, but doesn't seem to work anymore in PETSc versions after 3.16.2. I've attached an example which replicates the issue. It creates a box with a random field is

Re: [petsc-users] DMView and DMLoad

2022-02-17 Thread Berend van Wachem
l just by modifying the dm(i.e., using the periodic mesh you are actually using)? Thanks, Koki -------- *From:* Berend van Wachem *Sent:* Monday, December 6, 2021 3:39 PM *To:* Sagiyama, Koki ; Hapla Vaclav ; PETSc users list

Re: [petsc-users] DMView and DMLoad

2021-12-06 Thread Berend van Wachem
ionally load coordinates directly on the distributed dm as (using your notation):   /* Distribute dm */   ...   PetscSFCompose(sfO, sfDist, );   DMPlexCoordinatesLoad(dm, viewer, sf); To use this feature, we need to pass "-dm_plex_view_hdf5_storage_version 2.0.0" option when sav

Re: [petsc-users] DMView and DMLoad

2021-11-17 Thread Berend van Wachem
;mailto:knep...@gmail.com>> wrote: On Tue, Sep 14, 2021 at 5:15 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear PETSc-team, We are trying to save and load distributed DMPlex and its associated physical fields (created with DMCreateGlobalVector)  (Uvelocity, VVelocity,  

Re: [petsc-users] DMView and DMLoad

2021-09-30 Thread Berend van Wachem
.@gmx.li>> wrote: Hi Berend, On 14 Sep 2021, at 12:23, Matthew Knepley <mailto:knep...@gmail.com>> wrote: On Tue, Sep 14, 2021 at 5:15 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear PETSc-team, We are trying to save and load distributed DMPlex

[petsc-users] DMView and DMLoad

2021-09-14 Thread Berend van Wachem
Dear PETSc-team, We are trying to save and load distributed DMPlex and its associated physical fields (created with DMCreateGlobalVector) (Uvelocity, VVelocity, ...) in HDF5_XDMF format. To achieve this, we do the following: 1) save in the same xdmf.h5 file: DMView( DM ,

Re: [petsc-users] VTK format?

2020-09-07 Thread Berend van Wachem
03 16:53, Jed Brown wrote: Use the xml format (not the legacy format) by naming your file.vtu instead of file.vtk On Thu, Sep 3, 2020, at 8:17 AM, Berend van Wachem wrote: Dear PETSc, What is the best way to write data from a DMPLEX vector to file, so it can be viewed with paraview? I've foun

[petsc-users] VTK format?

2020-09-03 Thread Berend van Wachem
Dear PETSc, What is the best way to write data from a DMPLEX vector to file, so it can be viewed with paraview? I've found that the standard VTK format works for a serial job, but if there is more than 1 processor, the geometry data gets messed up. I've attached a small working example for a

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-30 Thread Berend van Wachem
i, Mar 13, 2020 at 9:45 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, Thanks for your response. My understanding of the DM and DMClone is the same - and I have tested this with a DMPLEX DM without problems. However, for

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-23 Thread Berend van Wachem
020 at 6:07 PM Matthew Knepley <mailto:knep...@gmail.com>> wrote: On Fri, Mar 13, 2020 at 9:45 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, Thanks for your response. My understanding of the DM and DMClone is the s

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-21 Thread Berend van Wachem
Mar 12, 2020 at 7:40 AM Berend van Wachem > mailto:berend.vanwac...@ovgu.de> <mailto:berend.vanwac...@ovgu.de <mailto:berend.vanwac...@ovgu.de>>> wrote: > >     Dear All, > >     I have started to use

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-19 Thread Berend van Wachem
and my best wishes in these difficult times, Berend. On 2020-03-13 14:50, Matthew Knepley wrote: On Fri, Mar 13, 2020 at 9:45 AM Berend van Wachem mailto:berend.vanwac...@ovgu.de>> wrote: Dear Matt, Thanks for your response. My understanding of the DM and DMClone is the same -

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-13 Thread Berend van Wachem
to create a new section from the cloned P4EST DM. Is it not possible to create/set a section on a P4EST DM? Or maybe I am doing something else wrong? Do you suggest a workaround? Many thanks, Berend. On 2020-03-13 00:19, Matthew Knepley wrote: On Thu, Mar 12, 2020 at 7:40 AM Berend van Wachem

[petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-12 Thread Berend van Wachem
Dear All, I have started to use DMPLEX with P4EST for a computational fluid dynamics application. I am solving a coupled system of 4 discretised equations (for 3 velocity components and one pressure) on a mesh. However, next to these 4 variables, I also have a few single field variables

[petsc-users] PETSc, C++ and Eclipse

2011-07-28 Thread Berend van Wachem
Dear Matt, I use Eclipse and have eclipse make the makefiles. It is just a matter of indicating to eclipse where the PETSc headers/libraries are to be found, so if you have a C project which needs PETSc headers and libraries: To do this, click on your managed C project with the right sided

[petsc-users] PETSc, C++ and Eclipse

2011-07-28 Thread Berend van Wachem
generated by the compiler, there is a PetscInitialize symbol that isn't found in the library. But I'm soo confused at this point :(. How did you guys all learn how to compile this? Matt On Wed, Jul 27, 2011 at 4:46 PM, Berend van Wachem b.van-wachem at imperial.ac.uk mailto:b.van-wachem

[petsc-users] PETSc, C++ and Eclipse

2011-07-28 Thread Berend van Wachem
believe it is failing during the linking step. I'm not 100% sure though. Thanks for your quick response and help. Please advise, Matt On Wed, Jul 27, 2011 at 5:39 PM, Berend van Wachem b.van-wachem at imperial.ac.uk mailto:b.van-wachem at imperial.ac.uk wrote: Dear Matt, Does it say

[petsc-users] PETSc, C++ and Eclipse

2011-07-28 Thread Berend van Wachem
/Documents/Research/codes/petsc/petsc-3.1-p8 In my source file I have included petsc.h: #include petsc.h Thanks, Matt On Wed, Jul 27, 2011 at 5:54 PM, Berend van Wachem b.van-wachem at imperial.ac.uk mailto:b.van-wachem at imperial.ac.uk wrote: Dear Matt, The error is definitely

[petsc-users] PETSc, C++ and Eclipse

2011-07-28 Thread Berend van Wachem
pthread rt gcc_s mpichf90 gfortran m m dl mpich rt gcc_s dl I used the exact order as I found in petscmachineinfo.h file (see here: http://pastebin.com/cqzNgjJe) Thank you very much for your help Berend, Matt On Wed, Jul 27, 2011 at 6:11 PM, Berend van Wachem b.van-wachem

PETSC debugger

2009-07-19 Thread Berend van Wachem
Dear Ryan, I had a similar issue as you have. I am using KDE as a desktop manager and found that I have to comment out the line ServerArgsLocal=-nolisten tcp in kdm, in the kdmrc file (on my system located at /etc/kde/kdm/kdmrc). After restarting kdm, I get all windows of gdb coming up.

PETSC debugger

2009-07-19 Thread Berend van Wachem
On Sun, Jul 19, 2009 at 2:59 AM, Berend van Wachem b.van-wachem at imperial.ac.uk mailto:b.van-wachem at imperial.ac.uk wrote: Dear Ryan, I had a similar issue as you have. I am using KDE as a desktop manager and found that I have to comment out the line ServerArgsLocal

general question on speed using quad core Xeons

2008-04-16 Thread Berend van Wachem
Hi Barry, http://www.intel.com/performance/server/xeon/hpc_ansys.htm http://www.intel.com/performance/server/xeon/hpc_md_nastr.htm Aren't both benchmarks run on Quads? The difference just being the cache per processor? Or am I mistaken? Berend. these are the two benchmarks that

Dynamic allocation of Non zeros?

2007-11-01 Thread Berend van Wachem
Hi Barry, Perhaps you could describe how your matrix entries are generated and we can suggest a preallocation scheme? Are there examples of preallocation schemes for PETSc? For instance, if I would like to solve Poisson equation on an irregular grid (9 point stencil in 2d and 27 in

Petsc Error

2007-10-09 Thread Berend van Wachem
Hi, On the command ierr = DACreateLocalVector(da,g); CHKERRQ(ierr); I get the error [0]PETSC ERROR: PetscMallocAlign() line 61 in src/sys/memory/mal.c Memory requested 6050600 [0]PETSC ERROR: PETSC: Attaching gdb to Debug/MultiFlow of pid 19087 on display :0.0 on machine tfdpc102 What

Petsc Error

2007-10-09 Thread Berend van Wachem
van Wachem berend at chalmers.se wrote: Hi, On the command ierr = DACreateLocalVector(da,g); CHKERRQ(ierr); I get the error [0]PETSC ERROR: PetscMallocAlign() line 61 in src/sys/memory/mal.c Memory requested 6050600 [0]PETSC ERROR: PETSC: Attaching gdb to Debug/MultiFlow of pid 19087

Petsc Error

2007-10-09 Thread Berend van Wachem
malloc? On Tue, 9 Oct 2007, Berend van Wachem wrote: Hi, I ran the same command again, running top, and got the result Mem: 6220940k total, 5879056k used, 341884k free, 143992k buffers Swap: 1951888k total, 2584k used, 1949304k free, 2363516k cached PID USER PR NI

Petsc Error

2007-10-09 Thread Berend van Wachem
Hi, I am using 32 bit linux (slackware) on a 64 bit opteron. Would using a 64 bit linux distro help? Berend. Barry Smith wrote: Pressure your vendors, be they IBM or Redhat, to provide a 2007 OS instead of a 2001 OS :-(. Barry On Tue, 9 Oct 2007, Berend van Wachem wrote: Hi

Compiled information for Petsc 2.3.2-p10

2007-10-09 Thread Berend van Wachem
Hi, I'm not sure if it is optimal, but I usually go through the changes when upgrading, http://www-unix.mcs.anl.gov/petsc/petsc-as/documentation/changes/index.html Maybe there is a more easy way, I'm not sure. Berend. Trivedi, Jagruti CIV 47D, 474300D wrote: Hello there, I am

PETSc CG solver uses more iterations than other CG solver

2007-03-10 Thread Berend van Wachem
Hi, I have also used the VOF/level set model in our PETSc based code, and it does require a lot more iterations than a single phase model because of the stencil. I guess you are solving d/dx 1/rho d/dx p = 0 ? Which can result in a terrible coefficient structure. Are you sure the

Using PETSc in structured c-grid for CFD and multigrid

2007-02-02 Thread Berend van Wachem
of freedom. Barry On Wed, 31 Jan 2007, Berend van Wachem wrote: Hi Ben, The challenge in your problem is how you glue the C grid in the back; there you will need to do some additional scattering. I would set-up the IS for this, and then use that to scatter the values

Using PETSc in structured c-grid for CFD and multigrid

2007-01-31 Thread Berend van Wachem
? Is it to install as an external software thru PETSc or just use HYPRE on its own? Btw, it will be great if you can send me parts of your code regarding DA. Thank you very much! On 1/26/07, Berend van Wachem berend at tfd.chalmers.se wrote: Hi, I am not an expert - but have used PETSc

Using PETSc in structured c-grid for CFD and multigrid

2007-01-26 Thread Berend van Wachem
Hi Ben, Sure you can - it just means you will need to save the X,Y,Z locations of the grid points as well. All a DA requires is a regular I,J,K numbering over your grid. Berend. Hi, just to clarify. I'm using structured grid but not cartesian ie strictly horizontal/vertical. So I can't

Using PETSc in structured c-grid for CFD and multigrid

2007-01-26 Thread Berend van Wachem
Hi, I am not an expert - but have used PETSc for both structured and unstructured grids. When you use an unstructured code for a structured grid, there is additional overhead (addressing, connectivity) which is redundant; this information is not required for solving on a structured grid. I would

Vector containing one number

2007-01-19 Thread Berend van Wachem
-laptop:/PETSc3/petsc/petsc-dev/src/vec/vec/examples/ tutorials$ $MPIRUN -np 4 ./ex1001 -vec_view Process [0] 3 Process [1] Process [2] Process [3] Matt On 1/18/07, Berend van Wachem berend at chalmers.se wrote: Hi, In one of the input/output routines, I want to write one number

Vector containing one number

2007-01-19 Thread Berend van Wachem
Hi, valgrind shows something related to open-mpi, see below. I'll try mpich to see if the problem goes away. Thanks, Berend. ==3683== Syscall param writev(vector[...]) points to uninitialised byte(s) ==3683==at 0x543A607: writev (in /lib64/tls/libc-2.3.6.so) ==3683==by 0x5BE0AEA:

Vector containing one number

2007-01-19 Thread Berend van Wachem
dealing with this. Barry On Fri, 19 Jan 2007, Berend van Wachem wrote: Hi, valgrind shows something related to open-mpi, see below. I'll try mpich to see if the problem goes away. Thanks, Berend. ==3683== Syscall param writev(vector[...]) points to uninitialised byte(s

Vector containing one number

2007-01-18 Thread Berend van Wachem
Hi, In one of the input/output routines, I want to write one number to a viewer. I created a vector with global size one, wrote the number to the vector, and then viewed the vector. In the latest version of Petsc, this does not seem to work anymore. What do you suggest as a work around? Hereby

MPI question

2006-10-16 Thread Berend van Wachem
Hi Julian, I am not affiliated to the petsc-team, but have been using petsc a number of years. The idea of MPI is that your whole program get executed on each processor. So getting output twice on each processor is quite normal. So not only PETSC functions are called by each processor, every

distributed array

2006-07-21 Thread Berend van Wachem
Dear Mat, One other thing, in your function VecOverGlobalToBlockGlobalBegin and VecOverGlobalToBlockGlobalEnd: i assume that Vec *A is a the pointer to the blockglobal Vector? further Vec **B is an array of pointers to MPI vectors where each element of the array is a MPI vector

question concerning building vectors

2006-07-21 Thread Berend van Wachem
Hi Mat, Isn't that exactly what the function I sent you does? It just places a series of pointers into the new vector. Berend. i was wondering if there exists a function that lets me assemble a vector. Basically i would like to do the following: I have several PETSc vectors on the same

distributed array

2006-07-20 Thread Berend van Wachem
what m and n are. It says they denote the process partition in each direction and that m*n must be equal the total number of processes in the communicator. Sorry, i am almost sure this is something simple. thanks mat On Thursday 13 July 2006 23:13, Berend van Wachem wrote: Hi, i

Using valgrind on petsc projects

2006-05-28 Thread Berend van Wachem
Hi, I am using Petsc with Open-Mpi and have started to use valgrind to find a bug. One of the things that I see is that there is memory lost in PetscInitialize by calling MPI_Init and in DACreate (which I do quite often in my project). The amounts of memory lost aren't huge; should I be