[petsc-users] Unstructured mesh

Mark Adams mfadams at lbl.gov
Sun Dec 12 17:00:06 CST 2021


On Sun, Dec 12, 2021 at 3:19 PM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalingam at stfc.ac.uk> wrote:

> Thank for your response that was helpful. I have a couple of questions:
>
>
>
> (i)                  How can I control the level of refinement? I tried
> to pass the flag “-ex56_dm_refine 0” but that didn’t stop the refinement
> from 8 giving 32 cubes.
>

I answered this question recently but ex56 clobbers ex56_dm_refine in the
convergence loop. I have an MR that prints a warning if you provide a
ex56_dm_refine.

* snes/ex56 runs a convergence study and confusingly sets the options
manually, thus erasing your -ex56_dm_refine.

* To refine, use -max_conv_its N <3>, this sets the number of steps of
refinement. That is, the length of the convergence study

* You can adjust where it starts from with -cells i,j,k <1,1,1>
You do want to set this if you have multiple MPI processes so that the size
of this mesh is the number of processes. That way it starts with one cell
per process and refines from there.

(ii)                What does -cell 2,2,1 correspond to?
>

The initial mesh or mesh_0. The convergence test uniformly refines this
mesh. So if you want to refine this twice you could use -cells 8,8,4


> How can I determine the total number of dofs?
>
Unfortunately, that is not printed but you can calculate from the initial
cell grid, the order of the element and the refinement in each iteration of
the convergence tests.


> So that I can perform a scaling study by changing the input of the flag
> -cells.
>
>
>
You can and the convergence test gives you data for a strong speedup study
in one run. Each solve is put in its own "stage" of the output and you want
to look at KSPSolve lines in the log_view output.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211212/254081da/attachment-0001.html>


More information about the petsc-users mailing list