[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
PHiLiP::GridRefinement::GmshOut< dim, real > Class Template Reference

GmshOut class. More...

#include <gmsh_out.h>

Collaboration diagram for PHiLiP::GridRefinement::GmshOut< dim, real >:

Static Public Member Functions

static void write_pos (const dealii::Triangulation< dim, dim > &tria, dealii::Vector< real > data, std::ostream &out)
 Write scalar .pos file for use with GMSH. More...
 
static void write_pos_anisotropic (const dealii::Triangulation< dim, dim > &tria, const std::vector< dealii::SymmetricTensor< 2, dim, real >> &data, std::ostream &out, const int p_scale=1)
 Write anisotropic tensor .pos file for use with GMSH. More...
 
static void write_geo (std::vector< std::string > &posFile_vec, std::ostream &out)
 Writes the central .geo file for call to GMSH on main process with isotropic quad meshing. More...
 
static void write_geo_anisotropic (std::vector< std::string > &posFile_vec, std::ostream &out)
 Writes the central .geo file for call to GMSH on main process with anisotropic quad meshing. More...
 
static int call_gmsh (std::string geo_name, std::string output_name)
 Performs command line call to GMSH for grid generation (if availible) More...
 
static void write_geo_hyper_cube (const double left, const double right, std::ostream &out, const bool colorize=true)
 Writes the part of the .geo file associated wit the hyperdube geometry. More...
 

Detailed Description

template<int dim, typename real>
class PHiLiP::GridRefinement::GmshOut< dim, real >

GmshOut class.

This class contains static methods for writing files neeed to describe the domain geometry and adapted size or anisotropic tesnor fields compatible for use with standard GMSH interfaces for use with quad remeshing.

This class also contains a utility function to call GMSH from the console if it has been enabled with ENABLE_GMSH=1 in the CMakeLists.txt with suitable path to GMSH also specified.

GMSH is an open source 2D and 3D mesh generation software with specialized functions for treatment of all-quad meshing domains (E.g. \(L^\infty\) advacing front methods and BlossomQuad for recombination). It uses a combination of .geo files to describe the part and case setup and .pos files for addittional field information (e.g. mesh size). See link for more details: https://gmsh.info/

Note: Currently only supported in 2D

Definition at line 35 of file gmsh_out.h.

Member Function Documentation

◆ call_gmsh()

template<int dim, typename real >
int PHiLiP::GridRefinement::GmshOut< dim, real >::call_gmsh ( std::string  geo_name,
std::string  output_name 
)
static

Performs command line call to GMSH for grid generation (if availible)

Read input .geo and writes the final .msh to specified output. Requires that ENABLE_GMSH has been set to 1 and the GMSH_PATH has been defined in the CMakeLists.txt file. Returns 1 if the system call is performed, 0 otherwise.

Definition at line 423 of file gmsh_out.cpp.

◆ write_geo()

template<int dim, typename real >
void PHiLiP::GridRefinement::GmshOut< dim, real >::write_geo ( std::vector< std::string > &  posFile_vec,
std::ostream &  out 
)
static

Writes the central .geo file for call to GMSH on main process with isotropic quad meshing.

posFile_vec contains list of data files written from each subprocess to the filesystem to be read from parralel run for serial remeshing. Uses advancing front delaunay method for quads based on \(L^\infty\) node insertion to produce a right angle mesh. Final isotropic mesh with target size field is reocmbined using BlossomQuad to produce all-quad output mesh Note: Currently only hybercube geometries are supported

Definition at line 291 of file gmsh_out.cpp.

◆ write_geo_anisotropic()

template<int dim, typename real >
void PHiLiP::GridRefinement::GmshOut< dim, real >::write_geo_anisotropic ( std::vector< std::string > &  posFile_vec,
std::ostream &  out 
)
static

Writes the central .geo file for call to GMSH on main process with anisotropic quad meshing.

posFile_vec contains list of data files written from each subprocess to the filesystem to be read from parralel run for serial remeshing. Uses BAMG for anisotropic triangular mesh generation with BlossomQuad recombination to all-quad output mesh (may fail in some versions). Note: Currently only hybercube geometries are supported

Definition at line 333 of file gmsh_out.cpp.

◆ write_geo_hyper_cube()

template<int dim, typename real >
void PHiLiP::GridRefinement::GmshOut< dim, real >::write_geo_hyper_cube ( const double  left,
const double  right,
std::ostream &  out,
const bool  colorize = true 
)
static

Writes the part of the .geo file associated wit the hyperdube geometry.

left and right specify the min and max axis aligned values in each direction. Use colorize to number the domain boundaries in GMSH form

Definition at line 375 of file gmsh_out.cpp.

◆ write_pos()

template<int dim, typename real >
void PHiLiP::GridRefinement::GmshOut< dim, real >::write_pos ( const dealii::Triangulation< dim, dim > &  tria,
dealii::Vector< real >  data,
std::ostream &  out 
)
static

Write scalar .pos file for use with GMSH.

Write SQ (Scalar Quad) output based on input triangulation (the original mesh) and a size field stored in vector form. The specified format is written to the ostream which can be an output file (or console for debugging).

Definition at line 40 of file gmsh_out.cpp.

◆ write_pos_anisotropic()

template<int dim, typename real >
void PHiLiP::GridRefinement::GmshOut< dim, real >::write_pos_anisotropic ( const dealii::Triangulation< dim, dim > &  tria,
const std::vector< dealii::SymmetricTensor< 2, dim, real >> &  data,
std::ostream &  out,
const int  p_scale = 1 
)
static

Write anisotropic tensor .pos file for use with GMSH.

Written as TT (Tensor triangles) using a split quad representation. Each element is described by a 3x3 matrix specifying the local anisotropic quadratic sizing function \(x^T \mathcal{M} x\) for use with the BAMG meshing methods in 2D. Use with write_geo_anisotropic to specify recombination with default BlossomQuad methods for best perfomance.

Definition at line 152 of file gmsh_out.cpp.


The documentation for this class was generated from the following files: