tmp<Field<Type> > regionCouplingFvPatchField<Type>::patchNeighbourField() const { Field<Type> sField = shadowPatchField().patchInternalField(); tmp<Field<Type> > tpnf ( regionCouplePatch_.interpolate ( shadowPatchField().patchInternalField() ) ); Field<Type>& pnf = tpnf(); if (regionCouplePatch_.bridgeOverlap()) { // Symmetry treatment used for overlap vectorField nHat = this->patch().nf(); // Use mirrored neighbour field for interpolation // HJ, 21/Jan/2009 Field<Type> bridgeField = transform(I - 2.0*sqr(nHat), this->patchInternalField()); regionCouplePatch_.bridge(bridgeField, pnf); } return tpnf; }
Foam::tmp<Foam::Field<Type> > Foam::cyclicAMIFvPatchField<Type>::patchNeighbourField() const { const Field<Type>& iField = this->internalField(); const labelUList& nbrFaceCells = cyclicAMIPatch_.cyclicAMIPatch().neighbPatch().faceCells(); Field<Type> pnf(iField, nbrFaceCells); tmp<Field<Type> > tpnf; if (cyclicAMIPatch_.applyLowWeightCorrection()) { tpnf = cyclicAMIPatch_.interpolate(pnf, this->patchInternalField()()); } else { tpnf = cyclicAMIPatch_.interpolate(pnf); } if (doTransform()) { tpnf() = transform(forwardT(), tpnf()); } return tpnf; }
Foam::tmp<Foam::gpuField<Type> > Foam::cyclicACMIFvPatchField<Type>::patchNeighbourField() const { const gpuField<Type>& iField = this->internalField(); const labelgpuList& nbrFaceCellsCoupled = cyclicACMIPatch_.cyclicACMIPatch().neighbPatch().getFaceCells(); const labelgpuList& faceCellsNonOverlap = cyclicACMIPatch_.cyclicACMIPatch().nonOverlapPatch().getFaceCells(); gpuField<Type> pnfCoupled(iField, nbrFaceCellsCoupled); gpuField<Type> pfNonOverlap(iField, faceCellsNonOverlap); tmp<gpuField<Type> > tpnf ( new gpuField<Type> ( cyclicACMIPatch_.interpolate ( pnfCoupled, pfNonOverlap ) ) ); if (doTransform()) { tpnf() = transform(getForwardT(), tpnf()); } return tpnf; }
Foam::tmp<Foam::labelField> Foam::regionCoupledBaseGAMGInterface:: internalFieldTransfer ( const Pstream::commsTypes, const labelUList& iF ) const { /* WarningIn ( "regionCoupledBaseGAMGInterface::internalFieldTransfer" "( const Pstream::commsTypes, const labelUList&)" " the internal field can not be transfered " " as the neighbFvPatch are in different meshes " ); //const labelUList& nbrFaceCells = neighbPatch().faceCells(); const labelUList& nbrFaceCells = nbrLduInterface().faceCells(); tmp<labelField> tpnf(new labelField(nbrFaceCells.size())); labelField& pnf = tpnf(); forAll(pnf, facei) { pnf[facei] = iF[nbrFaceCells[facei]]; } */ tmp<labelField> tpnf(new labelField(iF)); return tpnf; }
tmp<labelField> cyclicFvPatch::transfer ( const Pstream::commsTypes, const unallocLabelList& interfaceData ) const { tmp<labelField> tpnf(new labelField(this->size())); labelField& pnf = tpnf(); label sizeby2 = this->size()/2; for (label facei=0; facei<sizeby2; facei++) { pnf[facei] = interfaceData[facei + sizeby2]; pnf[facei + sizeby2] = interfaceData[facei]; } return tpnf; }
tmp<labelField> cyclicFvPatch::internalFieldTransfer ( const Pstream::commsTypes commsType, const unallocLabelList& iF ) const { const unallocLabelList& faceCells = this->patch().faceCells(); tmp<labelField> tpnf(new labelField(this->size())); labelField& pnf = tpnf(); label sizeby2 = this->size()/2; for (label facei=0; facei<sizeby2; facei++) { pnf[facei] = iF[faceCells[facei + sizeby2]]; pnf[facei + sizeby2] = iF[faceCells[facei]]; } return tpnf; }
tmp<Field<Type> > jumpCyclicFvPatchField<Type>::patchNeighbourField() const { const Field<Type>& iField = this->internalField(); const unallocLabelList& faceCells = this->cyclicPatch().faceCells(); tmp<Field<Type> > tpnf(new Field<Type>(this->size())); Field<Type>& pnf = tpnf(); tmp<Field<scalar> > tjf = jump(); const Field<scalar>& jf = tjf(); label sizeby2 = this->size()/2; if (this->doTransform()) { for (label facei=0; facei<sizeby2; facei++) { pnf[facei] = transform ( this->forwardT()[0], iField[faceCells[facei + sizeby2]] ) - jf[facei]; pnf[facei + sizeby2] = transform ( this->reverseT()[0], iField[faceCells[facei]] + jf[facei] ); } } else { for (label facei=0; facei<sizeby2; facei++) { pnf[facei] = iField[faceCells[facei + sizeby2]] - jf[facei]; pnf[facei + sizeby2] = iField[faceCells[facei]] + jf[facei]; } } return tpnf; }
tmp<Field<Type> > cyclicFvPatchField<Type>::patchNeighbourField() const { const Field<Type>& iField = this->internalField(); const unallocLabelList& faceCells = cyclicPatch_.faceCells(); tmp<Field<Type> > tpnf(new Field<Type>(this->size())); Field<Type>& pnf = tpnf(); label sizeby2 = this->size()/2; if (doTransform()) { for (label facei=0; facei<sizeby2; facei++) { pnf[facei] = transform ( forwardT()[0], iField[faceCells[facei + sizeby2]] ); pnf[facei + sizeby2] = transform ( reverseT()[0], iField[faceCells[facei]] ); } } else { for (label facei=0; facei<sizeby2; facei++) { pnf[facei] = iField[faceCells[facei + sizeby2]]; pnf[facei + sizeby2] = iField[faceCells[facei]]; } } return tpnf; }