diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index ec09ef343858351572e5a133c539bfe61c18737a..fb5df1f37015f8f4dfb4db3d12f493d5fae407ee 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -909,6 +909,8 @@ int main(int argc, char *argv[]) { if (own[faceI] != -1 && nei[faceI] != -1) { + faceToCell[1].insert(faceI, own[faceI]); + faceToCell[0].insert(faceI, nei[faceI]); cnt++; } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C index fc0739e79faf42d048b133d79b2a97f572b99388..55f6a907676e7f241fd34c11befaa23a5de4332f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceOrthogonality // Coupled faces pointField neighbourCc; - syncTools::swapBoundaryCellList(mesh, cc, neighbourCc); + syncTools::swapBoundaryCellPositions(mesh, cc, neighbourCc); forAll(pbm, patchI) { @@ -123,7 +123,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceSkewness // (i.e. treat as if mirror cell on other side) pointField neighbourCc; - syncTools::swapBoundaryCellList(mesh, cellCtrs, neighbourCc); + syncTools::swapBoundaryCellPositions(mesh, cellCtrs, neighbourCc); forAll(pbm, patchI) { diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C index 2d007ad9faf92fb439fd67bb3f897d914fdfc691..4326d43f38f3f33dd0f7ea35f86a7720e49ee2ac 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C @@ -27,6 +27,44 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +void Foam::syncTools::swapBoundaryCellPositions +( + const polyMesh& mesh, + const UList<point>& cellData, + List<point>& neighbourCellData +) +{ + if (cellData.size() != mesh.nCells()) + { + FatalErrorIn + ( + "syncTools<class T>::swapBoundaryCellPositions" + "(const polyMesh&, const UList<T>&, List<T>&)" + ) << "Number of cell values " << cellData.size() + << " is not equal to the number of cells in the mesh " + << mesh.nCells() << abort(FatalError); + } + + const polyBoundaryMesh& patches = mesh.boundaryMesh(); + + label nBnd = mesh.nFaces()-mesh.nInternalFaces(); + + neighbourCellData.setSize(nBnd); + + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + const labelUList& faceCells = pp.faceCells(); + forAll(faceCells, i) + { + label bFaceI = pp.start()+i-mesh.nInternalFaces(); + neighbourCellData[bFaceI] = cellData[faceCells[i]]; + } + } + syncTools::swapBoundaryFacePositions(mesh, neighbourCellData); +} + + Foam::PackedBoolList Foam::syncTools::getMasterPoints(const polyMesh& mesh) { PackedBoolList isMasterPoint(mesh.nPoints()); diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H index d089d04f9eaaf91baa1d76a3aad4606582160fe2..cb1484b3b0f7316358e021ddc31a5eb707545be1 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H @@ -442,18 +442,17 @@ public: } //- Swap coupled positions. - template<class T> static void swapBoundaryFacePositions ( const polyMesh& mesh, - UList<T>& l + UList<point>& l ) { syncBoundaryFaceList ( mesh, l, - eqOp<T>(), + eqOp<point>(), mapDistribute::transformPosition() ); } @@ -490,6 +489,14 @@ public: List<T>& neighbourCellData ); + //- Swap to obtain neighbour cell positions for all boundary faces + static void swapBoundaryCellPositions + ( + const polyMesh& mesh, + const UList<point>& cellData, + List<point>& neighbourCellData + ); + // Sparse versions //- Synchronize values on selected points. @@ -531,11 +538,11 @@ public: } //- Synchronize locations on selected edges. - template<class T, class CombineOp> + template<class CombineOp> static void syncEdgePositions ( const polyMesh& mesh, - EdgeMap<T>& l, + EdgeMap<point>& l, const CombineOp& cop ) { diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C index 4d08364389a89d226e35220d25902354857d0138..1a0aacd03039f349486cc1a29a8cbc5cc84dc3b3 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C @@ -104,16 +104,6 @@ Foam::coupledFvPatchField<Type>::coupledFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class Type> -Foam::tmp<Foam::Field<Type> > Foam::coupledFvPatchField<Type>::snGrad() const -{ - notImplemented("coupledFvPatchField<Type>::snGrad()"); - return - this->patch().deltaCoeffs() - *(this->patchNeighbourField() - this->patchInternalField()); -} - - template<class Type> Foam::tmp<Foam::Field<Type> > Foam::coupledFvPatchField<Type>::snGrad ( diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H index aa6610709fd8925154cff3d5b65fd11a83748ff6..4a443c6f115205304d6323c329f3b8edaf64a49c 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H @@ -145,7 +145,14 @@ public: ) const; //- Return patch-normal gradient - virtual tmp<Field<Type> > snGrad() const; + virtual tmp<Field<Type> > snGrad() const + { + notImplemented + ( + type() + "::coupledFvPatchField<Type>::snGrad()" + ); + return *this; + } //- Initialise the evaluation of the patch field virtual void initEvaluate diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C index d36da92ef362d3458dece311f13ccd69b26e2bcb..3a0f7fd1b4cc30404a2a55b955d6d935145a09d7 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,15 +28,10 @@ License #include "demandDrivenData.H" #include "transformField.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF @@ -48,7 +43,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, @@ -63,7 +58,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField // Construct by mapping given processorCyclicFvPatchField<Type> template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const processorCyclicFvPatchField<Type>& ptf, const fvPatch& p, @@ -97,7 +92,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, @@ -144,7 +139,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const processorCyclicFvPatchField<Type>& ptf ) @@ -157,7 +152,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const processorCyclicFvPatchField<Type>& ptf, const DimensionedField<Type, volMesh>& iF @@ -172,107 +167,8 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // template<class Type> -processorCyclicFvPatchField<Type>::~processorCyclicFvPatchField() +Foam::processorCyclicFvPatchField<Type>::~processorCyclicFvPatchField() {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -//template<class Type> -//tmp<Field<Type> > -//processorCyclicFvPatchField<Type>::patchNeighbourField() const -//{ -// return *this; -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::initEvaluate -//( -// const Pstream::commsTypes commsType -//) -//{ -// if (Pstream::parRun()) -// { -// procPatch_.compressedSend(commsType, this->patchInternalField()()); -// } -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::evaluate -//( -// const Pstream::commsTypes commsType -//) -//{ -// if (Pstream::parRun()) -// { -// procPatch_.compressedReceive<Type>(commsType, *this); -// -// if (doTransform()) -// { -// transform(*this, procPatch_.forwardT(), *this); -// } -// } -//} -// -// -//template<class Type> -//tmp<Field<Type> > processorCyclicFvPatchField<Type>::snGrad() const -//{ -// return this->patch().deltaCoeffs()*(*this - this->patchInternalField()); -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::initInterfaceMatrixUpdate -//( -// scalarField&, -// const scalarField& psiInternal, -// const scalarField&, -// const direction, -// const Pstream::commsTypes commsType -//) const -//{ -// procPatch_.compressedSend -// ( -// commsType, -// this->patch().patchInternalField(psiInternal)() -// ); -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::updateInterfaceMatrix -//( -// scalarField& result, -// const scalarField&, -// const scalarField& coeffs, -// const direction cmpt, -// const Pstream::commsTypes commsType -//) const -//{ -// scalarField pnf -// ( -// procPatch_.compressedReceive<scalar>(commsType, this->size())() -// ); -// -// // Transform according to the transformation tensor -// transformCoupleField(pnf, cmpt); -// -// // Multiply the field by coefficients and add into the result -// -// const labelUList& faceCells = this->patch().faceCells(); -// -// forAll(faceCells, elemI) -// { -// result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI]; -// } -//} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 5635b348be99f4a300bb1417ef2fac4f7b6a97f9..f5622451cbf45706cc3c7569aff24b2ea9bb2d1b 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -173,20 +173,10 @@ void Foam::fvPatchField<Type>::check(const fvPatchField<Type>& ptf) const } -template<class Type> -Foam::tmp<Foam::Field<Type> > Foam::fvPatchField<Type>::snGrad -( - const scalarField& deltaCoeffs -) const -{ - return deltaCoeffs*(*this - patchInternalField()); -} - - template<class Type> Foam::tmp<Foam::Field<Type> > Foam::fvPatchField<Type>::snGrad() const { - return this->snGrad(patch_.deltaCoeffs()); + return patch_.deltaCoeffs()*(*this - patchInternalField()); } diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 0167133a0361de3ace42cc03c69450915f00497e..6047f1e4af794e10a5abbcc8e89176c337a90cf6 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -347,13 +347,21 @@ public: // Evaluation functions //- Return patch-normal gradient + virtual tmp<Field<Type> > snGrad() const; + + //- Return patch-normal gradient for coupled-patches + // using the deltaCoeffs provided virtual tmp<Field<Type> > snGrad ( const scalarField& deltaCoeffs - ) const; - - //- Return patch-normal gradient - virtual tmp<Field<Type> > snGrad() const; + ) const + { + notImplemented + ( + type() + "::snGrad(const scalarField& deltaCoeffs)" + ); + return *this; + } //- Update the coefficients associated with the patch field // Sets Updated to true @@ -421,6 +429,15 @@ public: //- Return the matrix diagonal coefficients corresponding to the // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const + { + notImplemented(type() + "::gradientInternalCoeffs()"); + return *this; + } + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this coupled patchField + // using the deltaCoeffs provided virtual tmp<Field<Type> > gradientInternalCoeffs ( const scalarField& deltaCoeffs @@ -434,16 +451,17 @@ public: return *this; } - //- Return the matrix diagonal coefficients corresponding to the + //- Return the matrix source coefficients corresponding to the // evaluation of the gradient of this patchField - virtual tmp<Field<Type> > gradientInternalCoeffs() const + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const { - notImplemented(type() + "::gradientInternalCoeffs()"); + notImplemented(type() + "::gradientBoundaryCoeffs()"); return *this; } //- Return the matrix source coefficients corresponding to the - // evaluation of the gradient of this patchField + // evaluation of the gradient of this coupled patchField + // using the deltaCoeffs provided virtual tmp<Field<Type> > gradientBoundaryCoeffs ( const scalarField& deltaCoeffs @@ -457,14 +475,6 @@ public: return *this; } - //- Return the matrix source coefficients corresponding to the - // evaluation of the gradient of this patchField - virtual tmp<Field<Type> > gradientBoundaryCoeffs() const - { - notImplemented(type() + "::gradientBoundaryCoeffs()"); - return *this; - } - //- Manipulate matrix virtual void manipulateMatrix(fvMatrix<Type>& matrix); diff --git a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C index b91ec33b8285b7bbb31f417938d4c4dd810c1557..039e14555f8515fa01346f9cc2a643d563606bab 100644 --- a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,7 +120,7 @@ void Foam::searchableSurfaceToFaceZone::applyToSet // Boundary faces vectorField nbrCellCentres; - syncTools::swapBoundaryCellList(mesh_, cc, nbrCellCentres); + syncTools::swapBoundaryCellPositions(mesh_, cc, nbrCellCentres); const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C index 83fe6ae2c44b8df0b8398bf6a3770b90c5241c24..d09ec8ee554b90a6bd55c857b28ef7776a0c70ef 100644 --- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C +++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C @@ -59,12 +59,13 @@ void Foam::energyRegionCoupledFvPatchScalarField::setMethod() const { if (method_ == UNDEFINED) { - if ( - this->db().foundObject<compressible::turbulenceModel> - ( - "turbulenceModel" - ) - ) + if + ( + this->db().foundObject<compressible::turbulenceModel> + ( + "turbulenceModel" + ) + ) { method_ = FLUID; } @@ -212,8 +213,7 @@ energyRegionCoupledFvPatchScalarField const DimensionedField<scalar, volMesh>& iF ) : - LduInterfaceField<scalar>(refCast<const lduInterface>(p)), - fvPatchScalarField(p, iF), + coupledFvPatchField<scalar>(p, iF), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(UNDEFINED), nbrThermoPtr_(NULL), @@ -230,8 +230,7 @@ energyRegionCoupledFvPatchScalarField const fvPatchFieldMapper& mapper ) : - LduInterfaceField<scalar>(refCast<const lduInterface>(p)), - fvPatchScalarField(ptf, p, iF, mapper), + coupledFvPatchField<scalar>(ptf, p, iF, mapper), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(ptf.method_), nbrThermoPtr_(NULL), @@ -247,8 +246,7 @@ energyRegionCoupledFvPatchScalarField const dictionary& dict ) : - LduInterfaceField<scalar>(refCast<const lduInterface>(p)), - fvPatchScalarField(p, iF, dict), + coupledFvPatchField<scalar>(p, iF, dict), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(UNDEFINED), nbrThermoPtr_(NULL), @@ -287,8 +285,7 @@ energyRegionCoupledFvPatchScalarField const energyRegionCoupledFvPatchScalarField& ptf ) : - LduInterfaceField<scalar>(refCast<const lduInterface>(ptf.patch())), - fvPatchScalarField(ptf), + coupledFvPatchField<scalar>(ptf), regionCoupledPatch_(ptf.regionCoupledPatch_), method_(ptf.method_), nbrThermoPtr_(NULL), @@ -303,8 +300,7 @@ energyRegionCoupledFvPatchScalarField const DimensionedField<scalar, volMesh>& iF ) : - LduInterfaceField<scalar>(refCast<const lduInterface>(ptf.patch())), - fvPatchScalarField(ptf, iF), + coupledFvPatchField<scalar>(ptf, iF), regionCoupledPatch_(ptf.regionCoupledPatch_), method_(ptf.method_), nbrThermoPtr_(NULL), @@ -314,24 +310,19 @@ energyRegionCoupledFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField:: snGrad() const { return - (*this - patchInternalField())*regionCoupledPatch_.patch().deltaCoeffs(); + regionCoupledPatch_.patch().deltaCoeffs() + *(*this - patchInternalField()); } -void Foam::energyRegionCoupledFvPatchScalarField::initEvaluate -( - const Pstream::commsTypes -) +Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField:: +snGrad(const scalarField&) const { - if (!updated()) - { - updateCoeffs(); - } + return snGrad(); } @@ -365,42 +356,6 @@ void Foam::energyRegionCoupledFvPatchScalarField::evaluate } -Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField:: -valueInternalCoeffs -( - const tmp<scalarField>& w -) const -{ - return scalar(pTraits<scalar>::one)*w; -} - - -Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField:: -valueBoundaryCoeffs -( - const tmp<scalarField>& w -) const -{ - return scalar(pTraits<scalar>::one)*(1.0 - w); -} - - -Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField:: -gradientInternalCoeffs() const -{ - return - -scalar(pTraits<scalar>::one) - *regionCoupledPatch_.patch().deltaCoeffs(); -} - - -Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField:: -gradientBoundaryCoeffs() const -{ - return -this->gradientInternalCoeffs(); -} - - Foam::tmp<Foam::Field<Foam::scalar> > Foam::energyRegionCoupledFvPatchScalarField:: patchNeighbourField() const @@ -546,6 +501,7 @@ void Foam::energyRegionCoupledFvPatchScalarField::write(Ostream& os) const this->writeEntry("value", os); } + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H index 7b0b7df39c39cc18c7285241510d363bb7fbedce..7103f1f1f1224120bff0c8a43d4250e0ed0602bc 100644 --- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H +++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,22 +43,23 @@ SourceFiles #include "fvPatchField.H" #include "NamedEnum.H" #include "basicThermo.H" +#include "coupledFvPatchField.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - /*---------------------------------------------------------------------------*\ Class energyRegionCoupledFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ class energyRegionCoupledFvPatchScalarField : - public LduInterfaceField<scalar>, - public fvPatchScalarField + public coupledFvPatchField<scalar> { + public: enum kappaMethodType @@ -162,12 +163,6 @@ public: const DimensionedField<scalar, volMesh>& ); - - //- Destructor - virtual ~energyRegionCoupledFvPatchScalarField() - {} - - //- Construct and return a clone setting internal field reference virtual tmp<fvPatchField<scalar> > clone ( @@ -181,16 +176,14 @@ public: } - // Member functions + //- Destructor + virtual ~energyRegionCoupledFvPatchScalarField() + {} - // Access + // Member functions - //- Return true if this patch field is coupled - virtual bool coupled() const - { - return true; - } + // Access //- Method to obtain K word kappaMethod() const @@ -207,11 +200,13 @@ public: //- Return patch-normal gradient virtual tmp<scalarField> snGrad() const; - //- Initialise the evaluation of the patch field - virtual void initEvaluate + //- Return patch-normal gradient + // Note: the deltaCoeffs supplied are not used + virtual tmp<scalarField> snGrad ( - const Pstream::commsTypes commsType - ); + const scalarField& deltaCoeffs + ) const; + //- Evaluate the patch field virtual void evaluate @@ -219,28 +214,6 @@ public: const Pstream::commsTypes commsType ); - //- Return the matrix diagonal coefficients corresponding to the - // evaluation of the value of this patchField with given weights - virtual tmp<scalarField> valueInternalCoeffs - ( - const tmp<scalarField>& - ) const; - - //- Return the matrix source coefficients corresponding to the - // evaluation of the value of this patchField with given weights - virtual tmp<scalarField> valueBoundaryCoeffs - ( - const tmp<scalarField>& - ) const; - - //- Return the matrix diagonal coefficients corresponding to the - // evaluation of the gradient of this patchField - virtual tmp<scalarField> gradientInternalCoeffs() const; - - //- Return the matrix source coefficients corresponding to the - // evaluation of the gradient of this patchField - virtual tmp<scalarField> gradientBoundaryCoeffs() const; - // Coupled interface functionality diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/controlDict b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/controlDict index d30e569e91c1d7948b74ee4a78d850b3773e3774..9b931e305a584b4c9da6a5ba3f1b698fd943b211 100644 --- a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/controlDict +++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/controlDict @@ -49,5 +49,9 @@ adjustTimeStep no; maxCo 0.2; +functions +{ + #include "cuttingPlane" +} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/cuttingPlane b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/cuttingPlane new file mode 100644 index 0000000000000000000000000000000000000000..29b42ee98325da2a54a7563e7abdb2ebb7d4c927 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/cuttingPlane @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +cuttingPlane +{ + type surfaces; + functionObjectLibs ("libsampling.so"); + + outputControl outputTime; + + surfaceFormat vtk; + fields ( p U ); + + interpolationScheme cellPoint; + + surfaces + ( + zNormal + { + type cuttingPlane; + planeType pointAndNormal; + pointAndNormalDict + { + basePoint (0 0 0); + normalVector (0 0 1); + } + interpolate true; + } + ); +} + + +// ************************************************************************* // diff --git a/wmake/rules/linux64Icc/c++Opt b/wmake/rules/linux64Icc/c++Opt index 66638ffe984a81a2145ace8c5e44491fdb8fe2ae..2e2380eee2363254a7642b3a6472a04a446a18cc 100644 --- a/wmake/rules/linux64Icc/c++Opt +++ b/wmake/rules/linux64Icc/c++Opt @@ -1,2 +1,2 @@ c++DBUG = -c++OPT = -xSSE3 -O2 -no-prec-div +c++OPT = -xHost -O2 -no-prec-div diff --git a/wmake/rules/linuxIcc/c++Opt b/wmake/rules/linuxIcc/c++Opt index 66638ffe984a81a2145ace8c5e44491fdb8fe2ae..2e2380eee2363254a7642b3a6472a04a446a18cc 100644 --- a/wmake/rules/linuxIcc/c++Opt +++ b/wmake/rules/linuxIcc/c++Opt @@ -1,2 +1,2 @@ c++DBUG = -c++OPT = -xSSE3 -O2 -no-prec-div +c++OPT = -xHost -O2 -no-prec-div