Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
7bd6b89b
Commit
7bd6b89b
authored
Oct 25, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction particle 2D et demi
parent
750381ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
+23
-11
No files found.
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
View file @
7bd6b89b
...
...
@@ -39,7 +39,7 @@ Geom::Orientation3D ParticleCell2DAndHalf<PFP>::getOrientationEdge(const VEC3& p
const
VEC3
&
n1
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
//orientation relative to the plane orthogonal to the face going through the edge
return
Geom
::
testOrientation3D
(
point
,
vertexPoint
,
endPoint
,
vertexPoint
+
n1
);
return
Geom
::
testOrientation3D
(
point
,
vertexPoint
,
endPoint
,
vertexPoint
+
n1
);
}
template
<
typename
PFP
>
...
...
@@ -67,7 +67,7 @@ Geom::Orientation3D ParticleCell2DAndHalf<PFP>::getOrientationFace(VEC3 point, V
VEC3
n1
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
return
Geom
::
testOrientation3D
(
point
,
sourcePoint
,
dPoint
,
dPoint
+
n1
);
return
Geom
::
testOrientation3D
(
point
,
sourcePoint
,
dPoint
+
n1
,
dPoint
);
}
template
<
typename
PFP
>
...
...
@@ -167,17 +167,27 @@ void ParticleCell2DAndHalf<PFP>::edgeState(VEC3 current, Geom::Orientation3D sid
faceState
(
current
);
return
;
case
Geom
::
OVER
:
{
//transform the displacement into the new entered face
VEC3
displ
=
current
-
m_position
;
VEC3
edge
=
Algo
::
Geom
::
vectorOutOfDart
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
edge
.
normalize
();
VEC3
n
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
current
=
m_position
+
((
displ
^
n
)
*
displ
.
norm
());
VEC3
edge
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
VEC3
n1
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
VEC3
n2
=
Algo
::
Geometry
::
faceNormal
<
PFP
>
(
m
,
m
.
phi2
(
d
),
m_positions
);
float
angle
=
acos
(
n1
*
n2
);
Geom
::
Matrix
<
4
,
4
,
float
>
mRot
;
mRot
.
identity
();
Geom
::
rotate
(
edge
[
0
],
edge
[
1
],
edge
[
2
],
angle
,
mRot
);
displ
=
Geom
::
transform
(
displ
,
mRot
);
current
=
m_position
+
displ
;
d
=
m
.
phi1
(
m
.
phi2
(
d
));
faceState
(
current
);
return
;
}
default
:
state
=
EDGE
;
}
...
...
@@ -311,12 +321,14 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 current)
default
:
if
(
wsoe
==
Geom
::
ON
)
{
d
=
m
.
phi1
(
d
);
//to check
m_position
=
m_positions
[
d
];
std
::
cout
<<
__FILE__
<<
" to uncomment and check"
<<
std
::
endl
;
vertexState
(
current
);
// d = m.phi1(d); //to check
// m_position = m_positions[d];
//
// vertexState(current);
}
else
//
else
{
// CGoGNout << "wsoe : " << wsoe << CGoGNendl;
// CGoGNout << "current " << current << " " << m_position << CGoGNendl;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment