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
9798d033
Commit
9798d033
authored
Jan 20, 2011
by
mattijs
Browse files
ENH: InteractionLists : moved globalTransforms to globalMeshData
parent
2ec55a92
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/basic/InteractionLists/InteractionLists.C
View file @
9798d033
...
...
@@ -24,6 +24,11 @@ License
\*---------------------------------------------------------------------------*/
#include
"InteractionLists.H"
#include
"globalIndexAndTransform.H"
#include
"indexedOctree.H"
#include
"treeDataFace.H"
#include
"treeDataCell.H"
#include
"volFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
...
...
@@ -61,7 +66,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
(
procBb
,
allExtendedProcBbs
,
globalTransforms
_
,
mesh_
.
globalData
().
globalTransforms
()
,
extendedProcBbsInRange
,
extendedProcBbsTransformIndex
,
extendedProcBbsOrigProc
...
...
@@ -81,6 +86,9 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
);
}
const
globalIndexAndTransform
&
globalTransforms
=
mesh_
.
globalData
().
globalTransforms
();
// Recording which cells are in range of an extended boundBox, as
// only these cells will need to be tested to determine which
// referred cells that they interact with.
...
...
@@ -116,7 +124,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
cellIAndTToExchange
.
append
(
globalTransforms
_
.
encode
(
cellI
,
transformIndex
)
globalTransforms
.
encode
(
cellI
,
transformIndex
)
);
cellBbsToExchange
.
append
(
cellBb
);
...
...
@@ -173,9 +181,9 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
{
const
labelPair
&
ciat
=
cellIAndTToExchange
[
bbI
];
const
vectorTensorTransform
&
transform
=
globalTransforms
_
.
transform
const
vectorTensorTransform
&
transform
=
globalTransforms
.
transform
(
globalTransforms
_
.
transformIndex
(
ciat
)
globalTransforms
.
transformIndex
(
ciat
)
);
treeBoundBox
tempTransformedBb
...
...
@@ -352,7 +360,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
wallFaceIAndTToExchange
.
append
(
globalTransforms
_
.
encode
(
wallFaceI
,
transformIndex
)
globalTransforms
.
encode
(
wallFaceI
,
transformIndex
)
);
wallFaceBbsToExchange
.
append
(
wallFaceBb
);
...
...
@@ -390,9 +398,9 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
{
const
labelPair
&
wfiat
=
wallFaceIAndTToExchange
[
bbI
];
const
vectorTensorTransform
&
transform
=
globalTransforms
_
.
transform
const
vectorTensorTransform
&
transform
=
globalTransforms
.
transform
(
globalTransforms
_
.
transformIndex
(
wfiat
)
globalTransforms
.
transformIndex
(
wfiat
)
);
treeBoundBox
tempTransformedBb
...
...
@@ -518,11 +526,11 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
{
const
labelPair
&
wfiat
=
wallFaceIndexAndTransformToDistribute_
[
rWFI
];
label
wallFaceIndex
=
globalTransforms
_
.
index
(
wfiat
);
label
wallFaceIndex
=
globalTransforms
.
index
(
wfiat
);
const
vectorTensorTransform
&
transform
=
globalTransforms
_
.
transform
const
vectorTensorTransform
&
transform
=
globalTransforms
.
transform
(
globalTransforms
_
.
transformIndex
(
wfiat
)
globalTransforms
.
transformIndex
(
wfiat
)
);
const
face
&
f
=
mesh_
.
faces
()[
wallFaceIndex
];
...
...
@@ -911,6 +919,10 @@ void Foam::InteractionLists<ParticleType>::prepareParticlesToRefer
const
List
<
DynamicList
<
ParticleType
*>
>&
cellOccupancy
)
{
const
globalIndexAndTransform
&
globalTransforms
=
mesh_
.
globalData
().
globalTransforms
();
referredParticles_
.
setSize
(
cellIndexAndTransformToDistribute_
.
size
());
// Clear all existing referred particles
...
...
@@ -927,7 +939,7 @@ void Foam::InteractionLists<ParticleType>::prepareParticlesToRefer
{
const
labelPair
ciat
=
cellIndexAndTransformToDistribute_
[
i
];
label
cellIndex
=
globalTransforms
_
.
index
(
ciat
);
label
cellIndex
=
globalTransforms
.
index
(
ciat
);
List
<
ParticleType
*>
realParticles
=
cellOccupancy
[
cellIndex
];
...
...
@@ -952,9 +964,12 @@ void Foam::InteractionLists<ParticleType>::prepareParticleToBeReferred
labelPair
ciat
)
{
const
vectorTensorTransform
&
transform
=
globalTransforms_
.
transform
const
globalIndexAndTransform
&
globalTransforms
=
mesh_
.
globalData
().
globalTransforms
();
const
vectorTensorTransform
&
transform
=
globalTransforms
.
transform
(
globalTransforms
_
.
transformIndex
(
ciat
)
globalTransforms
.
transformIndex
(
ciat
)
);
particle
->
position
()
=
transform
.
invTransformPosition
(
particle
->
position
());
...
...
@@ -993,6 +1008,9 @@ void Foam::InteractionLists<ParticleType>::fillReferredParticleCloud()
template
<
class
ParticleType
>
void
Foam
::
InteractionLists
<
ParticleType
>::
prepareWallDataToRefer
()
{
const
globalIndexAndTransform
&
globalTransforms
=
mesh_
.
globalData
().
globalTransforms
();
referredWallData_
.
setSize
(
wallFaceIndexAndTransformToDistribute_
.
size
()
...
...
@@ -1004,11 +1022,11 @@ void Foam::InteractionLists<ParticleType>::prepareWallDataToRefer()
{
const
labelPair
&
wfiat
=
wallFaceIndexAndTransformToDistribute_
[
rWVI
];
label
wallFaceIndex
=
globalTransforms
_
.
index
(
wfiat
);
label
wallFaceIndex
=
globalTransforms
.
index
(
wfiat
);
const
vectorTensorTransform
&
transform
=
globalTransforms
_
.
transform
const
vectorTensorTransform
&
transform
=
globalTransforms
.
transform
(
globalTransforms
_
.
transformIndex
(
wfiat
)
globalTransforms
.
transformIndex
(
wfiat
)
);
label
patchI
=
mesh_
.
boundaryMesh
().
patchID
()
...
...
@@ -1088,7 +1106,6 @@ Foam::InteractionLists<ParticleType>::InteractionLists(const polyMesh& mesh)
writeCloud_
(
false
),
cellMapPtr_
(),
wallFaceMapPtr_
(),
globalTransforms_
(
mesh_
),
maxDistance_
(
0
.
0
),
dil_
(),
dwfil_
(),
...
...
@@ -1117,7 +1134,6 @@ Foam::InteractionLists<ParticleType>::InteractionLists
writeCloud_
(
writeCloud
),
cellMapPtr_
(),
wallFaceMapPtr_
(),
globalTransforms_
(
mesh_
),
maxDistance_
(
maxDistance
),
dil_
(),
dwfil_
(),
...
...
src/lagrangian/basic/InteractionLists/InteractionLists.H
View file @
9798d033
...
...
@@ -60,21 +60,17 @@ SourceFiles
#define InteractionLists_H
#include
"polyMesh.H"
#include
"globalIndexAndTransform.H"
#include
"referredWallFace.H"
#include
"indexedOctree.H"
#include
"Tuple2.H"
#include
"treeDataCell.H"
#include
"treeDataFace.H"
#include
"mapDistribute.H"
#include
"volFields.H"
#include
"Random.H"
//#include "mapDistribute.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
class
globalIndexAndTransform
;
class
mapDistribute
;
/*---------------------------------------------------------------------------*\
Class InteractionLists Declaration
\*---------------------------------------------------------------------------*/
...
...
@@ -100,10 +96,6 @@ class InteractionLists
//- mapDistribute to exchange wall face data
autoPtr
<
mapDistribute
>
wallFaceMapPtr_
;
//- Storage and encoding/decoding for all possible transforms
// of the geometry
globalIndexAndTransform
globalTransforms_
;
//- Maximum distance over which interactions will be detected
scalar
maxDistance_
;
...
...
@@ -259,9 +251,6 @@ public:
//- Return access to the wallFaceMap
inline
const
mapDistribute
&
wallFaceMap
()
const
;
//- Return access to the globalTransforms
inline
const
globalIndexAndTransform
&
globalTransforms
()
const
;
//- Return access to the direct interaction list
inline
const
labelListList
&
dil
()
const
;
...
...
src/lagrangian/basic/InteractionLists/InteractionListsI.H
View file @
9798d033
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-201
0
OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-201
1
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -50,14 +50,6 @@ Foam::InteractionLists<ParticleType>::wallFaceMap() const
}
template
<
class
ParticleType
>
const
Foam
::
globalIndexAndTransform
&
Foam
::
InteractionLists
<
ParticleType
>::
globalTransforms
()
const
{
return
globalTransforms_
;
}
template
<
class
ParticleType
>
const
Foam
::
labelListList
&
Foam
::
InteractionLists
<
ParticleType
>::
dil
()
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