[petsc-users] Unstructured mesh
Matthew Knepley
knepley at gmail.com
Fri Dec 10 07:04:12 CST 2021
On Fri, Dec 10, 2021 at 7:42 AM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalingam at stfc.ac.uk> wrote:
> Hi Matt,
>
>
>
> I intend to perform a scaling study – I have a few more questions from ex56
>
> *3D, tri-quadratic hexahedra (Q1), displacement finite element
> formulation.*
>
> i) What makes the problem non-linear? I believe SNES
> are used to solve non-linear problems.
>
It is a linear problem. We use SNES because it is easier to use it for
everything.
> ii) 2,2,1 does it present the number of elements used
> in each direction?
>
You can use -dm_view to show the mesh information actually used in the run.
> iii) What makes the problem unstructured? I believe the
> geometry is a cube or cuboid – is it because it uses DMPlex?
>
Yes.
> iv) Do any external FEM package with an unstructured
> problem domain has to use DMPlex mat type?
>
DMPlex is not a Mat type, but rather a DM type. I do not understand the
question. For example, LibMesh uses PETSc solvers but has
its own mesh types.
> v) What about -mat_type (not _dm_mat_type) ajicusparse
> – will it work with unstructured FEM discretised domains?
>
dm_mat_type is just a way of setting the MatType that the DM creates. You
can set it to whatever type you want. Since it uses MatSetValues()
there may be overhead in converting to that matrix type, but it should work.
> I tried to run two problems of ex56 with two different domain size ( -
> attached you find the log_view outputs of both on *gpus*) using _pc_type
> asm:
>
>
>
> ./ex56 -cells 2,2,1 -max_conv_its 2 -lx 1. -alpha .01 -petscspace_degree 1
> -ksp_type cg -ksp_monitor -ksp_rtol 1.e-8 -pc_type asm -snes_monitor
> -use_mat_nearnullspace true -snes_rtol 1.e-10 > output_221.txt
>
>
>
>
>
> ./ex56 -cells 10,10,5 -max_conv_its 2 -lx 1. -alpha .01 -petscspace_degree
> 1 -ksp_type cg -ksp_monitor -ksp_rtol 1.e-8 -pc_type asm -snes_monitor
> -use_mat_nearnullspace true -snes_rtol 1.e-10 > output_221.txt
>
>
>
> Below is the SNES iteration for problem with 2,2,1 cells which converges
> after two non-linear iterations:
>
>
>
> 0 SNES Function norm 0.000000000000e+00
>
> 0 SNES Function norm 7.529825940191e+01
>
> 1 SNES Function norm 4.734810707002e-08
>
> 2 SNES Function norm 1.382827243108e-14
>
Your KSP tolerance is too high, so it takes another iterate. Use -ksp_rtol
1e-10.
> Below is the SNES iteration for problem with 10,10,5 cells– why does it
> first decrease and then increase to *0 SNES Function norm
> 1.085975028558e+01* and finally converge?
>
>
>
> 0 SNES Function norm 2.892801019593e+01
>
> 1 SNES Function norm 5.361683383932e-07
>
> 2 SNES Function norm 1.726814199132e-14
>
> 0 SNES Function norm 1.085975028558e+01
>
> 1 SNES Function norm 2.294074693590e-07
>
> 2 SNES Function norm 2.491900236077e-14
>
You are solving the problem twice, probably because ex56 is in its
refinement loop.
Thanks,
Matt
> Kind regards,
>
> Karthik.
>
>
>
> *From: *Matthew Knepley <knepley at gmail.com>
> *Date: *Thursday, 2 December 2021 at 10:57
> *To: *"Chockalingam, Karthikeyan (STFC,DL,HC)" <
> karthikeyan.chockalingam at stfc.ac.uk>
> *Cc: *"petsc-users at mcs.anl.gov" <petsc-users at mcs.anl.gov>
> *Subject: *Re: [petsc-users] Unstructured mesh
>
>
>
> On Thu, Dec 2, 2021 at 3:33 AM Karthikeyan Chockalingam - STFC UKRI <
> karthikeyan.chockalingam at stfc.ac.uk> wrote:
>
> Hello,
>
>
>
> Are there example tutorials on unstructured mesh in ksp? Can some of them
> run on gpus?
>
>
>
> There are many unstructured grid examples, e.g. SNES ex13, ex17, ex56. The
> solver can run on the GPU, but the vector/matrix
>
> FEM assembly does not. I am working on that now.
>
>
>
> Thanks,
>
>
>
> Matt
>
>
>
> Kind regards,
>
> Karthik.
>
> This email and any attachments are intended solely for the use of the
> named recipients. If you are not the intended recipient you must not use,
> disclose, copy or distribute this email or any of its attachments and
> should notify the sender immediately and delete this email from your
> system. UK Research and Innovation (UKRI) has taken every reasonable
> precaution to minimise risk of this email or any attachments containing
> viruses or malware but the recipient should carry out its own virus and
> malware checks before opening the attachments. UKRI does not accept any
> liability for any losses or damages which the recipient may sustain due to
> presence of any viruses.
>
>
>
>
> --
>
> 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/>
>
--
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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211210/3661e7a1/attachment.html>
More information about the petsc-users
mailing list