[petsc-users] Multi-physics meshes with PETSc DM?

Andrew Ho andrewh0 at uw.edu
Sat Jul 30 12:19:45 CDT 2016


I am trying to solve a multi-physics problem consisting of some physics on
a rectangular domain which is split in half such that one set of physics is
solved on the left, and the other set of physics is solved on the right.

Each set has their own set of variable components, and I would like to not
allocate both variable sets across the entire domain because the physics in
one subdomain happens to have lots of components per mesh element, which
the other subdomain doesn't need except to compute boundary interactions.

For testing right now, I am using the attached gmsh file to generate a mesh
with 2 physical groups to represent each subdomain (called "left" and
"right"). It has periodic boundaries on all sides.

However, when I try to load the generated mesh into PETSc using the
*DMPlexCreateFromFile* function, PETSc complains that the mesh is not a
valid Gmsh file. I've attached the sample mesh, as well as the error
message PETSc spits out.

Here's the relevant code (should be a complete working example) which
re-creates what I'm doing:

#include <petsc.h>


> int main(int argc, char** argv)
> {
>   PetscInitialize(&argc, &argv, NULL, "multi physics testing");
>   DM dm;
>   CHKERRQ(DMPlexCreateFromFile(PETSC_COMM_WORLD, "periodic_square.msh",
> PETSC_TRUE, &dm));
>   PetscFinalize();
> }


What is the correct procedure for creating a multi-physics mesh using PETSc
DM objects for mesh management?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160730/8316638e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: periodic_square.geo
Type: application/octet-stream
Size: 521 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160730/8316638e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: periodic_square.msh
Type: model/mesh
Size: 433 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160730/8316638e/attachment.msh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: petsc_error.log
Type: text/x-log
Size: 3518 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160730/8316638e/attachment.bin>


More information about the petsc-users mailing list