Re: [petsc-users] Build a basis of the kernel of a matrix

2024-02-02 Thread TARDIEU Nicolas via petsc-users
Simple and straightforward. Thanks a lot Barry.


De : bsm...@petsc.dev 
Envoyé : vendredi 2 février 2024 18:34
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] Build a basis of the kernel of a matrix


   Call MatSetOption(mat,MAT_IGNORE_ZERO_ENTRIES,PETSC_TRUE)
   For each column call VecGetArray(), zero the "small entries", then call 
MatSetValues() for that single column.

   Barry


On Feb 2, 2024, at 12:28 PM, TARDIEU Nicolas via petsc-users 
 wrote:

Dear PETSc users,

I consider a sparse rectangular matrix B of size n x m, n

[petsc-users] Build a basis of the kernel of a matrix

2024-02-02 Thread TARDIEU Nicolas via petsc-users
Dear PETSc users,

I consider a sparse rectangular matrix B of size n x m, n

Re: [petsc-users] Undestanding how to increase the overlap

2024-01-18 Thread TARDIEU Nicolas via petsc-users
Arrghhh ! Shame on me !
Sorry for that and thank you for the help Matt.
I works like a charm now.

De : knep...@gmail.com 
Envoyé : jeudi 18 janvier 2024 15:49
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] Undestanding how to increase the overlap

On Thu, Jan 18, 2024 at 9:46 AM TARDIEU Nicolas 
mailto:nicolas.tard...@edf.fr>> wrote:
Hi Matt,
The isovl is in global numbering. I am pasting the output of the script  :

I see. Is your matrix diagonal? If so, there is no overlap. You need 
connections to the other rows in order to have overlapping submatrices.

  Thanks,

 Matt

#
# The matrix
# ---
[1,0]:Mat Object: 2 MPI processes
[1,0]:  type: mpiaij
[1,0]:row 0: (0, 0.)
[1,0]:row 1: (1, 1.)
[1,0]:row 2: (2, 2.)
[1,0]:row 3: (3, 3.)
[1,0]:row 4: (4, 4.)
[1,0]:row 5: (5, 5.)
#
# The IS isovl before the call to increaseOverlap
# ---
[1,0]:locSize before = 3
[1,0]:IS Object: 1 MPI processes
[1,0]:  type: stride
[1,0]:Number of indices in (stride) set 3
[1,0]:0 0
[1,0]:1 1
[1,0]:2 2
[1,1]:locSize before = 3
[1,1]:IS Object: 1 MPI processes
[1,1]:  type: stride
[1,1]:Number of indices in (stride) set 3
[1,1]:0 3
[1,1]:1 4
[1,1]:2 5
#
# The IS isovl after the call to increaseOverlap
# ---
[1,0]:locSize after = 3
[1,0]:IS Object: 1 MPI processes
[1,0]:  type: general
[1,0]:Number of indices in set 3
[1,0]:0 0
[1,0]:1 1
[1,0]:2 2
[1,1]:locSize after = 3
[1,1]:IS Object: 1 MPI processes
[1,1]:  type: general
[1,1]:Number of indices in set 3
[1,1]:0 3
[1,1]:1 4
[1,1]:2 5
#

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : knep...@gmail.com<mailto:knep...@gmail.com> 
mailto:knep...@gmail.com>>
Envoyé : jeudi 18 janvier 2024 15:29
À : TARDIEU Nicolas mailto:nicolas.tard...@edf.fr>>
Cc : petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> 
mailto:petsc-users@mcs.anl.gov>>
Objet : Re: [petsc-users] Undestanding how to increase the overlap

On Thu, Jan 18, 2024 at 9:24 AM TARDIEU Nicolas via petsc-users 
mailto:petsc-users@mcs.anl.gov>> wrote:
Dear PETSc Team,

I am trying to understand how to increase the overlap of a matrix.
I wrote the attached petsc4py script where I build a simple matrix and play 
with the increaseOverlap method. Unfortunately, before and after the call, 
nothing changes in the index set. FYI, I have tried to mimic 
src/ksp/ksp/tutorials/ex82.c<https://petsc.org/main/src/ksp/ksp/tutorials/ex82.c.html>
 line 72:76.
Here is how I run the script : "mpiexec -n 2 python test_overlap.py"

Could you please indicate what I am missing ?

Usually matrix functions like this take input in global indices. It looks like 
your isovl is in local indices. Am I reading that correctly?

  Thanks,

 Matt

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


--
What most experime

Re: [petsc-users] Undestanding how to increase the overlap

2024-01-18 Thread TARDIEU Nicolas via petsc-users
Hi Matt,
The isovl is in global numbering. I am pasting the output of the script  :

#
# The matrix
# ---
[1,0]:Mat Object: 2 MPI processes
[1,0]:  type: mpiaij
[1,0]:row 0: (0, 0.)
[1,0]:row 1: (1, 1.)
[1,0]:row 2: (2, 2.)
[1,0]:row 3: (3, 3.)
[1,0]:row 4: (4, 4.)
[1,0]:row 5: (5, 5.)
#
# The IS isovl before the call to increaseOverlap
# ---
[1,0]:locSize before = 3
[1,0]:IS Object: 1 MPI processes
[1,0]:  type: stride
[1,0]:Number of indices in (stride) set 3
[1,0]:0 0
[1,0]:1 1
[1,0]:2 2
[1,1]:locSize before = 3
[1,1]:IS Object: 1 MPI processes
[1,1]:  type: stride
[1,1]:Number of indices in (stride) set 3
[1,1]:0 3
[1,1]:1 4
[1,1]:2 5
#
# The IS isovl after the call to increaseOverlap
# ---
[1,0]:locSize after = 3
[1,0]:IS Object: 1 MPI processes
[1,0]:  type: general
[1,0]:Number of indices in set 3
[1,0]:0 0
[1,0]:1 1
[1,0]:2 2
[1,1]:locSize after = 3
[1,1]:IS Object: 1 MPI processes
[1,1]:  type: general
[1,1]:Number of indices in set 3
[1,1]:0 3
[1,1]:1 4
[1,1]:2 5
#

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : knep...@gmail.com 
Envoyé : jeudi 18 janvier 2024 15:29
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] Undestanding how to increase the overlap

On Thu, Jan 18, 2024 at 9:24 AM TARDIEU Nicolas via petsc-users 
mailto:petsc-users@mcs.anl.gov>> wrote:
Dear PETSc Team,

I am trying to understand how to increase the overlap of a matrix.
I wrote the attached petsc4py script where I build a simple matrix and play 
with the increaseOverlap method. Unfortunately, before and after the call, 
nothing changes in the index set. FYI, I have tried to mimic 
src/ksp/ksp/tutorials/ex82.c<https://petsc.org/main/src/ksp/ksp/tutorials/ex82.c.html>
 line 72:76.
