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
09e1b710
Commit
09e1b710
authored
13 years ago
by
Matti Pellika
Browse files
Options
Downloads
Patches
Plain Diff
Fixes
parent
fe63d335
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/Homology.cpp
+22
-7
22 additions, 7 deletions
Geo/Homology.cpp
with
22 additions
and
7 deletions
Geo/Homology.cpp
+
22
−
7
View file @
09e1b710
...
...
@@ -105,7 +105,8 @@ CellComplex* Homology::createCellComplex(std::vector<GEntity*>& domainEntities,
Homology
::~
Homology
()
{
for
(
std
::
map
<
int
,
Chain
*>::
iterator
it
=
_basisChains
.
begin
();
it
!=
_basisChains
.
end
();
it
++
)
delete
it
->
second
;
}
void
Homology
::
findGenerators
(
CellComplex
*
cellComplex
)
...
...
@@ -161,7 +162,11 @@ void Homology::findGenerators(CellComplex* cellComplex)
Msg
::
Warning
(
"H%d %d has torsion coefficient %d!"
,
j
,
i
,
chain
->
getTorsion
());
}
_basisChains
[
chain
->
createPGroup
()]
=
chain
;
// FIXME: Cell* and CellComplex* pointers should not outlive
// the objects, don't store Chains containing them for now
//_basisChains[chain->createPGroup()] = chain;
chain
->
createPGroup
();
delete
chain
;
}
}
...
...
@@ -238,7 +243,11 @@ void Homology::findDualGenerators(CellComplex* cellComplex)
Msg
::
Warning
(
"H%d* %d has torsion coefficient %d!"
,
dim
-
j
,
i
,
chain
->
getTorsion
());
}
_basisChains
[
chain
->
createPGroup
()]
=
chain
;
// FIXME: Cell* and CellComplex* pointers should not outlive
// the objects, don't store Chains containing them for now
//_basisChains[chain->createPGroup()] = chain;
chain
->
createPGroup
();
delete
chain
;
}
}
...
...
@@ -491,10 +500,16 @@ int Chain::createPGroup()
std
::
vector
<
MVertex
*>
v
;
cell
->
getMeshVertices
(
v
);
MElement
*
e
=
factory
.
create
(
cell
->
getTypeMSH
(),
v
);
if
(
cell
->
getDim
()
>
0
&&
coeff
<
0
)
e
->
revert
();
// flip orientation
for
(
int
i
=
0
;
i
<
abs
(
coeff
);
i
++
)
elements
.
push_back
(
e
);
elements
.
push_back
(
e
);
// if cell coefficient is other than -1 or 1, add multiple
// identical MElements to the physical group
for
(
int
i
=
1
;
i
<
abs
(
coeff
);
i
++
)
{
MElement
*
ecopy
=
factory
.
create
(
cell
->
getTypeMSH
(),
v
);
if
(
cell
->
getDim
()
>
0
&&
coeff
<
0
)
ecopy
->
revert
();
elements
.
push_back
(
ecopy
);
}
std
::
vector
<
double
>
coeffs
(
1
,
abs
(
coeff
));
data
[
e
->
getNum
()]
=
coeffs
;
...
...
@@ -520,7 +535,7 @@ int Chain::createPGroup()
this
->
getCellComplex
()
->
getModel
()
->
storeChain
(
getDim
(),
entityMap
,
physicalMap
);
this
->
getCellComplex
()
->
getModel
()
->
setPhysicalName
(
getName
(),
getDim
(),
physicalNum
);
getDim
(),
physicalNum
);
#if defined(HAVE_POST)
// create PView for instant visualization
PView
*
view
=
new
PView
(
getName
(),
"ElementData"
,
...
...
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