mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Clean-up up AMI write patch/weights
This commit is contained in:
@ -850,14 +850,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "AMI: calcAddressing" << endl;
|
||||
writePatch(srcPatch, "VTK", "source");
|
||||
writePatch(tgtPatch, "VTK", "target");
|
||||
}
|
||||
|
||||
// temporary storage for addressing and weights
|
||||
List<DynamicList<label> > srcAddr(srcPatch.size());
|
||||
List<DynamicList<scalar> > srcWght(srcPatch.size());
|
||||
@ -1307,8 +1299,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
|
||||
|
||||
if (debug)
|
||||
{
|
||||
writeWeights(srcWeights_, srcPatch, "VTK", "source");
|
||||
writeWeights(tgtWeights_, tgtPatch, "VTK", "target");
|
||||
writeFaceConnectivity(srcPatch, newTgtPatch, srcAddress_);
|
||||
}
|
||||
}
|
||||
@ -1318,12 +1308,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
|
||||
|
||||
calcAddressing(srcPatch, tgtPatch);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
writeWeights(srcWeights_, srcPatch, "VTK", "source");
|
||||
writeWeights(tgtWeights_, tgtPatch, "VTK", "target");
|
||||
}
|
||||
|
||||
normaliseWeights(srcPatch, "source", srcAddress_, srcWeights_, true);
|
||||
normaliseWeights(tgtPatch, "target", tgtAddress_, tgtWeights_, true);
|
||||
}
|
||||
@ -1576,74 +1560,4 @@ const
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::writeWeights
|
||||
(
|
||||
const scalarListList& weights,
|
||||
const primitivePatch& patch,
|
||||
const word& folder,
|
||||
const word& prefix
|
||||
)
|
||||
const
|
||||
{
|
||||
/*
|
||||
static label i = 0;
|
||||
|
||||
scalarField wghtSum(weights.size(), 0.0);
|
||||
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
scalar s = sum(weights[faceI]);
|
||||
wghtSum[faceI] = s;
|
||||
}
|
||||
|
||||
vtkSurfaceWriter writer;
|
||||
|
||||
writer.write
|
||||
(
|
||||
folder,
|
||||
prefix
|
||||
+ '_' + Foam::name(i) + "_proc" + Foam::name(Pstream::myProcNo()),
|
||||
patch.localPoints(),
|
||||
patch.localFaces(),
|
||||
"weights",
|
||||
wghtSum,
|
||||
false
|
||||
);
|
||||
|
||||
i++;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::writePatch
|
||||
(
|
||||
const primitivePatch& patch,
|
||||
const word& folder,
|
||||
const word& prefix
|
||||
)
|
||||
const
|
||||
{
|
||||
/*
|
||||
static label i = 0;
|
||||
|
||||
vtkSurfaceWriter writer;
|
||||
writer.write
|
||||
(
|
||||
folder,
|
||||
prefix
|
||||
+ '_' + Foam::name(i) + "_proc" + Foam::name(Pstream::myProcNo()),
|
||||
patch.localPoints(),
|
||||
patch.localFaces(),
|
||||
"AMIPatch",
|
||||
scalarField(patch.size(), Pstream::myProcNo()),
|
||||
false
|
||||
);
|
||||
|
||||
i++;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -416,25 +416,6 @@ public:
|
||||
const primitivePatch& tgtPatch,
|
||||
const labelListList& srcAddress
|
||||
) const;
|
||||
|
||||
//- Write weights to VTK file
|
||||
void writeWeights
|
||||
(
|
||||
const scalarListList& weights,
|
||||
const primitivePatch& patch,
|
||||
const word& folder,
|
||||
const word& prefix
|
||||
)
|
||||
const;
|
||||
|
||||
//- Write patch
|
||||
void writePatch
|
||||
(
|
||||
const primitivePatch& patch,
|
||||
const word& folder,
|
||||
const word& prefix
|
||||
)
|
||||
const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user