gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GModelIO_MSH4.cpp File Reference
#include <cstdio>
#include <fstream>
#include <vector>
#include <map>
#include <algorithm>
#include <sstream>
#include <string>
#include <cstdlib>
#include <limits>
#include <stdexcept>
#include "GmshDefines.h"
#include "OS.h"
#include "Context.h"
#include "GModel.h"
#include "GEntity.h"
#include "partitionRegion.h"
#include "partitionFace.h"
#include "partitionEdge.h"
#include "partitionVertex.h"
#include "discreteEdge.h"
#include "ghostFace.h"
#include "ghostEdge.h"
#include "ghostRegion.h"
#include "MPoint.h"
#include "MLine.h"
#include "MTriangle.h"
#include "MQuadrangle.h"
#include "MTetrahedron.h"
#include "MHexahedron.h"
#include "MPrism.h"
#include "MPyramid.h"
#include "MTrihedron.h"
#include "StringUtils.h"
Include dependency graph for GModelIO_MSH4.cpp:

Go to the source code of this file.

Functions

static bool readMSH4Physicals (GModel *const model, FILE *fp, GEntity *const entity, bool binary, char *str, bool swap)
 
static bool readMSH4BoundingEntities (GModel *const model, FILE *fp, GEntity *const entity, bool binary, char *str, bool swap)
 
static bool readMSH4EntityInfo (FILE *fp, bool binary, char *str, int sizeofstr, bool swap, double version, bool partition, int dim, int &tag, int &parentDim, int &parentTag, std::vector< int > &partitions, double &minX, double &minY, double &minZ, double &maxX, double &maxY, double &maxZ)
 
static bool readMSH4Entities (GModel *const model, FILE *fp, bool partition, bool binary, bool swap, double version)
 
static std::pair< std::size_t, MVertex * > * readMSH4Nodes (GModel *const model, FILE *fp, bool binary, bool &dense, std::size_t &totalNumNodes, std::size_t &maxNodeNum, bool swap, double version)
 
static std::pair< std::size_t, std::pair< MElement *, int > > * readMSH4Elements (GModel *const model, FILE *fp, bool binary, bool &dense, std::size_t &totalNumElements, std::size_t &maxElementNum, bool swap, double version)
 
static bool readMSH4PeriodicNodes (GModel *const model, FILE *fp, bool binary, bool swap, double version)
 
static bool readMSH4GhostElements (GModel *const model, FILE *fp, bool binary, bool swap)
 
static bool readMSH4Parametrizations (GModel *const model, FILE *fp, bool binary)
 
static void writeMSH4Physicals (FILE *fp, GEntity *const entity, bool binary)
 
static void writeMSH4BoundingBox (SBoundingBox3d boundBox, FILE *fp, double scalingFactor, bool binary, int dim, double version)
 
static void writeMSH4Entities (GModel *const model, FILE *fp, bool partition, bool binary, double scalingFactor, double version, std::map< GEntity *, SBoundingBox3d > *entityBounds)
 
static void writeMSH4EntityNodes (GEntity *ge, FILE *fp, bool binary, int saveParametric, double scalingFactor, double version)
 
static std::size_t getAdditionalEntities (std::set< GRegion *, GEntityPtrLessThan > &regions, std::set< GFace *, GEntityPtrLessThan > &faces, std::set< GEdge *, GEntityPtrLessThan > &edges, std::set< GVertex *, GEntityPtrLessThan > &vertices)
 
static void getEntitiesToSave (GModel *const model, bool partitioned, int partitionToSave, bool saveAll, std::set< GRegion *, GEntityPtrLessThan > &regions, std::set< GFace *, GEntityPtrLessThan > &faces, std::set< GEdge *, GEntityPtrLessThan > &edges, std::set< GVertex *, GEntityPtrLessThan > &vertices)
 
static void writeMSH4Nodes (GModel *const model, FILE *fp, bool partitioned, int partitionToSave, bool binary, int saveParametric, double scalingFactor, bool saveAll, double version)
 
static void writeMSH4Elements (GModel *const model, FILE *fp, bool partitioned, int partitionToSave, bool binary, bool saveAll, double version)
 
static void writeMSH4PeriodicNodes (GModel *const model, FILE *fp, bool binary, double version)
 
static void writeMSH4GhostCells (GModel *const model, FILE *fp, int partitionToSave, bool binary)
 
static void writeMSH4Parametrizations (GModel *const model, FILE *fp, bool binary)
 
static bool getPhyscialNameInfo (const std::string &name, int &parentPhysicalTag, std::vector< int > &partitions)
 

Function Documentation

◆ getAdditionalEntities()

static std::size_t getAdditionalEntities ( std::set< GRegion *, GEntityPtrLessThan > &  regions,
std::set< GFace *, GEntityPtrLessThan > &  faces,
std::set< GEdge *, GEntityPtrLessThan > &  edges,
std::set< GVertex *, GEntityPtrLessThan > &  vertices 
)
static

Definition at line 2073 of file GModelIO_MSH4.cpp.

Referenced by writeMSH4Nodes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntitiesToSave()

static void getEntitiesToSave ( GModel *const  model,
bool  partitioned,
int  partitionToSave,
bool  saveAll,
std::set< GRegion *, GEntityPtrLessThan > &  regions,
std::set< GFace *, GEntityPtrLessThan > &  faces,
std::set< GEdge *, GEntityPtrLessThan > &  edges,
std::set< GVertex *, GEntityPtrLessThan > &  vertices 
)
static

Definition at line 2211 of file GModelIO_MSH4.cpp.

Referenced by writeMSH4Elements(), and writeMSH4Nodes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPhyscialNameInfo()

static bool getPhyscialNameInfo ( const std::string &  name,
int &  parentPhysicalTag,
std::vector< int > &  partitions 
)
static

Definition at line 2957 of file GModelIO_MSH4.cpp.

Referenced by GModel::writePartitionedTopology().

Here is the caller graph for this function:

◆ readMSH4BoundingEntities()

static bool readMSH4BoundingEntities ( GModel *const  model,
FILE *  fp,
GEntity *const  entity,
bool  binary,
char *  str,
bool  swap 
)
static

Definition at line 79 of file GModelIO_MSH4.cpp.

Referenced by readMSH4Entities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4Elements()

static std::pair<std::size_t, std::pair<MElement *, int> >* readMSH4Elements ( GModel *const  model,
FILE *  fp,
bool  binary,
bool &  dense,
std::size_t &  totalNumElements,
std::size_t &  maxElementNum,
bool  swap,
double  version 
)
static

Definition at line 714 of file GModelIO_MSH4.cpp.

Referenced by GModel::_readMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4Entities()

static bool readMSH4Entities ( GModel *const  model,
FILE *  fp,
bool  partition,
bool  binary,
bool  swap,
double  version 
)
static

Definition at line 269 of file GModelIO_MSH4.cpp.

Referenced by GModel::_readMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4EntityInfo()

static bool readMSH4EntityInfo ( FILE *  fp,
bool  binary,
char *  str,
int  sizeofstr,
bool  swap,
double  version,
bool  partition,
int  dim,
int &  tag,
int &  parentDim,
int &  parentTag,
std::vector< int > &  partitions,
double &  minX,
double &  minY,
double &  minZ,
double &  maxX,
double &  maxY,
double &  maxZ 
)
static

Definition at line 171 of file GModelIO_MSH4.cpp.

Referenced by readMSH4Entities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4GhostElements()

static bool readMSH4GhostElements ( GModel *const  model,
FILE *  fp,
bool  binary,
bool  swap 
)
static

Definition at line 1090 of file GModelIO_MSH4.cpp.

Referenced by GModel::_readMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4Nodes()

