diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C index 7d43c87cf21830763132e4b4db20e8948c34d748..4443f6f7bac8583b949db7a2c546b7603169cf4d 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -621,7 +621,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator== Boundary& bf ) { - forAll((*this), patchi) + forAll(*this, patchi) { this->operator[](patchi) == bf[patchi]; } @@ -634,7 +634,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator== const FieldField<PatchField, Type>& ptff ) { - forAll((*this), patchi) + forAll(*this, patchi) { this->operator[](patchi) == ptff[patchi]; } @@ -647,7 +647,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::operator== const Type& t ) { - forAll((*this), patchi) + forAll(*this, patchi) { this->operator[](patchi) == t; } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index 320c31939080fdffe3d69bbb18469a698ca3675a..78cfc3e57244cb1ff409bb5e7850ed1d68175f2c 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -54,7 +54,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class dictionary; template<class Type, template<class> class PatchField, class GeoMesh> @@ -95,7 +95,7 @@ class GeometricField public: - // Public typedefs + // Public Typedefs //- Type of mesh on which this GeometricField is instantiated typedef typename GeoMesh::Mesh Mesh; @@ -112,11 +112,12 @@ public: typedef PatchField<Type> Patch; + //- The boundary fields class Boundary : public FieldField<PatchField, Type> { - // Private data + // Private Data //- Reference to BoundaryMesh for which this field is defined const BoundaryMesh& bmesh_; @@ -126,8 +127,8 @@ public: // Constructors - //- Construct from a BoundaryMesh - Boundary(const BoundaryMesh& bmesh); + //- Construct from a BoundaryMesh, setting patches later + explicit Boundary(const BoundaryMesh& bmesh); //- Construct from a BoundaryMesh, reference to the internal field //- and a patch type @@ -135,7 +136,7 @@ public: ( const BoundaryMesh& bmesh, const Internal& field, - const word& patchFieldType + const word& patchFieldType = PatchField<Type>::calculatedType() ); //- Construct from a BoundaryMesh, reference to the internal field @@ -175,15 +176,12 @@ public: const word& patchFieldName ); - //- Construct as copy + //- Copy construct // Dangerous because Field may be set to a field which gets deleted // Need new type of BoundaryField, one which is part of a geometric // field for which snGrad etc. may be called and a free standing // BoundaryField for which such operations are unavailable. - Boundary - ( - const Boundary& btf - ); + Boundary(const Boundary& btf); //- Construct from dictionary Boundary @@ -231,7 +229,7 @@ public: void writeEntries(Ostream& os) const; - // Member operators + // Member Operators //- Assignment to BoundaryField<Type, PatchField, BoundaryMesh> void operator=(const Boundary&);