mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Resolved conflict
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -42,20 +42,9 @@ Description
|
|||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
void testMapDistribute()
|
||||||
{
|
{
|
||||||
|
|
||||||
#include "setRootCase.H"
|
|
||||||
#include "createTime.H"
|
|
||||||
|
|
||||||
|
|
||||||
// Test mapDistribute
|
|
||||||
// ~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
if (true)
|
|
||||||
{
|
|
||||||
Random rndGen(43544*Pstream::myProcNo());
|
Random rndGen(43544*Pstream::myProcNo());
|
||||||
|
|
||||||
// Generate random data.
|
// Generate random data.
|
||||||
@ -71,7 +60,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Send all ones to processor indicated by .first()
|
// Send all ones to processor indicated by .first()
|
||||||
|
|
||||||
|
|
||||||
// Count how many to send
|
// Count how many to send
|
||||||
labelList nSend(Pstream::nProcs(), 0);
|
labelList nSend(Pstream::nProcs(), 0);
|
||||||
forAll(complexData, i)
|
forAll(complexData, i)
|
||||||
@ -122,8 +110,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Construct distribute map (destructively)
|
// Construct distribute map (destructively)
|
||||||
mapDistribute map(constructSize, sendMap.xfer(), recvMap.xfer());
|
mapDistribute map(constructSize, sendMap.xfer(), recvMap.xfer());
|
||||||
|
|
||||||
@ -131,65 +117,160 @@ int main(int argc, char *argv[])
|
|||||||
map.distribute(complexData);
|
map.distribute(complexData);
|
||||||
|
|
||||||
Pout<< "complexData:" << complexData << endl;
|
Pout<< "complexData:" << complexData << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
void testTransfer(const T& input)
|
||||||
|
{
|
||||||
|
T data = input;
|
||||||
|
|
||||||
|
if (Pstream::master())
|
||||||
|
{
|
||||||
|
Perr<<"test transfer (" << (typeid(T).name()) << "): " << data << nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Perr<< "\nStarting transfers\n" << endl;
|
|
||||||
|
|
||||||
vector data(0, 1, 2);
|
|
||||||
|
|
||||||
if (Pstream::parRun())
|
|
||||||
{
|
|
||||||
if (Pstream::myProcNo() != Pstream::masterNo())
|
if (Pstream::myProcNo() != Pstream::masterNo())
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
Perr<< "slave sending to master "
|
Perr<< "slave sending to master " << Pstream::masterNo() << endl;
|
||||||
<< Pstream::masterNo() << endl;
|
|
||||||
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
||||||
toMaster << data;
|
toMaster << data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Perr<< "slave receiving from master "
|
Perr<< "slave receiving from master " << Pstream::masterNo() << endl;
|
||||||
<< Pstream::masterNo() << endl;
|
|
||||||
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
||||||
fromMaster >> data;
|
fromMaster >> data;
|
||||||
|
|
||||||
Perr<< data << endl;
|
Perr<< data << endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
int slave=Pstream::firstSlave();
|
int slave = Pstream::firstSlave();
|
||||||
slave<=Pstream::lastSlave();
|
slave <= Pstream::lastSlave();
|
||||||
slave++
|
++slave
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Perr << "master receiving from slave " << slave << endl;
|
Perr<< "master receiving from slave " << slave << endl;
|
||||||
IPstream fromSlave(Pstream::blocking, slave);
|
IPstream fromSlave(Pstream::blocking, slave);
|
||||||
fromSlave >> data;
|
fromSlave >> data;
|
||||||
|
|
||||||
Perr<< data << endl;
|
Perr<< data << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
int slave=Pstream::firstSlave();
|
int slave = Pstream::firstSlave();
|
||||||
slave<=Pstream::lastSlave();
|
slave <= Pstream::lastSlave();
|
||||||
slave++
|
++slave
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Perr << "master sending to slave " << slave << endl;
|
Perr<< "master sending to slave " << slave << endl;
|
||||||
OPstream toSlave(Pstream::blocking, slave);
|
OPstream toSlave(Pstream::blocking, slave);
|
||||||
toSlave << data;
|
toSlave << data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
void testTokenized(const T& data)
|
||||||
|
{
|
||||||
|
token tok;
|
||||||
|
|
||||||
|
if (Pstream::master())
|
||||||
|
{
|
||||||
|
Perr<<"test tokenized \"" << data << "\"" << nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
if (Pstream::myProcNo() != Pstream::masterNo())
|
||||||
|
{
|
||||||
|
{
|
||||||
|
Perr<< "slave sending to master " << Pstream::masterNo() << endl;
|
||||||
|
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
||||||
|
toMaster << data;
|
||||||
|
}
|
||||||
|
|
||||||
|
Perr<< "slave receiving from master " << Pstream::masterNo() << endl;
|
||||||
|
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
||||||
|
|
||||||
|
fromMaster >> tok;
|
||||||
|
Perr<< tok.info() << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for
|
||||||
|
(
|
||||||
|
int slave = Pstream::firstSlave();
|
||||||
|
slave <= Pstream::lastSlave();
|
||||||
|
++slave
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Perr<< "master receiving from slave " << slave << endl;
|
||||||
|
IPstream fromSlave(Pstream::blocking, slave);
|
||||||
|
fromSlave >> tok;
|
||||||
|
Perr<< tok.info() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
for
|
||||||
|
(
|
||||||
|
int slave = Pstream::firstSlave();
|
||||||
|
slave <= Pstream::lastSlave();
|
||||||
|
++slave
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Perr<< "master sending to slave " << slave << endl;
|
||||||
|
OPstream toSlave(Pstream::blocking, slave);
|
||||||
|
toSlave << data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
|
||||||
|
testMapDistribute();
|
||||||
|
|
||||||
|
if (!Pstream::parRun())
|
||||||
|
{
|
||||||
|
Info<< "\nWarning: not parallel - skipping further tests\n" << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "\nStarting transfers\n\n" << endl;
|
||||||
|
|
||||||
|
testTransfer(vector(0, 1, 2));
|
||||||
|
testTransfer(label(1234));
|
||||||
|
testTransfer(scalar(3.14159));
|
||||||
|
testTransfer(string("test string"));
|
||||||
|
testTransfer(string(" x "));
|
||||||
|
testTransfer(word("3.141 59")); // bad word, but transfer doesn't care
|
||||||
|
|
||||||
|
testTokenized(label(1234));
|
||||||
|
testTokenized(scalar(3.14159));
|
||||||
|
testTokenized('a');
|
||||||
|
testTokenized('$'); // will not tokenize well
|
||||||
|
|
||||||
|
testTokenized(string("test string1"));
|
||||||
|
testTokenized("test string1");
|
||||||
|
testTokenized(word("3.141 59")); // bad word, but transfer doesn't care
|
||||||
|
|
||||||
|
testTokenized(string(" a "));
|
||||||
|
testTokenized(" a ");
|
||||||
|
|
||||||
|
testTokenized(string(" $ "));
|
||||||
|
testTokenized(" $ "); // reduces to 'char' and will not tokenize well
|
||||||
|
|
||||||
|
testTokenized(string(" $$ "));
|
||||||
|
testTokenized(" $$ "); // reduces to 'word' and is tagged as such
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -285,14 +285,18 @@ castellatedMeshControls
|
|||||||
// after refinement.
|
// after refinement.
|
||||||
//
|
//
|
||||||
// There are two different ways of specifying the regions to keep:
|
// There are two different ways of specifying the regions to keep:
|
||||||
// 1. a single locationInMesh. All the 'zoned' surfaces are marked as such
|
// 1. a single locationInMesh. This is the unzoned part of the mesh.
|
||||||
|
// All the 'zoned' surfaces are marked as such
|
||||||
// in the refinementSurfaces with the faceZone and cellZone keywords.
|
// in the refinementSurfaces with the faceZone and cellZone keywords.
|
||||||
|
// It is illegal to have the locationInMesh inside a surface for which
|
||||||
|
// a cellZone is specified.
|
||||||
//
|
//
|
||||||
// or
|
// or
|
||||||
//
|
//
|
||||||
// 2. multiple locationsInMesh, with per location the name of the cellZone.
|
// 2. multiple locationsInMesh, with per location the name of the cellZone.
|
||||||
// This uses walking to determine zones and automatically creates
|
// This uses walking to determine zones and automatically creates
|
||||||
// faceZones on the outside of cellZones.
|
// faceZones on the outside of cellZones. The special name 'none' is
|
||||||
|
// used to indicate the unzoned/background part of the mesh.
|
||||||
|
|
||||||
|
|
||||||
// Ad 1. Specify a single location and how to treat faces inbetween
|
// Ad 1. Specify a single location and how to treat faces inbetween
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -97,8 +97,8 @@ public:
|
|||||||
|
|
||||||
virtual void write(const char* val)
|
virtual void write(const char* val)
|
||||||
{
|
{
|
||||||
char buffer[80] = {0};
|
char buffer[80];
|
||||||
strcpy(buffer, val);
|
strncpy(buffer, val, 80);
|
||||||
str_().write(buffer, 80*sizeof(char));
|
str_().write(buffer, 80*sizeof(char));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,11 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
<<<<<<< HEAD:applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H
|
|
||||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
|
||||||
=======
|
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
>>>>>>> foundation:applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamVolFields.H
|
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,18 +44,10 @@ InClass
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
<<<<<<< HEAD:applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H
|
void Foam::vtkPVFoam::convertVolField
|
||||||
void Foam::vtkPV4Foam::convertVolField
|
|
||||||
(
|
(
|
||||||
const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
|
const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||||
=======
|
|
||||||
void Foam::vtkPVFoam::convertVolFields
|
|
||||||
(
|
|
||||||
const fvMesh& mesh,
|
|
||||||
const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
|
|
||||||
const IOobjectList& objects,
|
|
||||||
>>>>>>> foundation:applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamVolFields.H
|
|
||||||
const bool interpFields,
|
const bool interpFields,
|
||||||
vtkMultiBlockDataSet* output
|
vtkMultiBlockDataSet* output
|
||||||
)
|
)
|
||||||
@ -81,27 +69,7 @@ void Foam::vtkPVFoam::convertVolFields
|
|||||||
(
|
(
|
||||||
volPointInterpolation::New(mesh).interpolate(tf).ptr()
|
volPointInterpolation::New(mesh).interpolate(tf).ptr()
|
||||||
);
|
);
|
||||||
<<<<<<< HEAD:applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H
|
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
|
|
||||||
// Interpolated field (demand driven)
|
|
||||||
autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr;
|
|
||||||
if (interpFields)
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Info<< "convertVolFieldBlock interpolating:" << tf.name()
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
ptfPtr.reset
|
|
||||||
(
|
|
||||||
volPointInterpolation::New(tf.mesh()).interpolate(tf).ptr()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
>>>>>>> foundation:applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamVolFields.H
|
|
||||||
|
|
||||||
|
|
||||||
// Convert activated internalMesh regions
|
// Convert activated internalMesh regions
|
||||||
convertVolFieldBlock
|
convertVolFieldBlock
|
||||||
@ -169,7 +137,6 @@ void Foam::vtkPVFoam::convertVolFields
|
|||||||
|
|
||||||
tmp<Field<Type>> tpptf
|
tmp<Field<Type>> tpptf
|
||||||
(
|
(
|
||||||
<<<<<<< HEAD:applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H
|
|
||||||
fvPatchField<Type>(p, tf).patchInternalField()
|
fvPatchField<Type>(p, tf).patchInternalField()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -181,22 +148,6 @@ void Foam::vtkPVFoam::convertVolFields
|
|||||||
arrayRangePatches_,
|
arrayRangePatches_,
|
||||||
datasetNo
|
datasetNo
|
||||||
);
|
);
|
||||||
=======
|
|
||||||
isType<emptyFvPatchField<Type>>(ptf)
|
|
||||||
||
|
|
||||||
(
|
|
||||||
reader_->GetExtrapolatePatches()
|
|
||||||
&& !polyPatch::constraintType(patches[patchId].type())
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fvPatch p(ptf.patch().patch(), tf.mesh().boundary());
|
|
||||||
|
|
||||||
tmp<Field<Type>> tpptf
|
|
||||||
(
|
|
||||||
fvPatchField<Type>(p, tf).patchInternalField()
|
|
||||||
);
|
|
||||||
>>>>>>> foundation:applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamVolFields.H
|
|
||||||
|
|
||||||
if (interpFields)
|
if (interpFields)
|
||||||
{
|
{
|
||||||
@ -310,7 +261,7 @@ void Foam::vtkPVFoam::convertVolFields
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV4Foam::convertVolFields
|
void Foam::vtkPVFoam::convertVolFields
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
|
const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
|
||||||
@ -345,7 +296,7 @@ void Foam::vtkPV4Foam::convertVolFields
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV4Foam::convertDimFields
|
void Foam::vtkPVFoam::convertDimFields
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
|
const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
|
||||||
|
|||||||
@ -74,6 +74,11 @@ formatOptions
|
|||||||
//collateTimes true; // write single file containing multiple timesteps
|
//collateTimes true; // write single file containing multiple timesteps
|
||||||
// (only for static surfaces)
|
// (only for static surfaces)
|
||||||
}
|
}
|
||||||
|
vtk
|
||||||
|
{
|
||||||
|
// Non-default write precision for floating point numbers
|
||||||
|
writePrecision 10;
|
||||||
|
}
|
||||||
nastran
|
nastran
|
||||||
{
|
{
|
||||||
// From OpenFOAM field name to Nastran field name
|
// From OpenFOAM field name to Nastran field name
|
||||||
|
|||||||
@ -88,7 +88,7 @@ tmp<vectorField> calcVertexNormals(const triSurface& surf)
|
|||||||
// Weight = fA / (mag(e0)^2 * mag(e1)^2);
|
// Weight = fA / (mag(e0)^2 * mag(e1)^2);
|
||||||
tmp<vectorField> tpointNormals
|
tmp<vectorField> tpointNormals
|
||||||
(
|
(
|
||||||
new pointField(surf.nPoints(), vector::zero)
|
new pointField(surf.nPoints(), Zero)
|
||||||
);
|
);
|
||||||
vectorField& pointNormals = tpointNormals.ref();
|
vectorField& pointNormals = tpointNormals.ref();
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ tmp<vectorField> calcPointNormals
|
|||||||
{
|
{
|
||||||
if (!isFeaturePoint[e[i]])
|
if (!isFeaturePoint[e[i]])
|
||||||
{
|
{
|
||||||
pointNormals[e[i]] = vector::zero;
|
pointNormals[e[i]] = Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ tmp<vectorField> calcPointNormals
|
|||||||
const labelList& eFaces = edgeFaces[edgeI];
|
const labelList& eFaces = edgeFaces[edgeI];
|
||||||
|
|
||||||
// Get average edge normal
|
// Get average edge normal
|
||||||
vector n = vector::zero;
|
vector n = Zero;
|
||||||
forAll(eFaces, i)
|
forAll(eFaces, i)
|
||||||
{
|
{
|
||||||
n += s.faceNormals()[eFaces[i]];
|
n += s.faceNormals()[eFaces[i]];
|
||||||
@ -483,7 +483,7 @@ void lloydsSmoothing
|
|||||||
{
|
{
|
||||||
const labelList& pFaces = pointFaces[pointI];
|
const labelList& pFaces = pointFaces[pointI];
|
||||||
|
|
||||||
point avg = point::zero;
|
point avg(Zero);
|
||||||
forAll(pFaces, pFaceI)
|
forAll(pFaces, pFaceI)
|
||||||
{
|
{
|
||||||
avg += faceCentres[pFaces[pFaceI]];
|
avg += faceCentres[pFaces[pFaceI]];
|
||||||
@ -498,7 +498,7 @@ void lloydsSmoothing
|
|||||||
|
|
||||||
const pointField& points = s.points();
|
const pointField& points = s.points();
|
||||||
|
|
||||||
vectorField pointSum(s.nPoints(), vector::zero);
|
vectorField pointSum(s.nPoints(), Zero);
|
||||||
labelList nPointSum(s.nPoints(), 0);
|
labelList nPointSum(s.nPoints(), 0);
|
||||||
|
|
||||||
forAll(edges, edgeI)
|
forAll(edges, edgeI)
|
||||||
|
|||||||
25
bin/tools/RunFunctions
Normal file → Executable file
25
bin/tools/RunFunctions
Normal file → Executable file
@ -2,9 +2,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
# \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -42,8 +41,10 @@ isTest()
|
|||||||
|
|
||||||
getNumberOfProcessors()
|
getNumberOfProcessors()
|
||||||
{
|
{
|
||||||
expandDictionary system/decomposeParDict \
|
if [ -f $1 ]
|
||||||
| sed -ne 's/^numberOfSubdomains\s*\(.*\);/\1/p'
|
then
|
||||||
|
expandDictionary $1 | sed -ne 's/^numberOfSubdomains\s*\(.*\);/\1/p'
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
getApplication()
|
getApplication()
|
||||||
@ -101,13 +102,16 @@ runParallel()
|
|||||||
{
|
{
|
||||||
LOG_NAME=
|
LOG_NAME=
|
||||||
APP_RUN=
|
APP_RUN=
|
||||||
|
# Store any parsed additional arguments e.g. decomposeParDict
|
||||||
|
APP_PARARGS=
|
||||||
LOG_IGNORE=false
|
LOG_IGNORE=false
|
||||||
LOG_APPEND=false
|
LOG_APPEND=false
|
||||||
LOG_SUFFIX=
|
LOG_SUFFIX=
|
||||||
nProcs=$(getNumberOfProcessors)
|
# Check the default decomposeParDict if available
|
||||||
|
nProcs=$(getNumberOfProcessors "system/decomposeParDict")
|
||||||
|
|
||||||
# Parse options and executable
|
# Parse options and executable
|
||||||
while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
|
while [ $# -gt 0 ] && [ -z "$APP_RUN" ] ; do
|
||||||
key="$1"
|
key="$1"
|
||||||
case "$key" in
|
case "$key" in
|
||||||
-append|-a)
|
-append|-a)
|
||||||
@ -125,6 +129,11 @@ runParallel()
|
|||||||
nProcs="$2"
|
nProcs="$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-decomposeParDict)
|
||||||
|
nProcs=$(getNumberOfProcessors "$2")
|
||||||
|
APP_PARARGS="$APP_PARARGS -decomposeParDict $2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
APP_RUN="$key"
|
APP_RUN="$key"
|
||||||
APP_NAME="${key##*/}"
|
APP_NAME="${key##*/}"
|
||||||
@ -142,9 +151,9 @@ runParallel()
|
|||||||
else
|
else
|
||||||
echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"
|
echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"
|
||||||
if [ "$LOG_APPEND" = "true" ]; then
|
if [ "$LOG_APPEND" = "true" ]; then
|
||||||
( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null >> log.$LOG_SUFFIX 2>&1 )
|
( mpirun -np $nProcs $APP_RUN $APP_PARARGS -parallel "$@" < /dev/null >> log.$LOG_SUFFIX 2>&1 )
|
||||||
else
|
else
|
||||||
( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null > log.$LOG_SUFFIX 2>&1 )
|
( mpirun -np $nProcs $APP_RUN $APP_PARARGS -parallel "$@" < /dev/null > log.$LOG_SUFFIX 2>&1 )
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,6 +179,7 @@ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview`
|
|||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
|
||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`
|
||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
|
||||||
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
|
||||||
|
|
||||||
|
|
||||||
# Clean environment paths again. Only remove duplicates
|
# Clean environment paths again. Only remove duplicates
|
||||||
|
|||||||
@ -21,7 +21,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Update OpenFOAM version strings if required
|
# Update OpenFOAM version strings if required
|
||||||
wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/*/global.? 2>/dev/null
|
wmakePrintBuild -check || wrmo OpenFOAM/global/global.o
|
||||||
|
|
||||||
wmakeLnInclude OpenFOAM
|
wmakeLnInclude OpenFOAM
|
||||||
wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
|
wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -40,7 +40,7 @@ void Foam::Ostream::decrIndent()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
indentLevel_--;
|
--indentLevel_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,4 +79,35 @@ Foam::Ostream& Foam::Ostream::writeKeyword(const keyType& kw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::Ostream& Foam::Ostream::beginBlock(const word& keyword)
|
||||||
|
{
|
||||||
|
indent();
|
||||||
|
write(keyword);
|
||||||
|
endl();
|
||||||
|
beginBlock();
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::Ostream& Foam::Ostream::beginBlock()
|
||||||
|
{
|
||||||
|
indent();
|
||||||
|
write(char(token::BEGIN_BLOCK));
|
||||||
|
incrIndent();
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::Ostream& Foam::Ostream::endBlock()
|
||||||
|
{
|
||||||
|
decrIndent();
|
||||||
|
indent();
|
||||||
|
write(char(token::END_BLOCK));
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -109,8 +109,8 @@ public:
|
|||||||
virtual Ostream& write(const word&) = 0;
|
virtual Ostream& write(const word&) = 0;
|
||||||
|
|
||||||
//- Write keyType
|
//- Write keyType
|
||||||
// write regular expression as quoted string
|
// A plain word is written unquoted.
|
||||||
// write plain word as word (unquoted)
|
// A regular expression is written as a quoted string.
|
||||||
virtual Ostream& write(const keyType&);
|
virtual Ostream& write(const keyType&);
|
||||||
|
|
||||||
//- Write string
|
//- Write string
|
||||||
@ -157,14 +157,29 @@ public:
|
|||||||
//- Incrememt the indent level
|
//- Incrememt the indent level
|
||||||
void incrIndent()
|
void incrIndent()
|
||||||
{
|
{
|
||||||
indentLevel_++;
|
++indentLevel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Decrememt the indent level
|
//- Decrememt the indent level
|
||||||
void decrIndent();
|
void decrIndent();
|
||||||
|
|
||||||
//- Write the keyword followed by an appropriate indentation
|
//- Write the keyword followed by an appropriate indentation
|
||||||
Ostream& writeKeyword(const keyType&);
|
virtual Ostream& writeKeyword(const keyType&);
|
||||||
|
|
||||||
|
//- Write begin block group with the given name
|
||||||
|
// Uses the appropriate indentation,
|
||||||
|
// does not include a trailing newline.
|
||||||
|
virtual Ostream& beginBlock(const word&);
|
||||||
|
|
||||||
|
//- Write begin block group without a name
|
||||||
|
// Uses the appropriate indentation,
|
||||||
|
// does not include a trailing newline.
|
||||||
|
virtual Ostream& beginBlock();
|
||||||
|
|
||||||
|
//- Write end block group
|
||||||
|
// Uses the appropriate indentation,
|
||||||
|
// does not include a trailing newline.
|
||||||
|
virtual Ostream& endBlock();
|
||||||
|
|
||||||
|
|
||||||
// Stream state functions
|
// Stream state functions
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -194,7 +194,7 @@ Foam::Ostream& Foam::UOPstream::write(const char* str)
|
|||||||
|
|
||||||
if (nonWhiteChars.size() == 1)
|
if (nonWhiteChars.size() == 1)
|
||||||
{
|
{
|
||||||
return write(nonWhiteChars.c_str()[1]);
|
return write(nonWhiteChars[0]);
|
||||||
}
|
}
|
||||||
else if (nonWhiteChars.size())
|
else if (nonWhiteChars.size())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -95,157 +95,6 @@ void Foam::UPstream::setParRun(const label nProcs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::calcLinearComm
|
|
||||||
(
|
|
||||||
const label nProcs
|
|
||||||
)
|
|
||||||
{
|
|
||||||
List<commsStruct> linearCommunication(nProcs);
|
|
||||||
|
|
||||||
// Master
|
|
||||||
labelList belowIDs(nProcs - 1);
|
|
||||||
forAll(belowIDs, i)
|
|
||||||
{
|
|
||||||
belowIDs[i] = i + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
linearCommunication[0] = commsStruct
|
|
||||||
(
|
|
||||||
nProcs,
|
|
||||||
0,
|
|
||||||
-1,
|
|
||||||
belowIDs,
|
|
||||||
labelList(0)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Slaves. Have no below processors, only communicate up to master
|
|
||||||
for (label procID = 1; procID < nProcs; procID++)
|
|
||||||
{
|
|
||||||
linearCommunication[procID] = commsStruct
|
|
||||||
(
|
|
||||||
nProcs,
|
|
||||||
procID,
|
|
||||||
0,
|
|
||||||
labelList(0),
|
|
||||||
labelList(0)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return linearCommunication;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::UPstream::collectReceives
|
|
||||||
(
|
|
||||||
const label procID,
|
|
||||||
const List<DynamicList<label>>& receives,
|
|
||||||
DynamicList<label>& allReceives
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// Append my children (and my children children etc.) to allReceives.
|
|
||||||
|
|
||||||
const DynamicList<label>& myChildren = receives[procID];
|
|
||||||
|
|
||||||
forAll(myChildren, childI)
|
|
||||||
{
|
|
||||||
allReceives.append(myChildren[childI]);
|
|
||||||
collectReceives(myChildren[childI], receives, allReceives);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::calcTreeComm
|
|
||||||
(
|
|
||||||
label nProcs
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// Tree like schedule. For 8 procs:
|
|
||||||
// (level 0)
|
|
||||||
// 0 receives from 1
|
|
||||||
// 2 receives from 3
|
|
||||||
// 4 receives from 5
|
|
||||||
// 6 receives from 7
|
|
||||||
// (level 1)
|
|
||||||
// 0 receives from 2
|
|
||||||
// 4 receives from 6
|
|
||||||
// (level 2)
|
|
||||||
// 0 receives from 4
|
|
||||||
//
|
|
||||||
// The sends/receives for all levels are collected per processor
|
|
||||||
// (one send per processor; multiple receives possible) creating a table:
|
|
||||||
//
|
|
||||||
// So per processor:
|
|
||||||
// proc receives from sends to
|
|
||||||
// ---- ------------- --------
|
|
||||||
// 0 1,2,4 -
|
|
||||||
// 1 - 0
|
|
||||||
// 2 3 0
|
|
||||||
// 3 - 2
|
|
||||||
// 4 5 0
|
|
||||||
// 5 - 4
|
|
||||||
// 6 7 4
|
|
||||||
// 7 - 6
|
|
||||||
|
|
||||||
label nLevels = 1;
|
|
||||||
while ((1 << nLevels) < nProcs)
|
|
||||||
{
|
|
||||||
nLevels++;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<DynamicList<label>> receives(nProcs);
|
|
||||||
labelList sends(nProcs, -1);
|
|
||||||
|
|
||||||
// Info<< "Using " << nLevels << " communication levels" << endl;
|
|
||||||
|
|
||||||
label offset = 2;
|
|
||||||
label childOffset = offset/2;
|
|
||||||
|
|
||||||
for (label level = 0; level < nLevels; level++)
|
|
||||||
{
|
|
||||||
label receiveID = 0;
|
|
||||||
while (receiveID < nProcs)
|
|
||||||
{
|
|
||||||
// Determine processor that sends and we receive from
|
|
||||||
label sendID = receiveID + childOffset;
|
|
||||||
|
|
||||||
if (sendID < nProcs)
|
|
||||||
{
|
|
||||||
receives[receiveID].append(sendID);
|
|
||||||
sends[sendID] = receiveID;
|
|
||||||
}
|
|
||||||
|
|
||||||
receiveID += offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
offset <<= 1;
|
|
||||||
childOffset <<= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For all processors find the processors it receives data from
|
|
||||||
// (and the processors they receive data from etc.)
|
|
||||||
List<DynamicList<label>> allReceives(nProcs);
|
|
||||||
for (label procID = 0; procID < nProcs; procID++)
|
|
||||||
{
|
|
||||||
collectReceives(procID, receives, allReceives[procID]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
List<commsStruct> treeCommunication(nProcs);
|
|
||||||
|
|
||||||
for (label procID = 0; procID < nProcs; procID++)
|
|
||||||
{
|
|
||||||
treeCommunication[procID] = commsStruct
|
|
||||||
(
|
|
||||||
nProcs,
|
|
||||||
procID,
|
|
||||||
sends[procID],
|
|
||||||
receives[procID].shrink(),
|
|
||||||
allReceives[procID].shrink()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return treeCommunication;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::UPstream::allocateCommunicator
|
Foam::label Foam::UPstream::allocateCommunicator
|
||||||
(
|
(
|
||||||
const label parentIndex,
|
const label parentIndex,
|
||||||
@ -299,9 +148,9 @@ Foam::label Foam::UPstream::allocateCommunicator
|
|||||||
}
|
}
|
||||||
parentCommunicator_[index] = parentIndex;
|
parentCommunicator_[index] = parentIndex;
|
||||||
|
|
||||||
linearCommunication_[index] = calcLinearComm(procIDs_[index].size());
|
// Size but do not fill structure - this is done on-the-fly
|
||||||
treeCommunication_[index] = calcTreeComm(procIDs_[index].size());
|
linearCommunication_[index] = List<commsStruct>(procIDs_[index].size());
|
||||||
|
treeCommunication_[index] = List<commsStruct>(procIDs_[index].size());
|
||||||
|
|
||||||
if (doPstream && parRun())
|
if (doPstream && parRun())
|
||||||
{
|
{
|
||||||
@ -397,6 +246,115 @@ Foam::label Foam::UPstream::procNo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Foam::UPstream::commsStruct&
|
||||||
|
Foam::UList<Foam::UPstream::commsStruct>::operator[](const label procID)
|
||||||
|
{
|
||||||
|
UPstream::commsStruct& t = v_[procID];
|
||||||
|
|
||||||
|
if (t.allBelow().size() + t.allNotBelow().size() + 1 != size())
|
||||||
|
{
|
||||||
|
// Not yet allocated
|
||||||
|
|
||||||
|
label above(-1);
|
||||||
|
labelList below(0);
|
||||||
|
labelList allBelow(0);
|
||||||
|
|
||||||
|
if (size() < UPstream::nProcsSimpleSum)
|
||||||
|
{
|
||||||
|
// Linear schedule
|
||||||
|
|
||||||
|
if (procID == 0)
|
||||||
|
{
|
||||||
|
below.setSize(size()-1);
|
||||||
|
for (label procI = 1; procI < size(); procI++)
|
||||||
|
{
|
||||||
|
below[procI-1] = procI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
above = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Use tree like schedule. For 8 procs:
|
||||||
|
// (level 0)
|
||||||
|
// 0 receives from 1
|
||||||
|
// 2 receives from 3
|
||||||
|
// 4 receives from 5
|
||||||
|
// 6 receives from 7
|
||||||
|
// (level 1)
|
||||||
|
// 0 receives from 2
|
||||||
|
// 4 receives from 6
|
||||||
|
// (level 2)
|
||||||
|
// 0 receives from 4
|
||||||
|
//
|
||||||
|
// The sends/receives for all levels are collected per processor
|
||||||
|
// (one send per processor; multiple receives possible) creating
|
||||||
|
// a table:
|
||||||
|
//
|
||||||
|
// So per processor:
|
||||||
|
// proc receives from sends to
|
||||||
|
// ---- ------------- --------
|
||||||
|
// 0 1,2,4 -
|
||||||
|
// 1 - 0
|
||||||
|
// 2 3 0
|
||||||
|
// 3 - 2
|
||||||
|
// 4 5 0
|
||||||
|
// 5 - 4
|
||||||
|
// 6 7 4
|
||||||
|
// 7 - 6
|
||||||
|
|
||||||
|
label mod = 0;
|
||||||
|
|
||||||
|
for (label step = 1; step < size(); step = mod)
|
||||||
|
{
|
||||||
|
mod = step * 2;
|
||||||
|
|
||||||
|
if (procID % mod)
|
||||||
|
{
|
||||||
|
above = procID - (procID % mod);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for
|
||||||
|
(
|
||||||
|
label j = procID + step;
|
||||||
|
j < size() && j < procID + mod;
|
||||||
|
j += step
|
||||||
|
)
|
||||||
|
{
|
||||||
|
below.append(j);
|
||||||
|
}
|
||||||
|
for
|
||||||
|
(
|
||||||
|
label j = procID + step;
|
||||||
|
j < size() && j < procID + mod;
|
||||||
|
j++
|
||||||
|
)
|
||||||
|
{
|
||||||
|
allBelow.append(j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t = UPstream::commsStruct(size(), procID, above, below, allBelow);
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const Foam::UPstream::commsStruct&
|
||||||
|
Foam::UList<Foam::UPstream::commsStruct>::operator[](const label procID) const
|
||||||
|
{
|
||||||
|
return const_cast<UList<UPstream::commsStruct>& >(*this).operator[](procID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::UPstream::parRun_(false);
|
bool Foam::UPstream::parRun_(false);
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -504,6 +504,14 @@ public:
|
|||||||
|
|
||||||
Ostream& operator<<(Ostream&, const UPstream::commsStruct&);
|
Ostream& operator<<(Ostream&, const UPstream::commsStruct&);
|
||||||
|
|
||||||
|
// Template specialisation for access of commsStruct
|
||||||
|
template<>
|
||||||
|
UPstream::commsStruct&
|
||||||
|
UList<UPstream::commsStruct>::operator[](const label);
|
||||||
|
template<>
|
||||||
|
const UPstream::commsStruct&
|
||||||
|
UList<UPstream::commsStruct>::operator[](const label) const;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -61,8 +61,6 @@ void Foam::Pstream::exchange
|
|||||||
|
|
||||||
recvBufs.setSize(sendBufs.size());
|
recvBufs.setSize(sendBufs.size());
|
||||||
|
|
||||||
recvBufs.setSize(sendBufs.size());
|
|
||||||
|
|
||||||
if (UPstream::parRun() && UPstream::nProcs(comm) > 1)
|
if (UPstream::parRun() && UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
label startOfRequests = Pstream::nRequests();
|
label startOfRequests = Pstream::nRequests();
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -174,7 +174,8 @@ void Foam::dictionary::write(Ostream& os, bool subDict) const
|
|||||||
{
|
{
|
||||||
if (subDict)
|
if (subDict)
|
||||||
{
|
{
|
||||||
os << nl << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
os << nl;
|
||||||
|
os.beginBlock() << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllConstIter(IDLList<entry>, *this, iter)
|
forAllConstIter(IDLList<entry>, *this, iter)
|
||||||
@ -202,7 +203,7 @@ void Foam::dictionary::write(Ostream& os, bool subDict) const
|
|||||||
|
|
||||||
if (subDict)
|
if (subDict)
|
||||||
{
|
{
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
os.endBlock() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -122,7 +122,7 @@ void Foam::functionObjectFile::resetFile(const word& fileName)
|
|||||||
|
|
||||||
Foam::Omanip<int> Foam::functionObjectFile::valueWidth(const label offset) const
|
Foam::Omanip<int> Foam::functionObjectFile::valueWidth(const label offset) const
|
||||||
{
|
{
|
||||||
return setw(IOstream::defaultPrecision() + addChars + offset);
|
return setw(writePrecision_ + addChars + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ bool Foam::functionObjectFile::writeToFile() const
|
|||||||
|
|
||||||
Foam::label Foam::functionObjectFile::charWidth() const
|
Foam::label Foam::functionObjectFile::charWidth() const
|
||||||
{
|
{
|
||||||
return IOstream::defaultPrecision() + addChars;
|
return writePrecision_ + addChars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -569,17 +569,16 @@ template<class Type, template<class> class PatchField, class GeoMesh>
|
|||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
void Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||||
writeEntry(const word& keyword, Ostream& os) const
|
writeEntry(const word& keyword, Ostream& os) const
|
||||||
{
|
{
|
||||||
os << keyword << nl << token::BEGIN_BLOCK << incrIndent << nl;
|
os.beginBlock(keyword) << nl;
|
||||||
|
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
os << indent << this->operator[](patchi).patch().name() << nl
|
os.beginBlock(this->operator[](patchi).patch().name()) << nl;
|
||||||
<< indent << token::BEGIN_BLOCK << nl
|
os << this->operator[](patchi);
|
||||||
<< incrIndent << this->operator[](patchi) << decrIndent
|
os.endBlock() << endl;
|
||||||
<< indent << token::END_BLOCK << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
os << decrIndent << token::END_BLOCK << endl;
|
os.endBlock() << endl;
|
||||||
|
|
||||||
// Check state of IOstream
|
// Check state of IOstream
|
||||||
os.check
|
os.check
|
||||||
|
|||||||
@ -584,18 +584,26 @@ void Foam::globalMeshData::calcPointConnectivity
|
|||||||
transforms.nullTransformIndex()
|
transforms.nullTransformIndex()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Send over.
|
// Send to master
|
||||||
globalPointSlavesMap().distribute(myData);
|
globalPointSlavesMap().distribute(myData);
|
||||||
|
|
||||||
|
|
||||||
// String of connected points with their transform
|
// String of connected points with their transform
|
||||||
allPointConnectivity.setSize(globalPointSlavesMap().constructSize());
|
allPointConnectivity.setSize(globalPointSlavesMap().constructSize());
|
||||||
|
allPointConnectivity = labelPairList(0);
|
||||||
|
|
||||||
|
// Pass1: do the master points since these also update local slaves
|
||||||
|
// (e.g. from local cyclics)
|
||||||
forAll(slaves, pointI)
|
forAll(slaves, pointI)
|
||||||
{
|
{
|
||||||
// Reconstruct string of connected points
|
// Reconstruct string of connected points
|
||||||
const labelList& pSlaves = slaves[pointI];
|
const labelList& pSlaves = slaves[pointI];
|
||||||
const labelList& pTransformSlaves = transformedSlaves[pointI];
|
const labelList& pTransformSlaves = transformedSlaves[pointI];
|
||||||
|
|
||||||
|
if (pSlaves.size()+pTransformSlaves.size())
|
||||||
|
{
|
||||||
labelPairList& pConnectivity = allPointConnectivity[pointI];
|
labelPairList& pConnectivity = allPointConnectivity[pointI];
|
||||||
|
|
||||||
pConnectivity.setSize(1+pSlaves.size()+pTransformSlaves.size());
|
pConnectivity.setSize(1+pSlaves.size()+pTransformSlaves.size());
|
||||||
label connI = 0;
|
label connI = 0;
|
||||||
|
|
||||||
@ -616,11 +624,11 @@ void Foam::globalMeshData::calcPointConnectivity
|
|||||||
);
|
);
|
||||||
// Add transform to connectivity
|
// Add transform to connectivity
|
||||||
const labelPair& n = myData[pTransformSlaves[i]];
|
const labelPair& n = myData[pTransformSlaves[i]];
|
||||||
label procI = globalIndexAndTransform::processor(n);
|
label proci = globalIndexAndTransform::processor(n);
|
||||||
label index = globalIndexAndTransform::index(n);
|
label index = globalIndexAndTransform::index(n);
|
||||||
pConnectivity[connI++] = globalIndexAndTransform::encode
|
pConnectivity[connI++] = globalIndexAndTransform::encode
|
||||||
(
|
(
|
||||||
procI,
|
proci,
|
||||||
index,
|
index,
|
||||||
transformI
|
transformI
|
||||||
);
|
);
|
||||||
@ -636,9 +644,24 @@ void Foam::globalMeshData::calcPointConnectivity
|
|||||||
allPointConnectivity[pTransformSlaves[i]] = pConnectivity;
|
allPointConnectivity[pTransformSlaves[i]] = pConnectivity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Pass2: see if anything is still unset (should not be the case)
|
||||||
|
forAll(slaves, pointI)
|
||||||
|
{
|
||||||
|
labelPairList& pConnectivity = allPointConnectivity[pointI];
|
||||||
|
|
||||||
|
if (pConnectivity.size() == 0)
|
||||||
|
{
|
||||||
|
pConnectivity.setSize(1, myData[pointI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
globalPointSlavesMap().reverseDistribute
|
globalPointSlavesMap().reverseDistribute
|
||||||
(
|
(
|
||||||
allPointConnectivity.size(),
|
slaves.size(),
|
||||||
allPointConnectivity
|
allPointConnectivity
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -792,13 +815,13 @@ void Foam::globalMeshData::calcGlobalPointEdges
|
|||||||
// Push back
|
// Push back
|
||||||
globalPointSlavesMap().reverseDistribute
|
globalPointSlavesMap().reverseDistribute
|
||||||
(
|
(
|
||||||
globalPointEdges.size(),
|
slaves.size(),
|
||||||
globalPointEdges
|
globalPointEdges
|
||||||
);
|
);
|
||||||
// Push back
|
// Push back
|
||||||
globalPointSlavesMap().reverseDistribute
|
globalPointSlavesMap().reverseDistribute
|
||||||
(
|
(
|
||||||
globalPointPoints.size(),
|
slaves.size(),
|
||||||
globalPointPoints
|
globalPointPoints
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -880,7 +903,7 @@ void Foam::globalMeshData::calcGlobalEdgeSlaves() const
|
|||||||
|
|
||||||
|
|
||||||
// 1. collect point connectivity - basically recreating globalPoints output.
|
// 1. collect point connectivity - basically recreating globalPoints output.
|
||||||
// All points will now have a string of points. The transforms are
|
// All points will now have a string of coupled points. The transforms are
|
||||||
// in respect to the master.
|
// in respect to the master.
|
||||||
List<labelPairList> allPointConnectivity;
|
List<labelPairList> allPointConnectivity;
|
||||||
calcPointConnectivity(allPointConnectivity);
|
calcPointConnectivity(allPointConnectivity);
|
||||||
|
|||||||
@ -1116,10 +1116,9 @@ bool Foam::polyBoundaryMesh::writeData(Ostream& os) const
|
|||||||
|
|
||||||
forAll(patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
os << indent << patches[patchI].name() << nl
|
os.beginBlock(patches[patchI].name()) << nl;
|
||||||
<< indent << token::BEGIN_BLOCK << nl
|
os << patches[patchI];
|
||||||
<< incrIndent << patches[patchI] << decrIndent
|
os.endBlock() << endl;
|
||||||
<< indent << token::END_BLOCK << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
os << decrIndent << token::END_LIST;
|
os << decrIndent << token::END_LIST;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -437,12 +437,15 @@ void Foam::plane::writeDict(Ostream& os) const
|
|||||||
{
|
{
|
||||||
os.writeKeyword("planeType") << "pointAndNormal"
|
os.writeKeyword("planeType") << "pointAndNormal"
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os << indent << "pointAndNormalDict" << nl
|
|
||||||
<< indent << token::BEGIN_BLOCK << incrIndent << nl;
|
os.beginBlock("pointAndNormalDict") << nl;
|
||||||
os.writeKeyword("basePoint") << basePoint_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("normalVector") << unitVector_ << token::END_STATEMENT
|
os.writeKeyword("basePoint") << basePoint_
|
||||||
<< nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
os.writeKeyword("normalVector") << unitVector_
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
os.endBlock() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -230,7 +230,7 @@ public:
|
|||||||
// point and density specification
|
// point and density specification
|
||||||
inline tensor inertia
|
inline tensor inertia
|
||||||
(
|
(
|
||||||
PointRef refPt = vector::zero,
|
PointRef refPt = Zero,
|
||||||
scalar density = 1.0
|
scalar density = 1.0
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -264,16 +264,17 @@ void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
|
|||||||
{
|
{
|
||||||
Function1<Type>::writeData(os);
|
Function1<Type>::writeData(os);
|
||||||
os << token::END_STATEMENT << nl;
|
os << token::END_STATEMENT << nl;
|
||||||
os << indent << word(this->name() + "Coeffs") << nl;
|
|
||||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
os.beginBlock(word(this->name() + "Coeffs")) << nl;
|
||||||
|
|
||||||
// Note: for TableBase write the dictionary entries it needs but not
|
// Note: for TableBase write the dictionary entries it needs but not
|
||||||
// the values themselves
|
// the values themselves
|
||||||
TableBase<Type>::writeEntries(os);
|
TableBase<Type>::writeEntries(os);
|
||||||
|
|
||||||
os.writeKeyword("nHeaderLine") << nHeaderLine_ << token::END_STATEMENT
|
os.writeKeyword("nHeaderLine") << nHeaderLine_
|
||||||
<< nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("refColumn") << refColumn_ << token::END_STATEMENT << nl;
|
os.writeKeyword("refColumn") << refColumn_
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
// Force writing labelList in ascii
|
// Force writing labelList in ascii
|
||||||
os.writeKeyword("componentColumns");
|
os.writeKeyword("componentColumns");
|
||||||
@ -293,8 +294,10 @@ void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
|
|||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("mergeSeparators") << mergeSeparators_
|
os.writeKeyword("mergeSeparators") << mergeSeparators_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("fileName") << fName_
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
os.endBlock() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -90,14 +90,16 @@ void Foam::Function1Types::Sine<Type>::writeData(Ostream& os) const
|
|||||||
{
|
{
|
||||||
Function1<Type>::writeData(os);
|
Function1<Type>::writeData(os);
|
||||||
os << token::END_STATEMENT << nl;
|
os << token::END_STATEMENT << nl;
|
||||||
os << indent << word(this->name() + "Coeffs") << nl;
|
|
||||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
os.beginBlock(word(this->name() + "Coeffs")) << nl;
|
||||||
|
|
||||||
os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl;
|
os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl;
|
||||||
amplitude_->writeData(os);
|
amplitude_->writeData(os);
|
||||||
frequency_->writeData(os);
|
frequency_->writeData(os);
|
||||||
scale_->writeData(os);
|
scale_->writeData(os);
|
||||||
level_->writeData(os);
|
level_->writeData(os);
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
|
||||||
|
os.endBlock() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -103,15 +103,17 @@ void Foam::Function1Types::Square<Type>::writeData(Ostream& os) const
|
|||||||
{
|
{
|
||||||
Function1<Type>::writeData(os);
|
Function1<Type>::writeData(os);
|
||||||
os << token::END_STATEMENT << nl;
|
os << token::END_STATEMENT << nl;
|
||||||
os << indent << word(this->name() + "Coeffs") << nl;
|
|
||||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
os.beginBlock(word(this->name() + "Coeffs")) << nl;
|
||||||
|
|
||||||
os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl;
|
os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("markSpace") << markSpace_ << token::END_STATEMENT << nl;
|
os.writeKeyword("markSpace") << markSpace_ << token::END_STATEMENT << nl;
|
||||||
amplitude_->writeData(os);
|
amplitude_->writeData(os);
|
||||||
frequency_->writeData(os);
|
frequency_->writeData(os);
|
||||||
scale_->writeData(os);
|
scale_->writeData(os);
|
||||||
level_->writeData(os);
|
level_->writeData(os);
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
|
||||||
|
os.endBlock() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -78,17 +78,16 @@ template<class Type>
|
|||||||
void Foam::Function1Types::TableFile<Type>::writeData(Ostream& os) const
|
void Foam::Function1Types::TableFile<Type>::writeData(Ostream& os) const
|
||||||
{
|
{
|
||||||
Function1<Type>::writeData(os);
|
Function1<Type>::writeData(os);
|
||||||
|
os << token::END_STATEMENT << nl;
|
||||||
|
|
||||||
os << token::END_STATEMENT << nl
|
os.beginBlock(word(this->name() + "Coeffs")) << nl;
|
||||||
<< indent << word(this->name() + "Coeffs") << nl
|
|
||||||
<< indent << token::BEGIN_BLOCK << nl << incrIndent;
|
|
||||||
|
|
||||||
// Note: for TableBase write the dictionary entries it needs but not
|
// Note: for TableBase write the dictionary entries it needs but not
|
||||||
// the values themselves
|
// the values themselves
|
||||||
TableBase<Type>::writeEntries(os);
|
TableBase<Type>::writeEntries(os);
|
||||||
|
|
||||||
os.writeKeyword("fileName")<< fName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("fileName")<< fName_ << token::END_STATEMENT << nl;
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
|
||||||
|
os.endBlock() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -195,9 +195,9 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
|
|||||||
fvm::ddt(alpha, rho, flm_)
|
fvm::ddt(alpha, rho, flm_)
|
||||||
+ fvm::div(alphaRhoPhi, flm_)
|
+ fvm::div(alphaRhoPhi, flm_)
|
||||||
==
|
==
|
||||||
rho*invT*LM
|
alpha*rho*invT*LM
|
||||||
- fvm::Sp(rho*invT, flm_)
|
- fvm::Sp(alpha*rho*invT, flm_)
|
||||||
+ fvOptions(flm_)
|
+ fvOptions(alpha, rho, flm_)
|
||||||
);
|
);
|
||||||
|
|
||||||
flmEqn.relax();
|
flmEqn.relax();
|
||||||
@ -213,9 +213,9 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
|
|||||||
fvm::ddt(alpha, rho, fmm_)
|
fvm::ddt(alpha, rho, fmm_)
|
||||||
+ fvm::div(alphaRhoPhi, fmm_)
|
+ fvm::div(alphaRhoPhi, fmm_)
|
||||||
==
|
==
|
||||||
rho*invT*MM
|
alpha*rho*invT*MM
|
||||||
- fvm::Sp(rho*invT, fmm_)
|
- fvm::Sp(alpha*rho*invT, fmm_)
|
||||||
+ fvOptions(fmm_)
|
+ fvOptions(alpha, rho, fmm_)
|
||||||
);
|
);
|
||||||
|
|
||||||
fmmEqn.relax();
|
fmmEqn.relax();
|
||||||
|
|||||||
@ -525,7 +525,7 @@ void Foam::motionSmootherAlgo::setDisplacement
|
|||||||
label pointI = cppMeshPoints[i];
|
label pointI = cppMeshPoints[i];
|
||||||
if (isPatchPoint[pointI])
|
if (isPatchPoint[pointI])
|
||||||
{
|
{
|
||||||
displacement[pointI] = vector::zero;
|
displacement[pointI] = Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@ void Foam::polyMeshGeometry::updateCellCentresAndVols
|
|||||||
const labelList& cFaces(cells[cellI]);
|
const labelList& cFaces(cells[cellI]);
|
||||||
|
|
||||||
// Estimate the cell centre and bounding box using the face centres
|
// Estimate the cell centre and bounding box using the face centres
|
||||||
vector cEst = vector::zero;
|
vector cEst(Zero);
|
||||||
boundBox bb(boundBox::invertedBox);
|
boundBox bb(boundBox::invertedBox);
|
||||||
|
|
||||||
forAll(cFaces, cFaceI)
|
forAll(cFaces, cFaceI)
|
||||||
|
|||||||
@ -112,7 +112,7 @@ void Foam::pointMVCWeight::calcWeights
|
|||||||
u(j) = uVec[toLocal[f[j]]];
|
u(j) = uVec[toLocal[f[j]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
vector v(point::zero);
|
vector v(Zero);
|
||||||
forAll(f, j)
|
forAll(f, j)
|
||||||
{
|
{
|
||||||
label jPlus1 = f.fcIndex(j);
|
label jPlus1 = f.fcIndex(j);
|
||||||
|
|||||||
@ -124,7 +124,7 @@ displacementSBRStressFvMotionSolver
|
|||||||
(
|
(
|
||||||
"cellDisplacement",
|
"cellDisplacement",
|
||||||
displacementMotionSolver::pointDisplacement().dimensions(),
|
displacementMotionSolver::pointDisplacement().dimensions(),
|
||||||
vector::zero
|
Zero
|
||||||
),
|
),
|
||||||
cellMotionBoundaryTypes<vector>
|
cellMotionBoundaryTypes<vector>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -169,7 +169,7 @@ displacementLaplacianFvMotionSolver
|
|||||||
(
|
(
|
||||||
"cellDisplacement",
|
"cellDisplacement",
|
||||||
pointDisplacement_.dimensions(),
|
pointDisplacement_.dimensions(),
|
||||||
vector::zero
|
Zero
|
||||||
),
|
),
|
||||||
cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField())
|
cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField())
|
||||||
),
|
),
|
||||||
|
|||||||
@ -74,7 +74,7 @@ surfaceAlignedSBRStressFvMotionSolver
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
fvMesh_,
|
fvMesh_,
|
||||||
dimensionedVector("zero", dimless, vector::zero)
|
dimensionedVector("zero", dimless, Zero)
|
||||||
),
|
),
|
||||||
maxAng_(coeffDict().lookupOrDefault<scalar>("maxAng", 80.0)),
|
maxAng_(coeffDict().lookupOrDefault<scalar>("maxAng", 80.0)),
|
||||||
minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)),
|
minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)),
|
||||||
@ -93,7 +93,7 @@ surfaceAlignedSBRStressFvMotionSolver
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
fvMesh_,
|
fvMesh_,
|
||||||
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
|
dimensionedSymmTensor("zero", dimless, Zero)
|
||||||
),
|
),
|
||||||
minSigmaDiff_(coeffDict().lookupOrDefault<scalar>("minSigmaDiff", 1e-4))
|
minSigmaDiff_(coeffDict().lookupOrDefault<scalar>("minSigmaDiff", 1e-4))
|
||||||
{
|
{
|
||||||
@ -131,8 +131,8 @@ Foam::surfaceAlignedSBRStressFvMotionSolver::
|
|||||||
|
|
||||||
void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
|
void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
|
||||||
{
|
{
|
||||||
cellRot_.internalField() = vector::zero;
|
cellRot_.internalField() = Zero;
|
||||||
pointDisplacement_.internalField() = vector::zero;
|
pointDisplacement_.internalField() = Zero;
|
||||||
|
|
||||||
// Find intersections
|
// Find intersections
|
||||||
pointField start(fvMesh_.nInternalFaces());
|
pointField start(fvMesh_.nInternalFaces());
|
||||||
@ -316,7 +316,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
fvMesh_,
|
fvMesh_,
|
||||||
dimensionedVector("zero", dimLength, vector::zero),
|
dimensionedVector("zero", dimLength, Zero),
|
||||||
cellMotionBoundaryTypes<vector>
|
cellMotionBoundaryTypes<vector>
|
||||||
(
|
(
|
||||||
pointDisplacement().boundaryField()
|
pointDisplacement().boundaryField()
|
||||||
|
|||||||
@ -123,11 +123,11 @@ void Foam::patchTransformedInterpolation::interpolate
|
|||||||
|
|
||||||
pointDisplacement.correctBoundaryConditions();
|
pointDisplacement.correctBoundaryConditions();
|
||||||
|
|
||||||
vectorField pointRotation(nPoints, vector::zero);
|
vectorField pointRotation(nPoints, Zero);
|
||||||
scalarField pointExpansion(nPoints, scalar(0));
|
scalarField pointExpansion(nPoints, scalar(0));
|
||||||
|
|
||||||
labelList pointDisplacementNSum(nPoints, 0);
|
labelList pointDisplacementNSum(nPoints, 0);
|
||||||
vectorField pointDisplacementSum(nPoints, vector::zero);
|
vectorField pointDisplacementSum(nPoints, Zero);
|
||||||
|
|
||||||
forAll(patches_, patchI)
|
forAll(patches_, patchI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,6 +13,12 @@ $(generalSources)/semiImplicitSource/semiImplicitSource.C
|
|||||||
|
|
||||||
derivedSources=sources/derived
|
derivedSources=sources/derived
|
||||||
$(derivedSources)/actuationDiskSource/actuationDiskSource.C
|
$(derivedSources)/actuationDiskSource/actuationDiskSource.C
|
||||||
|
$(derivedSources)/buoyancyForce/buoyancyForce.C
|
||||||
|
$(derivedSources)/buoyancyForce/buoyancyForceIO.C
|
||||||
|
$(derivedSources)/buoyancyEnergy/buoyancyEnergy.C
|
||||||
|
$(derivedSources)/buoyancyEnergy/buoyancyEnergyIO.C
|
||||||
|
$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C
|
||||||
|
$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSourceIO.C
|
||||||
$(derivedSources)/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C
|
$(derivedSources)/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C
|
||||||
$(derivedSources)/explicitPorositySource/explicitPorositySource.C
|
$(derivedSources)/explicitPorositySource/explicitPorositySource.C
|
||||||
$(derivedSources)/meanVelocityForce/meanVelocityForce.C
|
$(derivedSources)/meanVelocityForce/meanVelocityForce.C
|
||||||
@ -33,14 +39,6 @@ $(derivedSources)/solidificationMeltingSource/solidificationMeltingSource.C
|
|||||||
$(derivedSources)/solidificationMeltingSource/solidificationMeltingSourceIO.C
|
$(derivedSources)/solidificationMeltingSource/solidificationMeltingSourceIO.C
|
||||||
$(derivedSources)/tabulatedAccelerationSource/tabulatedAccelerationSource.C
|
$(derivedSources)/tabulatedAccelerationSource/tabulatedAccelerationSource.C
|
||||||
$(derivedSources)/tabulatedAccelerationSource/tabulated6DoFAcceleration/tabulated6DoFAcceleration.C
|
$(derivedSources)/tabulatedAccelerationSource/tabulated6DoFAcceleration/tabulated6DoFAcceleration.C
|
||||||
/*
|
|
||||||
$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C
|
|
||||||
$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSourceIO.C
|
|
||||||
*/
|
|
||||||
$(derivedSources)/buoyancyForce/buoyancyForce.C
|
|
||||||
$(derivedSources)/buoyancyForce/buoyancyForceIO.C
|
|
||||||
$(derivedSources)/buoyancyEnergy/buoyancyEnergy.C
|
|
||||||
$(derivedSources)/buoyancyEnergy/buoyancyEnergyIO.C
|
|
||||||
|
|
||||||
interRegion = sources/interRegion
|
interRegion = sources/interRegion
|
||||||
$(interRegion)/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C
|
$(interRegion)/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C
|
||||||
|
|||||||
@ -179,9 +179,9 @@ directionalPressureGradientExplicitSource
|
|||||||
:
|
:
|
||||||
cellSetOption(sourceName, modelType, dict, mesh),
|
cellSetOption(sourceName, modelType, dict, mesh),
|
||||||
model_(PressureDropModelNames_.read(coeffs_.lookup("model"))),
|
model_(PressureDropModelNames_.read(coeffs_.lookup("model"))),
|
||||||
gradP0_(cells_.size(), vector::zero),
|
gradP0_(cells_.size(), Zero),
|
||||||
dGradP_(cells_.size(), vector::zero),
|
dGradP_(cells_.size(), Zero),
|
||||||
gradPporous_(cells_.size(), vector::zero),
|
gradPporous_(cells_.size(), Zero),
|
||||||
flowDir_(coeffs_.lookup("flowDir")),
|
flowDir_(coeffs_.lookup("flowDir")),
|
||||||
invAPtr_(NULL),
|
invAPtr_(NULL),
|
||||||
D_(0),
|
D_(0),
|
||||||
@ -386,7 +386,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::correct
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Accumulate 'upstream' velocity into cells
|
// Accumulate 'upstream' velocity into cells
|
||||||
vectorField UfCells(cells_.size(), vector::zero);
|
vectorField UfCells(cells_.size(), Zero);
|
||||||
scalarField UfCellWeights(cells_.size(), 0.0);
|
scalarField UfCellWeights(cells_.size(), 0.0);
|
||||||
|
|
||||||
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
||||||
@ -486,7 +486,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::addSup
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh_,
|
mesh_,
|
||||||
dimensionedVector("zero", eqn.dimensions()/dimVolume, vector::zero)
|
dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
UIndirectList<vector>(Su, cells_) = gradP0_ + dGradP_ + gradPporous_;
|
UIndirectList<vector>(Su, cells_) = gradP0_ + dGradP_ + gradPporous_;
|
||||||
@ -536,7 +536,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::constrain
|
|||||||
}
|
}
|
||||||
|
|
||||||
gradP0_ += dGradP_;
|
gradP0_ += dGradP_;
|
||||||
dGradP_ = vector::zero;
|
dGradP_ = Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -69,14 +69,12 @@ class DSMCParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private member data
|
public:
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
//- Size in bytes of the fields
|
||||||
static const std::size_t sizeofFields_;
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Class to hold DSMC particle constant properties
|
//- Class to hold DSMC particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -31,7 +31,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::DSMCParcel<ParcelType>::sizeofFields_
|
const std::size_t Foam::DSMCParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(DSMCParcel<ParcelType>) - sizeof(ParcelType)
|
sizeof(DSMCParcel<ParcelType>) - sizeof(ParcelType)
|
||||||
);
|
);
|
||||||
@ -62,7 +62,7 @@ Foam::DSMCParcel<ParcelType>::DSMCParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&U_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&U_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.U_),
|
reinterpret_cast<const char*>(&p.U_),
|
||||||
DSMCParcel<ParcelType>::sizeofFields_
|
DSMCParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -85,12 +85,12 @@ class particle
|
|||||||
//- Size in bytes of the position 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_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
class TrackingData
|
class TrackingData
|
||||||
{
|
{
|
||||||
@ -319,6 +319,12 @@ public:
|
|||||||
"tetFaceI tetPtI origProc origId"
|
"tetFaceI tetPtI origProc origId"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
DefinePropertyTypes
|
||||||
|
(
|
||||||
|
"vector label label scalar label label label label"
|
||||||
|
);
|
||||||
|
|
||||||
//- Cumulative particle counter - used to provode unique ID
|
//- Cumulative particle counter - used to provode unique ID
|
||||||
static label particleCount_;
|
static label particleCount_;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -29,13 +29,14 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::string Foam::particle::propertyList_ = Foam::particle::propertyList();
|
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, position_)
|
offsetof(particle, faceI_) - offsetof(particle, position_)
|
||||||
);
|
);
|
||||||
|
|
||||||
const std::size_t Foam::particle::sizeofFields_
|
const std::size_t Foam::particle::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(particle) - offsetof(particle, position_)
|
sizeof(particle) - offsetof(particle, position_)
|
||||||
);
|
);
|
||||||
@ -73,7 +74,7 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields)
|
|||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&position_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&position_), sizeofFields);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -120,7 +121,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const particle& p)
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.position_),
|
reinterpret_cast<const char*>(&p.position_),
|
||||||
particle::sizeofFields_
|
particle::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -39,6 +39,9 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//- Define a static 'propertyList' for particle properties
|
||||||
|
// The property list is space-delimited with brackets for vector groupings
|
||||||
|
// \sa AddToPropertyList
|
||||||
#define DefinePropertyList(str) \
|
#define DefinePropertyList(str) \
|
||||||
\
|
\
|
||||||
static string propertyList_; \
|
static string propertyList_; \
|
||||||
@ -49,6 +52,9 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Add to existing static 'propertyList' for particle properties
|
||||||
|
// The property list is space-delimited with brackets for vector groupings
|
||||||
|
// \sa DefinePropertyList
|
||||||
#define AddToPropertyList(ParcelType, str) \
|
#define AddToPropertyList(ParcelType, str) \
|
||||||
\
|
\
|
||||||
static string propertyList_; \
|
static string propertyList_; \
|
||||||
@ -59,6 +65,30 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Define a static 'propertyTypes' for the types of particle properties
|
||||||
|
// \sa AddToPropertyTypes
|
||||||
|
#define DefinePropertyTypes(str) \
|
||||||
|
\
|
||||||
|
static string propertyTypes_; \
|
||||||
|
\
|
||||||
|
static string propertyTypes() \
|
||||||
|
{ \
|
||||||
|
return str; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Add to existing static 'propertyTypes' for the types of particle properties
|
||||||
|
// \sa AddToPropertyTypes
|
||||||
|
#define AddToPropertyTypes(ParcelType, str) \
|
||||||
|
\
|
||||||
|
static string propertyTypes_; \
|
||||||
|
\
|
||||||
|
static string propertyTypes() \
|
||||||
|
{ \
|
||||||
|
return ParcelType::propertyTypes() + str; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -72,14 +72,12 @@ class CollidingParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private member data
|
public:
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
//- Size in bytes of the fields
|
||||||
static const std::size_t sizeofFields_;
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Class to hold thermo particle constant properties
|
//- Class to hold thermo particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
@ -160,6 +158,14 @@ public:
|
|||||||
+ " (collisionRecordsWallData)"
|
+ " (collisionRecordsWallData)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
static string propertyTypes()
|
||||||
|
{
|
||||||
|
// TODO: collision information types
|
||||||
|
NotImplemented;
|
||||||
|
return string::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Foam::string Foam::CollidingParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::CollidingParcel<ParcelType>::propertyList();
|
Foam::CollidingParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::CollidingParcel<ParcelType>::sizeofFields_
|
const std::size_t Foam::CollidingParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(CollidingParcel<ParcelType>, collisionRecords_)
|
offsetof(CollidingParcel<ParcelType>, collisionRecords_)
|
||||||
- offsetof(CollidingParcel<ParcelType>, f_)
|
- offsetof(CollidingParcel<ParcelType>, f_)
|
||||||
@ -67,7 +67,7 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&f_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&f_), sizeofFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
is >> collisionRecords_;
|
is >> collisionRecords_;
|
||||||
@ -297,7 +297,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.f_),
|
reinterpret_cast<const char*>(&p.f_),
|
||||||
CollidingParcel<ParcelType>::sizeofFields_
|
CollidingParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
os << p.collisionRecords();
|
os << p.collisionRecords();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -80,15 +80,15 @@ class KinematicParcel
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
//- Number of particle tracking attempts before we assume that it stalls
|
//- Number of particle tracking attempts before we assume that it stalls
|
||||||
static label maxTrackAttempts;
|
static label maxTrackAttempts;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold kinematic particle constant properties
|
//- Class to hold kinematic particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
{
|
{
|
||||||
@ -234,7 +234,8 @@ protected:
|
|||||||
// Parcel properties
|
// Parcel properties
|
||||||
|
|
||||||
//- Active flag - tracking inactive when active = false
|
//- Active flag - tracking inactive when active = false
|
||||||
bool active_;
|
// Store as label for data alignment, but only has bool states
|
||||||
|
label active_;
|
||||||
|
|
||||||
//- Parcel type id
|
//- Parcel type id
|
||||||
label typeId_;
|
label typeId_;
|
||||||
@ -309,7 +310,7 @@ public:
|
|||||||
+ " typeId"
|
+ " typeId"
|
||||||
+ " nParticle"
|
+ " nParticle"
|
||||||
+ " d"
|
+ " d"
|
||||||
+ " dTarget "
|
+ " dTarget"
|
||||||
+ " (Ux Uy Uz)"
|
+ " (Ux Uy Uz)"
|
||||||
+ " rho"
|
+ " rho"
|
||||||
+ " age"
|
+ " age"
|
||||||
@ -317,6 +318,22 @@ public:
|
|||||||
+ " (UTurbx UTurby UTurbz)"
|
+ " (UTurbx UTurby UTurbz)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" label"
|
||||||
|
+ " label"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " vector"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " vector"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
@ -442,8 +459,8 @@ public:
|
|||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Return const access to active flag
|
//- Set active flag to the specified state
|
||||||
inline bool& active();
|
inline void active(const bool state);
|
||||||
|
|
||||||
//- Return access to type id
|
//- Return access to type id
|
||||||
inline label& typeId();
|
inline label& typeId();
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -265,9 +265,9 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::muc() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline bool& Foam::KinematicParcel<ParcelType>::active()
|
inline void Foam::KinematicParcel<ParcelType>::active(const bool state)
|
||||||
{
|
{
|
||||||
return active_;
|
active_ = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -35,7 +35,11 @@ Foam::string Foam::KinematicParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::KinematicParcel<ParcelType>::propertyList();
|
Foam::KinematicParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::KinematicParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::KinematicParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::KinematicParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::KinematicParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(KinematicParcel<ParcelType>, rhoc_)
|
offsetof(KinematicParcel<ParcelType>, rhoc_)
|
||||||
- offsetof(KinematicParcel<ParcelType>, active_)
|
- offsetof(KinematicParcel<ParcelType>, active_)
|
||||||
@ -84,7 +88,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&active_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&active_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +233,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
if (os.format() == IOstream::ASCII)
|
if (os.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
os << static_cast<const ParcelType&>(p)
|
os << static_cast<const ParcelType&>(p)
|
||||||
<< token::SPACE << p.active()
|
<< token::SPACE << bool(p.active())
|
||||||
<< token::SPACE << p.typeId()
|
<< token::SPACE << p.typeId()
|
||||||
<< token::SPACE << p.nParticle()
|
<< token::SPACE << p.nParticle()
|
||||||
<< token::SPACE << p.d()
|
<< token::SPACE << p.d()
|
||||||
@ -246,7 +250,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.active_),
|
reinterpret_cast<const char*>(&p.active_),
|
||||||
KinematicParcel<ParcelType>::sizeofFields_
|
KinematicParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -73,14 +73,13 @@ class MPPICParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
|
//- Tracking data
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
class TrackingData
|
class TrackingData
|
||||||
:
|
:
|
||||||
@ -175,7 +174,14 @@ public:
|
|||||||
AddToPropertyList
|
AddToPropertyList
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
"(UCorrectx UCorrecty UCorrectz)"
|
" (UCorrectx UCorrecty UCorrectz)"
|
||||||
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" vector"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,7 +34,11 @@ Foam::string Foam::MPPICParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::MPPICParcel<ParcelType>::propertyList();
|
Foam::MPPICParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::MPPICParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::MPPICParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::MPPICParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::MPPICParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(MPPICParcel<ParcelType>) - sizeof(ParcelType)
|
sizeof(MPPICParcel<ParcelType>) - sizeof(ParcelType)
|
||||||
);
|
);
|
||||||
@ -61,7 +65,7 @@ Foam::MPPICParcel<ParcelType>::MPPICParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&UCorrect_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&UCorrect_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +150,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.UCorrect_),
|
reinterpret_cast<const char*>(&p.UCorrect_),
|
||||||
MPPICParcel<ParcelType>::sizeofFields_
|
MPPICParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -66,14 +66,12 @@ class ReactingMultiphaseParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
public:
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
//- Size in bytes of the fields
|
||||||
static const std::size_t sizeofFields_;
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// IDs of phases in ReacingParcel phase list (Y)
|
// IDs of phases in ReacingParcel phase list (Y)
|
||||||
|
|
||||||
static const label GAS;
|
static const label GAS;
|
||||||
@ -267,6 +265,15 @@ public:
|
|||||||
+ " nSolid(Y1..YN)"
|
+ " nSolid(Y1..YN)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" List<scalar>"
|
||||||
|
+ " List<scalar>"
|
||||||
|
+ " List<Scalar>"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,7 +33,11 @@ Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::ReactingMultiphaseParcel<ParcelType>::propertyList();
|
Foam::ReactingMultiphaseParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::ReactingMultiphaseParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::ReactingMultiphaseParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::ReactingMultiphaseParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,14 +67,12 @@ class ReactingParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
public:
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
//- Size in bytes of the fields
|
||||||
static const std::size_t sizeofFields_;
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Class to hold reacting parcel constant properties
|
//- Class to hold reacting parcel constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
@ -221,6 +219,14 @@ public:
|
|||||||
+ " nPhases(Y1..YN)"
|
+ " nPhases(Y1..YN)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" scalar"
|
||||||
|
+ " List<scalar>"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,7 +33,11 @@ Foam::string Foam::ReactingParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::ReactingParcel<ParcelType>::propertyList();
|
Foam::ReactingParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::ReactingParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::ReactingParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::ReactingParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::ReactingParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(scalar)
|
sizeof(scalar)
|
||||||
);
|
);
|
||||||
@ -64,7 +68,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&mass0_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&mass0_), sizeofFields);
|
||||||
is >> Ymix;
|
is >> Ymix;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +255,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.mass0_),
|
reinterpret_cast<const char*>(&p.mass0_),
|
||||||
ReactingParcel<ParcelType>::sizeofFields_
|
ReactingParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
os << p.Y();
|
os << p.Y();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,14 +67,12 @@ class ThermoParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
public:
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
//- Size in bytes of the fields
|
||||||
static const std::size_t sizeofFields_;
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Class to hold thermo particle constant properties
|
//- Class to hold thermo particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
@ -277,6 +275,14 @@ public:
|
|||||||
+ " Cp"
|
+ " Cp"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" scalar"
|
||||||
|
+ " scalar"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,7 +33,11 @@ Foam::string Foam::ThermoParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::ThermoParcel<ParcelType>::propertyList();
|
Foam::ThermoParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::ThermoParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::ThermoParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::ThermoParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::ThermoParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(ThermoParcel<ParcelType>, Tc_)
|
offsetof(ThermoParcel<ParcelType>, Tc_)
|
||||||
- offsetof(ThermoParcel<ParcelType>, T_)
|
- offsetof(ThermoParcel<ParcelType>, T_)
|
||||||
@ -65,7 +69,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&T_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&T_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +158,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.T_),
|
reinterpret_cast<const char*>(&p.T_),
|
||||||
ThermoParcel<ParcelType>::sizeofFields_
|
ThermoParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace Foam
|
|||||||
|
|
||||||
Foam::kinematicParcelInjectionData::kinematicParcelInjectionData()
|
Foam::kinematicParcelInjectionData::kinematicParcelInjectionData()
|
||||||
:
|
:
|
||||||
x_(point::zero),
|
x_(Zero),
|
||||||
U_(Zero),
|
U_(Zero),
|
||||||
d_(0.0),
|
d_(0.0),
|
||||||
rho_(0.0),
|
rho_(0.0),
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -181,7 +181,6 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
if (patchI >= 0)
|
if (patchI >= 0)
|
||||||
{
|
{
|
||||||
vector& U = p.U();
|
vector& U = p.U();
|
||||||
bool& active = p.active();
|
|
||||||
|
|
||||||
typename PatchInteractionModel<CloudType>::interactionType it =
|
typename PatchInteractionModel<CloudType>::interactionType it =
|
||||||
this->wordToInteractionType
|
this->wordToInteractionType
|
||||||
@ -196,7 +195,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
scalar dm = p.mass()*p.nParticle();
|
scalar dm = p.mass()*p.nParticle();
|
||||||
|
|
||||||
keepParticle = false;
|
keepParticle = false;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nEscape_[patchI]++;
|
nEscape_[patchI]++;
|
||||||
massEscape_[patchI] += dm;
|
massEscape_[patchI] += dm;
|
||||||
@ -213,7 +212,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
scalar dm = p.mass()*p.nParticle();
|
scalar dm = p.mass()*p.nParticle();
|
||||||
|
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nStick_[patchI]++;
|
nStick_[patchI]++;
|
||||||
massStick_[patchI] += dm;
|
massStick_[patchI] += dm;
|
||||||
@ -228,7 +227,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itRebound:
|
case PatchInteractionModel<CloudType>::itRebound:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = true;
|
p.active(true);
|
||||||
|
|
||||||
vector nw;
|
vector nw;
|
||||||
vector Up;
|
vector Up;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -69,7 +69,7 @@ bool Foam::Rebound<CloudType>::correct
|
|||||||
vector& U = p.U();
|
vector& U = p.U();
|
||||||
|
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
p.active() = true;
|
p.active(true);
|
||||||
|
|
||||||
vector nw;
|
vector nw;
|
||||||
vector Up;
|
vector Up;
|
||||||
|
|||||||
@ -112,8 +112,6 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
{
|
{
|
||||||
vector& U = p.U();
|
vector& U = p.U();
|
||||||
|
|
||||||
bool& active = p.active();
|
|
||||||
|
|
||||||
if (isA<wallPolyPatch>(pp))
|
if (isA<wallPolyPatch>(pp))
|
||||||
{
|
{
|
||||||
switch (interactionType_)
|
switch (interactionType_)
|
||||||
@ -121,7 +119,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itEscape:
|
case PatchInteractionModel<CloudType>::itEscape:
|
||||||
{
|
{
|
||||||
keepParticle = false;
|
keepParticle = false;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nEscape_++;
|
nEscape_++;
|
||||||
massEscape_ += p.nParticle()*p.mass();
|
massEscape_ += p.nParticle()*p.mass();
|
||||||
@ -130,7 +128,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itStick:
|
case PatchInteractionModel<CloudType>::itStick:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nStick_++;
|
nStick_++;
|
||||||
massStick_ += p.nParticle()*p.mass();
|
massStick_ += p.nParticle()*p.mass();
|
||||||
@ -139,7 +137,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itRebound:
|
case PatchInteractionModel<CloudType>::itRebound:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = true;
|
p.active(true);
|
||||||
|
|
||||||
vector nw;
|
vector nw;
|
||||||
vector Up;
|
vector Up;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -58,17 +58,15 @@ class molecule
|
|||||||
:
|
:
|
||||||
public particle
|
public particle
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
// Values of special that are less than zero are for built-in functionality.
|
// Values of special that are less than zero are for built-in functionality.
|
||||||
// Values greater than zero are user specifiable/expandable (i.e. test
|
// Values greater than zero are user specifiable/expandable
|
||||||
// special_ >= SPECIAL_USER)
|
// (i.e. test special_ >= SPECIAL_USER)
|
||||||
|
|
||||||
enum specialTypes
|
enum specialTypes
|
||||||
{
|
{
|
||||||
@ -78,6 +76,7 @@ public:
|
|||||||
SPECIAL_USER = 1
|
SPECIAL_USER = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold molecule constant properties
|
//- Class to hold molecule constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -29,7 +29,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const std::size_t Foam::molecule::sizeofFields_
|
const std::size_t Foam::molecule::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
|
offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
|
||||||
);
|
);
|
||||||
@ -77,7 +77,7 @@ Foam::molecule::molecule
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&Q_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&Q_), sizeofFields);
|
||||||
is >> siteForces_ >> sitePositions_;
|
is >> siteForces_ >> sitePositions_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const molecule& mol)
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&mol.Q_),
|
reinterpret_cast<const char*>(&mol.Q_),
|
||||||
molecule::sizeofFields_
|
molecule::sizeofFields
|
||||||
);
|
);
|
||||||
os << mol.siteForces_ << mol.sitePositions_;
|
os << mol.siteForces_ << mol.sitePositions_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -61,9 +61,6 @@ class solidParticle
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
//- Diameter
|
//- Diameter
|
||||||
scalar d_;
|
scalar d_;
|
||||||
|
|
||||||
@ -116,6 +113,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Static data members
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|||||||
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const std::size_t Foam::solidParticle::sizeofFields_
|
const std::size_t Foam::solidParticle::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(solidParticle) - sizeof(particle)
|
sizeof(solidParticle) - sizeof(particle)
|
||||||
);
|
);
|
||||||
@ -54,7 +54,7 @@ Foam::solidParticle::solidParticle
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&d_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&d_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const solidParticle& p)
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.d_),
|
reinterpret_cast<const char*>(&p.d_),
|
||||||
solidParticle::sizeofFields_
|
solidParticle::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -25,7 +25,7 @@ Class
|
|||||||
Foam::SprayParcel
|
Foam::SprayParcel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Reacing spray parcel, with added functionality for atomization and breakup
|
Reacting spray parcel, with added functionality for atomization and breakup
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -59,12 +59,6 @@ class SprayParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Class to hold reacting particle constant properties
|
//- Class to hold reacting particle constant properties
|
||||||
@ -178,6 +172,9 @@ public:
|
|||||||
|
|
||||||
// Static data members
|
// Static data members
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("SprayParcel");
|
TypeName("SprayParcel");
|
||||||
|
|
||||||
@ -185,7 +182,7 @@ public:
|
|||||||
AddToPropertyList
|
AddToPropertyList
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
+ " d0"
|
" d0"
|
||||||
+ " position0"
|
+ " position0"
|
||||||
+ " sigma"
|
+ " sigma"
|
||||||
+ " mu"
|
+ " mu"
|
||||||
@ -200,6 +197,25 @@ public:
|
|||||||
+ " user"
|
+ " user"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" scalar"
|
||||||
|
+ " vector"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,9 +32,13 @@ template<class ParcelType>
|
|||||||
Foam::string Foam::SprayParcel<ParcelType>::propertyList_ =
|
Foam::string Foam::SprayParcel<ParcelType>::propertyList_ =
|
||||||
Foam::SprayParcel<ParcelType>::propertyList();
|
Foam::SprayParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
Foam::string Foam::SprayParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::SprayParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::SprayParcel<ParcelType>::sizeofFields_
|
const std::size_t Foam::SprayParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(SprayParcel<ParcelType>) - sizeof(ParcelType)
|
sizeof(SprayParcel<ParcelType>) - sizeof(ParcelType)
|
||||||
);
|
);
|
||||||
@ -85,7 +89,7 @@ Foam::SprayParcel<ParcelType>::SprayParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&d0_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&d0_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +315,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.d0_),
|
reinterpret_cast<const char*>(&p.d0_),
|
||||||
SprayParcel<ParcelType>::sizeofFields_
|
SprayParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -630,13 +630,13 @@ bool Foam::medialAxisMeshMover::unmarkExtrusion
|
|||||||
if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDE)
|
if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDE)
|
||||||
{
|
{
|
||||||
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
|
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = Zero;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDEREMOVE)
|
else if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDEREMOVE)
|
||||||
{
|
{
|
||||||
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
|
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = Zero;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1224,7 +1224,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
|
|||||||
false
|
false
|
||||||
),
|
),
|
||||||
pMesh(),
|
pMesh(),
|
||||||
dimensionedVector("dispVec", dimLength, vector::zero)
|
dimensionedVector("dispVec", dimLength, Zero)
|
||||||
),
|
),
|
||||||
medialRatio_
|
medialRatio_
|
||||||
(
|
(
|
||||||
@ -1266,7 +1266,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
|
|||||||
false
|
false
|
||||||
),
|
),
|
||||||
pMesh(),
|
pMesh(),
|
||||||
dimensionedVector("medialVec", dimLength, vector::zero)
|
dimensionedVector("medialVec", dimLength, Zero)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
update(dict);
|
update(dict);
|
||||||
@ -1594,7 +1594,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
|||||||
{
|
{
|
||||||
if (!pointWallDist[pointI].valid(dummyTrackData))
|
if (!pointWallDist[pointI].valid(dummyTrackData))
|
||||||
{
|
{
|
||||||
displacement[pointI] = vector::zero;
|
displacement[pointI] = Zero;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1737,7 +1737,7 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField
|
|||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
pMesh,
|
pMesh,
|
||||||
dimensionedVector("displacement", dimLength, vector::zero),
|
dimensionedVector("displacement", dimLength, Zero),
|
||||||
patchFieldTypes
|
patchFieldTypes
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -669,6 +669,7 @@ private:
|
|||||||
//- Determines cell zone from cell region information.
|
//- Determines cell zone from cell region information.
|
||||||
bool calcRegionToZone
|
bool calcRegionToZone
|
||||||
(
|
(
|
||||||
|
const label backgroundZoneID,
|
||||||
const label surfZoneI,
|
const label surfZoneI,
|
||||||
const label ownRegion,
|
const label ownRegion,
|
||||||
const label neiRegion,
|
const label neiRegion,
|
||||||
@ -680,6 +681,7 @@ private:
|
|||||||
// marked in namedSurfaceIndex regarded as blocked.
|
// marked in namedSurfaceIndex regarded as blocked.
|
||||||
void findCellZoneTopo
|
void findCellZoneTopo
|
||||||
(
|
(
|
||||||
|
const label backgroundZoneID,
|
||||||
const pointField& locationsInMesh,
|
const pointField& locationsInMesh,
|
||||||
const labelList& allSurfaceIndex,
|
const labelList& allSurfaceIndex,
|
||||||
const labelList& namedSurfaceIndex,
|
const labelList& namedSurfaceIndex,
|
||||||
@ -700,6 +702,7 @@ private:
|
|||||||
void zonify
|
void zonify
|
||||||
(
|
(
|
||||||
const bool allowFreeStandingZoneFaces,
|
const bool allowFreeStandingZoneFaces,
|
||||||
|
const label backgroundZoneID,
|
||||||
const pointField& locationsInMesh,
|
const pointField& locationsInMesh,
|
||||||
const wordList& zonesInMesh,
|
const wordList& zonesInMesh,
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -311,6 +311,7 @@ void Foam::meshRefinement::getBafflePatches
|
|||||||
zonify
|
zonify
|
||||||
(
|
(
|
||||||
true, // allowFreeStandingZoneFaces
|
true, // allowFreeStandingZoneFaces
|
||||||
|
-2, // zone to put unreached cells into
|
||||||
locationsInMesh,
|
locationsInMesh,
|
||||||
zonesInMesh,
|
zonesInMesh,
|
||||||
|
|
||||||
@ -1812,6 +1813,7 @@ void Foam::meshRefinement::findCellZoneInsideWalk
|
|||||||
|
|
||||||
bool Foam::meshRefinement::calcRegionToZone
|
bool Foam::meshRefinement::calcRegionToZone
|
||||||
(
|
(
|
||||||
|
const label backgroundZoneID,
|
||||||
const label surfZoneI,
|
const label surfZoneI,
|
||||||
const label ownRegion,
|
const label ownRegion,
|
||||||
const label neiRegion,
|
const label neiRegion,
|
||||||
@ -1835,9 +1837,13 @@ bool Foam::meshRefinement::calcRegionToZone
|
|||||||
{
|
{
|
||||||
// Face between unset and my region. Put unset
|
// Face between unset and my region. Put unset
|
||||||
// region into keepRegion
|
// region into keepRegion
|
||||||
regionToCellZone[ownRegion] = -1;
|
//MEJ: see comment in findCellZoneTopo
|
||||||
|
if (backgroundZoneID != -2)
|
||||||
|
{
|
||||||
|
regionToCellZone[ownRegion] = backgroundZoneID;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (regionToCellZone[neiRegion] != -2)
|
else if (regionToCellZone[neiRegion] != -2)
|
||||||
{
|
{
|
||||||
// Face between unset and other region.
|
// Face between unset and other region.
|
||||||
@ -1852,9 +1858,12 @@ bool Foam::meshRefinement::calcRegionToZone
|
|||||||
{
|
{
|
||||||
// Face between unset and my region. Put unset
|
// Face between unset and my region. Put unset
|
||||||
// region into keepRegion
|
// region into keepRegion
|
||||||
regionToCellZone[neiRegion] = -1;
|
if (backgroundZoneID != -2)
|
||||||
|
{
|
||||||
|
regionToCellZone[neiRegion] = backgroundZoneID;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (regionToCellZone[ownRegion] != -2)
|
else if (regionToCellZone[ownRegion] != -2)
|
||||||
{
|
{
|
||||||
// Face between unset and other region.
|
// Face between unset and other region.
|
||||||
@ -1870,6 +1879,7 @@ bool Foam::meshRefinement::calcRegionToZone
|
|||||||
|
|
||||||
void Foam::meshRefinement::findCellZoneTopo
|
void Foam::meshRefinement::findCellZoneTopo
|
||||||
(
|
(
|
||||||
|
const label backgroundZoneID,
|
||||||
const pointField& locationsInMesh,
|
const pointField& locationsInMesh,
|
||||||
const labelList& allSurfaceIndex,
|
const labelList& allSurfaceIndex,
|
||||||
const labelList& namedSurfaceIndex,
|
const labelList& namedSurfaceIndex,
|
||||||
@ -1877,6 +1887,25 @@ void Foam::meshRefinement::findCellZoneTopo
|
|||||||
labelList& cellToZone
|
labelList& cellToZone
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
// This routine splits the mesh into regions, based on the intersection
|
||||||
|
// with a surface. The problem is that we know the surface which
|
||||||
|
// (intersected) face belongs to (in namedSurfaceIndex) but we don't
|
||||||
|
// know which side of the face it relates to. So all we are doing here
|
||||||
|
// is get the correspondence between surface/cellZone and regionSplit
|
||||||
|
// region.
|
||||||
|
// See the logic in calcRegionToZone. The problem is what to do
|
||||||
|
// with unreachable parts of the mesh (cellToZone = -2).
|
||||||
|
// In 23x this routine was only called for actually zoneing an existing
|
||||||
|
// mesh so we had to do something with these cells and they
|
||||||
|
// would get set to -1 (background). However in this version this routine
|
||||||
|
// also gets used much earlier on when after the surface refinement it
|
||||||
|
// removes unreachable cells ('Removing mesh beyond surface intersections')
|
||||||
|
// and this is when we keep -2 so it gets removed.
|
||||||
|
// So the zone to set these unmarked cells to is provided as argument:
|
||||||
|
// - backgroundZoneID = -2 : do not change so remove cells
|
||||||
|
// - backgroundZoneID = -1 : put into background
|
||||||
|
|
||||||
|
|
||||||
// Assumes:
|
// Assumes:
|
||||||
// - region containing keepPoint does not go into a cellZone
|
// - region containing keepPoint does not go into a cellZone
|
||||||
// - all other regions can be found by crossing faces marked in
|
// - all other regions can be found by crossing faces marked in
|
||||||
@ -1995,6 +2024,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
|||||||
// of internal face.
|
// of internal face.
|
||||||
bool changedCell = calcRegionToZone
|
bool changedCell = calcRegionToZone
|
||||||
(
|
(
|
||||||
|
backgroundZoneID,
|
||||||
surfaceToCellZone[surfI],
|
surfaceToCellZone[surfI],
|
||||||
cellRegion[mesh_.faceOwner()[faceI]],
|
cellRegion[mesh_.faceOwner()[faceI]],
|
||||||
cellRegion[mesh_.faceNeighbour()[faceI]],
|
cellRegion[mesh_.faceNeighbour()[faceI]],
|
||||||
@ -2032,6 +2062,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
|||||||
{
|
{
|
||||||
bool changedCell = calcRegionToZone
|
bool changedCell = calcRegionToZone
|
||||||
(
|
(
|
||||||
|
backgroundZoneID,
|
||||||
surfaceToCellZone[surfI],
|
surfaceToCellZone[surfI],
|
||||||
cellRegion[mesh_.faceOwner()[faceI]],
|
cellRegion[mesh_.faceOwner()[faceI]],
|
||||||
neiCellRegion[faceI-mesh_.nInternalFaces()],
|
neiCellRegion[faceI-mesh_.nInternalFaces()],
|
||||||
@ -2309,6 +2340,7 @@ void Foam::meshRefinement::getIntersections
|
|||||||
void Foam::meshRefinement::zonify
|
void Foam::meshRefinement::zonify
|
||||||
(
|
(
|
||||||
const bool allowFreeStandingZoneFaces,
|
const bool allowFreeStandingZoneFaces,
|
||||||
|
const label backgroundZoneID,
|
||||||
const pointField& locationsInMesh,
|
const pointField& locationsInMesh,
|
||||||
const wordList& zonesInMesh,
|
const wordList& zonesInMesh,
|
||||||
|
|
||||||
@ -2513,6 +2545,7 @@ void Foam::meshRefinement::zonify
|
|||||||
|
|
||||||
findCellZoneTopo
|
findCellZoneTopo
|
||||||
(
|
(
|
||||||
|
backgroundZoneID,
|
||||||
pointField(0),
|
pointField(0),
|
||||||
globalRegion1, // To split up cells
|
globalRegion1, // To split up cells
|
||||||
namedSurfaceIndex, // Step across named surfaces to propagate
|
namedSurfaceIndex, // Step across named surfaces to propagate
|
||||||
@ -4271,7 +4304,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
|||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Zone per cell:
|
// Zone per cell:
|
||||||
// -2 : unset
|
// -2 : unset : not allowed!
|
||||||
// -1 : not in any zone (zone 'none')
|
// -1 : not in any zone (zone 'none')
|
||||||
// >=0: zoneID
|
// >=0: zoneID
|
||||||
// namedSurfaceIndex:
|
// namedSurfaceIndex:
|
||||||
@ -4283,6 +4316,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
|||||||
zonify
|
zonify
|
||||||
(
|
(
|
||||||
allowFreeStandingZoneFaces,
|
allowFreeStandingZoneFaces,
|
||||||
|
-1, // Set all cells with cellToZone -2 to -1
|
||||||
locationsInMesh,
|
locationsInMesh,
|
||||||
zonesInMesh,
|
zonesInMesh,
|
||||||
|
|
||||||
|
|||||||
@ -1558,7 +1558,7 @@ bool Foam::meshRefinement::isGap
|
|||||||
{
|
{
|
||||||
scalar cosAngle = (normal0 & normal1);
|
scalar cosAngle = (normal0 & normal1);
|
||||||
|
|
||||||
vector avg = vector::zero;
|
vector avg = Zero;
|
||||||
if (cosAngle < (-1+planarCos))
|
if (cosAngle < (-1+planarCos))
|
||||||
{
|
{
|
||||||
// Opposite normals
|
// Opposite normals
|
||||||
@ -1615,7 +1615,7 @@ bool Foam::meshRefinement::isNormalGap
|
|||||||
{
|
{
|
||||||
scalar cosAngle = (normal0 & normal1);
|
scalar cosAngle = (normal0 & normal1);
|
||||||
|
|
||||||
vector avg = vector::zero;
|
vector avg = Zero;
|
||||||
if (cosAngle < (-1+planarCos))
|
if (cosAngle < (-1+planarCos))
|
||||||
{
|
{
|
||||||
// Opposite normals
|
// Opposite normals
|
||||||
@ -1782,8 +1782,8 @@ Foam::label Foam::meshRefinement::markProximityRefinement
|
|||||||
// minLevel) and cache per cell the max surface level and the local normal
|
// minLevel) and cache per cell the max surface level and the local normal
|
||||||
// on that surface.
|
// on that surface.
|
||||||
labelList cellMaxLevel(mesh_.nCells(), -1);
|
labelList cellMaxLevel(mesh_.nCells(), -1);
|
||||||
vectorField cellMaxNormal(mesh_.nCells(), vector::zero);
|
vectorField cellMaxNormal(mesh_.nCells(), Zero);
|
||||||
pointField cellMaxLocation(mesh_.nCells(), vector::zero);
|
pointField cellMaxLocation(mesh_.nCells(), Zero);
|
||||||
|
|
||||||
{
|
{
|
||||||
// Per segment the normals of the surfaces
|
// Per segment the normals of the surfaces
|
||||||
|
|||||||
@ -536,7 +536,7 @@ void Foam::refinementFeatures::findNearestEdge
|
|||||||
nearInfo.setSize(samples.size());
|
nearInfo.setSize(samples.size());
|
||||||
nearInfo = pointIndexHit();
|
nearInfo = pointIndexHit();
|
||||||
nearNormal.setSize(samples.size());
|
nearNormal.setSize(samples.size());
|
||||||
nearNormal = vector::zero;
|
nearNormal = Zero;
|
||||||
|
|
||||||
forAll(edgeTrees_, featI)
|
forAll(edgeTrees_, featI)
|
||||||
{
|
{
|
||||||
@ -595,7 +595,7 @@ void Foam::refinementFeatures::findNearestRegionEdge
|
|||||||
nearInfo.setSize(samples.size());
|
nearInfo.setSize(samples.size());
|
||||||
nearInfo = pointIndexHit();
|
nearInfo = pointIndexHit();
|
||||||
nearNormal.setSize(samples.size());
|
nearNormal.setSize(samples.size());
|
||||||
nearNormal = vector::zero;
|
nearNormal = Zero;
|
||||||
|
|
||||||
|
|
||||||
const PtrList<indexedOctree<treeDataEdge>>& regionTrees =
|
const PtrList<indexedOctree<treeDataEdge>>& regionTrees =
|
||||||
|
|||||||
@ -1216,7 +1216,7 @@ void Foam::refinementSurfaces::findNearestIntersection
|
|||||||
region1.setSize(start.size());
|
region1.setSize(start.size());
|
||||||
region1 = -1;
|
region1 = -1;
|
||||||
normal1.setSize(start.size());
|
normal1.setSize(start.size());
|
||||||
normal1 = vector::zero;
|
normal1 = Zero;
|
||||||
|
|
||||||
// Current end of segment to test.
|
// Current end of segment to test.
|
||||||
pointField nearest(end);
|
pointField nearest(end);
|
||||||
@ -1325,7 +1325,7 @@ void Foam::refinementSurfaces::findNearestIntersection
|
|||||||
surface1.setSize(start.size());
|
surface1.setSize(start.size());
|
||||||
surface1 = -1;
|
surface1 = -1;
|
||||||
normal1.setSize(start.size());
|
normal1.setSize(start.size());
|
||||||
normal1 = vector::zero;
|
normal1 = Zero;
|
||||||
|
|
||||||
// Current end of segment to test.
|
// Current end of segment to test.
|
||||||
pointField nearest(end);
|
pointField nearest(end);
|
||||||
@ -1374,7 +1374,7 @@ void Foam::refinementSurfaces::findNearestIntersection
|
|||||||
hitInfo1.setSize(start.size());
|
hitInfo1.setSize(start.size());
|
||||||
hitInfo1 = pointIndexHit();
|
hitInfo1 = pointIndexHit();
|
||||||
normal1.setSize(start.size());
|
normal1.setSize(start.size());
|
||||||
normal1 = vector::zero;
|
normal1 = Zero;
|
||||||
|
|
||||||
// Current end of segment to test.
|
// Current end of segment to test.
|
||||||
pointField nearest(end);
|
pointField nearest(end);
|
||||||
@ -1559,7 +1559,7 @@ void Foam::refinementSurfaces::findNearestRegion
|
|||||||
hitRegion.setSize(hitSurface.size());
|
hitRegion.setSize(hitSurface.size());
|
||||||
hitRegion = -1;
|
hitRegion = -1;
|
||||||
hitNormal.setSize(hitSurface.size());
|
hitNormal.setSize(hitSurface.size());
|
||||||
hitNormal = vector::zero;
|
hitNormal = Zero;
|
||||||
|
|
||||||
forAll(surfacesToTest, i)
|
forAll(surfacesToTest, i)
|
||||||
{
|
{
|
||||||
@ -1784,7 +1784,7 @@ void Foam::refinementSurfaces::findNearestRegion
|
|||||||
hitRegion.setSize(hitSurface.size());
|
hitRegion.setSize(hitSurface.size());
|
||||||
hitRegion = -1;
|
hitRegion = -1;
|
||||||
hitNormal.setSize(hitSurface.size());
|
hitNormal.setSize(hitSurface.size());
|
||||||
hitNormal = vector::zero;
|
hitNormal = Zero;
|
||||||
|
|
||||||
forAll(surfacesToTest, i)
|
forAll(surfacesToTest, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -223,14 +223,14 @@ bool Foam::snappyLayerDriver::unmarkExtrusion
|
|||||||
{
|
{
|
||||||
extrudeStatus[patchPointI] = NOEXTRUDE;
|
extrudeStatus[patchPointI] = NOEXTRUDE;
|
||||||
patchNLayers[patchPointI] = 0;
|
patchNLayers[patchPointI] = 0;
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = Zero;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
|
else if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
|
||||||
{
|
{
|
||||||
extrudeStatus[patchPointI] = NOEXTRUDE;
|
extrudeStatus[patchPointI] = NOEXTRUDE;
|
||||||
patchNLayers[patchPointI] = 0;
|
patchNLayers[patchPointI] = 0;
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = Zero;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -866,7 +866,7 @@ Foam::snappyLayerDriver::makeLayerDisplacementField
|
|||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
pMesh,
|
pMesh,
|
||||||
dimensionedVector("displacement", dimLength, vector::zero),
|
dimensionedVector("displacement", dimLength, Zero),
|
||||||
patchFieldTypes,
|
patchFieldTypes,
|
||||||
actualPatchTypes
|
actualPatchTypes
|
||||||
)
|
)
|
||||||
@ -953,7 +953,7 @@ void Foam::snappyLayerDriver::growNoExtrusion
|
|||||||
{
|
{
|
||||||
if (extrudeStatus[patchPointI] == NOEXTRUDE)
|
if (extrudeStatus[patchPointI] == NOEXTRUDE)
|
||||||
{
|
{
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = Zero;
|
||||||
patchNLayers[patchPointI] = 0;
|
patchNLayers[patchPointI] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1532,7 +1532,7 @@ void Foam::snappyLayerDriver::getPatchDisplacement
|
|||||||
{
|
{
|
||||||
// Do not use unmarkExtrusion; forcibly set to zero extrusion.
|
// Do not use unmarkExtrusion; forcibly set to zero extrusion.
|
||||||
patchNLayers[patchPointI] = 0;
|
patchNLayers[patchPointI] = 0;
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = Zero;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1561,7 +1561,7 @@ void Foam::snappyLayerDriver::getPatchDisplacement
|
|||||||
{
|
{
|
||||||
if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
|
if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
|
||||||
{
|
{
|
||||||
point avg(vector::zero);
|
point avg(Zero);
|
||||||
label nPoints = 0;
|
label nPoints = 0;
|
||||||
|
|
||||||
const labelList& pEdges = pp.pointEdges()[patchPointI];
|
const labelList& pEdges = pp.pointEdges()[patchPointI];
|
||||||
@ -1798,7 +1798,7 @@ Foam::label Foam::snappyLayerDriver::truncateDisplacement
|
|||||||
else if (extrudeStatus[patchPointI] == NOEXTRUDE)
|
else if (extrudeStatus[patchPointI] == NOEXTRUDE)
|
||||||
{
|
{
|
||||||
// Make sure displacement is 0. Should already be so but ...
|
// Make sure displacement is 0. Should already be so but ...
|
||||||
patchDisp[patchPointI] = vector::zero;
|
patchDisp[patchPointI] = Zero;
|
||||||
patchNLayers[patchPointI] = 0;
|
patchNLayers[patchPointI] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3681,7 +3681,7 @@ void Foam::snappyLayerDriver::addLayers
|
|||||||
|
|
||||||
// Calculate displacement for final layer for addPatchLayer.
|
// Calculate displacement for final layer for addPatchLayer.
|
||||||
// (layer of cells next to the original mesh)
|
// (layer of cells next to the original mesh)
|
||||||
vectorField finalDisp(patchNLayers.size(), vector::zero);
|
vectorField finalDisp(patchNLayers.size(), Zero);
|
||||||
|
|
||||||
forAll(nPatchPointLayers, i)
|
forAll(nPatchPointLayers, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1025,7 +1025,7 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
|
|||||||
// const scalar rCVol = pow(cellVolumes[cellI], -5.0/3.0);
|
// const scalar rCVol = pow(cellVolumes[cellI], -5.0/3.0);
|
||||||
//
|
//
|
||||||
// // Determine principal axes of cell
|
// // Determine principal axes of cell
|
||||||
// symmTensor R(symmTensor::zero);
|
// symmTensor R(Zero);
|
||||||
//
|
//
|
||||||
// forAll(cFaces, i)
|
// forAll(cFaces, i)
|
||||||
// {
|
// {
|
||||||
|
|||||||
@ -250,7 +250,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
|
|||||||
|
|
||||||
// Calculate average of connected cells
|
// Calculate average of connected cells
|
||||||
labelList nCells(mesh.nPoints(), 0);
|
labelList nCells(mesh.nPoints(), 0);
|
||||||
pointField sumLocation(mesh.nPoints(), vector::zero);
|
pointField sumLocation(mesh.nPoints(), Zero);
|
||||||
|
|
||||||
forAll(isMovingPoint, pointI)
|
forAll(isMovingPoint, pointI)
|
||||||
{
|
{
|
||||||
@ -276,7 +276,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
|
|||||||
vector::zero
|
vector::zero
|
||||||
);
|
);
|
||||||
|
|
||||||
tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), vector::zero));
|
tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), Zero));
|
||||||
pointField& displacement = tdisplacement.ref();
|
pointField& displacement = tdisplacement.ref();
|
||||||
|
|
||||||
label nAdapted = 0;
|
label nAdapted = 0;
|
||||||
@ -370,7 +370,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement
|
|||||||
// Get average position of boundary face centres
|
// Get average position of boundary face centres
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
vectorField avgBoundary(pointFaces.size(), vector::zero);
|
vectorField avgBoundary(pointFaces.size(), Zero);
|
||||||
labelList nBoundary(pointFaces.size(), 0);
|
labelList nBoundary(pointFaces.size(), 0);
|
||||||
|
|
||||||
forAll(pointFaces, patchPointI)
|
forAll(pointFaces, patchPointI)
|
||||||
@ -418,7 +418,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement
|
|||||||
vectorField avgInternal;
|
vectorField avgInternal;
|
||||||
labelList nInternal;
|
labelList nInternal;
|
||||||
{
|
{
|
||||||
vectorField globalSum(mesh.nPoints(), vector::zero);
|
vectorField globalSum(mesh.nPoints(), Zero);
|
||||||
labelList globalNum(mesh.nPoints(), 0);
|
labelList globalNum(mesh.nPoints(), 0);
|
||||||
|
|
||||||
// Note: no use of pointFaces
|
// Note: no use of pointFaces
|
||||||
@ -521,7 +521,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement
|
|||||||
|
|
||||||
|
|
||||||
// Displacement to calculate.
|
// Displacement to calculate.
|
||||||
tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), vector::zero));
|
tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), Zero));
|
||||||
pointField& patchDisp = tpatchDisp.ref();
|
pointField& patchDisp = tpatchDisp.ref();
|
||||||
|
|
||||||
forAll(pointFaces, i)
|
forAll(pointFaces, i)
|
||||||
@ -597,7 +597,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement
|
|||||||
// const labelListList& pointEdges = pp.pointEdges();
|
// const labelListList& pointEdges = pp.pointEdges();
|
||||||
// const edgeList& edges = pp.edges();
|
// const edgeList& edges = pp.edges();
|
||||||
//
|
//
|
||||||
// tmp<pointField> tavg(new pointField(pointEdges.size(), vector::zero));
|
// tmp<pointField> tavg(new pointField(pointEdges.size(), Zero));
|
||||||
// pointField& avg = tavg();
|
// pointField& avg = tavg();
|
||||||
//
|
//
|
||||||
// forAll(pointEdges, vertI)
|
// forAll(pointEdges, vertI)
|
||||||
@ -997,7 +997,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres
|
|||||||
|
|
||||||
tmp<pointField> tavgBoundary
|
tmp<pointField> tavgBoundary
|
||||||
(
|
(
|
||||||
new pointField(pointFaces.size(), vector::zero)
|
new pointField(pointFaces.size(), Zero)
|
||||||
);
|
);
|
||||||
pointField& avgBoundary = tavgBoundary.ref();
|
pointField& avgBoundary = tavgBoundary.ref();
|
||||||
labelList nBoundary(pointFaces.size(), 0);
|
labelList nBoundary(pointFaces.size(), 0);
|
||||||
@ -1805,7 +1805,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
|
|||||||
const fvMesh& mesh = meshRefiner.mesh();
|
const fvMesh& mesh = meshRefiner.mesh();
|
||||||
|
|
||||||
// Displacement per patch point
|
// Displacement per patch point
|
||||||
vectorField patchDisp(localPoints.size(), vector::zero);
|
vectorField patchDisp(localPoints.size(), Zero);
|
||||||
|
|
||||||
if (returnReduce(localPoints.size(), sumOp<label>()) > 0)
|
if (returnReduce(localPoints.size(), sumOp<label>()) > 0)
|
||||||
{
|
{
|
||||||
@ -2754,7 +2754,7 @@ void Foam::snappySnapDriver::doSnap
|
|||||||
if (snapParams.detectNearSurfacesSnap())
|
if (snapParams.detectNearSurfacesSnap())
|
||||||
{
|
{
|
||||||
nearestPoint.setSize(pp.nPoints(), vector::max);
|
nearestPoint.setSize(pp.nPoints(), vector::max);
|
||||||
nearestNormal.setSize(pp.nPoints(), vector::zero);
|
nearestNormal.setSize(pp.nPoints(), Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
vectorField disp = calcNearestSurface
|
vectorField disp = calcNearestSurface
|
||||||
|
|||||||
@ -152,7 +152,7 @@ void Foam::snappySnapDriver::smoothAndConstrain
|
|||||||
// - same for feature points. They are already attracted to the
|
// - same for feature points. They are already attracted to the
|
||||||
// nearest feature point.
|
// nearest feature point.
|
||||||
|
|
||||||
vectorField dispSum(pp.nPoints(), vector::zero);
|
vectorField dispSum(pp.nPoints(), Zero);
|
||||||
labelList dispCount(pp.nPoints(), 0);
|
labelList dispCount(pp.nPoints(), 0);
|
||||||
|
|
||||||
const labelListList& pointEdges = pp.pointEdges();
|
const labelListList& pointEdges = pp.pointEdges();
|
||||||
@ -233,9 +233,9 @@ void Foam::snappySnapDriver::calcNearestFace
|
|||||||
|
|
||||||
// Displacement and orientation per pp face.
|
// Displacement and orientation per pp face.
|
||||||
faceDisp.setSize(pp.size());
|
faceDisp.setSize(pp.size());
|
||||||
faceDisp = vector::zero;
|
faceDisp = Zero;
|
||||||
faceSurfaceNormal.setSize(pp.size());
|
faceSurfaceNormal.setSize(pp.size());
|
||||||
faceSurfaceNormal = vector::zero;
|
faceSurfaceNormal = Zero;
|
||||||
faceSurfaceGlobalRegion.setSize(pp.size());
|
faceSurfaceGlobalRegion.setSize(pp.size());
|
||||||
faceSurfaceGlobalRegion = -1;
|
faceSurfaceGlobalRegion = -1;
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ void Foam::snappySnapDriver::calcNearestFace
|
|||||||
//
|
//
|
||||||
//// Determine rotation axis
|
//// Determine rotation axis
|
||||||
//faceRotation.setSize(pp.size());
|
//faceRotation.setSize(pp.size());
|
||||||
//faceRotation = vector::zero;
|
//faceRotation = Zero;
|
||||||
//
|
//
|
||||||
//forAll(faceRotation, faceI)
|
//forAll(faceRotation, faceI)
|
||||||
//{
|
//{
|
||||||
@ -745,7 +745,7 @@ Foam::pointIndexHit Foam::snappySnapDriver::findMultiPatchPoint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pointIndexHit(false, vector::zero, labelMax);
|
return pointIndexHit(false, Zero, labelMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -933,7 +933,7 @@ void Foam::snappySnapDriver::featureAttractionUsingReconstruction
|
|||||||
pointConstraint& patchConstraint
|
pointConstraint& patchConstraint
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
patchAttraction = vector::zero;
|
patchAttraction = Zero;
|
||||||
patchConstraint = pointConstraint();
|
patchConstraint = pointConstraint();
|
||||||
|
|
||||||
const List<point>& pfSurfNormals = pointFaceSurfNormals[pointI];
|
const List<point>& pfSurfNormals = pointFaceSurfNormals[pointI];
|
||||||
@ -1155,7 +1155,7 @@ void Foam::snappySnapDriver::featureAttractionUsingReconstruction
|
|||||||
|
|
||||||
forAll(pp.localPoints(), pointI)
|
forAll(pp.localPoints(), pointI)
|
||||||
{
|
{
|
||||||
vector attraction = vector::zero;
|
vector attraction = Zero;
|
||||||
pointConstraint constraint;
|
pointConstraint constraint;
|
||||||
|
|
||||||
featureAttractionUsingReconstruction
|
featureAttractionUsingReconstruction
|
||||||
@ -1510,7 +1510,7 @@ void Foam::snappySnapDriver::releasePointsNextToMultiPatch
|
|||||||
//Pout<< "Knocking out constraint"
|
//Pout<< "Knocking out constraint"
|
||||||
// << " on non-multiPatchPoint:"
|
// << " on non-multiPatchPoint:"
|
||||||
// << pp.localPoints()[pointI] << endl;
|
// << pp.localPoints()[pointI] << endl;
|
||||||
patchAttraction[pointI] = vector::zero;
|
patchAttraction[pointI] = Zero;
|
||||||
patchConstraints[pointI] = pointConstraint();
|
patchConstraints[pointI] = pointConstraint();
|
||||||
nChanged++;
|
nChanged++;
|
||||||
|
|
||||||
@ -2193,14 +2193,14 @@ Foam::snappySnapDriver::findNearFeaturePoint
|
|||||||
// Current pointI nearer.
|
// Current pointI nearer.
|
||||||
pointAttractor[featI][featPointI] = pointI;
|
pointAttractor[featI][featPointI] = pointI;
|
||||||
pointConstraints[featI][featPointI].first() = 3;
|
pointConstraints[featI][featPointI].first() = 3;
|
||||||
pointConstraints[featI][featPointI].second() = vector::zero;
|
pointConstraints[featI][featPointI].second() = Zero;
|
||||||
|
|
||||||
// Store for later use
|
// Store for later use
|
||||||
patchAttraction[pointI] = featPt-pt;
|
patchAttraction[pointI] = featPt-pt;
|
||||||
patchConstraints[pointI] = pointConstraints[featI][featPointI];
|
patchConstraints[pointI] = pointConstraints[featI][featPointI];
|
||||||
|
|
||||||
// Reset oldPointI to nearest on feature edge
|
// Reset oldPointI to nearest on feature edge
|
||||||
patchAttraction[oldPointI] = vector::zero;
|
patchAttraction[oldPointI] = Zero;
|
||||||
patchConstraints[oldPointI] = pointConstraint();
|
patchConstraints[oldPointI] = pointConstraint();
|
||||||
|
|
||||||
findNearFeatureEdge
|
findNearFeatureEdge
|
||||||
@ -2224,7 +2224,7 @@ Foam::snappySnapDriver::findNearFeaturePoint
|
|||||||
// Current pointI nearer.
|
// Current pointI nearer.
|
||||||
pointAttractor[featI][featPointI] = pointI;
|
pointAttractor[featI][featPointI] = pointI;
|
||||||
pointConstraints[featI][featPointI].first() = 3;
|
pointConstraints[featI][featPointI].first() = 3;
|
||||||
pointConstraints[featI][featPointI].second() = vector::zero;
|
pointConstraints[featI][featPointI].second() = Zero;
|
||||||
|
|
||||||
// Store for later use
|
// Store for later use
|
||||||
patchAttraction[pointI] = featPt-pt;
|
patchAttraction[pointI] = featPt-pt;
|
||||||
@ -2346,7 +2346,7 @@ void Foam::snappySnapDriver::determineFeatures
|
|||||||
// 2: attract to feature line, constraint is feature line direction
|
// 2: attract to feature line, constraint is feature line direction
|
||||||
// 3: attract to feature point, constraint is zero)
|
// 3: attract to feature point, constraint is zero)
|
||||||
|
|
||||||
vector attraction = vector::zero;
|
vector attraction = Zero;
|
||||||
pointConstraint constraint;
|
pointConstraint constraint;
|
||||||
|
|
||||||
featureAttractionUsingReconstruction
|
featureAttractionUsingReconstruction
|
||||||
@ -3029,8 +3029,7 @@ void Foam::snappySnapDriver::determineBaffleFeatures
|
|||||||
{
|
{
|
||||||
pointAttractor[featI][featPointI] = pointI;
|
pointAttractor[featI][featPointI] = pointI;
|
||||||
pointConstraints[featI][featPointI].first() = 3;
|
pointConstraints[featI][featPointI].first() = 3;
|
||||||
pointConstraints[featI][featPointI].second() =
|
pointConstraints[featI][featPointI].second() = Zero;
|
||||||
vector::zero;
|
|
||||||
|
|
||||||
// Store for later use
|
// Store for later use
|
||||||
patchAttraction[pointI] = featPt-pt;
|
patchAttraction[pointI] = featPt-pt;
|
||||||
@ -3245,7 +3244,7 @@ void Foam::snappySnapDriver::reverseAttractMeshPoints
|
|||||||
|
|
||||||
// Per mesh point the point on nearest feature edge.
|
// Per mesh point the point on nearest feature edge.
|
||||||
patchAttraction.setSize(pp.nPoints());
|
patchAttraction.setSize(pp.nPoints());
|
||||||
patchAttraction = vector::zero;
|
patchAttraction = Zero;
|
||||||
patchConstraints.setSize(pp.nPoints());
|
patchConstraints.setSize(pp.nPoints());
|
||||||
patchConstraints = pointConstraint();
|
patchConstraints = pointConstraint();
|
||||||
|
|
||||||
@ -3440,7 +3439,7 @@ void Foam::snappySnapDriver::featureAttractionUsingFeatureEdges
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reverse: from pp point to nearest feature
|
// Reverse: from pp point to nearest feature
|
||||||
vectorField rawPatchAttraction(pp.nPoints(), vector::zero);
|
vectorField rawPatchAttraction(pp.nPoints(), Zero);
|
||||||
List<pointConstraint> rawPatchConstraints(pp.nPoints());
|
List<pointConstraint> rawPatchConstraints(pp.nPoints());
|
||||||
|
|
||||||
determineFeatures
|
determineFeatures
|
||||||
@ -3875,11 +3874,11 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurfaceFeature
|
|||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// vector from point on surface back to face centre
|
// vector from point on surface back to face centre
|
||||||
vectorField faceDisp(pp.size(), vector::zero);
|
vectorField faceDisp(pp.size(), Zero);
|
||||||
// normal of surface at point on surface
|
// normal of surface at point on surface
|
||||||
vectorField faceSurfaceNormal(pp.size(), vector::zero);
|
vectorField faceSurfaceNormal(pp.size(), Zero);
|
||||||
labelList faceSurfaceGlobalRegion(pp.size(), -1);
|
labelList faceSurfaceGlobalRegion(pp.size(), -1);
|
||||||
//vectorField faceRotation(pp.size(), vector::zero);
|
//vectorField faceRotation(pp.size(), Zero);
|
||||||
|
|
||||||
calcNearestFace
|
calcNearestFace
|
||||||
(
|
(
|
||||||
@ -3927,7 +3926,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurfaceFeature
|
|||||||
|
|
||||||
// Nearest feature
|
// Nearest feature
|
||||||
patchAttraction.setSize(localPoints.size());
|
patchAttraction.setSize(localPoints.size());
|
||||||
patchAttraction = vector::zero;
|
patchAttraction = Zero;
|
||||||
// Constraints at feature
|
// Constraints at feature
|
||||||
patchConstraints.setSize(localPoints.size());
|
patchConstraints.setSize(localPoints.size());
|
||||||
patchConstraints = pointConstraint();
|
patchConstraints = pointConstraint();
|
||||||
|
|||||||
@ -490,7 +490,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
nbrPatchName_(word::null),
|
nbrPatchName_(word::null),
|
||||||
nbrPatchID_(-1),
|
nbrPatchID_(-1),
|
||||||
rotationAxis_(Zero),
|
rotationAxis_(Zero),
|
||||||
rotationCentre_(point::zero),
|
rotationCentre_(Zero),
|
||||||
rotationAngleDefined_(false),
|
rotationAngleDefined_(false),
|
||||||
rotationAngle_(0.0),
|
rotationAngle_(0.0),
|
||||||
separationVector_(Zero),
|
separationVector_(Zero),
|
||||||
@ -521,7 +521,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
coupleGroup_(dict),
|
coupleGroup_(dict),
|
||||||
nbrPatchID_(-1),
|
nbrPatchID_(-1),
|
||||||
rotationAxis_(Zero),
|
rotationAxis_(Zero),
|
||||||
rotationCentre_(point::zero),
|
rotationCentre_(Zero),
|
||||||
rotationAngleDefined_(false),
|
rotationAngleDefined_(false),
|
||||||
rotationAngle_(0.0),
|
rotationAngle_(0.0),
|
||||||
separationVector_(Zero),
|
separationVector_(Zero),
|
||||||
|
|||||||
@ -284,7 +284,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
ownStr.reset(new OBJstream(dir/name() + postfix));
|
ownStr.reset(new OBJstream(dir/name() + postfix));
|
||||||
neiStr.reset(new OBJstream(dir/neighbPatch().name() + postfix));
|
neiStr.reset(new OBJstream(dir/neighbPatch().name() + postfix));
|
||||||
|
|
||||||
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
|
InfoInFunction
|
||||||
|
<< "patch:" << name()
|
||||||
<< " writing accumulated AMI to " << ownStr().name()
|
<< " writing accumulated AMI to " << ownStr().name()
|
||||||
<< " and " << neiStr().name() << endl;
|
<< " and " << neiStr().name() << endl;
|
||||||
}
|
}
|
||||||
@ -368,7 +369,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
|
InfoInFunction
|
||||||
|
<< "patch:" << name()
|
||||||
<< " srcSum:" << srcSum
|
<< " srcSum:" << srcSum
|
||||||
<< " tgtSum:" << tgtSum
|
<< " tgtSum:" << tgtSum
|
||||||
<< " direction:" << direction
|
<< " direction:" << direction
|
||||||
@ -391,8 +393,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
|
InfoInFunction
|
||||||
<< name()
|
<< "patch:" << name()
|
||||||
<< " moving this side from:"
|
<< " moving this side from:"
|
||||||
<< gAverage(thisPatch.points())
|
<< gAverage(thisPatch.points())
|
||||||
<< " to:" << gAverage(thisPoints) << endl;
|
<< " to:" << gAverage(thisPoints) << endl;
|
||||||
@ -402,8 +404,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
|
InfoInFunction
|
||||||
<< name()
|
<< "patch:" << name()
|
||||||
<< " appending weights with untransformed slave side"
|
<< " appending weights with untransformed slave side"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
@ -421,8 +423,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
|
InfoInFunction
|
||||||
<< name()
|
<< "patch:" << name()
|
||||||
<< " moving neighbour side from:"
|
<< " moving neighbour side from:"
|
||||||
<< gAverage(nbrPatch.points())
|
<< gAverage(nbrPatch.points())
|
||||||
<< " to:" << gAverage(nbrPoints) << endl;
|
<< " to:" << gAverage(nbrPoints) << endl;
|
||||||
@ -453,11 +455,12 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
|
|
||||||
nTransforms_ += direction ? +1 : -1;
|
nTransforms_ += direction ? +1 : -1;
|
||||||
|
|
||||||
++ iter;
|
++iter;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
|
InfoInFunction
|
||||||
|
<< "patch:" << name()
|
||||||
<< " iteration:" << iter
|
<< " iteration:" << iter
|
||||||
<< " srcSum:" << srcSum
|
<< " srcSum:" << srcSum
|
||||||
<< " tgtSum:" << tgtSum
|
<< " tgtSum:" << tgtSum
|
||||||
|
|||||||
@ -99,7 +99,7 @@ Foam::cylindrical::cylindrical
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
Rptr_(),
|
Rptr_(),
|
||||||
origin_(point::zero),
|
origin_(Zero),
|
||||||
e3_(Zero)
|
e3_(Zero)
|
||||||
{
|
{
|
||||||
// If origin is specified in the coordinateSystem
|
// If origin is specified in the coordinateSystem
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::coordinateSystem::coordinateSystem()
|
|||||||
:
|
:
|
||||||
name_(),
|
name_(),
|
||||||
note_(),
|
note_(),
|
||||||
origin_(point::zero),
|
origin_(Zero),
|
||||||
R_(new axesRotation(sphericalTensor::I))
|
R_(new axesRotation(sphericalTensor::I))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ Foam::coordinateSystem::coordinateSystem
|
|||||||
:
|
:
|
||||||
name_(name),
|
name_(name),
|
||||||
note_(),
|
note_(),
|
||||||
origin_(point::zero),
|
origin_(Zero),
|
||||||
R_()
|
R_()
|
||||||
{
|
{
|
||||||
init(dict);
|
init(dict);
|
||||||
@ -109,7 +109,7 @@ Foam::coordinateSystem::coordinateSystem(const dictionary& dict)
|
|||||||
:
|
:
|
||||||
name_(),
|
name_(),
|
||||||
note_(),
|
note_(),
|
||||||
origin_(point::zero),
|
origin_(Zero),
|
||||||
R_()
|
R_()
|
||||||
{
|
{
|
||||||
init(dict);
|
init(dict);
|
||||||
@ -124,7 +124,7 @@ Foam::coordinateSystem::coordinateSystem
|
|||||||
:
|
:
|
||||||
name_(),
|
name_(),
|
||||||
note_(),
|
note_(),
|
||||||
origin_(point::zero),
|
origin_(Zero),
|
||||||
R_()
|
R_()
|
||||||
{
|
{
|
||||||
const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);
|
const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);
|
||||||
@ -168,7 +168,7 @@ Foam::coordinateSystem::coordinateSystem(Istream& is)
|
|||||||
:
|
:
|
||||||
name_(is),
|
name_(is),
|
||||||
note_(),
|
note_(),
|
||||||
origin_(point::zero),
|
origin_(Zero),
|
||||||
R_()
|
R_()
|
||||||
{
|
{
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
|
|||||||
@ -100,7 +100,7 @@ void Foam::searchableCone::findNearestAndNormal
|
|||||||
scalar magV = mag(v);
|
scalar magV = mag(v);
|
||||||
if (magV < ROOTVSMALL)
|
if (magV < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
v = vector::zero;
|
v = Zero;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1045,7 +1045,7 @@ void Foam::searchableCone::getNormal
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
normal.setSize(info.size());
|
normal.setSize(info.size());
|
||||||
normal = vector::zero;
|
normal = Zero;
|
||||||
|
|
||||||
forAll(info, i)
|
forAll(info, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -57,7 +57,7 @@ Foam::searchableRotatedBox::searchableRotatedBox
|
|||||||
io.writeOpt(),
|
io.writeOpt(),
|
||||||
false //io.registerObject(),
|
false //io.registerObject(),
|
||||||
),
|
),
|
||||||
treeBoundBox(point::zero, dict.lookup("span"))
|
treeBoundBox(Zero, dict.lookup("span"))
|
||||||
),
|
),
|
||||||
transform_
|
transform_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -70,7 +70,7 @@ class tetOverlapVolume
|
|||||||
|
|
||||||
inline sumMomentOp()
|
inline sumMomentOp()
|
||||||
:
|
:
|
||||||
vol_(0.0, vector::zero)
|
vol_(0.0, Zero)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
inline void operator()(const tetPoints& tet)
|
inline void operator()(const tetPoints& tet)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,7 +67,7 @@ Foam::label Foam::metisDecomp::decompose
|
|||||||
|
|
||||||
// processor weights initialised with no size, only used if specified in
|
// processor weights initialised with no size, only used if specified in
|
||||||
// a file
|
// a file
|
||||||
Field<scalar> processorWeights;
|
Field<floatScalar> processorWeights;
|
||||||
|
|
||||||
// cell weights (so on the vertices of the dual)
|
// cell weights (so on the vertices of the dual)
|
||||||
List<label> cellWeights;
|
List<label> cellWeights;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -107,7 +107,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fieldAverageItem& faItem)
|
|||||||
|
|
||||||
os << faItem.fieldName_ << nl << token::BEGIN_BLOCK << nl;
|
os << faItem.fieldName_ << nl << token::BEGIN_BLOCK << nl;
|
||||||
os.writeKeyword("mean") << faItem.mean_ << token::END_STATEMENT << nl;
|
os.writeKeyword("mean") << faItem.mean_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("prime2Mean") << faItem.mean_
|
os.writeKeyword("prime2Mean") << faItem.prime2Mean_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("base") << faItem.baseTypeNames_[faItem.base_]
|
os.writeKeyword("base") << faItem.baseTypeNames_[faItem.base_]
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
|||||||
@ -273,7 +273,7 @@ void Foam::forceCoeffs::read(const dictionary& dict)
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedVector("0", dimless, vector::zero)
|
dimensionedVector("0", dimless, Zero)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ void Foam::forceCoeffs::read(const dictionary& dict)
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedVector("0", dimless, vector::zero)
|
dimensionedVector("0", dimless, Zero)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -304,7 +304,7 @@ void Foam::forces::resetFields()
|
|||||||
obr_.lookupObject<volVectorField>(fieldName("force"))
|
obr_.lookupObject<volVectorField>(fieldName("force"))
|
||||||
);
|
);
|
||||||
|
|
||||||
force == dimensionedVector("0", force.dimensions(), vector::zero);
|
force == dimensionedVector("0", force.dimensions(), Zero);
|
||||||
|
|
||||||
volVectorField& moment =
|
volVectorField& moment =
|
||||||
const_cast<volVectorField&>
|
const_cast<volVectorField&>
|
||||||
@ -312,7 +312,7 @@ void Foam::forces::resetFields()
|
|||||||
obr_.lookupObject<volVectorField>(fieldName("moment"))
|
obr_.lookupObject<volVectorField>(fieldName("moment"))
|
||||||
);
|
);
|
||||||
|
|
||||||
moment == dimensionedVector("0", moment.dimensions(), vector::zero);
|
moment == dimensionedVector("0", moment.dimensions(), Zero);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -968,7 +968,7 @@ void Foam::forces::read(const dictionary& dict)
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedVector("0", dimForce, vector::zero)
|
dimensionedVector("0", dimForce, Zero)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -987,7 +987,7 @@ void Foam::forces::read(const dictionary& dict)
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedVector("0", dimForce*dimLength, vector::zero)
|
dimensionedVector("0", dimForce*dimLength, Zero)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,13 @@ add_definitions(
|
|||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG
|
set(CMAKE_CXX_FLAGS_DEBUG
|
||||||
"-g -O0 -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual"
|
"-g -O0 -std=c++0x -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual"
|
||||||
)
|
)
|
||||||
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
|
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -std=c++0x")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE
|
set(CMAKE_CXX_FLAGS_RELEASE
|
||||||
"-O3 -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual")
|
"-O3 -std=c++0x -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual")
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
set(CMAKE_C_FLAGS_RELEASE "-O3 -std=c++0x")
|
||||||
|
|
||||||
# Set output library destination to plugin directory
|
# Set output library destination to plugin directory
|
||||||
set(LIBRARY_OUTPUT_PATH $ENV{FOAM_LIBBIN}
|
set(LIBRARY_OUTPUT_PATH $ENV{FOAM_LIBBIN}
|
||||||
|
|||||||
@ -437,7 +437,7 @@ Foam::fieldVisualisationBase::fieldVisualisationBase
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
parent_(parent),
|
parent_(parent),
|
||||||
@ -489,7 +489,7 @@ Foam::fieldVisualisationBase::~fieldVisualisationBase()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::HashPtrTable<Foam::DataEntry<Foam::vector>, Foam::word>&
|
const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
|
||||||
Foam::fieldVisualisationBase::colours() const
|
Foam::fieldVisualisationBase::colours() const
|
||||||
{
|
{
|
||||||
return colours_;
|
return colours_;
|
||||||
|
|||||||
@ -39,7 +39,7 @@ SourceFiles
|
|||||||
#include "NamedEnum.H"
|
#include "NamedEnum.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "HashPtrTable.H"
|
#include "HashPtrTable.H"
|
||||||
#include "DataEntry.H"
|
#include "Function1.H"
|
||||||
|
|
||||||
#include "vtkSmartPointer.h"
|
#include "vtkSmartPointer.h"
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//- Colours
|
//- Colours
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours_;
|
const HashPtrTable<Function1<vector>, word>& colours_;
|
||||||
|
|
||||||
//- Field name
|
//- Field name
|
||||||
word fieldName_;
|
word fieldName_;
|
||||||
@ -183,7 +183,7 @@ public:
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ public:
|
|||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the colours
|
//- Return the colours
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours() const;
|
const HashPtrTable<Function1<vector>, word>& colours() const;
|
||||||
|
|
||||||
//- Return the field name
|
//- Return the field name
|
||||||
const word& fieldName() const;
|
const word& fieldName() const;
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::functionObjectCloud::functionObjectCloud
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
pointData(parent, dict, colours),
|
pointData(parent, dict, colours),
|
||||||
|
|||||||
@ -92,7 +92,7 @@ public:
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::functionObjectLine::functionObjectLine
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
pathline(parent, dict, colours),
|
pathline(parent, dict, colours),
|
||||||
|
|||||||
@ -86,7 +86,7 @@ public:
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::functionObjectSurface::functionObjectSurface
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
geometrySurface(parent, dict, colours, List<fileName>()),
|
geometrySurface(parent, dict, colours, List<fileName>()),
|
||||||
|
|||||||
@ -85,7 +85,7 @@ public:
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ Foam::geometryBase::geometryBase
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
parent_(parent),
|
parent_(parent),
|
||||||
@ -98,11 +98,11 @@ Foam::geometryBase::geometryBase
|
|||||||
|
|
||||||
if (dict.found("opacity"))
|
if (dict.found("opacity"))
|
||||||
{
|
{
|
||||||
opacity_.reset(DataEntry<scalar>::New("opacity", dict).ptr());
|
opacity_.reset(Function1<scalar>::New("opacity", dict).ptr());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
opacity_.reset(new Constant<scalar>("opacity", 1.0));
|
opacity_.reset(new Function1Types::Constant<scalar>("opacity", 1.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ Foam::scalar Foam::geometryBase::opacity(const scalar position) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::HashPtrTable<Foam::DataEntry<Foam::vector>, Foam::word>&
|
const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
|
||||||
Foam::geometryBase::colours() const
|
Foam::geometryBase::colours() const
|
||||||
{
|
{
|
||||||
return colours_;
|
return colours_;
|
||||||
|
|||||||
@ -36,7 +36,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "DataEntry.H"
|
#include "Function1.H"
|
||||||
#include "HashPtrTable.H"
|
#include "HashPtrTable.H"
|
||||||
#include "NamedEnum.H"
|
#include "NamedEnum.H"
|
||||||
|
|
||||||
@ -99,10 +99,10 @@ protected:
|
|||||||
renderModeType renderMode_;
|
renderModeType renderMode_;
|
||||||
|
|
||||||
//- Opacity
|
//- Opacity
|
||||||
autoPtr<DataEntry<scalar>> opacity_;
|
autoPtr<Function1<scalar>> opacity_;
|
||||||
|
|
||||||
//- Reference to the colours
|
//- Reference to the colours
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours_;
|
const HashPtrTable<Function1<vector>, word>& colours_;
|
||||||
|
|
||||||
|
|
||||||
// Protected functions
|
// Protected functions
|
||||||
@ -120,7 +120,7 @@ public:
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent_,
|
const runTimePostProcessing& parent_,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ public:
|
|||||||
scalar opacity(const scalar position) const;
|
scalar opacity(const scalar position) const;
|
||||||
|
|
||||||
//- Return reference to the colours
|
//- Return reference to the colours
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours() const;
|
const HashPtrTable<Function1<vector>, word>& colours() const;
|
||||||
|
|
||||||
|
|
||||||
//- Add geometry to scene
|
//- Add geometry to scene
|
||||||
|
|||||||
@ -136,7 +136,7 @@ Foam::geometrySurface::geometrySurface
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
surface(parent, dict, colours),
|
surface(parent, dict, colours),
|
||||||
@ -148,7 +148,7 @@ Foam::geometrySurface::geometrySurface
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours,
|
const HashPtrTable<Function1<vector>, word>& colours,
|
||||||
const List<fileName>& fileNames
|
const List<fileName>& fileNames
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -94,7 +94,7 @@ public:
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours,
|
const HashPtrTable<Function1<vector>, word>& colours,
|
||||||
const List<fileName>& fileNames
|
const List<fileName>& fileNames
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ Foam::pathline::pathline
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours
|
const HashPtrTable<Function1<vector>, word>& colours
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
geometryBase(parent, dict, colours),
|
geometryBase(parent, dict, colours),
|
||||||
@ -131,7 +131,7 @@ Foam::pathline::pathline
|
|||||||
{
|
{
|
||||||
if (dict.found("lineColour"))
|
if (dict.found("lineColour"))
|
||||||
{
|
{
|
||||||
lineColour_.reset(DataEntry<vector>::New("lineColour", dict).ptr());
|
lineColour_.reset(Function1<vector>::New("lineColour", dict).ptr());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -168,7 +168,7 @@ Foam::autoPtr<Foam::pathline> Foam::pathline::New
|
|||||||
(
|
(
|
||||||
const runTimePostProcessing& parent,
|
const runTimePostProcessing& parent,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const HashPtrTable<DataEntry<vector>, word>& colours,
|
const HashPtrTable<Function1<vector>, word>& colours,
|
||||||
const word& pathlineType
|
const word& pathlineType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user