Here is how I run the script : "mpiexec -n 2 python test_overlap.py"

Could you please indicate what I am missing ?

Usually matrix functions like this take input in global indices. It looks like 
your isovl is in local indices. Am I reading that correctly?

  Thanks,

 Matt

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


--
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://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou p

[petsc-users] Undestanding how to increase the overlap

2024-01-18 Thread TARDIEU Nicolas via petsc-users
Dear PETSc Team,

I am trying to understand how to increase the overlap of a matrix.
I wrote the attached petsc4py script where I build a simple matrix and play 
with the increaseOverlap method. Unfortunately, before and after the call, 
nothing changes in the index set. FYI, I have tried to mimic 
src/ksp/ksp/tutorials/ex82.c
 line 72:76.
Here is how I run the script : "mpiexec -n 2 python test_overlap.py"

Could you please indicate what I am missing ?

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.

import petsc4py
# petsc4py.init(['-info'])
from petsc4py.PETSc import KSP, IS, Mat, Options, Viewer, PC, Vec, NullSpace, MatPartitioning, COMM_SELF


NEQ = 6

# Simple parallel diagonal matrix
M = Mat().create()
M.setSizes([NEQ, NEQ])
M.setType('aij')
M.setUp()
M.setPreallocationNNZ(1)
cs, ce = M.getOwnershipRange()
for row in range(cs, ce):
M.setValue(row, row, row)
M.assemble()
M.view()


ovl=2
# reproduce initial layout
isovl = IS().createStride(ce-cs, cs, 1, comm=COMM_SELF)
loc = isovl.getLocalSize()
print(f"locSize before = {loc}", flush=True)
isovl.view()

# increase overlap
M.increaseOverlap(isovl, ovl)
loc = isovl.getLocalSize()
print(f"locSize after = {loc}", flush=True)
isovl.view()



Re: [petsc-users] Near null space for a fieldsplit in petsc4py

2023-07-13 Thread TARDIEU Nicolas via petsc-users
Dear Pierre,

You are absolutely right. I was using a --with-debugging=0 (aka release) 
install and this is definitely an error.
Once I used my debug install, I found the way to fix my problem. The solution 
is in the attached script: I first need to extract the correct block from the 
PC operator's MatNest and then append the null space to it.
Anyway this is a bit tricky...

Regards,
Nicolas


De : pierre.joli...@lip6.fr 
Envoyé : mercredi 12 juillet 2023 19:52
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] Near null space for a fieldsplit in petsc4py


> On 12 Jul 2023, at 6:04 PM, TARDIEU Nicolas via petsc-users 
>  wrote:
>
> Dear PETSc team,
>
> In the attached example, I set up a block pc for a saddle-point problem in 
> petsc4py. The IS define the unknowns, namely some physical quantity (phys) 
> and a Lagrange multiplier (lags).
> I would like to attach a near null space to the physical block, in order to 
> get the best performance from an AMG pc.
> I have been trying hard, attaching it to the initial block, to the IS but no 
> matter what I am doing, when it comes to "ksp_view", no near null space is 
> attached to the matrix.
>
> Could you please help me figure out what I am doing wrong ?

Are you using a double-precision 32-bit integers real build of PETSc?
Is it --with-debugging=0?
Because with my debug build, I get the following error (thus explaining why 
it’s not attached to the KSP).
Traceback (most recent call last):
  File "/Volumes/Data/Downloads/test/test_NullSpace.py", line 35, in 
ns = NullSpace().create(True, [v], comm=comm)
 
  File "petsc4py/PETSc/Mat.pyx", line 5611, in petsc4py.PETSc.NullSpace.create
petsc4py.PETSc.Error: error code 62
[0] MatNullSpaceCreate() at 
/Volumes/Data/repositories/petsc/src/mat/interface/matnull.c:249
[0] Invalid argument
[0] Vector 0 must have 2-norm of 1.0, it is 22.3159

Furthermore, if you set yourself the constant vector in the near null-space, 
then the first argument of create() must be False, otherwise, you’ll have twice 
the same vector, and you’ll end up with another error (the vectors in the near 
null-space must be orthonormal).
If things still don’t work after those couple of fixes, please feel free to 
send an up-to-date reproducer.

Thanks,
Pierre

> Thanks,
> Nicolas
>
>
>
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis 
> à l'intention exclusive des destinataires et les informations qui y figurent 
> sont strictement confidentielles. Toute utilisation de ce Message non 
> conforme à sa destination, toute diffusion ou toute publication totale ou 
> partielle, est interdite sauf autorisation expresse.
>
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
> copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. 
> Si vous avez reçu ce Message par erreur, merci de le supprimer de votre 
> système, ainsi que toutes ses copies, et de n'en garder aucune trace sur 
> quelque support que ce soit. Nous vous remercions également d'en avertir 
> immédiatement l'expéditeur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie 
> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
> erreur ou virus.
> 
>
> This message and any attachments (the 'Message') are intended solely for the 
> addressees. The information contained in this Message is confidential. Any 
> use of information contained in this Message not in accord with its purpose, 
> any dissemination or disclosure, either whole or partial, is prohibited 
> except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or use any 
> part of it. If you have received this message in error, please delete it and 
> all copies from your system and notify the sender immediately by return 
> message.
>
> E-mail communication cannot be guaranteed to be timely secure, error or 
> virus-free.
> 




Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. 

[petsc-users] Near null space for a fieldsplit in petsc4py

2023-07-12 Thread TARDIEU Nicolas via petsc-users
Dear PETSc team,

In the attached example, I set up a block pc for a saddle-point problem in 
petsc4py. The IS define the unknowns, namely some physical quantity (phys) and 
a Lagrange multiplier (lags).
I would like to attach a near null space to the physical block, in order to get 
the best performance from an AMG pc. 
I have been trying hard, attaching it to the initial block, to the IS but no 
matter what I am doing, when it comes to "ksp_view", no near null space is 
attached to the matrix.

Could you please help me figure out what I am doing wrong ?

Thanks,
Nicolas




Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


test.tgz
Description: test.tgz


Re: [petsc-users] SNES and TS for nonlinear quasi-static problems

2022-12-19 Thread TARDIEU Nicolas via petsc-users
Dear Matt and Jed,

Thank you for your answers. I'll have a look at Ratel to see how to set-up a 
quasi-static nonlinear problem with TS and SNES.

Best regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : j...@jedbrown.org 
Envoyé : lundi 19 décembre 2022 14:40
À : Matthew Knepley ; TARDIEU Nicolas 

Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] SNES and TS for nonlinear quasi-static problems

Indeed, this is exactly how we do quasistatic analysis for solid mechanics in 
Ratel 
(https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fmicromorph%2Fratel=05%7C01%7Cnicolas.tardieu%40edf.fr%7C08e0ffed6942443fe5e908dae1c6c819%7Ce242425b70fc44dc9ddfc21e304e6c80%7C1%7C0%7C638070541137140223%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=9E63JeIqTU1efxC8ij5OaL6XWPcErHbaVAAZwpvPY3o%3D=0)
 -- make sure to choose an L-stable integrator (backward Euler being the most 
natural choice). Implicit dynamics can be done by choosing a suitable 
integrator, like TSALPHA2, with almost no code change to the residual (only 
adding the mass term in DMTSSetI2Function()).

Matthew Knepley  writes:

> On Mon, Dec 19, 2022 at 6:12 AM TARDIEU Nicolas via petsc-users <
> petsc-users@mcs.anl.gov> wrote:
>
>> Dear PETSc users,
>>
>> I plan to solve nonlinear quasi-static problems with PETSc. More
>> precisely, these are solid mechanics problems with elasto-plasticity.
>> So they do not involve  "physical time", rather  "pseudo time", which is
>> mandatory to describe the stepping of the loading application.
>> In general, the loading vector F(x, t) is expressed as the following
>> product  F(x, t)=F0(x)*g(t), where g is a scalar function of the
>> pseudo-time.
>>
>> I see how to use a SNES in order to solve a certain step of the loading
>> history but I wonder if a TS can be used to deal with the loading history
>> through the definition of this g(t) function ?
>>
>
> I believe so. We would want you to formulate it as a differential equation,
>
>   F(x, \dot x, t) = G(x)
>
> which is your case is easy
>
>   F(x, t) = 0
>
> so you would just put your function completely into the IFunction. Since
> there is no \dot x term, this is a DAE,
> and you need to use one of the solvers for that.
>
>
>> Furthermore, since too large load steps can lead to non-convergence, a
>> stepping strategy is almost always required to restart a load step that
>> failed. Does TS offer such a feature ?
>>
>
> I think you can use PETSc adaptation. There is a PID option, which might be
> able to capture your behavior.
>
>   Thanks,
>
>   Matt
>
>
>> Thank you for your answers.
>> Regards,
>> Nicolas
>> --
>> *Nicolas Tardieu*
>> *Ing PhD Computational Mechanics*
>> EDF - R Dpt ERMES
>> PARIS-SACLAY, FRANCE
>>
>>
>> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
>> établis à l'intention exclusive des destinataires et les informations qui y
>> figurent sont strictement confidentielles. Toute utilisation de ce Message
>> non conforme à sa destination, toute diffusion ou toute publication totale
>> ou partielle, est interdite sauf autorisation expresse.
>>
>> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de
>> le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou
>> partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de
>> votre système, ainsi que toutes ses copies, et de n'en garder aucune trace
>> sur quelque support que ce soit. Nous vous remercions également d'en
>> avertir immédiatement l'expéditeur par retour du message.
>>
>> Il est impossible de garantir que les communications par messagerie
>> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute
>> erreur ou virus.
>> 
>>
>> This message and any attachments (the 'Message') are intended solely for
>> the addressees. The information contained in this Message is confidential.
>> Any use of information contained in this Message not in accord with its
>> purpose, any dissemination or disclosure, either whole or partial, is
>> prohibited except formal approval.
>>
>> If you are not the addressee, you may not copy, forward, disclose or use
>> any part of it. If you have received this message in error, please delete
>> it and all copies from your system and notify the sender immediately by
>> return message.
>>
>> E-ma

[petsc-users] SNES and TS for nonlinear quasi-static problems

2022-12-19 Thread TARDIEU Nicolas via petsc-users
Dear PETSc users,

I plan to solve nonlinear quasi-static problems with PETSc. More precisely, 
these are solid mechanics problems with elasto-plasticity.
So they do not involve  "physical time", rather  "pseudo time", which is 
mandatory to describe the stepping of the loading application.
In general, the loading vector F(x, t) is expressed as the following product  
F(x, t)=F0(x)*g(t), where g is a scalar function of the pseudo-time.

I see how to use a SNES in order to solve a certain step of the loading history 
but I wonder if a TS can be used to deal with the loading history through the 
definition of this g(t) function ?

Furthermore, since too large load steps can lead to non-convergence, a stepping 
strategy is almost always required to restart a load step that failed. Does TS 
offer such a feature ?

Thank you for your answers.
Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


Re: [petsc-users] Trouble with ISEmbed

2022-10-21 Thread TARDIEU Nicolas via petsc-users
Dear Pierre,

To complete my last post, in fact, the initial code (playing with the LGMap) 
was correct. It was my test case that was wrong.
Once fixed according to your suggestion, everything turns out to be OK.
I am nevertheless wondering if this IS embeding according to the global 
numbering should not be a native PTESc's feature ?

Thank you again,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : TARDIEU Nicolas 
Envoyé : jeudi 20 octobre 2022 11:45
À : pie...@joliv.et 
Cc : petsc-users@mcs.anl.gov 
Objet : RE: [petsc-users] Trouble with ISEmbed

Dear Pierre,

You fixed the problem! Thank you warmly for your precious help.

Best regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : pie...@joliv.et 
Envoyé : mercredi 19 octobre 2022 22:22
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] Trouble with ISEmbed

Sorry, I’m not very proficient in petsc4py, and there are a bunch of interfaces 
missing, e.g., ISShift(), so it may not be optimal, but I hope you’ll 
understand.
First, you’ll need to regenerate the .bin by uncommenting the proper part of 
the code.
That is because you were initially generating a 20x20 matrix, with 4 fields per 
unknown.
That’s 5 unknowns, and so, with two processes, 10 rows per process is not 
consistent as 10/4 is not an integer — I don’t know how to force, in petsc4py, 
the local size to 12 on process #0 and 8 on process #1.
The modified code generates a 16x16 matrices so it remains consistent.
If you then run the first part of the program, you’ll get both B_uu and B_pp 
from B instead of A, with one, two, or four processes.
Again, that should work for arbitrary number of processes, you just need to be 
careful that your local dimensions are consistent with the number of fields.

Thanks,
Pierre



On 19 Oct 2022, at 5:01 PM, Pierre Jolivet 
mailto:pie...@joliv.et>> wrote:



On 19 Oct 2022, at 4:32 PM, TARDIEU Nicolas 
mailto:nicolas.tard...@edf.fr>> wrote:

Dear Pierre,

Thank you very much for your answer. I have the same explanation as you for the 
code I sent.
But what I would like to do is the following : I have the full matrix A with 
fields u, p and t (which are interlaced in the real application). I want to 
extract B=A(u+p, u+p). *Then* I would like to extract the (u, u) block from B - 
let us call it B_uu.
In fact, B_uu=A_uu but I really need to do the extraction from B.
And I am missing something since I have to play with different numberings when 
switching the IS from A to B.

Is it clear enough 

That’s cristal clear.
If the fields are interlaced, that’s actually easier to do, because you 
preserve the distribution, and there is less data movement.
I’ll try to fix your code in the case where the fields are interlaced if now 
one gives you another answer in the meantime.

Thanks,
Pierre

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : pie...@joliv.et<mailto:pie...@joliv.et> 
mailto:pie...@joliv.et>>
Envoyé : mercredi 19 octobre 2022 14:51
À : TARDIEU Nicolas mailto:nicolas.tard...@edf.fr>>
Cc : petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> 
mailto:petsc-users@mcs.anl.gov>>
Objet : Re: [petsc-users] Trouble with ISEmbed

On two processes, you have a different distribution for u and u+p.
IS Object: 2 MPI processes
  type: general
[0] Number of indices in set 5
[0] 0 0
[0] 1 1
[0] 2 2
[0] 3 3
[0] 4 4
[1] Number of indices in set 5
[1] 0 5
[1] 1 6
[1] 2 7
[1] 3 8
[1] 4 9
IS Object: 2 MPI processes
  type: general
[0] Number of indices in set 8
[0] 0 0
[0] 1 1
[0] 2 2
[0] 3 3
[0] 4 4
[0] 5 5
[0] 6 6
[0] 7 7
[1] Number of indices in set 7
[1] 0 8
[1] 1 9
[1] 2 10
[1] 3 11
[1] 4 12
[1] 5 13
[1] 6 14
ISEmbed() only works on local indices, so when you embed u into u+p, on the 
second process, you miss the row/column indices 5, 6, 7 of B = A(u+p, u+p).
Thus, you end up with a matrix of dimension size(u) - 3 = 10 - 3 = 7, with just 
the row/column indices 8 and 9 being selected by the second process.
What is it that you want to do exactly? Play with ISEmbed(), or get A(u, u) 
without using A but B instead?

Thanks,
Pierre

> On 19 Oct 2022, at 12:00 PM, TARDIEU Nicolas via petsc-users 
> mailto:petsc-users@mcs.anl.gov>> wrote:
>
> Dear PETSc Team,
>
> I am trying to use IS embeding in parallel.
> In order to (try to) understand how it works, I have built a simple example, 
> attached to this email.
>
> I consider a 20X20 matrix. The dof (u, p, t) in global numbering are the 
> following :
> u: 0..9 p: 10..14 t: 15..19
>
> I have defined 4 IS to describe the dof  u, p, t and the agglomeration of u 
> and p, called up.
> I first extract the submatrix 

Re: [petsc-users] Trouble with ISEmbed

2022-10-20 Thread TARDIEU Nicolas via petsc-users
Dear Pierre,

You fixed the problem! Thank you warmly for your precious help.

Best regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : pie...@joliv.et 
Envoyé : mercredi 19 octobre 2022 22:22
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] Trouble with ISEmbed

Sorry, I’m not very proficient in petsc4py, and there are a bunch of interfaces 
missing, e.g., ISShift(), so it may not be optimal, but I hope you’ll 
understand.
First, you’ll need to regenerate the .bin by uncommenting the proper part of 
the code.
That is because you were initially generating a 20x20 matrix, with 4 fields per 
unknown.
That’s 5 unknowns, and so, with two processes, 10 rows per process is not 
consistent as 10/4 is not an integer — I don’t know how to force, in petsc4py, 
the local size to 12 on process #0 and 8 on process #1.
The modified code generates a 16x16 matrices so it remains consistent.
If you then run the first part of the program, you’ll get both B_uu and B_pp 
from B instead of A, with one, two, or four processes.
Again, that should work for arbitrary number of processes, you just need to be 
careful that your local dimensions are consistent with the number of fields.

Thanks,
Pierre



On 19 Oct 2022, at 5:01 PM, Pierre Jolivet 
mailto:pie...@joliv.et>> wrote:



On 19 Oct 2022, at 4:32 PM, TARDIEU Nicolas 
mailto:nicolas.tard...@edf.fr>> wrote:

Dear Pierre,

Thank you very much for your answer. I have the same explanation as you for the 
code I sent.
But what I would like to do is the following : I have the full matrix A with 
fields u, p and t (which are interlaced in the real application). I want to 
extract B=A(u+p, u+p). *Then* I would like to extract the (u, u) block from B - 
let us call it B_uu.
In fact, B_uu=A_uu but I really need to do the extraction from B.
And I am missing something since I have to play with different numberings when 
switching the IS from A to B.

Is it clear enough 

That’s cristal clear.
If the fields are interlaced, that’s actually easier to do, because you 
preserve the distribution, and there is less data movement.
I’ll try to fix your code in the case where the fields are interlaced if now 
one gives you another answer in the meantime.

Thanks,
Pierre

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : pie...@joliv.et<mailto:pie...@joliv.et> 
mailto:pie...@joliv.et>>
Envoyé : mercredi 19 octobre 2022 14:51
À : TARDIEU Nicolas mailto:nicolas.tard...@edf.fr>>
Cc : petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> 
mailto:petsc-users@mcs.anl.gov>>
Objet : Re: [petsc-users] Trouble with ISEmbed

On two processes, you have a different distribution for u and u+p.
IS Object: 2 MPI processes
  type: general
[0] Number of indices in set 5
[0] 0 0
[0] 1 1
[0] 2 2
[0] 3 3
[0] 4 4
[1] Number of indices in set 5
[1] 0 5
[1] 1 6
[1] 2 7
[1] 3 8
[1] 4 9
IS Object: 2 MPI processes
  type: general
[0] Number of indices in set 8
[0] 0 0
[0] 1 1
[0] 2 2
[0] 3 3
[0] 4 4
[0] 5 5
[0] 6 6
[0] 7 7
[1] Number of indices in set 7
[1] 0 8
[1] 1 9
[1] 2 10
[1] 3 11
[1] 4 12
[1] 5 13
[1] 6 14
ISEmbed() only works on local indices, so when you embed u into u+p, on the 
second process, you miss the row/column indices 5, 6, 7 of B = A(u+p, u+p).
Thus, you end up with a matrix of dimension size(u) - 3 = 10 - 3 = 7, with just 
the row/column indices 8 and 9 being selected by the second process.
What is it that you want to do exactly? Play with ISEmbed(), or get A(u, u) 
without using A but B instead?

Thanks,
Pierre

> On 19 Oct 2022, at 12:00 PM, TARDIEU Nicolas via petsc-users 
> mailto:petsc-users@mcs.anl.gov>> wrote:
>
> Dear PETSc Team,
>
> I am trying to use IS embeding in parallel.
> In order to (try to) understand how it works, I have built a simple example, 
> attached to this email.
>
> I consider a 20X20 matrix. The dof (u, p, t) in global numbering are the 
> following :
> u: 0..9 p: 10..14 t: 15..19
>
> I have defined 4 IS to describe the dof  u, p, t and the agglomeration of u 
> and p, called up.
> I first extract the submatrix matrix(up,up), then  I would like to extract 
> from it the (u,u) block.
>
> The example runs OK in sequential but I do not obtain the (u,u) block on 2 
> processes.
>
> I have a mistake in the build of the sub-IS but I cannot find it for days.
>
> Best regards,
> Nicolas
> --
> Nicolas Tardieu
> Ing PhD Computational Mechanics
> EDF - R Dpt ERMES
> PARIS-SACLAY, FRANCE
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis 
> à l'intention exclusive des destinataires et les informations qui y figurent 
> sont strictement confidentielles. Toute utilisation de ce Mess

Re: [petsc-users] Trouble with ISEmbed

2022-10-19 Thread TARDIEU Nicolas via petsc-users
Dear Pierre,

Thank you very much for your answer. I have the same explanation as you for the 
code I sent.
But what I would like to do is the following : I have the full matrix A with 
fields u, p and t (which are interlaced in the real application). I want to 
extract B=A(u+p, u+p). *Then* I would like to extract the (u, u) block from B - 
let us call it B_uu.
In fact, B_uu=A_uu but I really need to do the extraction from B.
And I am missing something since I have to play with different numberings when 
switching the IS from A to B.

Is it clear enough 

Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : pie...@joliv.et 
Envoyé : mercredi 19 octobre 2022 14:51
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] Trouble with ISEmbed

On two processes, you have a different distribution for u and u+p.
IS Object: 2 MPI processes
  type: general
[0] Number of indices in set 5
[0] 0 0
[0] 1 1
[0] 2 2
[0] 3 3
[0] 4 4
[1] Number of indices in set 5
[1] 0 5
[1] 1 6
[1] 2 7
[1] 3 8
[1] 4 9
IS Object: 2 MPI processes
  type: general
[0] Number of indices in set 8
[0] 0 0
[0] 1 1
[0] 2 2
[0] 3 3
[0] 4 4
[0] 5 5
[0] 6 6
[0] 7 7
[1] Number of indices in set 7
[1] 0 8
[1] 1 9
[1] 2 10
[1] 3 11
[1] 4 12
[1] 5 13
[1] 6 14
ISEmbed() only works on local indices, so when you embed u into u+p, on the 
second process, you miss the row/column indices 5, 6, 7 of B = A(u+p, u+p).
Thus, you end up with a matrix of dimension size(u) - 3 = 10 - 3 = 7, with just 
the row/column indices 8 and 9 being selected by the second process.
What is it that you want to do exactly? Play with ISEmbed(), or get A(u, u) 
without using A but B instead?

Thanks,
Pierre

> On 19 Oct 2022, at 12:00 PM, TARDIEU Nicolas via petsc-users 
>  wrote:
>
> Dear PETSc Team,
>
> I am trying to use IS embeding in parallel.
> In order to (try to) understand how it works, I have built a simple example, 
> attached to this email.
>
> I consider a 20X20 matrix. The dof (u, p, t) in global numbering are the 
> following :
> u: 0..9 p: 10..14 t: 15..19
>
> I have defined 4 IS to describe the dof  u, p, t and the agglomeration of u 
> and p, called up.
> I first extract the submatrix matrix(up,up), then  I would like to extract 
> from it the (u,u) block.
>
> The example runs OK in sequential but I do not obtain the (u,u) block on 2 
> processes.
>
> I have a mistake in the build of the sub-IS but I cannot find it for days.
>
> Best regards,
> Nicolas
> --
> Nicolas Tardieu
> Ing PhD Computational Mechanics
> EDF - R Dpt ERMES
> PARIS-SACLAY, FRANCE
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis 
> à l'intention exclusive des destinataires et les informations qui y figurent 
> sont strictement confidentielles. Toute utilisation de ce Message non 
> conforme à sa destination, toute diffusion ou toute publication totale ou 
> partielle, est interdite sauf autorisation expresse.
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
> copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. 
> Si vous avez reçu ce Message par erreur, merci de le supprimer de votre 
> système, ainsi que toutes ses copies, et de n'en garder aucune trace sur 
> quelque support que ce soit. Nous vous remercions également d'en avertir 
> immédiatement l'expéditeur par retour du message.
> Il est impossible de garantir que les communications par messagerie 
> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
> erreur ou virus.
> 
> This message and any attachments (the 'Message') are intended solely for the 
> addressees. The information contained in this Message is confidential. Any 
> use of information contained in this Message not in accord with its purpose, 
> any dissemination or disclosure, either whole or partial, is prohibited 
> except formal approval.
> If you are not the addressee, you may not copy, forward, disclose or use any 
> part of it. If you have received this message in error, please delete it and 
> all copies from your system and notify the sender immediately by return 
> message.
> E-mail communication cannot be guaranteed to be timely secure, error or 
> virus-free.
> 




Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le fai

[petsc-users] Trouble with ISEmbed

2022-10-19 Thread TARDIEU Nicolas via petsc-users
Dear PETSc Team,

I am trying to use IS embeding in parallel.
In order to (try to) understand how it works, I have built a simple example, 
attached to this email.

I consider a 20X20 matrix. The dof (u, p, t) in global numbering are the 
following :
u: 0..9 p: 10..14 t: 15..19

I have defined 4 IS to describe the dof  u, p, t and the agglomeration of u and 
p, called up.
I first extract the submatrix matrix(up,up), then  I would like to extract from 
it the (u,u) block.

The example runs OK in sequential but I do not obtain the (u,u) block on 2 
processes.

I have a mistake in the build of the sub-IS but I cannot find it for days.

Best regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


is_pb.tgz
Description: is_pb.tgz


Re: [petsc-users] non-manifold DMPLEX

2021-12-16 Thread TARDIEU Nicolas via petsc-users
Dear Yuan,

I had read with great interest your posts on the mailing-list. I am also a 
structural mechanics practitioner and I share your need to manage non-maniforld 
meshes.
I will let you know if we manage to do stuff with this kind of meshes in DMPLEX.

Regards,
Nicolas


De : yua...@advancesoft.jp 
Envoyé : jeudi 16 décembre 2021 06:47
À : TARDIEU Nicolas 
Cc : knep...@gmail.com ; Patrick Sanan 
; petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] non-manifold DMPLEX

Dear Nicolas :

Sorry for cutting in!

I'd like to indicate that I have also encountered the same problem. Pls refer 
to the follows

https://www.mail-archive.com/petsc-users@mcs.anl.gov/msg42462.html<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mail-archive.com%2Fpetsc-users%40mcs.anl.gov%2Fmsg42462.html=04%7C01%7Cnicolas.tardieu%40edf.fr%7C06d686d98ff44f43d12508d9c0578bae%7Ce242425b70fc44dc9ddfc21e304e6c80%7C1%7C0%7C637752305255610253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=qAaDA96DUChiUCYf0VEO96AIHj8tMWv%2BGNe0v2oQrkc%3D=0>

I have read those kinds of mesh successfully  but my program cracked when doing 
DMPlexInterpolate. It would be great that you could solve this problem.

Yuan


2021年12月13日(月) 6:36 TARDIEU Nicolas via petsc-users 
mailto:petsc-users@mcs.anl.gov>>:
Dear Patrick and Matthew,

Thank you very much for your answers. I am gonna try to set up such a test by 
assigning cell types.
Shall I open a MR in order to contribute this example ?

Regards,
Nicolas


De : knep...@gmail.com<mailto:knep...@gmail.com> 
mailto:knep...@gmail.com>>
Envoyé : dimanche 12 décembre 2021 12:17
À : Patrick Sanan mailto:patrick.sa...@gmail.com>>
Cc : TARDIEU Nicolas mailto:nicolas.tard...@edf.fr>>; 
petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> 
mailto:petsc-users@mcs.anl.gov>>
Objet : Re: [petsc-users] non-manifold DMPLEX

On Sun, Dec 12, 2021 at 6:11 AM Patrick Sanan 
mailto:patrick.sa...@gmail.com>> wrote:
Here you have the following "points":

- 1 3-cell (the cube volume)
- 7 2-cells (the 6 faces of the cube plus the extra one)
- 16 1-cells  (the 12 edges of the cube, plus 3 extra ones from the extra face, 
plus the extra edge)
- 11 0-cells (the 8 vertices of the cube, pus 2 extra ones from the extra face, 
plus the extra vertex)

You could encode your mesh as here, by directly specifying relationships 
between these points in the Hasse diagram:
https://petsc.org/release/docs/manual/dmplex/#representing-unstructured-grids<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpetsc.org%2Frelease%2Fdocs%2Fmanual%2Fdmplex%2F%23representing-unstructured-grids=04%7C01%7Cnicolas.tardieu%40edf.fr%7C06d686d98ff44f43d12508d9c0578bae%7Ce242425b70fc44dc9ddfc21e304e6c80%7C1%7C0%7C637752305255610253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=lgHWjIjpkXyRFrz%2BD22nhSCc%2FVLnDbDAi%2BXohB0mTnM%3D=0>

Then, maybe the special relation is captured because you've defined the "cone" 
or "support" for each "point", which tells you about the local topology 
everywhere. E.g. to take the simpler case, three of the faces have the yellow 
edge in their "cone", or equivalently the yellow edge has those three faces in 
its "support".

This is correct. I can help you make this if you want. I think if you assign 
cell types, you can even get Plex to automatically interpolate.

Note that with this kind of mesh, algorithms which assume a uniform cell 
dimension will break, but I am guessing you would not
be interested in those anyway.

  Thanks,

Matt

Am Fr., 10. Dez. 2021 um 17:04 Uhr schrieb TARDIEU Nicolas via petsc-users 
mailto:petsc-users@mcs.anl.gov>>:
Dear PETSc Team,

Following a previous discussion on the mailing list, I'd like to experiment 
with DMPLEX with a very simple non-manifold mesh as shown in the attached 
picture : a cube connected to a square by an edge and to an edge by a point.
I have read some of the papers that Matthew et al. have written, but I must 
admit that I do not see how to start...
I see how the define the different elements but I do not see how to specify the 
special relationship between the cube and the square and between the cube and 
the edge.
Once it will have been set correctly, what I am hoping is to be able to use all 
the nice features of the DMPLEX object.

Best regards,
Nicolas

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, 

Re: [petsc-users] non-manifold DMPLEX

2021-12-12 Thread TARDIEU Nicolas via petsc-users
Dear Patrick and Matthew,

Thank you very much for your answers. I am gonna try to set up such a test by 
assigning cell types.
Shall I open a MR in order to contribute this example ?

Regards,
Nicolas


De : knep...@gmail.com 
Envoyé : dimanche 12 décembre 2021 12:17
À : Patrick Sanan 
Cc : TARDIEU Nicolas ; petsc-users@mcs.anl.gov 

Objet : Re: [petsc-users] non-manifold DMPLEX

On Sun, Dec 12, 2021 at 6:11 AM Patrick Sanan 
mailto:patrick.sa...@gmail.com>> wrote:
Here you have the following "points":

- 1 3-cell (the cube volume)
- 7 2-cells (the 6 faces of the cube plus the extra one)
- 16 1-cells  (the 12 edges of the cube, plus 3 extra ones from the extra face, 
plus the extra edge)
- 11 0-cells (the 8 vertices of the cube, pus 2 extra ones from the extra face, 
plus the extra vertex)

You could encode your mesh as here, by directly specifying relationships 
between these points in the Hasse diagram:
https://petsc.org/release/docs/manual/dmplex/#representing-unstructured-grids<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpetsc.org%2Frelease%2Fdocs%2Fmanual%2Fdmplex%2F%23representing-unstructured-grids=04%7C01%7Cnicolas.tardieu%40edf.fr%7Cb7faa53e924149df02bb08d9bd610c10%7Ce242425b70fc44dc9ddfc21e304e6c80%7C1%7C0%7C637749046784571371%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=NX0gPHyjCX3kU%2BZIAZwZQ4951FpJCdri36OzDfRoLbk%3D=0>

Then, maybe the special relation is captured because you've defined the "cone" 
or "support" for each "point", which tells you about the local topology 
everywhere. E.g. to take the simpler case, three of the faces have the yellow 
edge in their "cone", or equivalently the yellow edge has those three faces in 
its "support".

This is correct. I can help you make this if you want. I think if you assign 
cell types, you can even get Plex to automatically interpolate.

Note that with this kind of mesh, algorithms which assume a uniform cell 
dimension will break, but I am guessing you would not
be interested in those anyway.

  Thanks,

    Matt

Am Fr., 10. Dez. 2021 um 17:04 Uhr schrieb TARDIEU Nicolas via petsc-users 
mailto:petsc-users@mcs.anl.gov>>:
Dear PETSc Team,

Following a previous discussion on the mailing list, I'd like to experiment 
with DMPLEX with a very simple non-manifold mesh as shown in the attached 
picture : a cube connected to a square by an edge and to an edge by a point.
I have read some of the papers that Matthew et al. have written, but I must 
admit that I do not see how to start...
I see how the define the different elements but I do not see how to specify the 
special relationship between the cube and the square and between the cube and 
the edge.
Once it will have been set correctly, what I am hoping is to be able to use all 
the nice features of the DMPLEX object.

Best regards,
Nicolas

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


--
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://www.cse.buffalo.edu/~knepley/<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cse.buffalo.edu%2F~knepley%2F=04%7C01%7Cnicolas.tardieu%40edf

[petsc-users] non-manifold DMPLEX

2021-12-10 Thread TARDIEU Nicolas via petsc-users
Dear PETSc Team,

Following a previous discussion on the mailing list, I'd like to experiment 
with DMPLEX with a very simple non-manifold mesh as shown in the attached 
picture : a cube connected to a square by an edge and to an edge by a point.
I have read some of the papers that Matthew et al. have written, but I must 
admit that I do not see how to start...
I see how the define the different elements but I do not see how to specify the 
special relationship between the cube and the square and between the cube and 
the edge.
Once it will have been set correctly, what I am hoping is to be able to use all 
the nice features of the DMPLEX object.

Best regards,
Nicolas



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


Re: [petsc-users] How to construct DMPlex of cells with different topological dimension?

2021-11-03 Thread TARDIEU Nicolas via petsc-users
Dear Matt,

Thank you for the additional information.
I do agree that I will have to write code to describe the interpolation I need 
for a multi-model problem.
Let me try to illustrate my point on the simple mesh I have attached to this 
email. It is done with Gmsh but other generators I use can do the same.
The mesh is composed of :

- a 3D part, volume_3d, where continuum mechanics equations will be assigned 
(displacement dof)
- a 2D part, neumann_2d, which is a face of volume_3d and that will be used to 
integrate a Neumann condition assigned to volume_3d (it shares the displacement 
dof of volume_3d)
- a 2D part, shell_2d, where shell equations will be assigned 
(displacement+rotation dof)
- a 1D part, beam_1d, where beam equations will be assigned  
(displacement+rotation dof)

I can imagine that it is impossible, only from the knowledge of the mesh, to 
guess the interpolation. But I would be happy to try to write a small DMPlex 
test to try to describe such a model with a little help from you or another 
PETSc practitioner.

Regards,
Nicolas

De : knep...@gmail.com 
Envoyé : mercredi 3 novembre 2021 12:14
À : TARDIEU Nicolas 
Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] How to construct DMPlex of cells with different 
topological dimension?

On Wed, Nov 3, 2021 at 4:20 AM TARDIEU Nicolas via petsc-users 
mailto:petsc-users@mcs.anl.gov>> wrote:
Dear all,

As a practitioner of structural mechanics, I modestly wish to support Yuan's 
argument. Model mixing, and consequently finite element dimension mixing, is 
(perhaps unfortunately) an inescapable practice of this engineering field. This 
has consequences not only on the nature of the meshes we use but also on the 
quasi-systematic recourse to linear relations (also named multipoints 
constraints, MPC) between the degrees of freedom of the different models (for 
example, linking a shell to a 3D part requires to write kinematic connections 
between displacements and rotations).
DMPlex handling such meshes would be a really great contribution for the 
structural mechanics community.

Nicolas,

>From my point of view, this is supported, so it would be good to understand 
>what you do not think is supported:

1) Multiple models

 This is supported in the sense that you can use any data layout, and 
assemble any system you want into it. You can use
 beams along edges and shells on faces if you want. I have examples of 
different equations in different pieces of the domain.

2) Mesh with pieces hanging off

 This is supported in the sense that you can input such a mesh. You have to 
describe it completely, but it can be input and iterated over.

3) Mesh Interpolation

 If you only want to input vertices _and_ you want to input different 
dimensional objects, you will have to write code. There is no way to guess
 what you mean from a collection of vertices. You could

 a) Directly  call GetRawFaces() to do the interpolation per cell before 
input (seems easier)

 b) Rewrite the interpolation loop to check whether cell types have been 
set and just call the appropriate interpolation if they have

I guess you are arguing that I should add the code for 3). Most people I have 
interacted with use a mesh generator to make the meshes, so
I concentrated on importing those formats. Can meshes like these be made with 
those generators?

  Thanks,

 Matt

Best regards,
Nicolas


Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notif

Re: [petsc-users] How to construct DMPlex of cells with different topological dimension?

2021-11-03 Thread TARDIEU Nicolas via petsc-users
Dear all,

As a practitioner of structural mechanics, I modestly wish to support Yuan's 
argument. Model mixing, and consequently finite element dimension mixing, is 
(perhaps unfortunately) an inescapable practice of this engineering field. This 
has consequences not only on the nature of the meshes we use but also on the 
quasi-systematic recourse to linear relations (also named multipoints 
constraints, MPC) between the degrees of freedom of the different models (for 
example, linking a shell to a 3D part requires to write kinematic connections 
between displacements and rotations).
DMPlex handling such meshes would be a really great contribution for the 
structural mechanics community.


Best regards,
Nicolas




Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


Re: [petsc-users] GMRES Breakdown

2021-09-28 Thread TARDIEU Nicolas via petsc-users
Dear Jose and Matt,


I thank you very much for your super-fast answers. And I apologize for not 
having checked the list of changes.


Best regards,
Nicolas
--
Nicolas Tardieu
Ingénieur Chercheur
Groupe Dynamique des Equipements - T6B
EDF - R Dpt ERMES
nicolas.tard...@edf.fr
Tél. : 01 78 19 37 49

De : knep...@gmail.com 
Envoyé : mardi 28 septembre 2021 14:54
À : TARDIEU Nicolas
Cc : petsc-users@mcs.anl.gov
Objet : Re: [petsc-users] GMRES Breakdown

On Tue, Sep 28, 2021 at 8:39 AM TARDIEU Nicolas via petsc-users 
mailto:petsc-users@mcs.anl.gov>> wrote:
Dear PETSc Team,

We, code_aster's development team, are using PETSc in our application for years 
now, mainly for the KSP et PC features. We run tests cases every week without 
problems.
After upgrading from PETSc 3.12.3 to 3.15.3, a test case using GMRES failed 
with KSP_DIVERGED_BREAKDOWN. By rolling back to 3.12.3, we have checked that 
the upgrade is the origin of the failure.

