Commit 4e99a6f3 authored by andy's avatar andy
Browse files

ENH: Clean-up up AMI write patch/weights

parent 3d03da8e
......@@ -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;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment