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
847ce8c9
Commit
847ce8c9
authored
13 years ago
by
Amaury Johnen
Browse files
Options
Downloads
Patches
Plain Diff
rmv comment Rec2DDataChange
parent
aabb9537
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Mesh/meshGFaceRecombine.cpp
+6
-173
6 additions, 173 deletions
Mesh/meshGFaceRecombine.cpp
Mesh/meshGFaceRecombine.h
+0
-31
0 additions, 31 deletions
Mesh/meshGFaceRecombine.h
with
6 additions
and
204 deletions
Mesh/meshGFaceRecombine.cpp
+
6
−
173
View file @
847ce8c9
...
...
@@ -1310,109 +1310,6 @@ void Rec2DChange::revert()
/** Rec2DDataChange **/
/***********************/
//void Rec2DDataChange::hide(Rec2DEdge *re)
//{
// _hiddenEdge.push_back(re);
// re->hide();
//}
//
//void Rec2DDataChange::hide(Rec2DVertex *rv)
//{
// _hiddenVertex.push_back(rv);
// rv->hide();
//}
//
//void Rec2DDataChange::hide(Rec2DElement *rel)
//{
// _hiddenElement.push_back(rel);
// rel->hide();
//}
//
//void Rec2DDataChange::hide(std::vector<Rec2DAction*> actions)
//{
// _hiddenAction.insert(_hiddenAction.end(), actions.begin(), actions.end());
// for (unsigned int i = 0; i < actions.size(); ++i) {
// actions[i]->hide();
// }
//}
//
//void Rec2DDataChange::hide(Rec2DAction *action)
//{
// _hiddenAction.push_back(action);
// action->hide();
//}
//
//void Rec2DDataChange::append(const Rec2DElement *rel)
//{
// _newElement.push_back((Rec2DElement*)rel);
//}
//
//void Rec2DDataChange::append(const Rec2DAction *ra)
//{
// _newAction.push_back((Rec2DAction*)ra);
//}
//
//void Rec2DDataChange::swapFor(Rec2DEdge *re1, Rec2DEdge *re2)
//{
// Rec2DElement *rel = Rec2DEdge::getUniqueElement(re1);
// if (!rel) {
// Msg::Error("[Rec2DDataChange] invalid swapping edges");
// return;
// }
// _edgeSwap.push_back(std::make_pair(rel, std::make_pair(re2, re1) ));
// rel->swap(re1, re2);
//}
//
//void Rec2DDataChange::swapFor(Rec2DVertex *rv1, Rec2DVertex *rv2)
//{
// std::vector<Rec2DElement*> elem;
// rv1->getElements(elem);
// for (unsigned int i = 0; i < elem.size(); ++i) {
// _vertSwapEL.push_back(std::make_pair(elem[i], std::make_pair(rv2, rv1) ));
// rv1->rmv(elem[i]);
// }
// std::vector<Rec2DEdge*> edges;
// rv1->getEdges(edges);
// for (unsigned int i = 0; i < edges.size(); ++i) {
// _vertSwapE.push_back(std::make_pair(edges[i], std::make_pair(rv2, rv1) ));
// edges[i]->swap(rv1, rv2);
// }
// for (unsigned int i = 0; i < elem.size(); ++i) {
// rv2->add(elem[i]);
// }
//}
//
//void Rec2DDataChange::relocate(Rec2DVertex *rv, double u, double v)
//{
// _oldCoordinate.push_back(std::make_pair(rv, SPoint2(rv->u(), rv->v())));
// rv->relocate(SPoint2(u, v));
//}
//
//void Rec2DDataChange::changeParity(Rec2DVertex *rv, int par)
//{
// for (unsigned int i = 0; i < _oldParity.size(); ++i) {
// if (_oldParity[i].first == rv)
// return;
// }
// _oldParity.push_back(std::make_pair(rv, rv->getParity()));
// rv->setParity(par);
//}
//
//void Rec2DDataChange::saveParity(std::vector<Rec2DVertex*> &vect)
//{
// int sizeOldParity = _oldParity.size();
// for (unsigned int i = 0; i < vect.size(); ++i) {
// bool notThere = true;
// for (int j = 0; j < sizeOldParity; ++j) {
// if (_oldParity[j].first == vect[i])
// notThere = false;
// }
// if (notThere) {
// _oldParity.push_back(std::make_pair(vect[i], vect[i]->getParity()));
// }
// }
//}
//
void
Rec2DDataChange
::
checkObsoleteActions
(
Rec2DVertex
*
const
*
verts
,
int
size
)
{
std
::
vector
<
Rec2DAction
*>
actions
;
...
...
@@ -1425,56 +1322,6 @@ void Rec2DDataChange::checkObsoleteActions(Rec2DVertex *const*verts, int size)
}
}
//void Rec2DDataChange::revert()
//{
// for (unsigned int i = 0; i < _oldParity.size(); ++i)
// _oldParity[i].first->setParity(_oldParity[i].second);
// for (unsigned int i = 0; i < _oldCoordinate.size(); ++i)
// _oldCoordinate[i].first->relocate(_oldCoordinate[i].second);
//
// for (unsigned int i = 0; i < _newAction.size(); ++i)
// delete _newAction[i];
// for (unsigned int i = 0; i < _newElement.size(); ++i)
// delete _newElement[i];
// //for (unsigned int i = 0; i < _newEdge.size(); ++i)
// // delete _newEdge[i];
// //for (unsigned int i = 0; i < _newVertex.size(); ++i)
// // delete _newVertex[i];
//
// for (unsigned int i = 0; i < _hiddenVertex.size(); ++i)
// _hiddenVertex[i]->reveal();
// for (unsigned int i = 0; i < _hiddenEdge.size(); ++i)
// _hiddenEdge[i]->reveal();
//
// for (unsigned int i = 0; i < _edgeSwap.size(); ++i) {
// _edgeSwap[i].first->swap(_edgeSwap[i].second.first,
// _edgeSwap[i].second.second);
// }
// for (unsigned int i = 0; i < _vertSwapE.size(); ++i) {
// _vertSwapE[i].first->swap(_vertSwapE[i].second.first,
// _vertSwapE[i].second.second);
// }
// for (unsigned int i = 0; i < _vertSwapEL.size(); ++i) {
// _vertSwapEL[i].first->swap(_vertSwapEL[i].second.first,
// _vertSwapEL[i].second.second);
// }
//
// for (unsigned int i = 0; i < _hiddenElement.size(); ++i)
// _hiddenElement[i]->reveal();
// for (unsigned int i = 0; i < _hiddenAction.size(); ++i)
// _hiddenAction[i]->reveal();
// _oldParity.clear();
// _oldCoordinate.clear();
// //_newEdge.clear();
// //_newVertex.clear();
// _newAction.clear();
// _newElement.clear();
// _hiddenEdge.clear();
// _hiddenVertex.clear();
// _hiddenAction.clear();
// _hiddenElement.clear();
//}
Rec2DDataChange
::~
Rec2DDataChange
()
{
for
(
unsigned
int
i
=
0
;
i
<
_changes
.
size
();
++
i
)
...
...
@@ -1825,17 +1672,10 @@ bool Rec2DTwoTri2Quad::isObsolete() const
p
[
1
]
=
_vertices
[
1
]
->
getParity
();
p
[
2
]
=
_vertices
[
2
]
->
getParity
();
p
[
3
]
=
_vertices
[
3
]
->
getParity
();
return
Rec2DTwoTri2Quad
::
isObsolete
(
p
);
}
bool
Rec2DTwoTri2Quad
::
isObsolete
(
const
int
*
p
)
{
if
(
p
[
0
]
&&
p
[
0
]
/
2
==
p
[
1
]
/
2
&&
p
[
0
]
%
2
!=
p
[
1
]
%
2
||
p
[
2
]
&&
p
[
2
]
/
2
==
p
[
3
]
/
2
&&
p
[
2
]
%
2
!=
p
[
3
]
%
2
||
p
[
0
]
&&
(
p
[
0
]
==
p
[
2
]
||
p
[
0
]
==
p
[
3
])
||
p
[
1
]
&&
(
p
[
1
]
==
p
[
2
]
||
p
[
1
]
==
p
[
3
])
)
return
true
;
return
false
;
return
(
p
[
0
]
&&
p
[
0
]
/
2
==
p
[
1
]
/
2
&&
p
[
0
]
%
2
!=
p
[
1
]
%
2
||
p
[
2
]
&&
p
[
2
]
/
2
==
p
[
3
]
/
2
&&
p
[
2
]
%
2
!=
p
[
3
]
%
2
||
p
[
0
]
&&
(
p
[
0
]
==
p
[
2
]
||
p
[
0
]
==
p
[
3
])
||
p
[
1
]
&&
(
p
[
1
]
==
p
[
2
]
||
p
[
1
]
==
p
[
3
])
);
}
void
Rec2DTwoTri2Quad
::
getElements
(
std
::
vector
<
Rec2DElement
*>
&
elem
)
const
...
...
@@ -2136,16 +1976,9 @@ bool Rec2DCollapse::isObsolete() const
int
p
[
2
];
p
[
0
]
=
_rec
->
_vertices
[
0
]
->
getParity
();
p
[
1
]
=
_rec
->
_vertices
[
1
]
->
getParity
();
return
Rec2DCollapse
::
isObsolete
(
p
)
||
return
(
p
[
0
]
&&
p
[
0
]
/
2
==
p
[
1
]
/
2
&&
p
[
0
]
%
2
!=
p
[
1
]
%
2
)
||
(
_rec
->
_vertices
[
0
]
->
getOnBoundary
()
&&
_rec
->
_vertices
[
1
]
->
getOnBoundary
()
);
}
bool
Rec2DCollapse
::
isObsolete
(
const
int
*
p
)
{
if
(
p
[
0
]
&&
p
[
0
]
/
2
==
p
[
1
]
/
2
&&
p
[
0
]
%
2
!=
p
[
1
]
%
2
)
return
true
;
return
false
;
_rec
->
_vertices
[
1
]
->
getOnBoundary
()
)
;
}
bool
Rec2DCollapse
::
whatWouldYouDo
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFaceRecombine.h
+
0
−
31
View file @
847ce8c9
...
...
@@ -255,17 +255,6 @@ class Rec2DDataChange {
std
::
vector
<
Rec2DChange
*>
_changes
;
Rec2DAction
*
_ra
;
//std::vector<Rec2DEdge*> _hiddenEdge/*, _newEdge*/;
//std::vector<Rec2DVertex*> _hiddenVertex/*, _newVertex*/;
//std::vector<Rec2DElement*> _hiddenElement, _newElement;
//std::vector<Rec2DAction*> _hiddenAction, _newAction;
//std::vector<std::pair<Rec2DVertex*, SPoint2> > _oldCoordinate;
//std::vector<std::pair<Rec2DVertex*, int> > _oldParity;
//std::vector<std::pair<Rec2DEdge*, std::pair<Rec2DVertex*, Rec2DVertex*> > > _vertSwapE;
//std::vector<std::pair<Rec2DElement*, std::pair<Rec2DEdge*, Rec2DEdge*> > > _edgeSwap;
//std::vector<std::pair<Rec2DElement*, std::pair<Rec2DVertex*, Rec2DVertex*> > > _vertSwapEL;
public
:
~
Rec2DDataChange
();
...
...
@@ -290,24 +279,6 @@ class Rec2DDataChange {
inline
void
saveParity
(
const
std
::
vector
<
Rec2DVertex
*>
&
verts
)
{
_changes
.
push_back
(
new
Rec2DChange
(
verts
,
SavePar
));
}
//void checkObsoleteActions() {_changes.push_back(new Rec2DChange());}
//void hide(Rec2DEdge*); {_elementaryChanges.push_back(new Rec2DChange(re));}
//void hide(Rec2DVertex*);
//void hide(Rec2DElement*);
//void hide(Rec2DAction*);
//void hide(std::vector<Rec2DAction*>);
//
//void append(const Rec2DElement*);
//void append(const Rec2DAction*);
//
//void swapFor(Rec2DEdge*, Rec2DEdge*);
//void swapFor(Rec2DVertex*, Rec2DVertex*);
//
//void relocate(Rec2DVertex*, double, double);
//
//void changeParity(Rec2DVertex*, int);
//void saveParity(std::vector<Rec2DVertex*>&);
void
checkObsoleteActions
(
Rec2DVertex
*
const
*
,
int
size
);
void
revert
();
...
...
@@ -373,7 +344,6 @@ class Rec2DTwoTri2Quad : public Rec2DAction {
virtual
void
apply
(
Rec2DDataChange
*
)
const
;
virtual
bool
isObsolete
()
const
;
static
bool
isObsolete
(
const
int
*
);
virtual
inline
Rec2DVertex
*
getVertex
(
int
i
)
const
{
return
_vertices
[
i
];}
//-
virtual
inline
int
getNumElement
()
{
return
2
;}
...
...
@@ -415,7 +385,6 @@ class Rec2DCollapse : public Rec2DAction {
virtual
void
apply
(
Rec2DDataChange
*
)
const
;
virtual
bool
isObsolete
()
const
;
static
bool
isObsolete
(
const
int
*
);
virtual
bool
whatWouldYouDo
(
std
::
map
<
Rec2DVertex
*
,
std
::
vector
<
int
>
>&
);
virtual
inline
Rec2DVertex
*
getVertex
(
int
i
)
const
{
...
...
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