[petsc-users] Problems with the null-space removal
Joseph Pusztay
josephpu at buffalo.edu
Thu May 8 11:43:23 CDT 2025
Hi Miguel,
I believe what you may be looking for is DMSwarmGetCellSwarm which extracts the fields from the swarm for a specified cell
https://urldefense.us/v3/__https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetCellSwarm/__;!!G_uCfscf7eWS!ZNzXAukaJWoy9gfF0ZpkipSh7IvFVWu9UsybjhiA8z5_GHxWHwJ60oFlfUGwwh73aGqUO3XB4W8Mo4B5m7I4YoqhM1c$
Best,
Joe
________________________________
From: MIGUEL MOLINOS PEREZ <mmolinos at us.es>
Sent: Thursday, May 8, 2025 10:22 AM
To: Matthew Knepley <knepley at gmail.com>
Cc: petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>; Joseph Pusztay <josephpu at buffalo.edu>
Subject: Re: [petsc-users] Problems with the null-space removal
You don't often get email from mmolinos at us.es. Learn why this is important<https://urldefense.us/v3/__https://aka.ms/LearnAboutSenderIdentification__;!!G_uCfscf7eWS!ZNzXAukaJWoy9gfF0ZpkipSh7IvFVWu9UsybjhiA8z5_GHxWHwJ60oFlfUGwwh73aGqUO3XB4W8Mo4B5m7I4Ts0tzdM$ >
This function “ DMSwarmCreatreSubswarm” is published somewhere? I can’t find it in the main branch of PETSc.
Thanks,
Miguel
On May 6, 2025, at 9:03 AM, MIGUEL MOLINOS PEREZ <mmolinos at us.es> wrote:
Oh, so you want to turn off some Swarm nodes? Joe has a DMSwarmCreatreSubswarm() function somewhere. This might work.
This would be awesome!
Thanks,
Miguel
On 5 May 2025, at 21:43, Matthew Knepley <knepley at gmail.com> wrote:
On Mon, May 5, 2025 at 2:08 PM MIGUEL MOLINOS PEREZ <mmolinos at us.es<mailto:mmolinos at us.es>> wrote:
Hi Matt, thank you for your response!
The most likely thing is that the nullspace is slightly wrong, or the convergence test is not accounting for the nullspace somehow.
However, since so many equations are inactive, I would consider projecting the problem. I might either
1) Select a subset of the mesh to phrase the problem on. In you use DMPlex, you could use DMPlexFilter().
I’am using a DMSwarm mesh so I can’t use this function.
Oh, so you want to turn off some Swarm nodes? Joe has a DMSwarmCreatreSubswarm() function somewhere. This might work.
2) Use a constraint to get a subsystem for Newton using SNESVI. The SNESVIRS will project the linear system onto a subspace without the constraints.
I assume you meant SNESVINEWTONRSLS (former SNESVI).
This is a subtype of SNESVI as it is a particular implementation.
I’ve been digging on this approach. However,I don’t think this fits my problem since I can not define the list of active nodes using upper and lower limits like in:
The way I am thinking, you must have some test to determine what nodes are active. I was supposing that test depending on the solution at those nodes. If that is true, you can use that test as the constraint.
Thanks,
Matt
<https://urldefense.us/v3/__https://petsc.org/release/src/snes/tutorials/ex9.c.html__;!!G_uCfscf7eWS!ZNzXAukaJWoy9gfF0ZpkipSh7IvFVWu9UsybjhiA8z5_GHxWHwJ60oFlfUGwwh73aGqUO3XB4W8Mo4B5m7I4JFyZnvY$ >
petsc.org<https://urldefense.us/v3/__https://petsc.org/release/src/snes/tutorials/ex9.c.html__;!!G_uCfscf7eWS!ZNzXAukaJWoy9gfF0ZpkipSh7IvFVWu9UsybjhiA8z5_GHxWHwJ60oFlfUGwwh73aGqUO3XB4W8Mo4B5m7I4JFyZnvY$ >
[X]<https://urldefense.us/v3/__https://petsc.org/release/src/snes/tutorials/ex9.c.html__;!!G_uCfscf7eWS!ZNzXAukaJWoy9gfF0ZpkipSh7IvFVWu9UsybjhiA8z5_GHxWHwJ60oFlfUGwwh73aGqUO3XB4W8Mo4B5m7I4JFyZnvY$ >
Thanks,
Miguel
--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener
https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ZNzXAukaJWoy9gfF0ZpkipSh7IvFVWu9UsybjhiA8z5_GHxWHwJ60oFlfUGwwh73aGqUO3XB4W8Mo4B5m7I4tiffvTQ$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ZNzXAukaJWoy9gfF0ZpkipSh7IvFVWu9UsybjhiA8z5_GHxWHwJ60oFlfUGwwh73aGqUO3XB4W8Mo4B5m7I4JQuaiJo$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250508/9a4e52b3/attachment-0001.html>
More information about the petsc-users
mailing list