mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: provide access to the underlying patch types of generic patches (issue #188)
This commit is contained in:
@ -118,6 +118,12 @@ Foam::genericPolyPatch::~genericPolyPatch()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::word& Foam::genericPolyPatch::actualType() const
|
||||||
|
{
|
||||||
|
return actualTypeName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::genericPolyPatch::write(Ostream& os) const
|
void Foam::genericPolyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -25,8 +25,9 @@ Class
|
|||||||
Foam::genericPolyPatch
|
Foam::genericPolyPatch
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Substitute for unknown patches. Used for postprocessing when only
|
Substitute for unknown patches.
|
||||||
basic polyPatch info is needed.
|
Used for postprocessing when only basic polyPatch info is needed
|
||||||
|
or if the real patch type is unavailable.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
Storage is not optimal. It stores all face centres and cells on all
|
Storage is not optimal. It stores all face centres and cells on all
|
||||||
@ -57,7 +58,7 @@ class genericPolyPatch
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
word actualTypeName_;
|
const word actualTypeName_;
|
||||||
dictionary dict_;
|
dictionary dict_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -162,6 +163,9 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
//- Return the actual type
|
||||||
|
const word& actualType() const;
|
||||||
|
|
||||||
//- Write the polyPatch data as a dictionary
|
//- Write the polyPatch data as a dictionary
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -764,6 +764,13 @@ Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
const Foam::word& Foam::genericFvPatchField<Type>::actualType() const
|
||||||
|
{
|
||||||
|
return actualTypeName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::genericFvPatchField<Type>::write(Ostream& os) const
|
void Foam::genericFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -59,7 +59,7 @@ class genericFvPatchField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
word actualTypeName_;
|
const word actualTypeName_;
|
||||||
dictionary dict_;
|
dictionary dict_;
|
||||||
|
|
||||||
HashPtrTable<scalarField> scalarFields_;
|
HashPtrTable<scalarField> scalarFields_;
|
||||||
@ -179,6 +179,9 @@ public:
|
|||||||
tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Return the actual type
|
||||||
|
const word& actualType() const;
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -557,6 +557,13 @@ void Foam::genericPointPatchField<Type>::rmap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
const Foam::word& Foam::genericPointPatchField<Type>::actualType() const
|
||||||
|
{
|
||||||
|
return actualTypeName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::genericPointPatchField<Type>::write(Ostream& os) const
|
void Foam::genericPointPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -55,7 +55,7 @@ class genericPointPatchField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
word actualTypeName_;
|
const word actualTypeName_;
|
||||||
dictionary dict_;
|
dictionary dict_;
|
||||||
|
|
||||||
HashPtrTable<scalarField> scalarFields_;
|
HashPtrTable<scalarField> scalarFields_;
|
||||||
@ -151,6 +151,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Return the actual type
|
||||||
|
const word& actualType() const;
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user