diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index b06aa0b259..3e210a8530 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -122,6 +122,7 @@ $(derivedFvPatchFields)/fan/fanFvPatchFields.C $(derivedFvPatchFields)/fanPressure/fanPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C +$(derivedFvPatchFields)/fixedJump/fixedJumpFvPatchFields.C $(derivedFvPatchFields)/fixedJumpAMI/fixedJumpAMIFvPatchFields.C $(derivedFvPatchFields)/fixedMean/fixedMeanFvPatchFields.C $(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C index 193008daff..67bc7f96db 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C @@ -105,12 +105,12 @@ tmp > jumpCyclicFvPatchField::patchNeighbourField() const tmp > tpnf(new Field(this->size())); Field& pnf = tpnf(); - tmp > tjf = jump(); + tmp > tjf = jump(); if (!this->cyclicPatch().owner()) { tjf = -tjf; } - const Field& jf = tjf(); + const Field& jf = tjf(); if (this->doTransform()) { @@ -149,7 +149,8 @@ void jumpCyclicFvPatchField::updateInterfaceMatrix const labelUList& nbrFaceCells = this->cyclicPatch().neighbFvPatch().faceCells(); - if (&psiInternal == &this->internalField()) + // for AMG solve - only apply jump to finest level + if (psiInternal.size() == this->internalField().size()) { tmp > tjf = jump()().component(cmpt); if (!this->cyclicPatch().owner()) @@ -197,7 +198,8 @@ void jumpCyclicFvPatchField::updateInterfaceMatrix const labelUList& nbrFaceCells = this->cyclicPatch().neighbFvPatch().faceCells(); - if (&psiInternal == &this->internalField()) + // for AMG solve - only apply jump to finest level + if (psiInternal.size() == this->internalField().size()) { tmp > tjf = jump(); if (!this->cyclicPatch().owner()) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H index 30ec57fc54..1beef6b3b1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H @@ -72,6 +72,9 @@ protected: public: + //- Runtime type information + TypeName("fixedJump"); + // Constructors //- Construct from patch and internal field diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFields.C new file mode 100644 index 0000000000..b06849691a --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFields.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "fixedJumpFvPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makePatchFields(fixedJump); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFields.H new file mode 100644 index 0000000000..444d3259bd --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFields.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedJumpFvPatchFields_H +#define fixedJumpFvPatchFields_H + +#include "fixedJumpFvPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeFieldTypedefs(fixedJump); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFieldsFwd.H new file mode 100644 index 0000000000..97a42cfa46 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchFieldsFwd.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedJumpFvPatchFieldsFwd_H +#define fixedJumpFvPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template class fixedJumpFvPatchField; + +makePatchTypeFieldTypedefs(fixedJump); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //