Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
27b2f7ad
Commit
27b2f7ad
authored
Jul 27, 2010
by
mattijs
Browse files
ENH: Particle: allow hitPatch to move particle to different face, different patchId.
parent
fbaea3c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/basic/Particle/Particle.C
View file @
27b2f7ad
...
...
@@ -334,11 +334,18 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
position_
=
endPosition
;
}
label
origFacei
=
facei_
;
label
patchi
=
patch
(
facei_
);
const
polyPatch
&
patch
=
mesh
.
boundaryMesh
()[
patchi
];
if
(
!
p
.
hitPatch
(
patch
,
td
,
patchi
))
if
(
!
p
.
hitPatch
(
mesh
.
boundaryMesh
()[
patch
i
]
,
td
,
patchi
))
{
// Did patch interaction model switch patches?
if
(
facei_
!=
origFacei
)
{
patchi
=
patch
(
facei_
);
}
const
polyPatch
&
patch
=
mesh
.
boundaryMesh
()[
patchi
];
if
(
isA
<
wedgePolyPatch
>
(
patch
))
{
p
.
hitWedgePatch
...
...
src/lagrangian/basic/Particle/Particle.H
View file @
27b2f7ad
...
...
@@ -378,6 +378,9 @@ public:
//- Return current cell particle is in
inline
label
cell
()
const
;
//- Return current face particle is on otherwise -1
inline
label
&
face
();
//- Return current face particle is on otherwise -1
inline
label
face
()
const
;
...
...
src/lagrangian/basic/Particle/ParticleI.H
View file @
27b2f7ad
...
...
@@ -325,6 +325,13 @@ inline Foam::label Foam::Particle<ParticleType>::face() const
}
template
<
class
ParticleType
>
inline
Foam
::
label
&
Foam
::
Particle
<
ParticleType
>::
face
()
{
return
facei_
;
}
template
<
class
ParticleType
>
inline
bool
Foam
::
Particle
<
ParticleType
>::
onBoundary
()
const
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment