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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
883a7a78
Commit
883a7a78
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
small fixes
parent
c0321a5d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GEntity.cpp
+0
-15
0 additions, 15 deletions
Geo/GEntity.cpp
Geo/GEntity.h
+0
-6
0 additions, 6 deletions
Geo/GEntity.h
Geo/GModel.cpp
+21
-20
21 additions, 20 deletions
Geo/GModel.cpp
Geo/GModelIO_Mesh.cpp
+1
-1
1 addition, 1 deletion
Geo/GModelIO_Mesh.cpp
with
22 additions
and
42 deletions
Geo/GEntity.cpp
+
0
−
15
View file @
883a7a78
...
@@ -77,18 +77,3 @@ std::string GEntity::getInfoString()
...
@@ -77,18 +77,3 @@ std::string GEntity::getInfoString()
return
out
;
return
out
;
}
}
void
GEntity
::
recomputeMeshPartitions
()
{
for
(
unsigned
int
i
=
0
;
i
<
getNumMeshElements
();
i
++
)
{
int
part
=
getMeshElement
(
i
)
->
getPartition
();
if
(
part
)
model
()
->
getMeshPartitions
().
insert
(
part
);
}
}
void
GEntity
::
deleteMeshPartitions
()
{
for
(
unsigned
int
i
=
0
;
i
<
getNumMeshElements
();
i
++
)
getMeshElement
(
i
)
->
setPartition
(
0
);
}
This diff is collapsed.
Click to expand it.
Geo/GEntity.h
+
0
−
6
View file @
883a7a78
...
@@ -245,12 +245,6 @@ class GEntity {
...
@@ -245,12 +245,6 @@ class GEntity {
// get the mesh vertex at the given index
// get the mesh vertex at the given index
MVertex
*
getMeshVertex
(
unsigned
int
index
)
{
return
mesh_vertices
[
index
];
}
MVertex
*
getMeshVertex
(
unsigned
int
index
)
{
return
mesh_vertices
[
index
];
}
// recompute the mesh partitions defined on this entity
void
recomputeMeshPartitions
();
// delete the mesh partitions defined on this entity
void
deleteMeshPartitions
();
};
};
class
GEntityLessThan
{
class
GEntityLessThan
{
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.cpp
+
21
−
20
View file @
883a7a78
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
// See the LICENSE.txt file for license information. Please report all
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
// bugs and problems to <gmsh@geuz.org>.
#include
<str
ing.h
>
#include
<
s
str
eam
>
#include
"GModel.h"
#include
"GModel.h"
#include
"MElement.h"
#include
"MElement.h"
#include
"discreteRegion.h"
#include
"discreteRegion.h"
...
@@ -463,6 +463,7 @@ MVertex *GModel::getMeshVertexByTag(int n)
...
@@ -463,6 +463,7 @@ MVertex *GModel::getMeshVertexByTag(int n)
std
::
vector
<
GEntity
*>
entities
;
std
::
vector
<
GEntity
*>
entities
;
getEntities
(
entities
);
getEntities
(
entities
);
if
(
dense
){
if
(
dense
){
Msg
::
Debug
(
"Good: we have a dense vertex numbering in the cache"
);
// numbering starts at 1
// numbering starts at 1
_vertexVectorCache
.
resize
(
MVertex
::
getGlobalNumber
()
+
1
);
_vertexVectorCache
.
resize
(
MVertex
::
getGlobalNumber
()
+
1
);
for
(
unsigned
int
i
=
0
;
i
<
entities
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
entities
.
size
();
i
++
)
...
@@ -593,8 +594,12 @@ void GModel::recomputeMeshPartitions()
...
@@ -593,8 +594,12 @@ void GModel::recomputeMeshPartitions()
meshPartitions
.
clear
();
meshPartitions
.
clear
();
std
::
vector
<
GEntity
*>
entities
;
std
::
vector
<
GEntity
*>
entities
;
getEntities
(
entities
);
getEntities
(
entities
);
for
(
unsigned
int
i
=
0
;
i
<
entities
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
entities
.
size
();
i
++
){
entities
[
i
]
->
recomputeMeshPartitions
();
for
(
unsigned
int
j
=
0
;
j
<
entities
[
i
]
->
getNumMeshElements
();
j
++
){
int
part
=
entities
[
i
]
->
getMeshElement
(
j
)
->
getPartition
();
if
(
part
)
meshPartitions
.
insert
(
part
);
}
}
}
}
void
GModel
::
deleteMeshPartitions
()
void
GModel
::
deleteMeshPartitions
()
...
@@ -602,7 +607,8 @@ void GModel::deleteMeshPartitions()
...
@@ -602,7 +607,8 @@ void GModel::deleteMeshPartitions()
std
::
vector
<
GEntity
*>
entities
;
std
::
vector
<
GEntity
*>
entities
;
getEntities
(
entities
);
getEntities
(
entities
);
for
(
unsigned
int
i
=
0
;
i
<
entities
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
entities
.
size
();
i
++
)
entities
[
i
]
->
deleteMeshPartitions
();
for
(
unsigned
int
j
=
0
;
j
<
entities
[
i
]
->
getNumMeshElements
();
j
++
)
entities
[
i
]
->
getMeshElement
(
j
)
->
setPartition
(
0
);
meshPartitions
.
clear
();
meshPartitions
.
clear
();
}
}
...
@@ -658,22 +664,17 @@ void GModel::checkMeshCoherence()
...
@@ -658,22 +664,17 @@ void GModel::checkMeshCoherence()
pos
.
insert
(
e
);
pos
.
insert
(
e
);
}
}
else
{
else
{
char
temp
[
256
],
temp2
[
256
];
std
::
ostringstream
sstream
;
sprintf
(
temp
,
"Element %d ( "
,
(
*
it
)
->
getNum
());
sstream
<<
"Element "
<<
e
->
getNum
()
<<
" [ "
;
for
(
int
k
=
0
;
k
<
(
*
it
)
->
getNumVertices
();
k
++
){
for
(
int
k
=
0
;
k
<
e
->
getNumVertices
();
k
++
)
sprintf
(
temp2
,
"%d "
,
(
*
it
)
->
getVertex
(
k
)
->
getNum
());
sstream
<<
e
->
getVertex
(
k
)
->
getNum
()
<<
" "
;
strcat
(
temp
,
temp2
);
sstream
<<
"] on entity "
<<
entities
[
i
]
->
tag
()
}
<<
" has same barycenter as element "
<<
(
*
it
)
->
getNum
()
sprintf
(
temp2
,
") on entity %d has same barycenter as element %d ( "
,
<<
" [ "
;
entities
[
i
]
->
tag
(),
e
->
getNum
());
for
(
int
k
=
0
;
k
<
(
*
it
)
->
getNumVertices
();
k
++
)
strcat
(
temp
,
temp2
);
sstream
<<
(
*
it
)
->
getVertex
(
k
)
->
getNum
()
<<
" "
;
for
(
int
k
=
0
;
k
<
e
->
getNumVertices
();
k
++
){
sstream
<<
"]"
;
sprintf
(
temp2
,
"%d "
,
e
->
getVertex
(
k
)
->
getNum
());
Msg
::
Info
(
"%s"
,
sstream
.
str
().
c_str
());
strcat
(
temp
,
temp2
);
}
sprintf
(
temp2
,
")"
);
strcat
(
temp
,
temp2
);
Msg
::
Info
(
"%s"
,
temp
);
num
++
;
num
++
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Geo/GModelIO_Mesh.cpp
+
1
−
1
View file @
883a7a78
...
@@ -76,7 +76,7 @@ static bool getVertices(int num, int *indices, std::vector<MVertex*> &vec,
...
@@ -76,7 +76,7 @@ static bool getVertices(int num, int *indices, std::vector<MVertex*> &vec,
static
void
createElementMSH
(
GModel
*
m
,
int
num
,
int
type
,
int
physical
,
static
void
createElementMSH
(
GModel
*
m
,
int
num
,
int
type
,
int
physical
,
int
reg
,
int
part
,
std
::
vector
<
MVertex
*>
&
v
,
int
reg
,
int
part
,
std
::
vector
<
MVertex
*>
&
v
,
std
::
map
<
int
,
std
::
vector
<
MElement
*>
>
elements
[
7
],
std
::
map
<
int
,
std
::
vector
<
MElement
*>
>
elements
[
8
],
std
::
map
<
int
,
std
::
map
<
int
,
std
::
string
>
>
physicals
[
4
])
std
::
map
<
int
,
std
::
map
<
int
,
std
::
string
>
>
physicals
[
4
])
{
{
MElementFactory
factory
;
MElementFactory
factory
;
...
...
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