static std::pair<std::size_t, MVertex *>* readMSH4Nodes ( GModel *const  model,
FILE *  fp,
bool  binary,
bool &  dense,
std::size_t &  totalNumNodes,
std::size_t &  maxNodeNum,
bool  swap,
double  version 
)
static

Definition at line 463 of file GModelIO_MSH4.cpp.

Referenced by GModel::_readMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4Parametrizations()

static bool readMSH4Parametrizations ( GModel *const  model,
FILE *  fp,
bool  binary 
)
static

Definition at line 1197 of file GModelIO_MSH4.cpp.

Referenced by GModel::_readMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4PeriodicNodes()

static bool readMSH4PeriodicNodes ( GModel *const  model,
FILE *  fp,
bool  binary,
bool  swap,
double  version 
)
static

Definition at line 941 of file GModelIO_MSH4.cpp.

Referenced by GModel::_readMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readMSH4Physicals()

static bool readMSH4Physicals ( GModel *const  model,
FILE *  fp,
GEntity *const  entity,
bool  binary,
char *  str,
bool  swap 
)
static

Definition at line 44 of file GModelIO_MSH4.cpp.

Referenced by readMSH4Entities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4BoundingBox()

static void writeMSH4BoundingBox ( SBoundingBox3d  boundBox,
FILE *  fp,
double  scalingFactor,
bool  binary,
int  dim,
double  version 
)
static

Definition at line 1551 of file GModelIO_MSH4.cpp.

Referenced by writeMSH4Entities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4Elements()

static void writeMSH4Elements ( GModel *const  model,
FILE *  fp,
bool  partitioned,
int  partitionToSave,
bool  binary,
bool  saveAll,
double  version 
)
static

Definition at line 2399 of file GModelIO_MSH4.cpp.

Referenced by GModel::_writeMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4Entities()

static void writeMSH4Entities ( GModel *const  model,
FILE *  fp,
bool  partition,
bool  binary,
double  scalingFactor,
double  version,
std::map< GEntity *, SBoundingBox3d > *  entityBounds 
)
static

Definition at line 1572 of file GModelIO_MSH4.cpp.

Referenced by GModel::_writeMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4EntityNodes()

static void writeMSH4EntityNodes ( GEntity ge,
FILE *  fp,
bool  binary,
int  saveParametric,
double  scalingFactor,
double  version 
)
static

Definition at line 2000 of file GModelIO_MSH4.cpp.

Referenced by writeMSH4Nodes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4GhostCells()

static void writeMSH4GhostCells ( GModel *const  model,
FILE *  fp,
int  partitionToSave,
bool  binary 
)
static

Definition at line 2674 of file GModelIO_MSH4.cpp.

Referenced by GModel::_writeMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4Nodes()

static void writeMSH4Nodes ( GModel *const  model,
FILE *  fp,
bool  partitioned,
int  partitionToSave,
bool  binary,
int  saveParametric,
double  scalingFactor,
bool  saveAll,
double  version 
)
static

Definition at line 2310 of file GModelIO_MSH4.cpp.

Referenced by GModel::_writeMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4Parametrizations()

static void writeMSH4Parametrizations ( GModel *const  model,
FILE *  fp,
bool  binary 
)
static

Definition at line 2742 of file GModelIO_MSH4.cpp.

Referenced by GModel::_writeMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4PeriodicNodes()

static void writeMSH4PeriodicNodes ( GModel *const  model,
FILE *  fp,
bool  binary,
double  version 
)
static

Definition at line 2568 of file GModelIO_MSH4.cpp.

Referenced by GModel::_writeMSH4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMSH4Physicals()

static void writeMSH4Physicals ( FILE *  fp,
GEntity *const  entity,
bool  binary 
)
static

Definition at line 1530 of file GModelIO_MSH4.cpp.

Referenced by writeMSH4Entities().

Here is the call graph for this function:
Here is the caller graph for this function: