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
f95af33a
Commit
f95af33a
authored
15 years ago
by
Matti Pellika
Browse files
Options
Downloads
Patches
Plain Diff
A fix.
parent
d38b6ffa
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/ChainComplex.cpp
+8
-5
8 additions, 5 deletions
Geo/ChainComplex.cpp
Geo/ChainComplex.h
+6
-1
6 additions, 1 deletion
Geo/ChainComplex.h
Geo/Homology.h
+1
-0
1 addition, 0 deletions
Geo/Homology.h
with
15 additions
and
6 deletions
Geo/ChainComplex.cpp
+
8
−
5
View file @
f95af33a
...
@@ -894,6 +894,7 @@ void Chain::createPView(){
...
@@ -894,6 +894,7 @@ void Chain::createPView(){
int
entityNum
=
*
std
::
max_element
(
max
,
max
+
4
)
+
1
;
int
entityNum
=
*
std
::
max_element
(
max
,
max
+
4
)
+
1
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
max
[
i
]
=
_model
->
getMaxPhysicalNumber
(
i
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
max
[
i
]
=
_model
->
getMaxPhysicalNumber
(
i
);
int
physicalNum
=
*
std
::
max_element
(
max
,
max
+
4
)
+
1
;
int
physicalNum
=
*
std
::
max_element
(
max
,
max
+
4
)
+
1
;
setNum
(
physicalNum
);
std
::
map
<
int
,
std
::
vector
<
MElement
*>
>
entityMap
;
std
::
map
<
int
,
std
::
vector
<
MElement
*>
>
entityMap
;
//int entityNum = _model->getMaxElementaryNumber(getDim())+1;
//int entityNum = _model->getMaxElementaryNumber(getDim())+1;
...
@@ -904,11 +905,13 @@ void Chain::createPView(){
...
@@ -904,11 +905,13 @@ void Chain::createPView(){
physicalInfo
[
physicalNum
]
=
getName
();
physicalInfo
[
physicalNum
]
=
getName
();
physicalMap
[
entityNum
]
=
physicalInfo
;
physicalMap
[
entityNum
]
=
physicalInfo
;
_model
->
storeChain
(
getDim
(),
entityMap
,
physicalMap
);
if
(
!
data
.
empty
()){
_model
->
setPhysicalName
(
getName
(),
getDim
(),
physicalNum
);
_model
->
storeChain
(
getDim
(),
entityMap
,
physicalMap
);
_model
->
setPhysicalName
(
getName
(),
getDim
(),
physicalNum
);
// only for visualization
if
(
!
data
.
empty
())
PView
*
chain
=
new
PView
(
getName
(),
"ElementData"
,
getGModel
(),
data
,
0
,
1
);
// only for visualization
PView
*
chain
=
new
PView
(
getName
(),
"ElementData"
,
getGModel
(),
data
,
0
,
1
);
}
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Geo/ChainComplex.h
+
6
−
1
View file @
f95af33a
...
@@ -139,6 +139,8 @@ class Chain{
...
@@ -139,6 +139,8 @@ class Chain{
std
::
map
<
Cell
*
,
int
,
Less_Cell
>
_cells
;
std
::
map
<
Cell
*
,
int
,
Less_Cell
>
_cells
;
// name of the chain (optional)
// name of the chain (optional)
std
::
string
_name
;
std
::
string
_name
;
// physical group number of the chain
int
_num
;
// cell complex this chain belongs to
// cell complex this chain belongs to
CellComplex
*
_cellComplex
;
CellComplex
*
_cellComplex
;
GModel
*
_model
;
GModel
*
_model
;
...
@@ -261,7 +263,10 @@ class Chain{
...
@@ -261,7 +263,10 @@ class Chain{
// get/set chain name
// get/set chain name
std
::
string
getName
()
{
return
_name
;
}
std
::
string
getName
()
{
return
_name
;
}
void
setName
(
std
::
string
name
)
{
_name
=
name
;
}
void
setName
(
std
::
string
name
)
{
_name
=
name
;
}
// get/set physical group number
int
getNum
()
{
return
_num
;
}
void
setNum
(
int
num
)
{
_num
=
num
;
}
// make local deformations to the chain to make it smoother and smaller
// make local deformations to the chain to make it smoother and smaller
// (for primary complex chains only, not for dual chains represented by primary cells (yet).)
// (for primary complex chains only, not for dual chains represented by primary cells (yet).)
void
smoothenChain
();
void
smoothenChain
();
...
...
This diff is collapsed.
Click to expand it.
Geo/Homology.h
+
1
−
0
View file @
f95af33a
...
@@ -46,6 +46,7 @@ class Homology
...
@@ -46,6 +46,7 @@ class Homology
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
_generators
[
i
].
size
();
j
++
){
for
(
int
j
=
0
;
j
<
_generators
[
i
].
size
();
j
++
){
Chain
*
chain
=
_generators
[
i
].
at
(
j
);
Chain
*
chain
=
_generators
[
i
].
at
(
j
);
//_model->deletePhysicalGroup(chain->getDim(), chain->getNum());
delete
chain
;
delete
chain
;
}
}
}
}
...
...
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