diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedField.H deleted file mode 100644 index d9e1d3555b..0000000000 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedField.H +++ /dev/null @@ -1,137 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 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 . - -Class - Foam::SubDimensionedField - -Description - SubDimensionedField is a DimensionedField obtained as a section of another - DimensionedField. - - Thus it is itself unallocated so that no storage is allocated or - deallocated during its use. To achieve this behaviour, - SubDimensionedField is derived from SubField rather than Field. - -SourceFiles - SubDimensionedFieldI.H - -\*---------------------------------------------------------------------------*/ - -#ifndef SubDimensionedField_H -#define SubDimensionedField_H - -#include "Field.H" -#include "SubField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class SubDimensionedField Declaration -\*---------------------------------------------------------------------------*/ - -template -class SubDimensionedField -: - public regIOobject, - public SubField -{ - -public: - - // Public typedefs - - typedef typename GeoMesh::Mesh Mesh; - typedef typename Field::cmptType cmptType; - - - // Constructors - - //- Construct from a SubField - inline SubDimensionedField - ( - const SubField& slist - ); - - //- Construct from a UList and size - inline SubDimensionedField - ( - const UList& list, - const label subSize - ); - - //- Construct from a UList start and end indices - inline SubDimensionedField - ( - const UList& list, - const label subSize, - const label startIndex - ); - - //- Construct as copy - inline SubDimensionedField - ( - const SubDimensionedField& sfield - ); - - - // Member functions - - //- Return a null SubDimensionedField - static inline const SubDimensionedField& null(); - - //- Return a component field of the field - inline tmp> component - ( - const direction - ) const; - - //- Return the field transpose (only defined for second rank tensors) - tmp> T() const; - - - // Member operators - - //- Assignment - inline void operator=(const SubDimensionedField&); - - //- Allow cast to a const DimensionedField& - inline operator const DimensionedField&() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "SubDimensionedFieldI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H deleted file mode 100644 index e68cc409f8..0000000000 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 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 . - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -inline Foam::SubDimensionedField::SubDimensionedField -( - const SubField& slist -) -: - SubField(slist) -{} - -template -inline Foam::SubDimensionedField::SubDimensionedField -( - const UList& list, - const label subSize -) -: - SubField(list, subSize) -{} - - -template -inline Foam::SubDimensionedField::SubDimensionedField -( - const UList& list, - const label subSize, - const label startIndex -) -: - SubField(list, subSize, startIndex) -{} - - -template -inline Foam::SubDimensionedField::SubDimensionedField -( - const SubDimensionedField& sfield -) -: - tmp>::refCount(), - SubField(sfield) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -inline const Foam::SubDimensionedField& -Foam::SubDimensionedField::null() -{ - return NullObjectRef>(); -} - - -template -inline -Foam::tmp -< - Foam::Field::cmptType> -> -Foam::SubDimensionedField::component -( - const direction d -) const -{ - return - ( - reinterpret_cast&>(*this) - ).component(d); -} - - -template -inline Foam::tmp> -Foam::SubDimensionedField::T() const -{ - return - ( - reinterpret_cast&>(*this) - ).T(); -} - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -template -inline void Foam::SubDimensionedField::operator= -( - const SubDimensionedField& rhs -) -{ - dimensions() = rhs.dimensions(); - SubField::operator=(rhs); -} - - -template -inline Foam::SubDimensionedField::operator -const Foam::DimensionedField&() const -{ - return *(reinterpret_cast*>(this)); -} - - -// ************************************************************************* //