mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Consistency updates after Foundation merge and code tidying
This commit is contained in:
@ -59,13 +59,13 @@ void Foam::correctedCellVolumeWeightMethod::calculateAddressing
|
||||
label srcCellI = srcSeedI;
|
||||
label tgtCellI = tgtSeedI;
|
||||
|
||||
List<DynamicList<label> > srcToTgtAddr(src_.nCells());
|
||||
List<DynamicList<scalar> > srcToTgtWght(src_.nCells());
|
||||
List<DynamicList<point> > srcToTgtVec(src_.nCells());
|
||||
List<DynamicList<label>> srcToTgtAddr(src_.nCells());
|
||||
List<DynamicList<scalar>> srcToTgtWght(src_.nCells());
|
||||
List<DynamicList<point>> srcToTgtVec(src_.nCells());
|
||||
|
||||
List<DynamicList<label> > tgtToSrcAddr(tgt_.nCells());
|
||||
List<DynamicList<scalar> > tgtToSrcWght(tgt_.nCells());
|
||||
List<DynamicList<point> > tgtToSrcVec(tgt_.nCells());
|
||||
List<DynamicList<label>> tgtToSrcAddr(tgt_.nCells());
|
||||
List<DynamicList<scalar>> tgtToSrcWght(tgt_.nCells());
|
||||
List<DynamicList<point>> tgtToSrcVec(tgt_.nCells());
|
||||
|
||||
// list of tgt cell neighbour cells
|
||||
DynamicList<label> nbrTgtCells(10);
|
||||
|
||||
@ -533,7 +533,7 @@ void Foam::meshToMesh::mapAndOpSrcToTgt
|
||||
const CombineOp& cop
|
||||
) const
|
||||
{
|
||||
tgtField = pTraits<Type>::zero;
|
||||
tgtField = Type(Zero);
|
||||
|
||||
AMI.interpolateToTarget
|
||||
(
|
||||
@ -569,7 +569,7 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
|
||||
// Clone and map (since rmap does not do general mapping)
|
||||
tmp<fvPatchField<Type> > tnewTgt
|
||||
tmp<fvPatchField<Type>> tnewTgt
|
||||
(
|
||||
fvPatchField<Type>::New
|
||||
(
|
||||
@ -728,7 +728,7 @@ template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
@ -771,7 +771,7 @@ void Foam::meshToMesh::mapAndOpTgtToSrc
|
||||
const CombineOp& cop
|
||||
) const
|
||||
{
|
||||
srcField = pTraits<Type>::zero;
|
||||
srcField = Type(Tero);
|
||||
|
||||
AMI.interpolateToSource
|
||||
(
|
||||
@ -806,7 +806,7 @@ void Foam::meshToMesh::mapTgtToSrc
|
||||
const fvPatchField<Type>& tgtField = field.boundaryField()[tgtPatchI];
|
||||
|
||||
// Clone and map (since rmap does not do general mapping)
|
||||
tmp<fvPatchField<Type> > tnewSrc
|
||||
tmp<fvPatchField<Type>> tnewSrc
|
||||
(
|
||||
fvPatchField<Type>::New
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -1181,8 +1181,8 @@ void Foam::isoSurface::trimToBox
|
||||
DynamicList<label>& triMap, // map from (new) triangle to original
|
||||
labelList& triPointMap, // map from (new) point to original
|
||||
labelList& interpolatedPoints, // labels of newly introduced points
|
||||
List<FixedList<label, 3> >& interpolatedOldPoints,// and their interpolation
|
||||
List<FixedList<scalar, 3> >& interpolationWeights
|
||||
List<FixedList<label, 3>>& interpolatedOldPoints,// and their interpolation
|
||||
List<FixedList<scalar, 3>>& interpolationWeights
|
||||
)
|
||||
{
|
||||
const List<point> oldTriPoints(triPoints);
|
||||
@ -1197,8 +1197,8 @@ void Foam::isoSurface::trimToBox
|
||||
// (interpolatedOldPoints)
|
||||
label sz = oldTriPoints.size()/100;
|
||||
DynamicList<label> dynInterpolatedPoints(sz);
|
||||
DynamicList<FixedList<label, 3> > dynInterpolatedOldPoints(sz);
|
||||
DynamicList<FixedList<scalar, 3> > dynInterpolationWeights(sz);
|
||||
DynamicList<FixedList<label, 3>> dynInterpolatedOldPoints(sz);
|
||||
DynamicList<FixedList<scalar, 3>> dynInterpolationWeights(sz);
|
||||
|
||||
|
||||
triPointMap.setSize(triPoints.size());
|
||||
|
||||
@ -143,10 +143,10 @@ class isoSurface
|
||||
DynamicList<label> interpolatedPoints_;
|
||||
|
||||
//- corresponding original, unmerged points
|
||||
DynamicList<FixedList<label, 3> > interpolatedOldPoints_;
|
||||
DynamicList<FixedList<label, 3>> interpolatedOldPoints_;
|
||||
|
||||
//- corresponding weights
|
||||
DynamicList<FixedList<scalar, 3> > interpolationWeights_;
|
||||
DynamicList<FixedList<scalar, 3>> interpolationWeights_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -330,13 +330,13 @@ class isoSurface
|
||||
) const;
|
||||
|
||||
template<class Type>
|
||||
static tmp<Field<Type> > interpolate
|
||||
static tmp<Field<Type>> interpolate
|
||||
(
|
||||
const label nPoints,
|
||||
const labelList& triPointMergeMap,
|
||||
const labelList& interpolatedPoints,
|
||||
const List<FixedList<label, 3> >& interpolatedOldPoints,
|
||||
const List<FixedList<scalar, 3> >& interpolationWeights,
|
||||
const List<FixedList<label, 3>>& interpolatedOldPoints,
|
||||
const List<FixedList<scalar, 3>>& interpolationWeights,
|
||||
const DynamicList<Type>& unmergedValues
|
||||
);
|
||||
|
||||
@ -373,8 +373,8 @@ class isoSurface
|
||||
DynamicList<label>& triMap,
|
||||
labelList& triPointMap,
|
||||
labelList& interpolatedPoints,
|
||||
List<FixedList<label, 3> >& interpolatedOldPoints,
|
||||
List<FixedList<scalar, 3> >& interpolationWeights
|
||||
List<FixedList<label, 3>>& interpolatedOldPoints,
|
||||
List<FixedList<scalar, 3>>& interpolationWeights
|
||||
);
|
||||
|
||||
//- Check single triangle for (topological) validity
|
||||
|
||||
@ -115,10 +115,10 @@ class isoSurfaceCell
|
||||
DynamicList<label> interpolatedPoints_;
|
||||
|
||||
//- corresponding original, unmerged points
|
||||
DynamicList<FixedList<label, 3> > interpolatedOldPoints_;
|
||||
DynamicList<FixedList<label, 3>> interpolatedOldPoints_;
|
||||
|
||||
//- corresponding weights
|
||||
DynamicList<FixedList<scalar, 3> > interpolationWeights_;
|
||||
DynamicList<FixedList<scalar, 3>> interpolationWeights_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -523,7 +523,7 @@ void Foam::isoSurfaceCell::generateTriPoints
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::isoSurfaceCell::interpolate
|
||||
(
|
||||
const Field<Type>& cCoords,
|
||||
|
||||
@ -735,20 +735,20 @@ void Foam::isoSurface::generateTriPoints
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::isoSurface::interpolate
|
||||
(
|
||||
const label nPoints,
|
||||
const labelList& triPointMergeMap,
|
||||
const labelList& interpolatedPoints,
|
||||
const List<FixedList<label, 3> >& interpolatedOldPoints,
|
||||
const List<FixedList<scalar, 3> >& interpolationWeights,
|
||||
const List<FixedList<label, 3>>& interpolatedOldPoints,
|
||||
const List<FixedList<scalar, 3>>& interpolationWeights,
|
||||
const DynamicList<Type>& unmergedValues
|
||||
)
|
||||
{
|
||||
// One value per point
|
||||
tmp<Field<Type> > tvalues(new Field<Type>(nPoints, pTraits<Type>::zero));
|
||||
Field<Type>& values = tvalues();
|
||||
tmp<Field<Type>> tvalues(new Field<Type>(nPoints, Type(Zero)));
|
||||
Field<Type>& values = tvalues.ref();
|
||||
|
||||
|
||||
// Pass1: unweighted average of merged point values
|
||||
@ -786,7 +786,7 @@ Foam::isoSurface::interpolate
|
||||
|
||||
// Note: zeroing should not be necessary if interpolation only done
|
||||
// for newly introduced points (i.e. not in triPointMergeMap)
|
||||
values[pointI] = pTraits<Type>::zero;
|
||||
values[pointI] = Type(Zero);
|
||||
forAll(oldPoints, j)
|
||||
{
|
||||
values[pointI] = w[j]*unmergedValues[oldPoints[j]];
|
||||
@ -798,7 +798,7 @@ Foam::isoSurface::interpolate
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::isoSurface::interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& cCoords,
|
||||
|
||||
@ -123,7 +123,7 @@ Foam::fileName Foam::boundaryDataSurfaceWriter::writeTemplate
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
pTraits<Type>::zero,
|
||||
Type(Zero),
|
||||
values
|
||||
);
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ namespace Foam
|
||||
|
||||
|
||||
#define defineSurfaceWriterWriteField(ThisClass, FieldType) \
|
||||
void ThisClass::write \
|
||||
Foam::fileName ThisClass::write \
|
||||
( \
|
||||
const fileName& outputDir, \
|
||||
const fileName& surfaceName, \
|
||||
@ -59,7 +59,7 @@ namespace Foam
|
||||
const bool verbose \
|
||||
) const \
|
||||
{ \
|
||||
writeTemplate \
|
||||
return writeTemplate \
|
||||
( \
|
||||
outputDir, \
|
||||
surfaceName, \
|
||||
|
||||
Reference in New Issue
Block a user