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
79e2c740
Commit
79e2c740
authored
9 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
limit export name length
parent
5b08f736
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/Chain.cpp
+3
-3
3 additions, 3 deletions
Geo/Chain.cpp
Geo/Chain.h
+9
-5
9 additions, 5 deletions
Geo/Chain.h
Geo/Homology.cpp
+1
-1
1 addition, 1 deletion
Geo/Homology.cpp
with
13 additions
and
9 deletions
Geo/Chain.cpp
+
3
−
3
View file @
79e2c740
...
...
@@ -27,7 +27,8 @@ void updateFltk()
#endif
}
std
::
string
convertInt
(
int
number
){
std
::
string
convertInt
(
int
number
)
{
std
::
stringstream
stream
;
stream
<<
number
;
return
stream
.
str
();
...
...
@@ -49,8 +50,7 @@ inline void ElemChain::_sortVertexIndices()
}
void
findEntitiesInPhysicalGroups
(
GModel
*
m
,
const
std
::
vector
<
int
>&
physicalGroups
,
std
::
vector
<
GEntity
*>&
entities
)
(
GModel
*
m
,
const
std
::
vector
<
int
>&
physicalGroups
,
std
::
vector
<
GEntity
*>&
entities
)
{
std
::
map
<
int
,
std
::
vector
<
GEntity
*>
>
groups
[
4
];
m
->
getPhysicalGroups
(
groups
);
...
...
This diff is collapsed.
Click to expand it.
Geo/Chain.h
+
9
−
5
View file @
79e2c740
...
...
@@ -465,14 +465,18 @@ Chain<C>& Chain<C>::operator*=(const C& coeff)
}
template
<
class
C
>
int
Chain
<
C
>::
addToModel
(
GModel
*
m
,
bool
post
,
int
physicalNumRequest
)
const
int
Chain
<
C
>::
addToModel
(
GModel
*
m
,
bool
post
,
int
physicalNumRequest
)
const
{
if
(
this
->
isZero
())
{
Msg
::
Info
(
"A chain is zero element of C%d, not added to the model"
,
this
->
getDim
());
return
-
1
;
}
std
::
string
name
=
_name
;
// avoid too long names, which screw up the GUI and the msh file
if
(
name
.
size
()
>
128
)
name
.
resize
(
128
);
std
::
vector
<
MElement
*>
elements
;
std
::
map
<
int
,
std
::
vector
<
double
>
>
data
;
int
dim
=
this
->
getDim
();
...
...
@@ -511,16 +515,16 @@ int Chain<C>::addToModel(GModel* m, bool post,
entityMap
[
entityNum
]
=
elements
;
std
::
map
<
int
,
std
::
map
<
int
,
std
::
string
>
>
physicalMap
;
std
::
map
<
int
,
std
::
string
>
physicalInfo
;
physicalInfo
[
physicalNum
]
=
_
name
;
physicalInfo
[
physicalNum
]
=
name
;
physicalMap
[
entityNum
]
=
physicalInfo
;
m
->
storeChain
(
dim
,
entityMap
,
physicalMap
);
m
->
setPhysicalName
(
_
name
,
dim
,
physicalNum
);
m
->
setPhysicalName
(
name
,
dim
,
physicalNum
);
#if defined(HAVE_POST)
if
(
post
&&
CTX
::
instance
()
->
batch
==
0
)
{
// create PView for instant visualization
std
::
string
pnum
=
convertInt
(
physicalNum
);
std
::
string
postname
=
pnum
+
"="
+
_
name
;
std
::
string
postname
=
pnum
+
"="
+
name
;
PView
*
view
=
new
PView
(
postname
,
"ElementData"
,
m
,
data
,
0.
,
1
);
// the user should be interested about the orientations
int
size
=
30
;
...
...
This diff is collapsed.
Click to expand it.
Geo/Homology.cpp
+
1
−
1
View file @
79e2c740
...
...
@@ -624,6 +624,7 @@ std::string Homology::_getDomainString(const std::vector<int>& domain,
}
domainString
+=
"}"
;
}
return
domainString
;
}
...
...
@@ -673,4 +674,3 @@ void Homology::storeCells(CellComplex* cellComplex, int dim)
}
#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