Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
89da9ad2
Commit
89da9ad2
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
pp
parent
5fd2aaec
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GModelIO_GEO.cpp
+16
-3
16 additions, 3 deletions
Geo/GModelIO_GEO.cpp
Geo/GModelIO_GEO.h
+29
-47
29 additions, 47 deletions
Geo/GModelIO_GEO.h
with
45 additions
and
50 deletions
Geo/GModelIO_GEO.cpp
+
16
−
3
View file @
89da9ad2
...
@@ -55,10 +55,17 @@ void GEO_Internals::_freeAll()
...
@@ -55,10 +55,17 @@ void GEO_Internals::_freeAll()
List_Action
(
PhysicalGroups
,
Free_PhysicalGroup
);
List_Delete
(
PhysicalGroups
);
List_Action
(
PhysicalGroups
,
Free_PhysicalGroup
);
List_Delete
(
PhysicalGroups
);
}
}
void
GEO_Internals
::
resetPhysicalGroups
()
int
GEO_Internals
::
getMaxTag
(
int
dim
)
const
{
{
List_Action
(
PhysicalGroups
,
Free_PhysicalGroup
);
switch
(
dim
){
List_Reset
(
PhysicalGroups
);
case
0
:
return
MaxPointNum
;
case
1
:
return
MaxLineNum
;
case
-
1
:
return
MaxLineLoopNum
;
case
2
:
return
MaxSurfaceNum
;
case
-
2
:
return
MaxSurfaceLoopNum
;
case
3
:
return
MaxVolumeNum
;
default:
return
0
;
}
}
}
void
GEO_Internals
::
addVertex
(
int
num
,
double
x
,
double
y
,
double
z
,
double
lc
)
void
GEO_Internals
::
addVertex
(
int
num
,
double
x
,
double
y
,
double
z
,
double
lc
)
...
@@ -379,6 +386,12 @@ void GEO_Internals::addCompoundVolume(int num, std::vector<int> regionTags)
...
@@ -379,6 +386,12 @@ void GEO_Internals::addCompoundVolume(int num, std::vector<int> regionTags)
Tree_Add
(
Volumes
,
&
v
);
Tree_Add
(
Volumes
,
&
v
);
}
}
void
GEO_Internals
::
resetPhysicalGroups
()
{
List_Action
(
PhysicalGroups
,
Free_PhysicalGroup
);
List_Reset
(
PhysicalGroups
);
}
void
GEO_Internals
::
setCompoundMesh
(
int
dim
,
std
::
vector
<
int
>
tags
)
void
GEO_Internals
::
setCompoundMesh
(
int
dim
,
std
::
vector
<
int
>
tags
)
{
{
meshCompounds
.
insert
(
std
::
make_pair
(
dim
,
tags
));
meshCompounds
.
insert
(
std
::
make_pair
(
dim
,
tags
));
...
...
This diff is collapsed.
Click to expand it.
Geo/GModelIO_GEO.h
+
29
−
47
View file @
89da9ad2
...
@@ -12,58 +12,13 @@ class GEO_Internals{
...
@@ -12,58 +12,13 @@ class GEO_Internals{
private:
private:
void
_allocateAll
();
void
_allocateAll
();
void
_freeAll
();
void
_freeAll
();
public:
// FIXME: all this must (will) become private ; and all the direct calls in
// Gmsh.y should (will) go through an integer-based API similar to the one in
// OCC_Internals
Tree_T
*
Points
;
Tree_T
*
Curves
;
Tree_T
*
Surfaces
;
Tree_T
*
Volumes
;
Tree_T
*
SurfaceLoops
;
Tree_T
*
EdgeLoops
;
Tree_T
*
LevelSets
;
List_T
*
PhysicalGroups
;
int
MaxPointNum
,
MaxLineNum
,
MaxLineLoopNum
,
MaxSurfaceNum
;
int
MaxSurfaceLoopNum
,
MaxVolumeNum
,
MaxPhysicalNum
;
std
::
multimap
<
int
,
std
::
vector
<
int
>
>
meshCompounds
;
struct
MasterEdge
{
int
tag
;
// signed
std
::
vector
<
double
>
affineTransform
;
};
std
::
map
<
int
,
MasterEdge
>
periodicEdges
;
struct
MasterFace
{
int
tag
;
// map from slave to master edges
std
::
map
<
int
,
int
>
edgeCounterparts
;
std
::
vector
<
double
>
affineTransform
;
};
std
::
map
<
int
,
MasterFace
>
periodicFaces
;
gmshSurface
*
newGeometrySphere
(
int
num
,
int
centerTag
,
int
pointTag
);
gmshSurface
*
newGeometryPolarSphere
(
int
num
,
int
centerTag
,
int
pointTag
);
public:
public:
GEO_Internals
(){
_allocateAll
();
}
GEO_Internals
(){
_allocateAll
();
}
~
GEO_Internals
(){
_freeAll
();
}
~
GEO_Internals
(){
_freeAll
();
}
void
destroy
(){
_freeAll
();
_allocateAll
();
}
void
destroy
(){
_freeAll
();
_allocateAll
();
}
void
resetPhysicalGroups
();
// get maximum tag number for each dimension
// get maximum tag number for each dimension
int
getMaxTag
(
int
dim
)
const
int
getMaxTag
(
int
dim
)
const
;
{
switch
(
dim
){
case
0
:
return
MaxPointNum
;
case
1
:
return
MaxLineNum
;
case
-
1
:
return
MaxLineLoopNum
;
case
2
:
return
MaxSurfaceNum
;
case
-
2
:
return
MaxSurfaceLoopNum
;
case
3
:
return
MaxVolumeNum
;
default:
return
0
;
}
}
// add shapes
// add shapes
void
addVertex
(
int
num
,
double
x
,
double
y
,
double
z
,
double
lc
);
void
addVertex
(
int
num
,
double
x
,
double
y
,
double
z
,
double
lc
);
...
@@ -88,13 +43,40 @@ class GEO_Internals{
...
@@ -88,13 +43,40 @@ class GEO_Internals{
void
addVolume
(
int
num
,
std
::
vector
<
int
>
shellTags
);
void
addVolume
(
int
num
,
std
::
vector
<
int
>
shellTags
);
void
addCompoundVolume
(
int
num
,
std
::
vector
<
int
>
regionTags
);
void
addCompoundVolume
(
int
num
,
std
::
vector
<
int
>
regionTags
);
// add physical groups
// manipulate physical groups (this will eventually move directly to GModel)
void
resetPhysicalGroups
();
// set meshing constraints
// set meshing constraints
void
setCompoundMesh
(
int
dim
,
std
::
vector
<
int
>
tags
);
void
setCompoundMesh
(
int
dim
,
std
::
vector
<
int
>
tags
);
// synchronize internal CAD data with the given GModel
// synchronize internal CAD data with the given GModel
void
synchronize
(
GModel
*
model
);
void
synchronize
(
GModel
*
model
);
// create coordinate systems
gmshSurface
*
newGeometrySphere
(
int
num
,
int
centerTag
,
int
pointTag
);
gmshSurface
*
newGeometryPolarSphere
(
int
num
,
int
centerTag
,
int
pointTag
);
public
:
// FIXME: all of this will become private once the refactoring of the old code
// is complete
Tree_T
*
Points
,
*
Curves
,
*
EdgeLoops
,
*
Surfaces
,
*
SurfaceLoops
,
*
Volumes
;
Tree_T
*
LevelSets
;
List_T
*
PhysicalGroups
;
int
MaxPointNum
,
MaxLineNum
,
MaxLineLoopNum
,
MaxSurfaceNum
;
int
MaxSurfaceLoopNum
,
MaxVolumeNum
,
MaxPhysicalNum
;
std
::
multimap
<
int
,
std
::
vector
<
int
>
>
meshCompounds
;
struct
MasterEdge
{
int
tag
;
// signed
std
::
vector
<
double
>
affineTransform
;
};
std
::
map
<
int
,
MasterEdge
>
periodicEdges
;
struct
MasterFace
{
int
tag
;
// map from slave to master edges
std
::
map
<
int
,
int
>
edgeCounterparts
;
std
::
vector
<
double
>
affineTransform
;
};
std
::
map
<
int
,
MasterFace
>
periodicFaces
;
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment