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?

Attachment: periodic_square.geo
Description: Binary data

Attachment: periodic_square.msh
Description: Mesh model

[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------                                                                             
[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: File is not a valid Gmsh file
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.7.3, unknown 
[0]PETSC ERROR: bin/mesh_testing on a arch-linux2-c-opt named ahome by andrew Sat Jul 30 09:53:37 2016                                                                                         
[0]PETSC ERROR: Configure options --with-debugging=0 --prefix=/usr/local --COPTFLAGS="-O3 -march=native" --CXXOPTFLAGS="-O3 -march=native" --FOPTFLAGS="-O3 -march=native"                     
[0]PETSC ERROR: #1 DMPlexCreateGmsh() line 140 in /home/andrew/tools/petsc/src/dm/impls/plex/plexgmsh.c                                                                                        
[0]PETSC ERROR: #2 DMPlexCreateGmshFromFile() line 59 in /home/andrew/tools/petsc/src/dm/impls/plex/plexgmsh.c                                                                                 
[0]PETSC ERROR: #3 DMPlexCreateFromFile() line 1746 in /home/andrew/tools/petsc/src/dm/impls/plex/plexcreate.c                                                                                 
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------                                                                             
[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: File is not a valid Gmsh file
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.7.3, unknown 
[0]PETSC ERROR: bin/mesh_testing on a arch-linux2-c-opt named ahome by andrew Sat Jul 30 09:53:37 2016                                                                                         
[0]PETSC ERROR: Configure options --with-debugging=0 --prefix=/usr/local --COPTFLAGS="-O3 -march=native" --CXXOPTFLAGS="-O3 -march=native" --FOPTFLAGS="-O3 -march=native"                     
[0]PETSC ERROR: #4 DMPlexCreateGmsh() line 140 in /home/andrew/tools/petsc/src/dm/impls/plex/plexgmsh.c                                                                                        
[0]PETSC ERROR: #5 DMPlexCreateGmshFromFile() line 59 in /home/andrew/tools/petsc/src/dm/impls/plex/plexgmsh.c                                                                                 
[0]PETSC ERROR: #6 DMPlexCreateFromFile() line 1746 in /home/andrew/tools/petsc/src/dm/impls/plex/plexcreate.c                                                                                 
[0]PETSC ERROR: #7 main() line 10 in /home/andrew/code/research/dg/dg/examples/fvm/mesh_testing.cpp                                                                                            
[0]PETSC ERROR: No PETSc Option Table entries
[0]PETSC ERROR: ----------------End of Error Message -------send entire error message to [email protected]
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 62.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Reply via email to