Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • I INMOST
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Terekhov
  • INMOST
  • Wiki
  • 1390 GridGen Example

Last edited by Kirill Terekhov Sep 21, 2018
Page history

1390 GridGen Example

Parallel Grid Generation Example

The code for this example is located in examples/GridGen

Brief

This example creates simple cubic or prismatic mesh

Description

This example may run in both serial and parallel modes with NP processes.

The virtual IJK-structure with user defined sizes is used to cover the unit cube [0,1]^3. In parallel mode this structure is split into NP rectangular superblocks. Local IJK-structures are created in each superblock separately. Depending on user defined choice in each IJK block either one cubical cell, or two triangular prismatic cells are created. In the latter case the direction of diagonal plane is changed in staggered order.

Two images below show cuts through the generated volume meshes with prismatic and cubic cells.

[//]: # (pic1) [//]: # (pic2)

Arguments

Usage: ./GridGen ng nx ny nz [output.[p]vtk]
  • First parameter ng=3 stands for Prismatic generator and ng=4 for Cubic one.
  • Parameters nx, ny and nz are the IJK-structure sizes.
  • Last optional parameter – output file name, default: grid.vtk for serial runs and grid.pvtk for parallel runs.

Running example

If you compiled INMOST with USE_MPI=ON you can generate and save mesh in parallel. The following line will create 32x32x32 cubic grid using 4 processes:

$ cd Examples/GridGen
$ mpirun -np 4 ./GridGen 4 32 32 32 /tmp/grid-32-32-32.pvtk
Cubic Grid: 32 x 32 x 32
Processors: 4
Mesh generator time: 0.14828
Save to file "/tmp/grid-32-32-32.pvtk" time: 0.060786

If you have ParaView installed, you can open pvtk file:

$ paraview --data=/tmp/grid-32-32-32.pvtk

You can view the following tags:

  • P_OWNER_PROCESSOR – partitioning to processors
  • GLOBAL_ID – global cell ID number
Clone repository
  • 0100 Compilation
  • 0200 Compilation Windows
  • 0201 Obtain MSVC
  • 0202 Obtain MSMPI
  • 0203 Compilation INMOST Windows
  • 0204 Compilation ParMETIS Windows
  • 0205 Compilation Zoltan Windows
  • 0206 Compilation PETSc Windows
  • 0207 Compilation Trilinos Windows
  • 0400 Compilation Linux
  • 0401 Install MPI
  • 0402 Compilation INMOST Linux
  • 0403 Compilation PETSc Linux
  • 0404 Compilation Trilinos Linux
  • 0405 Compilation ParMETIS Linux
View All Pages