diff --git a/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index ca265b4e25f8cf0b0383aae13ae338984a0468d8..a0bf7fc15f5170e4dd08dae42bd97e821e7596ce 100644 --- a/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -1023,6 +1023,34 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class SourcePatch, class TargetPatch> +Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation +( + const SourcePatch& srcPatch, + const TargetPatch& tgtPatch, + const faceAreaIntersect::triangulationMode& triMode +) +: + srcAddress_(), + srcWeights_(), + tgtAddress_(), + tgtWeights_(), + startSeedI_(0), + triMode_(triMode), + srcMapPtr_(NULL), + tgtMapPtr_(NULL) +{ + label srcSize = returnReduce(srcPatch.size(), sumOp<label>()); + label tgtSize = returnReduce(tgtPatch.size(), sumOp<label>()); + + Info<< "AMI: Creating addressing and weights between " + << srcSize << " source faces and " << tgtSize << " target faces" + << endl; + + update(srcPatch, tgtPatch); +} + + template<class SourcePatch, class TargetPatch> Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation ( diff --git a/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.H b/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.H index 3e7e93831aa5eaa80f0e160f47ab6ac157a98631..8ad3be39ba079b7f9d4aa2782220acc563603bea 100644 --- a/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.H +++ b/src/AMIInterpolation/AMIInterpolation/AMIInterpolation.H @@ -284,6 +284,14 @@ public: //- Construct from components AMIInterpolation + ( + const SourcePatch& srcPatch, + const TargetPatch& tgtPatch, + const faceAreaIntersect::triangulationMode& triMode + ); + + //- Construct from components, with projection surface + AMIInterpolation ( const SourcePatch& srcPatch, const TargetPatch& tgtPatch,