Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-28 Thread Matthew Knepley
No problem. Sorry I did not think of it sooner. Matt On Tue, Jan 28, 2025 at 10:45 AM MIGUEL MOLINOS PEREZ wrote: > It works! Thank you again Matt. > > Miguel > > > On 24 Jan 2025, at 17:07, MIGUEL MOLINOS PEREZ wrote: > > Ohh, I wasn't aware of this function. Thank you Matt, I’ll see if th

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-28 Thread MIGUEL MOLINOS PEREZ
It works! Thank you again Matt. Miguel On 24 Jan 2025, at 17:07, MIGUEL MOLINOS PEREZ wrote: Ohh, I wasn't aware of this function. Thank you Matt, I’ll see if that solves the problem. Miguel On 24 Jan 2025, at 17:00, Matthew Knepley wrote: On Fri, Jan 24, 2025 at 10:56 AM MIGUEL MOLINOS P

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-24 Thread MIGUEL MOLINOS PEREZ
Ohh, I wasn't aware of this function. Thank you Matt, I’ll see if that solves the problem. Miguel On 24 Jan 2025, at 17:00, Matthew Knepley wrote: On Fri, Jan 24, 2025 at 10:56 AM MIGUEL MOLINOS PEREZ mailto:mmoli...@us.es>> wrote: Sorry I wasn’t clear enough. By “the box is updated” I mean:

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-24 Thread Matthew Knepley
On Fri, Jan 24, 2025 at 10:56 AM MIGUEL MOLINOS PEREZ wrote: > Sorry I wasn’t clear enough. By “the box is updated” I mean: I run > DMGetBoundingBox and the resulting coordinates are updated according to the > deformation gradient “F". > Oh, if you change the periodic extent, which you are, you

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-24 Thread MIGUEL MOLINOS PEREZ
Sorry I wasn’t clear enough. By “the box is updated” I mean: I run DMGetBoundingBox and the resulting coordinates are updated according to the deformation gradient “F". Thanks, Miguel On 24 Jan 2025, at 16:50, Matthew Knepley wrote: On Fri, Jan 24, 2025 at 10:36 AM MIGUEL MOLINOS PEREZ mailt

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-24 Thread Matthew Knepley
On Fri, Jan 24, 2025 at 10:36 AM MIGUEL MOLINOS PEREZ wrote: > Thanks Matt, I tried that too, and the problem remains. The box is updated > only if I set no periodic bcc. > What do you mean by "The box is updated"? I am trying to understand how you test things. Clearly the coordinates are update

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-24 Thread MIGUEL MOLINOS PEREZ
Thanks Matt, I tried that too, and the problem remains. The box is updated only if I set no periodic bcc. Miguel On 24 Jan 2025, at 14:20, Matthew Knepley wrote: On Fri, Jan 24, 2025 at 4:41 AM MIGUEL MOLINOS PEREZ mailto:mmoli...@us.es>> wrote: Dear Matt, the error was in the implementation

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-24 Thread Matthew Knepley
On Fri, Jan 24, 2025 at 4:41 AM MIGUEL MOLINOS PEREZ wrote: > Dear Matt, the error was in the implementation of the volume expansion > function. I updated it, and it works finte under finite domains. However, > if I include periodic boundary conditions the volume of the cell does not > accommodat

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-24 Thread MIGUEL MOLINOS PEREZ
Dear Matt, the error was in the implementation of the volume expansion function. I updated it, and it works finte under finite domains. However, if I include periodic boundary conditions the volume of the cell does not accommodate the volume expansion of the particles. The deformation gradient i

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-17 Thread MIGUEL MOLINOS PEREZ
You are right!! Thank you again! Miguel On Jan 17, 2025, at 5:18 PM, Matthew Knepley wrote: On Fri, Jan 17, 2025 at 10:49 AM MIGUEL MOLINOS PEREZ mailto:mmoli...@us.es>> wrote: Now the error is in the call to DMSwarmMigrate You have almost certainly overwritten memory somewhere. Can you use v

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-17 Thread Matthew Knepley
On Fri, Jan 17, 2025 at 10:49 AM MIGUEL MOLINOS PEREZ wrote: > Now the error is in the call to DMSwarmMigrate > You have almost certainly overwritten memory somewhere. Can you use vlagrind or Address Sanitizer? Thanks, Matt > Miguel > > [0]PETSC ERROR: >

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-17 Thread MIGUEL MOLINOS PEREZ
Now the error is in the call to DMSwarmMigrate Miguel [0]PETSC ERROR: [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-17 Thread Matthew Knepley
On Fri, Jan 17, 2025 at 10:08 AM MIGUEL MOLINOS PEREZ wrote: > Thank you Matt, this the piece of code I use to change the coordinates of > the DM obtained using: > You do not need the call to DMSetCoordinates(). What happens when you remove it? Thanks, Matt > > DMSwarmGetCellDM(Simulat

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-17 Thread MIGUEL MOLINOS PEREZ
Thank you Matt, this the piece of code I use to change the coordinates of the DM obtained using: DMSwarmGetCellDM(Simulation.atomistic_data, &bounding_cell); DMGetApplicationContext(bounding_cell, &background_mesh); Thanks, Miguel /***

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-17 Thread Matthew Knepley
On Fri, Jan 17, 2025 at 9:45 AM MIGUEL MOLINOS PEREZ wrote: > I tried what you suggested, but still I got this error message. Maybe I > should use main release? > No. I suspect something is wrong with the way you are setting coordinates. Can you share the code? Thanks, Matt > Miguel >

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-17 Thread MIGUEL MOLINOS PEREZ
I tried what you suggested, but still I got this error message. Maybe I should use main release? Miguel [4]PETSC ERROR: [4]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of r

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-15 Thread MIGUEL MOLINOS PEREZ
Thank you Matt for the useful info. I’ll try your idea. Miguel On 15 Jan 2025, at 16:48, Matthew Knepley wrote: On Wed, Jan 15, 2025 at 10:41 AM MIGUEL MOLINOS PEREZ mailto:mmoli...@us.es>> wrote: Thank you Matt. Yes, I am getting the "CellDM" from the DMSwarm. 1. I have recently overhauled

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-15 Thread Matthew Knepley
On Wed, Jan 15, 2025 at 10:41 AM MIGUEL MOLINOS PEREZ wrote: > Thank you Matt. > > Yes, I am getting the "CellDM" from the DMSwarm. > > 1. I have recently overhauled this functionality because it was not > flexible enough for the plasma simulation we do. Thus main and release work > differently.

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-15 Thread MIGUEL MOLINOS PEREZ
Yes, I am getting the "CellDM" from the DMSwarm. Miguel On 15 Jan 2025, at 16:08, Mark Adams wrote: Are you getting the "CellDM" from the DMSwarm? Mark On Wed, Jan 15, 2025 at 7:09 AM MIGUEL MOLINOS PEREZ mailto:mmoli...@us.es>> wrote: Dear all, It seems that we can not modify the coordinate

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-15 Thread MIGUEL MOLINOS PEREZ
Thank you Matt. Yes, I am getting the "CellDM" from the DMSwarm. 1. I have recently overhauled this functionality because it was not flexible enough for the plasma simulation we do. Thus main and release work differently. Nice to hear that. Should I move to main? 2. I assume you are using rele

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-15 Thread Matthew Knepley
On Wed, Jan 15, 2025 at 7:09 AM MIGUEL MOLINOS PEREZ wrote: > Dear all, > > It seems that we can not modify the coordinates of the background mesh > attached to a DMSwarm simulation. This is a feature? > 1. I have recently overhauled this functionality because it was not flexible enough for the

Re: [petsc-users] Update DMDA attached to DMSWARM

2025-01-15 Thread Mark Adams
Are you getting the "CellDM" from the DMSwarm? Mark On Wed, Jan 15, 2025 at 7:09 AM MIGUEL MOLINOS PEREZ wrote: > Dear all, > > It seems that we can not modify the coordinates of the background mesh > attached to a DMSwarm simulation. This is a feature? > > Best, > Miguel > >

[petsc-users] Update DMDA attached to DMSWARM

2025-01-15 Thread MIGUEL MOLINOS PEREZ
Dear all, It seems that we can not modify the coordinates of the background mesh attached to a DMSwarm simulation. This is a feature? Best, Miguel