Compare commits
20 Commits
OpenFOAM-v
...
OpenFOAM-v
| Author | SHA1 | Date | |
|---|---|---|---|
| 6740925621 | |||
| 19b90a1130 | |||
| 21dda3254c | |||
| dbed3a0602 | |||
| 8d3efa1cb9 | |||
| a8c9b5936e | |||
| a334aaae78 | |||
| ae8ccd7b94 | |||
| 0ee7a23504 | |||
| 9913dfb31a | |||
| 77c31a7bef | |||
| 4245909efb | |||
| d70e11195c | |||
| f88feaf0d4 | |||
| c9b34c52bb | |||
| 81629a44d0 | |||
| 4561717c51 | |||
| b84caecc1e | |||
| d2c0c97af8 | |||
| 2f449c57ce |
@ -1,2 +1,2 @@
|
||||
api=2012
|
||||
patch=0
|
||||
patch=210414
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -813,7 +813,9 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
|
||||
|
||||
for (auto& pfld : bfld)
|
||||
{
|
||||
if (pfld.patch().coupled())
|
||||
const auto& fvp = pfld.patch();
|
||||
|
||||
if (fvp.coupled() && !isA<cyclicACMIFvPatch>(fvp))
|
||||
{
|
||||
pfld.evaluate(Pstream::defaultCommsType);
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -771,7 +771,7 @@ int main(int argc, char *argv[])
|
||||
expressions::exprString
|
||||
expression
|
||||
(
|
||||
args[expression],
|
||||
args["expression"],
|
||||
dictionary::null
|
||||
);
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -140,8 +140,8 @@ do
|
||||
esac
|
||||
else
|
||||
echo "Ignore bad/invalid plugin-path: $pluginPath" 1>&2
|
||||
unset pluginPath
|
||||
fi
|
||||
unset pluginPath
|
||||
;;
|
||||
|
||||
-block*) # Silently accepts -blockMesh
|
||||
@ -238,8 +238,11 @@ then
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$pluginError" ]
|
||||
if [ -z "$pluginError" ]
|
||||
then
|
||||
# Ensure plugin is also in the lib-path
|
||||
LD_LIBRARY_PATH="${PV_PLUGIN_PATH}:$LD_LIBRARY_PATH"
|
||||
else
|
||||
cat<< NO_PLUGIN 1>&2
|
||||
$pluginError
|
||||
See '${0##*/} -help-build' for more information
|
||||
|
||||
@ -52,7 +52,7 @@ Foam::functionObjects::FUNCTIONOBJECT::FUNCTIONOBJECT
|
||||
)
|
||||
:
|
||||
fvMeshFunctionObject(name, runTime, dict),
|
||||
boolData_(dict.getOrDefault<bool>("boolData"), true),
|
||||
boolData_(dict.getOrDefault<bool>("boolData", true)),
|
||||
labelData_(dict.get<label>("labelData")),
|
||||
wordData_(dict.getOrDefault<word>("wordData", "defaultWord")),
|
||||
scalarData_(dict.getOrDefault<scalar>("scalarData", 1.0))
|
||||
|
||||
@ -44,7 +44,7 @@ coldAndHot
|
||||
fire
|
||||
{
|
||||
// ParaView: Black-Body Radiation
|
||||
interpolate rbg;
|
||||
interpolate rgb;
|
||||
|
||||
table
|
||||
(
|
||||
@ -70,7 +70,7 @@ rainbow
|
||||
greyscale
|
||||
{
|
||||
// ParaView: grayscale
|
||||
interpolate rbg;
|
||||
interpolate rgb;
|
||||
|
||||
table
|
||||
(
|
||||
@ -82,7 +82,7 @@ greyscale
|
||||
xray
|
||||
{
|
||||
// ParaView: "X ray"
|
||||
interpolate rbg;
|
||||
interpolate rgb;
|
||||
|
||||
table
|
||||
(
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -136,8 +136,8 @@ public:
|
||||
|
||||
// Read Functions
|
||||
|
||||
//- Read into given buffer from given processor and return the
|
||||
// message size
|
||||
//- Read into given buffer from given processor
|
||||
// \return the message size
|
||||
static label read
|
||||
(
|
||||
const commsTypes commsType,
|
||||
@ -145,7 +145,7 @@ public:
|
||||
char* buf,
|
||||
const std::streamsize bufSize,
|
||||
const int tag = UPstream::msgType(),
|
||||
const label communicator = 0
|
||||
const label communicator = UPstream::worldComm
|
||||
);
|
||||
|
||||
//- Return next token from stream
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -104,7 +104,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct given process index to send to and optional buffer size,
|
||||
// write format and IO version
|
||||
//- write format and IO version
|
||||
UOPstream
|
||||
(
|
||||
const commsTypes commsType,
|
||||
@ -146,7 +146,7 @@ public:
|
||||
const char* buf,
|
||||
const std::streamsize bufSize,
|
||||
const int tag = UPstream::msgType(),
|
||||
const label communicator = 0
|
||||
const label communicator = UPstream::worldComm
|
||||
);
|
||||
|
||||
//- Write token to stream or otherwise handle it.
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -26,7 +26,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
@ -55,20 +55,22 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
|
||||
if
|
||||
(
|
||||
actualPatchType == word::null
|
||||
actualPatchType.empty()
|
||||
|| actualPatchType != p.type()
|
||||
)
|
||||
{
|
||||
if (pfPtr().constraintType() != p.constraintType())
|
||||
{
|
||||
// Use default constraint type
|
||||
// Incompatible (constraint-wise) with the patch type
|
||||
// - use default constraint type
|
||||
|
||||
auto patchTypeCstrIter =
|
||||
pointPatchConstructorTablePtr_->cfind(p.type());
|
||||
|
||||
if (!patchTypeCstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "inconsistent patch and patchField types for \n"
|
||||
<< "Inconsistent patch and patchField types for\n"
|
||||
<< " patch type " << p.type()
|
||||
<< " and patchField type " << patchFieldType
|
||||
<< exit(FatalError);
|
||||
@ -138,20 +140,17 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
|
||||
if
|
||||
(
|
||||
!dict.found("patchType")
|
||||
!dict.found("patchType")
|
||||
|| dict.get<word>("patchType") != p.type()
|
||||
)
|
||||
{
|
||||
if (pfPtr().constraintType() == p.constraintType())
|
||||
if (pfPtr().constraintType() != p.constraintType())
|
||||
{
|
||||
// Compatible (constraint-wise) with the patch type
|
||||
return pfPtr;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use default constraint type
|
||||
auto patchTypeCstrIter
|
||||
= dictionaryConstructorTablePtr_->cfind(p.type());
|
||||
// Incompatible (constraint-wise) with the patch type
|
||||
// - use default constraint type
|
||||
|
||||
auto patchTypeCstrIter =
|
||||
dictionaryConstructorTablePtr_->cfind(p.type());
|
||||
|
||||
if (!patchTypeCstrIter.found())
|
||||
{
|
||||
@ -166,7 +165,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
}
|
||||
}
|
||||
|
||||
return cstrIter()(p, iF, dict);
|
||||
return pfPtr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016, 2020 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -118,6 +118,7 @@ Foam::labelList Foam::polyMesh::facePatchFaceCells
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "face " << fI << " in patch " << patchID
|
||||
<< " vertices " << UIndirectList<point>(points(), curFace)
|
||||
<< " does not have neighbour cell"
|
||||
<< " face: " << patchFaces[fI]
|
||||
<< abort(FatalError);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -114,9 +114,9 @@ void Foam::primitiveMeshTools::makeCellCentresAndVols
|
||||
{
|
||||
typedef Vector<solveScalar> solveVector;
|
||||
|
||||
PrecisionAdaptor<solveVector, vector> tcellCtrs(cellCtrs_s);
|
||||
PrecisionAdaptor<solveVector, vector> tcellCtrs(cellCtrs_s, false);
|
||||
PrecisionAdaptor<solveScalar, scalar> tcellVols(cellVols_s, false);
|
||||
Field<solveVector>& cellCtrs = tcellCtrs.ref();
|
||||
PrecisionAdaptor<solveScalar, scalar> tcellVols(cellVols_s);
|
||||
Field<solveScalar>& cellVols = tcellVols.ref();
|
||||
|
||||
// Clear the fields for accumulation
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -199,6 +199,9 @@ void Foam::ensightMesh::correct()
|
||||
|
||||
if (returnReduce(!zn.empty(), orOp<bool>()))
|
||||
{
|
||||
// Ensure full mesh coverage
|
||||
cellSelection.resize(mesh_.nCells());
|
||||
|
||||
cellSelection.set(zn);
|
||||
|
||||
ensightCells& part = cellZoneParts_(zoneId);
|
||||
@ -267,6 +270,7 @@ void Foam::ensightMesh::correct()
|
||||
|
||||
if (returnReduce(!cellSelection.empty(), orOp<bool>()))
|
||||
{
|
||||
// Ensure full mesh coverage
|
||||
excludeFace.resize(mesh_.nFaces());
|
||||
|
||||
const labelList& owner = mesh_.faceOwner();
|
||||
@ -288,6 +292,7 @@ void Foam::ensightMesh::correct()
|
||||
|
||||
if (fzoneIds.size())
|
||||
{
|
||||
// Ensure full mesh coverage
|
||||
excludeFace.resize(mesh_.nFaces());
|
||||
|
||||
for (const polyPatch& p : mesh_.boundaryMesh())
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -220,6 +220,9 @@ bool Foam::functionObjects::Curle::execute()
|
||||
sum((pp*sqr(invMagR) + invMagR/c0_*dpdtp)*(Sfp & r));
|
||||
}
|
||||
}
|
||||
|
||||
pDash /= 4*mathematical::pi;
|
||||
|
||||
Pstream::listCombineGather(pDash, plusEqOp<scalar>());
|
||||
Pstream::listCombineScatter(pDash);
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1051,15 +1051,6 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::read
|
||||
|
||||
if (usesWeight())
|
||||
{
|
||||
if (stSampled == regionType_)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Cannot use weighted operation '"
|
||||
<< operationTypeNames_[operation_]
|
||||
<< "' for sampledSurface"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
// Can have "weightFields" or "weightField"
|
||||
|
||||
bool missing = true;
|
||||
@ -1130,6 +1121,9 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::read
|
||||
)
|
||||
);
|
||||
|
||||
// Propagate field counts (per surface)
|
||||
surfaceWriterPtr_->nFields() = fields_.size();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
surfaceWriterPtr_->verbose(true);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -96,18 +96,13 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::getFieldValues
|
||||
|
||||
if (sampledPtr_)
|
||||
{
|
||||
if (sampledPtr_->interpolate())
|
||||
{
|
||||
const interpolationCellPoint<Type> interp(fld);
|
||||
// Could be runtime selectable
|
||||
// auto sampler = interpolation<Type>::New(sampleFaceScheme_, fld);
|
||||
|
||||
return sampledPtr_->interpolate(interp);
|
||||
}
|
||||
else
|
||||
{
|
||||
const interpolationCell<Type> interp(fld);
|
||||
// const interpolationCellPoint<Type> interp(fld);
|
||||
const interpolationCell<Type> interp(fld);
|
||||
|
||||
return sampledPtr_->sample(interp);
|
||||
}
|
||||
return sampledPtr_->sample(interp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -324,6 +319,30 @@ Foam::label Foam::functionObjects::fieldValues::surfaceFieldValue::writeAll
|
||||
{
|
||||
label nProcessed = 0;
|
||||
|
||||
// If using the surface writer, the points/faces parameters have already
|
||||
// been merged on the master and the writeValues routine will also gather
|
||||
// all data onto the master before calling the writer.
|
||||
// Thus only call the writer on master!
|
||||
|
||||
// Begin writer time step
|
||||
if (Pstream::master() && surfaceWriterPtr_ && surfaceWriterPtr_->enabled())
|
||||
{
|
||||
auto& writer = *surfaceWriterPtr_;
|
||||
|
||||
writer.open
|
||||
(
|
||||
points,
|
||||
faces,
|
||||
(
|
||||
outputDir()
|
||||
/ regionTypeNames_[regionType_] + ("_" + regionName_)
|
||||
),
|
||||
false // serial - already merged
|
||||
);
|
||||
|
||||
writer.beginTime(time_);
|
||||
}
|
||||
|
||||
for (const word& fieldName : fields_)
|
||||
{
|
||||
if
|
||||
@ -349,6 +368,23 @@ Foam::label Foam::functionObjects::fieldValues::surfaceFieldValue::writeAll
|
||||
}
|
||||
}
|
||||
|
||||
// Finish writer time step
|
||||
if (Pstream::master() && surfaceWriterPtr_ && surfaceWriterPtr_->enabled())
|
||||
{
|
||||
auto& writer = *surfaceWriterPtr_;
|
||||
|
||||
// Write geometry if no fields were written so that we still
|
||||
// can have something to look at.
|
||||
|
||||
if (!writer.wroteData())
|
||||
{
|
||||
writer.write();
|
||||
}
|
||||
|
||||
writer.endTime();
|
||||
writer.clear();
|
||||
}
|
||||
|
||||
return nProcessed;
|
||||
}
|
||||
|
||||
@ -377,20 +413,13 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
surfaceWriterPtr_->open
|
||||
(
|
||||
points,
|
||||
faces,
|
||||
(
|
||||
outputDir()
|
||||
/ regionTypeNames_[regionType_] + ("_" + regionName_)
|
||||
),
|
||||
false // serial - already merged
|
||||
);
|
||||
fileName outputName =
|
||||
surfaceWriterPtr_->write(fieldName, allValues);
|
||||
|
||||
surfaceWriterPtr_->write(fieldName, allValues);
|
||||
|
||||
surfaceWriterPtr_->clear();
|
||||
// Case-local file name with "<case>" to make relocatable
|
||||
dictionary propsDict;
|
||||
propsDict.add("file", time_.relativePath(outputName, true));
|
||||
this->setProperty(fieldName, propsDict);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -396,22 +396,43 @@ Foam::AABBTree<Type>::AABBTree
|
||||
// transfer flattened tree to persistent storage
|
||||
DynamicList<treeBoundBox> boundBoxes(2*bbs.size());
|
||||
DynamicList<labelList> addressing(2*addr.size());
|
||||
|
||||
forAll(nodes, nodeI)
|
||||
{
|
||||
if (nodes[nodeI].first() < 0)
|
||||
{
|
||||
boundBoxes.append(bbs[nodeI].first());
|
||||
addressing.append(addr[nodeI + 1]);
|
||||
addressing.append(addr[-(nodes[nodeI].first() + 1)]);
|
||||
}
|
||||
if (nodes[nodeI].second() < 0)
|
||||
{
|
||||
boundBoxes.append(bbs[nodeI].second());
|
||||
addressing.append(addr[nodeI + 1]);
|
||||
addressing.append(addr[-(nodes[nodeI].second() + 1)]);
|
||||
}
|
||||
}
|
||||
|
||||
boundBoxes_.transfer(boundBoxes);
|
||||
addressing_.transfer(addressing);
|
||||
|
||||
|
||||
if (0)
|
||||
{
|
||||
bitSet checked(objects.size());
|
||||
for (const auto& box : addressing_)
|
||||
{
|
||||
for (const auto& id : box)
|
||||
{
|
||||
checked.set(id);
|
||||
}
|
||||
}
|
||||
|
||||
const label unsetSize = checked.count(false);
|
||||
|
||||
if (unsetSize)
|
||||
{
|
||||
Info<< "*** Problem: IDs not set: " << unsetSize << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -142,8 +142,7 @@ public:
|
||||
AABBTree();
|
||||
|
||||
//- Construct from components
|
||||
// equalBinSize: divide into equal number of elements or
|
||||
// equal span
|
||||
// equalBinSize: divide into equal number of elements or equal span
|
||||
AABBTree
|
||||
(
|
||||
const UList<Type>& objects,
|
||||
@ -171,7 +170,7 @@ public:
|
||||
bool pointInside(const point& pt) const;
|
||||
|
||||
//- Determine whether a bounding box overlaps the tree bounding
|
||||
// boxes
|
||||
//- boxes
|
||||
bool overlaps(const boundBox& bbIn) const;
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ template<class Type>
|
||||
void Foam::mappedPatchBase::distribute(List<Type>& lst) const
|
||||
{
|
||||
const label oldComm(Pstream::warnComm);
|
||||
Pstream::warnComm = map().comm();
|
||||
Pstream::warnComm = comm_;
|
||||
switch (mode_)
|
||||
{
|
||||
case NEARESTPATCHFACEAMI:
|
||||
@ -96,7 +96,7 @@ template<class Type>
|
||||
void Foam::mappedPatchBase::reverseDistribute(List<Type>& lst) const
|
||||
{
|
||||
const label oldComm(Pstream::warnComm);
|
||||
Pstream::warnComm = map().comm();
|
||||
Pstream::warnComm = comm_;
|
||||
switch (mode_)
|
||||
{
|
||||
case NEARESTPATCHFACEAMI:
|
||||
@ -125,7 +125,7 @@ void Foam::mappedPatchBase::reverseDistribute
|
||||
) const
|
||||
{
|
||||
const label oldComm(Pstream::warnComm);
|
||||
Pstream::warnComm = map().comm();
|
||||
Pstream::warnComm = comm_;
|
||||
switch (mode_)
|
||||
{
|
||||
case NEARESTPATCHFACEAMI:
|
||||
|
||||
@ -81,6 +81,10 @@ void Foam::noiseModel::setOctaveBands
|
||||
|
||||
// Convert to lower band limit
|
||||
fTest /= fRatioL2C;
|
||||
while (fTest < fLower)
|
||||
{
|
||||
fTest *= fRatio;
|
||||
}
|
||||
|
||||
forAll(f, i)
|
||||
{
|
||||
@ -434,6 +438,11 @@ Foam::scalar Foam::noiseModel::RAf(const scalar f) const
|
||||
|
||||
Foam::scalar Foam::noiseModel::gainA(const scalar f) const
|
||||
{
|
||||
if (f < SMALL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 20*log10(RAf(f)) - 20*log10(RAf(1000));
|
||||
}
|
||||
|
||||
@ -456,6 +465,11 @@ Foam::scalar Foam::noiseModel::RBf(const scalar f) const
|
||||
|
||||
Foam::scalar Foam::noiseModel::gainB(const scalar f) const
|
||||
{
|
||||
if (f < SMALL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 20*log10(RBf(f)) - 20*log10(RBf(1000));
|
||||
}
|
||||
|
||||
@ -473,6 +487,11 @@ Foam::scalar Foam::noiseModel::RCf(const scalar f) const
|
||||
|
||||
Foam::scalar Foam::noiseModel::gainC(const scalar f) const
|
||||
{
|
||||
if (f < SMALL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 20*log10(RCf(f)) - 20*log10(RCf(1000));
|
||||
}
|
||||
|
||||
@ -492,6 +511,11 @@ Foam::scalar Foam::noiseModel::RDf(const scalar f) const
|
||||
|
||||
Foam::scalar Foam::noiseModel::gainD(const scalar f) const
|
||||
{
|
||||
if (f < SMALL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 20*log10(RDf(f));
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -215,7 +215,7 @@ protected:
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("samplediIsoSurfacePoint");
|
||||
TypeName("sampledIsoSurface");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
@ -27,8 +27,7 @@ Class
|
||||
Foam::sampledFaceZone
|
||||
|
||||
Description
|
||||
A sampledSurface defined by the cell faces corresponding to a threshold
|
||||
value.
|
||||
A sampledSurface defined by a faceZone or faceZones.
|
||||
|
||||
This is often embedded as part of a sampled surfaces function object.
|
||||
|
||||
@ -287,7 +286,6 @@ public:
|
||||
) const;
|
||||
|
||||
|
||||
|
||||
// Interpolate
|
||||
|
||||
//- Interpolate volume field onto surface points
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -416,11 +416,11 @@ bool Foam::surfaceWriter::empty() const
|
||||
|
||||
Foam::label Foam::surfaceWriter::size() const
|
||||
{
|
||||
const bool value =
|
||||
const label value =
|
||||
(
|
||||
useComponents_
|
||||
? surfComp_.faces().empty()
|
||||
: surf_.get().faces().empty()
|
||||
? surfComp_.faces().size()
|
||||
: surf_.get().faces().size()
|
||||
);
|
||||
|
||||
return (parallel_ ? returnReduce(value, sumOp<label>()) : value);
|
||||
|
||||
Reference in New Issue
Block a user