diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/componentMixed/componentMixedPointPatchVectorField.C b/src/OpenFOAM/fields/pointPatchFields/derived/componentMixed/componentMixedPointPatchVectorField.C deleted file mode 100644 index 4423e3b6f5..0000000000 --- a/src/OpenFOAM/fields/pointPatchFields/derived/componentMixed/componentMixedPointPatchVectorField.C +++ /dev/null @@ -1,222 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "ComponentMixedPointPatchVectorField.H" -#include "PointPatchFieldMapper.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -< - template class PatchField, - class PointPatch -> -void ComponentMixedPointPatchVectorField -::checkFieldSize() const -{ - if - ( - this->size() != this->patch().size() - || refValue_.size() != this->patch().size() - || valueFraction_.size() != this->patch().size() - ) - { - FatalErrorIn - ( - "void ComponentMixedPointPatchVectorField::checkField() const" - ) << "field does not correspond to patch. " << endl - << "Field size: " << this->size() - << " value size: " << refValue_.size() - << " valueFraction size: " << valueFraction_.size() - << " patch size: " << this->patch().size() - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -< - template class PatchField, - class PointPatch -> -ComponentMixedPointPatchVectorField:: -ComponentMixedPointPatchVectorField -( - const PointPatch& p, - const DimensionedField& iF -) -: - PatchField(p, iF), - refValue_(p.size()), - valueFraction_(p.size()) -{} - - -template -< - template class PatchField, - class PointPatch -> -ComponentMixedPointPatchVectorField:: -ComponentMixedPointPatchVectorField -( - const PointPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - PatchField(p, iF, dict), - refValue_("refValue", dict, p.size()), - valueFraction_("valueFraction", dict, p.size()) -{} - - -template -< - template class PatchField, - class PointPatch -> -ComponentMixedPointPatchVectorField:: -ComponentMixedPointPatchVectorField -( - const ComponentMixedPointPatchVectorField& ptf, - const PointPatch& p, - const DimensionedField& iF, - const PointPatchFieldMapper& mapper -) -: - PatchField(ptf, iF), - refValue_(ptf.refValue_, mapper), - valueFraction_(ptf.valueFraction_, mapper) -{} - - -template -< - template class PatchField, - class PointPatch -> -ComponentMixedPointPatchVectorField:: -ComponentMixedPointPatchVectorField -( - const ComponentMixedPointPatchVectorField& ptf, - const DimensionedField& iF -) -: - PatchField(ptf, iF), - refValue_(ptf.refValue_), - valueFraction_(ptf.valueFraction_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -< - template class PatchField, - class PointPatch -> -void ComponentMixedPointPatchVectorField::autoMap -( - const PointPatchFieldMapper& m -) -{ - refValue_.autoMap(m); - valueFraction_.autoMap(m); -} - - -// Grab the values using rmap -template -< - template class PatchField, - class PointPatch -> -void ComponentMixedPointPatchVectorField::rmap -( - const PointPatchField& ptf, - const labelList& addr -) -{ - const ComponentMixedPointPatchVectorField& mptf = - refCast(ptf); - - refValue_.rmap(mptf.refValue_, addr); - valueFraction_.rmap(mptf.valueFraction_, addr); -} - - -// Evaluate patch field -template -< - template class PatchField, - class PointPatch -> -void ComponentMixedPointPatchVectorField::evaluate -( - const Pstream::commsTypes -) -{ - tmp internalValues = this->patchInternalField(); - - // Get internal field to insert values into - Field& iF = const_cast(this->internalField()); - - vectorField values = - cmptMultiply(refValue_, valueFraction_) - + cmptMultiply(internalValues, vector::one - valueFraction_); - - this->setInInternalField(iF, values); -} - - -// Write -template -< - template class PatchField, - class PointPatch -> -void ComponentMixedPointPatchVectorField:: -write(Ostream& os) const -{ - PatchField::write(os); - refValue_.writeEntry("refValue", os); - valueFraction_.writeEntry("valueFraction", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/componentMixed/componentMixedPointPatchVectorField.H b/src/OpenFOAM/fields/pointPatchFields/derived/componentMixed/componentMixedPointPatchVectorField.H deleted file mode 100644 index 13ae98620d..0000000000 --- a/src/OpenFOAM/fields/pointPatchFields/derived/componentMixed/componentMixedPointPatchVectorField.H +++ /dev/null @@ -1,218 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::ComponentMixedPointPatchVectorField - -Description - The boundary condition is a mix of a fixedValue and a zeroGradient - boundary condition, where a fixedValue/zeroGradient mix may be - different for each direction. - - I am still not sure how to do the fixedValue-fixedGradient - combination. - -SourceFiles - ComponentMixedPointPatchVectorField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef ComponentMixedPointPatchVectorField_H -#define ComponentMixedPointPatchVectorField_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class ComponentMixedPointPatchVectorField Declaration -\*---------------------------------------------------------------------------*/ - -template -< - template class PatchField, - class PointPatch -> -class ComponentMixedPointPatchVectorField -: - public PatchField -{ - // Private data - - //- Fraction vector of value used for boundary condition - vectorField refValue_; - - //- Fraction vector of value used for boundary condition - vectorField valueFraction_; - - - // Private member functions - - void checkFieldSize() const; - - -public: - - //- Runtime type information - TypeName("componentMixed"); - - - // Constructors - - //- Construct from patch and internal field - ComponentMixedPointPatchVectorField - ( - const PointPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - ComponentMixedPointPatchVectorField - ( - const PointPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given patchVectorField onto a new patch - ComponentMixedPointPatchVectorField - ( - const ComponentMixedPointPatchVectorField&, - const PointPatch&, - const DimensionedField&, - const PointPatchFieldMapper& - ); - - //- Construct and return a clone - virtual autoPtr > clone() const - { - return autoPtr > - ( - new ComponentMixedPointPatchVectorField - - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - ComponentMixedPointPatchVectorField - ( - const ComponentMixedPointPatchVectorField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual autoPtr > clone - ( - const DimensionedField& iF - ) const - { - return autoPtr > - ( - new ComponentMixedPointPatchVectorField - - ( - *this, - iF - ) - ); - } - - - // Member functions - - // Return defining fields - - virtual vectorField& refValue() - { - return refValue_; - } - - virtual const vectorField& refValue() const - { - return refValue_; - } - - - virtual vectorField& valueFraction() - { - return valueFraction_; - } - - virtual const vectorField& valueFraction() const - { - return valueFraction_; - } - - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap - ( - const PointPatchFieldMapper& - ); - - //- Reverse map the given PointPatchVectorField onto - // this PointPatchVectorField - virtual void rmap - ( - const PointPatchField&, - const labelList& - ); - - - // Evaluation functions - - //- Insert boundary value into the internal field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::Pstream::blocking - ); - - - //- Write - virtual void write(Ostream&) const; - -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "ComponentMixedPointPatchVectorField.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* //