We know this can occur with GMRES but it is the first time we are facing this 
situation.

Is it a bug ? If yes, how can we help to fix it ? If no, what can we do ? Could 
the flexible version of GMRES be an alternative ?

This is not a bug, but we did change the operation. We now check whether there 
is a significant residual spike after a restart. We
want to let the user know that this likely means that the solver is 
inappropriate for the problem. As Jose notes, you can turn off this
behavior.

  Thanks,

 Matt

Best regards,
Nicolas
--
Nicolas Tardieu
Ing, PhD

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


--
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://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your syste

[petsc-users] GMRES Breakdown

2021-09-28 Thread TARDIEU Nicolas via petsc-users
Dear PETSc Team,

We, code_aster's development team, are using PETSc in our application for years 
now, mainly for the KSP et PC features. We run tests cases every week without 
problems.
After upgrading from PETSc 3.12.3 to 3.15.3, a test case using GMRES failed 
with KSP_DIVERGED_BREAKDOWN. By rolling back to 3.12.3, we have checked that 
the upgrade is the origin of the failure.

We know this can occur with GMRES but it is the first time we are facing this 
situation.

Is it a bug ? If yes, how can we help to fix it ? If no, what can we do ? Could 
the flexible version of GMRES be an alternative ?


Best regards,
Nicolas
--
Nicolas Tardieu
Ing, PhD



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.


Re: [petsc-users] GAMG scalability for serendipity 20 nodes hexahedra

2019-06-27 Thread TARDIEU Nicolas via petsc-users


Thank you very much for your answer, Mark.
Do you think it is worth it, to play around with aggregation variants? Plain 
aggregation "à la Notay" for instance.

Nicolas
 



 

De : mfad...@lbl.gov 
Envoyé : mercredi 26 juin 2019 22:37
À : TARDIEU Nicolas
Cc : PETSc users list
Objet : Re: [petsc-users] GAMG scalability for serendipity 20 nodes hexahedra
  

I get growth with Q2 elements also. I've never seen anyone report scaling of 
high order elements with generic AMG.


First, discretizations are very important for AMG solver. All optimal solvers 
really. I've never looked at serendipity elements. It might be a good idea to 
try Q2 as well.


SNES ex56 is 3D elasticity on a cube with tensor elements. Below are parameters 
that I have been using. I see some evidence that more smoothing steps 
(-mg_levels_ksp_max_it N) helps "scaling" but not necessarily solve time.


An example of what I see, running ex56 with -cells 8,12,16  -max_conv_its 5 and 
the below params I get these iteration counts: 19, 20, 31, 31, 38.


My guess is that you need higher order interpolation for higher order elements 
and when you add a new level you get an increase in condition number (ie, it is 
not an optimal MG method). But, the original smoothed aggregation paper did 
have high order discretizations  their theory said it was still optimal, as I 
recall.


Mark


-log_view
-max_conv_its 5
-petscspace_degree 2
-snes_max_it 2
-ksp_max_it 100
-ksp_type cg
-ksp_rtol 1.e-11
-ksp_atol 1.e-71
-ksp_norm_type unpreconditioned
-snes_rtol 1.e-10
-pc_type gamg
-pc_gamg_type agg
-pc_gamg_agg_nsmooths 1
-pc_gamg_coarse_eq_limit 1000
-pc_gamg_process_eq_limit 200
-pc_gamg_reuse_interpolation true
-ksp_converged_reason
-snes_monitor_short
-ksp_monitor_short
-snes_converged_reason
-use_mat_nearnullspace true
-mg_levels_ksp_max_it 4
-mg_levels_ksp_type chebyshev
-mg_levels_esteig_ksp_type cg
-gamg_est_ksp_type cg
-gamg_est_ksp_max_it 10
-mg_levels_esteig_ksp_max_it 10
-mg_levels_ksp_chebyshev_esteig 0,0.05,0,1.05
-mg_levels_pc_type jacobi
-petscpartitioner_type simple
-mat_block_size 3
-matptap_via scalable
-run_type 1
-pc_gamg_repartition false
-pc_gamg_threshold 0.0
-pc_gamg_threshold_scale .25
-pc_gamg_square_graph 1
-check_pointer_intensity 0
-snes_type ksponly
-ex56_dm_view
-options_left




 


On Wed, Jun 26, 2019 at 8:21 AM TARDIEU Nicolas via petsc-users 
 wrote:
 
Dear PETSc team,


I have run a simple weak scalability test based on canonical 3D elasticity 
problem : a cube, meshed with 8 nodes hexaedra, clamped on one of its face and 
submited to a pressure load on the opposite face. 
I am using the FGMRES ksp with GAMG as preconditioner. I have set the rigid 
body modes using MatNullSpaceCreateRigidBody and its works like a charm. The 
solver exhibit a perfect scalability until 800 cores (I haven't tested with 
more cores). The ksp always  converges in 11 or 12 iterations. Let me emphasize 
that I use GAMG default options.



Nevertheless, if I switch to a quadratic mesh with 20 nodes serendipity 
hexaedra, the weak scalability deteriorates. For instance the number of 
iteration for the ksp increases from 20 iterations for the smallest problem to 
30 for the biggest. 
Here is my question : I wonder what is the right tuning for GAMG to recover the 
same weak scalability as in the linear case? I apologize if this is a stupid 
question...





 
I  look forward to reading you,  
Nicolas

  

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute  diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.
Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses  copies, et de n'en garder aucune trace sur quelque 
support que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.
Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.

This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure,  either whole or partial, is prohibited except 
formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately 

[petsc-users] GAMG scalability for serendipity 20 nodes hexahedra

2019-06-26 Thread TARDIEU Nicolas via petsc-users
Dear PETSc team,


I have run a simple weak scalability test based on canonical 3D elasticity 
problem : a cube, meshed with 8 nodes hexaedra, clamped on one of its face and 
submited to a pressure load on the opposite face.

I am using the FGMRES ksp with GAMG as preconditioner. I have set the rigid 
body modes using MatNullSpaceCreateRigidBody and its works like a charm. The 
solver exhibit a perfect scalability until 800 cores (I haven't tested with 
more cores). The ksp always converges in 11 or 12 iterations. Let me emphasize 
that I use GAMG default options.


Nevertheless, if I switch to a quadratic mesh with 20 nodes serendipity 
hexaedra, the weak scalability deteriorates. For instance the number of 
iteration for the ksp increases from 20 iterations for the smallest problem to 
30 for the biggest.

Here is my question : I wonder what is the right tuning for GAMG to recover the 
same weak scalability as in the linear case? I apologize if this is a stupid 
question...

I look forward to reading you,
Nicolas




Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.