Re: [petsc-users] problem with generating simplicies mesh

2019-05-20 Thread Stefano Zampini via petsc-users
Matt,

The code is actually for 2d.

> On May 20, 2019, at 12:54 PM, Matthew Knepley via petsc-users 
>  wrote:
> 
> On Sun, May 19, 2019 at 9:22 AM 陳鳴諭 via petsc-users  > wrote:
> I have problem with generating simplicies mesh.
> I do as the description in DMPlexCreateBoxmesh says, but still meet error.
> 
> Stefano is right that you will need a mesh generator for a simplex mesh. 
> However, you are asking for
> a 1D mesh for which there are no generators. Since in 1D simplces and tensor 
> cells are the same, 
> just change it to tensor and it will work.
> 
>   Thanks,
> 
>  Matt
>  
> The following is the error message:
> [0]PETSC ERROR: - Error Message 
> --
> [0]PETSC ERROR: Argument out of range
> [0]PETSC ERROR: No grid generator of dimension 1 registered
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
>  for trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.11.1-723-g96d64d1  GIT 
> Date: 2019-05-15 13:23:17 +
> [0]PETSC ERROR: ./membrane on a arch-linux2-c-debug named 
> simon-System-Product-Name by simon Sun May 19 20:54:54 2019
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ 
> --with-fc=gfortran --download-mpich --download-fblaslapack
> [0]PETSC ERROR: #1 DMPlexGenerate() line 181 in 
> /home/simon/petsc/src/dm/impls/plex/plexgenerate.c
> [0]PETSC ERROR: #2 DMPlexCreateBoxMesh_Simplex_Internal() line 536 in 
> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
> [0]PETSC ERROR: #3 DMPlexCreateBoxMesh() line 1071 in 
> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
> [0]PETSC ERROR: #4 main() line 54 in /home/simon/Downloads/membrane.c
> [0]PETSC ERROR: PETSc Option Table entries:
> [0]PETSC ERROR: -dm_view
> [0]PETSC ERROR: End of Error Message ---send entire error 
> message to petsc-ma...@mcs.anl.gov--
> application called MPI_Abort(MPI_COMM_WORLD, 63) - process 0
> [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=63
> :
> system msg for write_line failure : Bad file descriptor
> 
> 
> 
> I need some help about this, please.
> 
> Simon
> 
> 
> -- 
> 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/ 


Re: [petsc-users] problem with generating simplicies mesh

2019-05-20 Thread Matthew Knepley via petsc-users
On Sun, May 19, 2019 at 9:22 AM 陳鳴諭 via petsc-users 
wrote:

> I have problem with generating simplicies mesh.
> I do as the description in DMPlexCreateBoxmesh says, but still meet error.
>

Stefano is right that you will need a mesh generator for a simplex mesh.
However, you are asking for
a 1D mesh for which there are no generators. Since in 1D simplces and
tensor cells are the same,
just change it to tensor and it will work.

  Thanks,

 Matt


> The following is the error message:
> [0]PETSC ERROR: - Error Message
> --
> [0]PETSC ERROR: Argument out of range
> [0]PETSC ERROR: No grid generator of dimension 1 registered
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.11.1-723-g96d64d1  GIT
> Date: 2019-05-15 13:23:17 +
> [0]PETSC ERROR: ./membrane on a arch-linux2-c-debug named
> simon-System-Product-Name by simon Sun May 19 20:54:54 2019
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> --with-fc=gfortran --download-mpich --download-fblaslapack
> [0]PETSC ERROR: #1 DMPlexGenerate() line 181 in
> /home/simon/petsc/src/dm/impls/plex/plexgenerate.c
> [0]PETSC ERROR: #2 DMPlexCreateBoxMesh_Simplex_Internal() line 536 in
> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
> [0]PETSC ERROR: #3 DMPlexCreateBoxMesh() line 1071 in
> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
> [0]PETSC ERROR: #4 main() line 54 in /home/simon/Downloads/membrane.c
> [0]PETSC ERROR: PETSc Option Table entries:
> [0]PETSC ERROR: -dm_view
> [0]PETSC ERROR: End of Error Message ---send entire
> error message to petsc-ma...@mcs.anl.gov--
> application called MPI_Abort(MPI_COMM_WORLD, 63) - process 0
> [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=63
> :
> system msg for write_line failure : Bad file descriptor
>
>
>
> I need some help about this, please.
>
> Simon
>


-- 
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/ 


Re: [petsc-users] problem with generating simplicies mesh

2019-05-19 Thread Stefano Zampini via petsc-users
You need a grid generator like triangle or tetgen. Reconfigure petsc adding
-- download-triangle --download-ctetgen

Il Dom 19 Mag 2019, 18:30 Mark Adams via petsc-users <
petsc-users@mcs.anl.gov> ha scritto:

> I would guess that you want 2 faces in each direction (the default so use
> NULL instead of faces).
>
> On Sun, May 19, 2019 at 9:23 AM 陳鳴諭 via petsc-users <
> petsc-users@mcs.anl.gov> wrote:
>
>> I have problem with generating simplicies mesh.
>> I do as the description in DMPlexCreateBoxmesh says, but still meet error.
>>
>> The following is the error message:
>> [0]PETSC ERROR: - Error Message
>> --
>> [0]PETSC ERROR: Argument out of range
>> [0]PETSC ERROR: No grid generator of dimension 1 registered
>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
>> for trouble shooting.
>> [0]PETSC ERROR: Petsc Development GIT revision: v3.11.1-723-g96d64d1  GIT
>> Date: 2019-05-15 13:23:17 +
>> [0]PETSC ERROR: ./membrane on a arch-linux2-c-debug named
>> simon-System-Product-Name by simon Sun May 19 20:54:54 2019
>> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
>> --with-fc=gfortran --download-mpich --download-fblaslapack
>> [0]PETSC ERROR: #1 DMPlexGenerate() line 181 in
>> /home/simon/petsc/src/dm/impls/plex/plexgenerate.c
>> [0]PETSC ERROR: #2 DMPlexCreateBoxMesh_Simplex_Internal() line 536 in
>> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
>> [0]PETSC ERROR: #3 DMPlexCreateBoxMesh() line 1071 in
>> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
>> [0]PETSC ERROR: #4 main() line 54 in /home/simon/Downloads/membrane.c
>> [0]PETSC ERROR: PETSc Option Table entries:
>> [0]PETSC ERROR: -dm_view
>> [0]PETSC ERROR: End of Error Message ---send entire
>> error message to petsc-ma...@mcs.anl.gov--
>> application called MPI_Abort(MPI_COMM_WORLD, 63) - process 0
>> [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=63
>> :
>> system msg for write_line failure : Bad file descriptor
>>
>>
>>
>> I need some help about this, please.
>>
>> Simon
>>
>


Re: [petsc-users] problem with generating simplicies mesh

2019-05-19 Thread Mark Adams via petsc-users
I would guess that you want 2 faces in each direction (the default so use
NULL instead of faces).

On Sun, May 19, 2019 at 9:23 AM 陳鳴諭 via petsc-users 
wrote:

> I have problem with generating simplicies mesh.
> I do as the description in DMPlexCreateBoxmesh says, but still meet error.
>
> The following is the error message:
> [0]PETSC ERROR: - Error Message
> --
> [0]PETSC ERROR: Argument out of range
> [0]PETSC ERROR: No grid generator of dimension 1 registered
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.11.1-723-g96d64d1  GIT
> Date: 2019-05-15 13:23:17 +
> [0]PETSC ERROR: ./membrane on a arch-linux2-c-debug named
> simon-System-Product-Name by simon Sun May 19 20:54:54 2019
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> --with-fc=gfortran --download-mpich --download-fblaslapack
> [0]PETSC ERROR: #1 DMPlexGenerate() line 181 in
> /home/simon/petsc/src/dm/impls/plex/plexgenerate.c
> [0]PETSC ERROR: #2 DMPlexCreateBoxMesh_Simplex_Internal() line 536 in
> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
> [0]PETSC ERROR: #3 DMPlexCreateBoxMesh() line 1071 in
> /home/simon/petsc/src/dm/impls/plex/plexcreate.c
> [0]PETSC ERROR: #4 main() line 54 in /home/simon/Downloads/membrane.c
> [0]PETSC ERROR: PETSc Option Table entries:
> [0]PETSC ERROR: -dm_view
> [0]PETSC ERROR: End of Error Message ---send entire
> error message to petsc-ma...@mcs.anl.gov--
> application called MPI_Abort(MPI_COMM_WORLD, 63) - process 0
> [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=63
> :
> system msg for write_line failure : Bad file descriptor
>
>
>
> I need some help about this, please.
>
> Simon
>