gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
discreteRegion.cpp
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #include "discreteRegion.h"
7 #include "GModelIO_GEO.h"
8 #include "Geo.h"
9 
11  : GRegion(model, num), _geometry(false)
12 {
15 }
16 
18  : GRegion(model, 0), _geometry(false)
19 {
20 }
21 
23 {
24  if(l_faces.empty()) {
25  Msg::Error("Discrete volume %d has no surfaces on its boundary", tag());
26  return 1;
27  }
28 
29  // we should check that the surfaces form one or more (closed) shell(s)
30  _geometry = true;
31 
32  return 0;
33 }
Volume
Definition: Geo.h:140
discreteRegion::_geometry
bool _geometry
Definition: discreteRegion.h:15
Geo.h
GRegion::l_faces
std::vector< GFace * > l_faces
Definition: GRegion.h:30
GEO_Internals::Volumes
Tree_T * Volumes
Definition: GModelIO_GEO.h:18
CreateVolume
Volume * CreateVolume(int Num, int Typ)
Definition: Geo.cpp:617
GEntity::model
GModel * model() const
Definition: GEntity.h:277
discreteRegion.h
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
GModelIO_GEO.h
MSH_VOLUME_DISCRETE
#define MSH_VOLUME_DISCRETE
Definition: GeoDefines.h:41
Tree_Add
void * Tree_Add(Tree_T *tree, void *data)
Definition: TreeUtils.cpp:37
discreteRegion::discreteRegion
discreteRegion(GModel *model, int num)
Definition: discreteRegion.cpp:10
GModel
Definition: GModel.h:44
GEntity::tag
int tag() const
Definition: GEntity.h:280
discreteRegion::createGeometry
int createGeometry()
Definition: discreteRegion.cpp:22
GRegion
Definition: GRegion.h:28
GModel::getGEOInternals
GEO_Internals * getGEOInternals()
Definition: GModel.h:315