From ae3b2d91920747bc47f54246e0d2a273feb92aa8 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 25 Oct 2012 10:02:42 +0100 Subject: [PATCH] ENH: Updated fixedJump boundary conditions --- .../derived/fixedJump/fixedJumpFvPatchField.C | 17 ++++++++++++++++ .../derived/fixedJump/fixedJumpFvPatchField.H | 17 ++-------------- .../fixedJumpAMI/fixedJumpAMIFvPatchField.C | 20 +++++++++++++++++++ .../fixedJumpAMI/fixedJumpAMIFvPatchField.H | 20 ++----------------- 4 files changed, 41 insertions(+), 33 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C index fd2050ffcc..6d692c4887 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C @@ -92,6 +92,23 @@ Foam::fixedJumpFvPatchField::fixedJumpFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +Foam::tmp > Foam::fixedJumpFvPatchField::jump() const +{ + if (this->cyclicPatch().owner()) + { + return jump_; + } + else + { + return refCast > + ( + this->neighbourPatchField() + ).jump(); + } +} + + template void Foam::fixedJumpFvPatchField::autoMap ( diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H index 1beef6b3b1..ba2fdc9aeb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H @@ -141,21 +141,8 @@ public: // Access - //- Return the "jump" across the patch. - virtual tmp > jump() const - { - if (this->cyclicPatch().owner()) - { - return jump_; - } - else - { - return refCast > - ( - this->neighbourPatchField() - ).jump(); - } - } + //- Return the "jump" across the patch + virtual tmp > jump() const; // Mapping functions diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C index ec60f11bc2..689981c20d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C @@ -91,6 +91,26 @@ Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +Foam::tmp > Foam::fixedJumpAMIFvPatchField::jump() const +{ + if (this->cyclicAMIPatch().owner()) + { + return jump_; + } + else + { + const fixedJumpAMIFvPatchField& nbrPatch = + refCast > + ( + this->neighbourPatchField() + ); + + return this->cyclicAMIPatch().interpolate(nbrPatch.jump()); + } +} + + template void Foam::fixedJumpAMIFvPatchField::autoMap ( diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H index d785ad5289..9e9d1a91d1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H @@ -135,24 +135,8 @@ public: // Access - //- Return the "jump" across the patch. - virtual tmp > jump() const - { - if (this->cyclicAMIPatch().owner()) - { - return jump_; - } - else - { - tmp > nbrJump = - refCast > - ( - this->neighbourPatchField() - ).jump(); - - return this->cyclicAMIPatch().interpolate(nbrJump); - } - } + //- Return the "jump" across the patch + virtual tmp > jump() const; // Mapping functions