Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
065bfa26
Commit
065bfa26
authored
Sep 05, 2017
by
Andrew Heather
Browse files
INT: Compatibility updates followinglatest integrations
parent
9976caa1
Changes
18
Hide whitespace changes
Inline
Side-by-side
applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C
View file @
065bfa26
...
...
@@ -140,7 +140,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
PstreamBuffers
pBufs
(
Pstream
::
commsTypes
::
nonBlocking
);
{
// List of lists of particles to be transfered for all of the
// List of lists of particles to be transfer
r
ed for all of the
// neighbour processors
List
<
IDLList
<
passiveParticle
>>
particleTransferLists
(
...
...
src/OpenFOAM/meshes/polyMesh/polyMesh.C
View file @
065bfa26
...
...
@@ -147,7 +147,7 @@ Foam::autoPtr<Foam::labelIOList> Foam::polyMesh::readTetBasePtIs() const
IOobject
::
NO_WRITE
);
if
(
io
.
h
eaderOk
(
))
if
(
io
.
typeH
eaderOk
<
labelIOList
>
(
true
))
{
return
autoPtr
<
labelIOList
>
(
new
labelIOList
(
io
));
}
...
...
src/OpenFOAM/primitives/Barycentric/barycentric/barycentric.C
View file @
065bfa26
...
...
@@ -25,7 +25,6 @@ License
#include "barycentric.H"
#include "Random.H"
#include "cachedRandom.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -69,18 +68,6 @@ Foam::barycentric barycentric01
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
barycentric
Foam
::
barycentric01
(
Random
&
rndGen
)
{
return
::
barycentric01
(
rndGen
.
scalar01
(),
rndGen
.
scalar01
(),
rndGen
.
scalar01
()
);
}
Foam
::
barycentric
Foam
::
barycentric01
(
cachedRandom
&
rndGen
)
{
return
::
barycentric01
...
...
src/OpenFOAM/primitives/Barycentric/barycentric/barycentric.H
View file @
065bfa26
...
...
@@ -53,7 +53,6 @@ typedef Barycentric<scalar> barycentric;
//- Generate a random barycentric coordinate within the unit tetrahedron
barycentric
barycentric01
(
Random
&
rndGen
);
barycentric
barycentric01
(
cachedRandom
&
rndGen
);
template
<
>
...
...
src/OpenFOAM/primitives/Barycentric2D/barycentric2D/barycentric2D.C
View file @
065bfa26
...
...
@@ -25,7 +25,6 @@ License
#include "barycentric2D.H"
#include "Random.H"
#include "cachedRandom.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -51,17 +50,6 @@ Foam::barycentric2D barycentric2D01
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
barycentric2D
Foam
::
barycentric2D01
(
Random
&
rndGen
)
{
return
::
barycentric2D01
(
rndGen
.
scalar01
(),
rndGen
.
scalar01
()
);
}
Foam
::
barycentric2D
Foam
::
barycentric2D01
(
cachedRandom
&
rndGen
)
{
return
::
barycentric2D01
...
...
src/OpenFOAM/primitives/Barycentric2D/barycentric2D/barycentric2D.H
View file @
065bfa26
...
...
@@ -53,7 +53,6 @@ typedef Barycentric2D<scalar> barycentric2D;
//- Generate a random barycentric coordinate within the unit triangle
barycentric2D
barycentric2D01
(
Random
&
rndGen
);
barycentric2D
barycentric2D01
(
cachedRandom
&
rndGen
);
template
<
>
...
...
src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H
View file @
065bfa26
...
...
@@ -39,6 +39,7 @@ Description
#include "autoPtr.H"
#include "runTimeSelectionTables.H"
#include "tetIndices.H"
#include "barycentric.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/functionObjects/field/Make/files
View file @
065bfa26
...
...
@@ -25,6 +25,13 @@ streamLine/streamLineBase.C
streamLine/streamLineParticle.C
streamLine/streamLineParticleCloud.C
/*
wallBoundedStreamLine/wallBoundedStreamLine.C
wallBoundedStreamLine/wallBoundedStreamLineParticle.C
wallBoundedStreamLine/wallBoundedStreamLineParticleCloud.C
wallBoundedStreamLine/wallBoundedParticle.C
*/
surfaceInterpolate/surfaceInterpolate.C
regionSizeDistribution/regionSizeDistribution.C
...
...
src/lagrangian/basic/injectedParticle/injectedParticleI.H
View file @
065bfa26
...
...
@@ -36,7 +36,7 @@ inline Foam::injectedParticle::injectedParticle
const
vector
&
U
)
:
particle
(
mesh
,
position
,
-
1
,
false
),
particle
(
mesh
,
position
,
-
1
),
tag_
(
tag
),
soi_
(
soi
),
d_
(
d
),
...
...
src/lagrangian/basic/particle/particle.H
View file @
065bfa26
...
...
@@ -88,7 +88,7 @@ class particle
// Private member data
//- Size in bytes of the position data
static
const
std
::
size_t
sizeofPosition
_
;
static
const
std
::
size_t
sizeofPosition
;
//- Size in bytes of the fields
static
const
std
::
size_t
sizeofFields
;
...
...
@@ -180,8 +180,6 @@ private:
label
origId_
;
private:
// Private Member Functions
// Tetrahedra functions
...
...
@@ -197,8 +195,8 @@ private:
//- Get the transformation associated with the current tet. This
// will convert a barycentric position within the tet to a
//
c
artesian position in the global coordinate system. The
// conversion is x = A & y, where x is the
c
artesian position, y is
//
C
artesian position in the global coordinate system. The
// conversion is x = A & y, where x is the
C
artesian position, y is
// the barycentric position and A is the transformation tensor.
barycentricTensor
stationaryTetTransform
()
const
;
...
...
@@ -398,7 +396,7 @@ public:
"{vector label label scalar label label label label}"
);
//- Cumulative particle counter - used to prov
o
de unique ID
//- Cumulative particle counter - used to prov
i
de unique ID
static
label
particleCount_
;
...
...
@@ -429,7 +427,7 @@ public:
//- Construct as a copy
particle
(
const
particle
&
p
);
//- Construct as a copy with refernce to a new mesh
//- Construct as a copy with refer
e
nce to a new mesh
particle
(
const
particle
&
p
,
const
polyMesh
&
mesh
);
//- Construct a clone
...
...
@@ -610,7 +608,7 @@ public:
TrackData
&
td
);
//- Convenience function. Cobines trackToFace and hitFace
//- Convenience function. Co
m
bines trackToFace and hitFace
template
<
class
TrackData
>
void
trackToAndHitFace
(
...
...
@@ -674,7 +672,7 @@ public:
// Decompose and reconstruct
//- Return the tet point appropr
o
ate for decomposition or reconstruction
//- Return the tet point appropr
i
ate for decomposition or reconstruction
// to or from the given mesh.
label
procTetPt
(
...
...
src/lagrangian/basic/particle/particleIO.C
View file @
065bfa26
...
...
@@ -31,7 +31,7 @@ License
Foam
::
string
Foam
::
particle
::
propertyList_
=
Foam
::
particle
::
propertyList
();
Foam
::
string
Foam
::
particle
::
propertyTypes_
=
Foam
::
particle
::
propertyTypes
();
const
std
::
size_t
Foam
::
particle
::
sizeofPosition
_
const
std
::
size_t
Foam
::
particle
::
sizeofPosition
(
offsetof
(
particle
,
facei_
)
-
offsetof
(
particle
,
coordinates_
)
);
...
...
@@ -69,11 +69,11 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields)
{
if
(
readFields
)
{
is
.
read
(
reinterpret_cast
<
char
*>
(
&
coordinates_
),
sizeofFields
_
);
is
.
read
(
reinterpret_cast
<
char
*>
(
&
coordinates_
),
sizeofFields
);
}
else
{
is
.
read
(
reinterpret_cast
<
char
*>
(
&
coordinates_
),
sizeofPosition
_
);
is
.
read
(
reinterpret_cast
<
char
*>
(
&
coordinates_
),
sizeofPosition
);
}
}
...
...
@@ -93,7 +93,7 @@ void Foam::particle::writePosition(Ostream& os) const
}
else
{
os
.
write
(
reinterpret_cast
<
const
char
*>
(
&
coordinates_
),
sizeofPosition
_
);
os
.
write
(
reinterpret_cast
<
const
char
*>
(
&
coordinates_
),
sizeofPosition
);
}
// Check state of Ostream
...
...
@@ -119,7 +119,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const particle& p)
os
.
write
(
reinterpret_cast
<
const
char
*>
(
&
p
.
coordinates_
),
particle
::
sizeofFields
_
particle
::
sizeofFields
);
}
...
...
src/lagrangian/basic/particle/particleTemplates.C
View file @
065bfa26
...
...
@@ -168,17 +168,12 @@ void Foam::particle::writeObjects(const CloudType& c, objectRegistry& obr)
{
label
np
=
c
.
size
();
IOField
<
vector
>&
position
(
cloud
::
createIOField
<
vector
>
(
"position"
,
np
,
obr
)
);
IOField
<
label
>&
origProc
(
cloud
::
createIOField
<
label
>
(
"origProc"
,
np
,
obr
));
IOField
<
label
>&
origId
(
cloud
::
createIOField
<
label
>
(
"origId"
,
np
,
obr
));
label
i
=
0
;
forAllConstIter
(
typename
CloudType
,
c
,
iter
)
{
position
[
i
]
=
iter
().
position_
;
origProc
[
i
]
=
iter
().
origProc_
;
origId
[
i
]
=
iter
().
origId_
;
i
++
;
...
...
src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
View file @
065bfa26
...
...
@@ -267,6 +267,7 @@ bool Foam::KinematicParcel<ParcelType>::move
const
polyBoundaryMesh
&
pbMesh
=
mesh
.
boundaryMesh
();
const
cloudSolution
&
solution
=
td
.
cloud
().
solution
();
const
scalarField
&
cellLengthScale
=
td
.
cloud
().
cellLengthScale
();
const
scalar
maxCo
=
solution
.
maxCo
();
while
(
td
.
keepParticle
&&
!
td
.
switchProcessor
&&
p
.
stepFraction
()
<
1
)
{
...
...
src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C
View file @
065bfa26
...
...
@@ -72,8 +72,11 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
{
this
->
Uc_
+=
td
.
cloud
().
UTrans
()[
celli
]
/
this
->
massCell
(
celli
);
tetIndices
tetIs
=
this
->
currentTetIndices
();
Tc_
=
td
.
TInterp
().
interpolate
(
this
->
position
(),
tetIs
);
// tetIndices tetIs = this->currentTetIndices();
// Tc_ = td.TInterp().interpolate(this->coordinates(), tetIs);
const
scalar
CpMean
=
td
.
CpInterp
().
psi
()[
celli
];
Tc_
+=
td
.
cloud
().
hsTrans
()[
celli
]
/
(
CpMean
*
this
->
massCell
(
celli
));
if
(
Tc_
<
td
.
cloud
().
constProps
().
TMin
())
{
...
...
src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C
View file @
065bfa26
...
...
@@ -122,13 +122,12 @@ Foam::forceSuSp Foam::InterfaceForce<CloudType>::calcNonCoupled
{
forceSuSp
value
(
vector
::
zero
,
0
.
0
);
const
interpolation
<
vector
>&
gradInterForceInterp
=
gradInterForceInterpPtr_
();
const
interpolation
<
vector
>&
interp
=
gradInterForceInterpPtr_
();
value
.
Su
()
=
value
.
Su
()
=
C_
*
mass
*
gradInterForceI
nterp
.
interpolate
(
p
.
position
(),
p
.
currentTetIndices
());
*
i
nterp
.
interpolate
(
p
.
coordinates
(),
p
.
currentTetIndices
());
return
value
;
}
...
...
src/mesh/extrudeModel/offsetSurface/offsetSurface.C
View file @
065bfa26
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015-201
6
OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-201
7
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -27,6 +27,7 @@ License
#include "addToRunTimeSelectionTable.H"
#include "triSurface.H"
#include "triSurfaceSearch.H"
#include "barycentric2D.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -115,9 +116,7 @@ point offsetSurface::operator()
const
triSurface
&
base
=
baseSurfPtr_
();
const
triPointRef
baseTri
(
base
[
triI
].
tri
(
base
.
points
()));
FixedList
<
scalar
,
3
>
bary
;
baseTri
.
barycentric
(
surfacePoint
,
bary
);
const
barycentric2D
bary
=
baseTri
.
pointToBarycentric
(
surfacePoint
);
const
triSurface
&
offset
=
offsetSurfPtr_
();
const
triPointRef
offsetTri
(
offset
[
triI
].
tri
(
offset
.
points
()));
...
...
@@ -125,8 +124,8 @@ point offsetSurface::operator()
const
point
offsetPoint
(
bary
[
0
]
*
offsetTri
.
a
()
+
bary
[
1
]
*
offsetTri
.
b
()
+
bary
[
2
]
*
offsetTri
.
c
()
+
bary
[
1
]
*
offsetTri
.
b
()
+
bary
[
2
]
*
offsetTri
.
c
()
);
point
interpolatedPoint
...
...
src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C
View file @
065bfa26
...
...
@@ -346,20 +346,18 @@ void Foam::meshRefinement::markFeatureCellLevel
// what to seed. Do this on only the processor that
// holds the keepPoint.
for
All
(
keepPoints
,
i
)
for
(
const
point
&
keepPoint
:
keepPoints
)
{
const
point
&
keepPoint
=
keepPoints
[
i
];
const
label
celli
=
mesh_
.
cellTree
().
findInside
(
keepPoint
);
if
(
cell
I
!=
-
1
)
if
(
cell
i
!=
-
1
)
{
// I am the processor that holds the keepPoint
forAll
(
features_
,
feat
I
)
forAll
(
features_
,
feat
i
)
{
const
edgeMesh
&
featureMesh
=
features_
[
feat
I
];
const
label
featureLevel
=
features_
.
levels
()[
feat
I
][
0
];
const
edgeMesh
&
featureMesh
=
features_
[
feat
i
];
const
label
featureLevel
=
features_
.
levels
()[
feat
i
][
0
];
const
labelListList
&
pointEdges
=
featureMesh
.
pointEdges
();
// Find regions on edgeMesh
...
...
@@ -373,16 +371,16 @@ void Foam::meshRefinement::markFeatureCellLevel
// 1. Seed all 'knots' in edgeMesh
forAll
(
pointEdges
,
point
I
)
forAll
(
pointEdges
,
point
i
)
{
if
(
pointEdges
[
point
I
].
size
()
!=
2
)
if
(
pointEdges
[
point
i
].
size
()
!=
2
)
{
if
(
debug
&
meshRefinement
::
FEATURESEEDS
)
{
Pout
<<
"Adding particle from point:"
<<
point
I
<<
" coord:"
<<
featureMesh
.
points
()[
point
I
]
Pout
<<
"Adding particle from point:"
<<
point
i
<<
" coord:"
<<
featureMesh
.
points
()[
point
i
]
<<
" since number of emanating edges:"
<<
pointEdges
[
point
I
].
size
()
<<
pointEdges
[
point
i
].
size
()
<<
endl
;
}
...
...
@@ -393,28 +391,21 @@ void Foam::meshRefinement::markFeatureCellLevel
(
mesh_
,
keepPoint
,
<<<<<<<
HEAD
cellI
,
tetFaceI
,
tetPtI
,
featureMesh
.
points
()[
pointI
],
// endpos
=======
celli
,
featureMesh
.
points
()[
pointi
],
// endpos
>>>>>>>
371762757
...
Lagrangian
:
Rewrite
of
the
particle
tracking
algorithm
to
function
in
featureLevel
,
// level
feat
I
,
// featureMesh
point
I
,
// end point
feat
i
,
// featureMesh
point
i
,
// end point
-
1
// feature edge
)
);
// Mark
if
(
pointEdges
[
point
I
].
size
()
>
0
)
if
(
pointEdges
[
point
i
].
size
()
>
0
)
{
label
e0
=
pointEdges
[
point
I
][
0
];
label
region
I
=
edgeRegion
[
e0
];
regionVisited
[
region
I
]
=
1u
;
label
e0
=
pointEdges
[
point
i
][
0
];
label
region
i
=
edgeRegion
[
e0
];
regionVisited
[
region
i
]
=
1u
;
}
}
}
...
...
@@ -422,17 +413,17 @@ void Foam::meshRefinement::markFeatureCellLevel
// 2. Any regions that have not been visited at all? These can
// only be circular regions!
forAll
(
featureMesh
.
edges
(),
edge
I
)
forAll
(
featureMesh
.
edges
(),
edge
i
)
{
if
(
regionVisited
.
set
(
edgeRegion
[
edge
I
],
1u
))
if
(
regionVisited
.
set
(
edgeRegion
[
edge
i
],
1u
))
{
const
edge
&
e
=
featureMesh
.
edges
()[
edge
I
];
label
point
I
=
e
.
start
();
const
edge
&
e
=
featureMesh
.
edges
()[
edge
i
];
label
point
i
=
e
.
start
();
if
(
debug
&
meshRefinement
::
FEATURESEEDS
)
{
Pout
<<
"Adding particle from point:"
<<
point
I
<<
" coord:"
<<
featureMesh
.
points
()[
point
I
]
<<
" on circular region:"
<<
edgeRegion
[
edge
I
]
Pout
<<
"Adding particle from point:"
<<
point
i
<<
" coord:"
<<
featureMesh
.
points
()[
point
i
]
<<
" on circular region:"
<<
edgeRegion
[
edge
i
]
<<
endl
;
}
...
...
@@ -443,18 +434,11 @@ void Foam::meshRefinement::markFeatureCellLevel
(
mesh_
,
keepPoint
,
<<<<<<<
HEAD
cellI
,
tetFaceI
,
tetPtI
,
featureMesh
.
points
()[
pointI
],
// endpos
=======
celli
,
featureMesh
.
points
()[
pointi
],
// endpos
>>>>>>>
371762757
...
Lagrangian
:
Rewrite
of
the
particle
tracking
algorithm
to
function
in
featureLevel
,
// level
feat
I
,
// featureMesh
point
I
,
// end point
feat
i
,
// featureMesh
point
i
,
// end point
-
1
// feature edge
)
);
...
...
@@ -541,17 +525,12 @@ void Foam::meshRefinement::markFeatureCellLevel
// on the edge.
const
edge
&
e
=
featureMesh
.
edges
()[
edgeI
];
label
otherPoint
I
=
e
.
otherVertex
(
pointI
);
label
otherPoint
i
=
e
.
otherVertex
(
pointI
);
trackedParticle
*
tp
(
new
trackedParticle
(
startTp
));
<<<<<<<
HEAD
tp
->
end
()
=
featureMesh
.
points
()[
otherPointI
];
tp
->
j
()
=
otherPointI
;
=======
tp
->
start
()
=
tp
->
position
();
tp
->
end
()
=
featureMesh
.
points
()[
otherPointi
];
tp
->
j
()
=
otherPointi
;
>>>>>>>
371762757
...
Lagrangian
:
Rewrite
of
the
particle
tracking
algorithm
to
function
in
tp
->
k
()
=
edgeI
;
if
(
debug
&
meshRefinement
::
FEATURESEEDS
)
...
...
@@ -608,16 +587,11 @@ void Foam::meshRefinement::markFeatureCellLevel
// on the edge.
const
edge
&
e
=
featureMesh
.
edges
()[
edgeI
];
label
otherPoint
I
=
e
.
otherVertex
(
pointI
);
label
otherPoint
i
=
e
.
otherVertex
(
pointI
);
<<<<<<<
HEAD
tp
.
end
()
=
featureMesh
.
points
()[
otherPointI
];
tp
.
j
()
=
otherPointI
;
=======
tp
.
start
()
=
tp
.
position
();
tp
.
end
()
=
featureMesh
.
points
()[
otherPointi
];
tp
.
j
()
=
otherPointi
;
>>>>>>>
371762757
...
Lagrangian
:
Rewrite
of
the
particle
tracking
algorithm
to
function
in
tp
.
k
()
=
edgeI
;
keepParticle
=
true
;
break
;
...
...
src/sampling/surface/isoSurface/isoSurface.C
View file @
065bfa26
...
...
@@ -1235,19 +1235,16 @@ void Foam::isoSurface::trimToBox
{
dynInterpolatedPoints
.
append
(
pointI
);
FixedList
<
label
,
3
>
oldPoints
;
oldPoints
[
0
]
=
3
*
oldTriI
;
oldPoints
[
1
]
=
3
*
oldTriI
+
1
;
oldPoints
[
2
]
=
3
*
oldTriI
+
2
;
FixedList
<
label
,
3
>
oldPoints
(
{
3
*
oldTriI
,
3
*
oldTriI
+
1
,
3
*
oldTriI
+
2
}
)
;
dynInterpolatedOldPoints
.
append
(
oldPoints
);
triPointRef
tri
(
oldTriPoints
,
oldPoints
);
FixedList
<
scalar
,
3
>
bary
;
tri
.
barycentric
(
pt
,
bary
);
FixedList
<
scalar
,
3
>
weights
;
weights
[
0
]
=
bary
[
0
];
weights
[
1
]
=
bary
[
1
];
weights
[
2
]
=
bary
[
2
];
barycentric2D
bary
=
tri
.
pointToBarycentric
(
pt
);
FixedList
<
scalar
,
3
>
weights
({
bary
.
a
(),
bary
.
b
(),
bary
.
c
()});
dynInterpolationWeights
.
append
(
weights
);
}
}
...
...
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