Commit 09620ce0 authored by Henry Weller's avatar Henry Weller
Browse files

regionModels: Renamed owner->region in regionModel and owner->film in surfaceFilmModel

This update does not change the operation or controls of the regionModels, it is
to aid understanding of the code.
parent 1dd74551
......@@ -41,11 +41,11 @@ namespace regionModels
Foam::regionModels::regionModelFunctionObject::regionModelFunctionObject
(
regionModel& owner
regionModel& region
)
:
dict_(dictionary::null),
owner_(owner),
regionModel_(region),
modelType_("modelType")
{}
......@@ -53,12 +53,12 @@ Foam::regionModels::regionModelFunctionObject::regionModelFunctionObject
Foam::regionModels::regionModelFunctionObject::regionModelFunctionObject
(
const dictionary& dict,
regionModel& owner,
regionModel& region,
const word& type
)
:
dict_(dict),
owner_(owner),
regionModel_(region),
modelType_(type)
{}
......@@ -69,7 +69,7 @@ Foam::regionModels::regionModelFunctionObject::regionModelFunctionObject
)
:
dict_(rmfo.dict_),
owner_(rmfo.owner_),
regionModel_(rmfo.regionModel_),
modelType_(rmfo.modelType_)
{}
......@@ -88,7 +88,7 @@ void Foam::regionModels::regionModelFunctionObject::preEvolveRegion()
void Foam::regionModels::regionModelFunctionObject::postEvolveRegion()
{
if (owner_.regionMesh().time().writeTime())
if (regionModel_.regionMesh().time().writeTime())
{
write();
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -64,7 +64,7 @@ protected:
dictionary dict_;
//- Reference to the region model
regionModel& owner_;
regionModel& regionModel_;
//- Model type name
word modelType_;
......@@ -83,22 +83,22 @@ public:
dictionary,
(
const dictionary& dict,
regionModel& owner
regionModel& region
),
(dict, owner)
(dict, region)
);
// Constructors
//- Construct null from owner
regionModelFunctionObject(regionModel& owner);
//- Construct null from region
regionModelFunctionObject(regionModel& region);
//- Construct from dictionary
regionModelFunctionObject
(
const dictionary& dict,
regionModel& owner,
regionModel& region,
const word& modelType
);
......@@ -123,7 +123,7 @@ public:
static autoPtr<regionModelFunctionObject> New
(
const dictionary& dict,
regionModel& owner,
regionModel& region,
const word& modelType
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -29,24 +29,24 @@ License
Foam::regionModels::regionModelFunctionObjectList::regionModelFunctionObjectList
(
regionModel& owner
regionModel& region
)
:
PtrList<regionModelFunctionObject>(),
owner_(owner),
regionModel_(region),
dict_(dictionary::null)
{}
Foam::regionModels::regionModelFunctionObjectList::regionModelFunctionObjectList
(
regionModel& owner,
regionModel& region,
const dictionary& dict,
const bool readFields
)
:
PtrList<regionModelFunctionObject>(),
owner_(owner),
regionModel_(region),
dict_(dict)
{
if (readFields)
......@@ -69,7 +69,7 @@ Foam::regionModels::regionModelFunctionObjectList::regionModelFunctionObjectList
regionModelFunctionObject::New
(
dict,
owner,
region,
modelName
)
);
......@@ -89,7 +89,7 @@ Foam::regionModels::regionModelFunctionObjectList::regionModelFunctionObjectList
)
:
PtrList<regionModelFunctionObject>(cfol),
owner_(cfol.owner_),
regionModel_(cfol.regionModel_),
dict_(cfol.dict_)
{}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -60,8 +60,8 @@ protected:
// Protected Data
//- Reference to the owner region model
regionModel& owner_;
//- Reference to the region region model
regionModel& regionModel_;
//- Dictionary
const dictionary dict_;
......@@ -72,12 +72,12 @@ public:
// Constructors
//- Null constructor
regionModelFunctionObjectList(regionModel& owner);
regionModelFunctionObjectList(regionModel& region);
//- Construct from mesh
regionModelFunctionObjectList
(
regionModel& owner,
regionModel& region,
const dictionary& dict,
const bool readFields = true
);
......@@ -97,11 +97,11 @@ public:
// Access
//- Return const access to the cloud owner
inline const regionModel& owner() const;
//- Return const access to the cloud region
inline const regionModel& region() const;
//- Return refernce to the cloud owner
inline regionModel& owner();
//- Return refernce to the cloud region
inline regionModel& region();
//- Return the forces dictionary
inline const dictionary& dict() const;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -24,16 +24,16 @@ License
\*---------------------------------------------------------------------------*/
inline const Foam::regionModels::regionModel&
Foam::regionModels::regionModelFunctionObjectList::owner() const
Foam::regionModels::regionModelFunctionObjectList::region() const
{
return owner_;
return regionModel_;
}
inline Foam::regionModels::regionModel&
Foam::regionModels::regionModelFunctionObjectList::owner()
Foam::regionModels::regionModelFunctionObjectList::region()
{
return owner_;
return regionModel_;
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -31,7 +31,7 @@ Foam::autoPtr<Foam::regionModels::regionModelFunctionObject>
Foam::regionModels::regionModelFunctionObject::New
(
const dictionary& dict,
regionModel& owner,
regionModel& region,
const word& modelName
)
{
......@@ -58,7 +58,7 @@ Foam::regionModels::regionModelFunctionObject::New
cstrIter()
(
dict.subDict(modelName),
owner
region
)
);
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -36,16 +36,16 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
filmSubModelBase::filmSubModelBase(surfaceFilmModel& owner)
filmSubModelBase::filmSubModelBase(surfaceFilmModel& film)
:
subModelBase(owner.outputProperties()),
owner_(owner)
subModelBase(film.outputProperties()),
filmModel_(film)
{}
filmSubModelBase::filmSubModelBase
(
surfaceFilmModel& owner,
surfaceFilmModel& film,
const dictionary& dict,
const word& baseName,
const word& modelType,
......@@ -54,20 +54,20 @@ filmSubModelBase::filmSubModelBase
:
subModelBase
(
owner.outputProperties(),
film.outputProperties(),
dict,
baseName,
modelType,
dictExt
),
owner_(owner)
filmModel_(film)
{}
filmSubModelBase::filmSubModelBase
(
const word& modelName,
surfaceFilmModel& owner,
surfaceFilmModel& film,
const dictionary& dict,
const word& baseName,
const word& modelType
......@@ -76,12 +76,12 @@ filmSubModelBase::filmSubModelBase
subModelBase
(
modelName,
owner.outputProperties(),
film.outputProperties(),
dict,
baseName,
modelType
),
owner_(owner)
filmModel_(film)
{}
......@@ -95,7 +95,7 @@ filmSubModelBase::~filmSubModelBase()
bool filmSubModelBase::writeTime() const
{
return active() && owner_.time().writeTime();
return active() && filmModel_.time().writeTime();
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -60,8 +60,8 @@ protected:
// Protected data
//- Reference to the owner surface film model
surfaceFilmModel& owner_;
//- Reference to the film surface film model
surfaceFilmModel& filmModel_;
public:
......@@ -69,23 +69,23 @@ public:
// Constructors
//- Construct null
filmSubModelBase(surfaceFilmModel& owner);
filmSubModelBase(surfaceFilmModel& film);
//- Construct from owner film wihout name
//- Construct from film film wihout name
filmSubModelBase
(
surfaceFilmModel& owner,
surfaceFilmModel& film,
const dictionary& dict,
const word& baseName,
const word& modelType,
const word& dictExt = "Coeffs"
);
//- Construct from owner film with name
//- Construct from film film with name
filmSubModelBase
(
const word& modelName,
surfaceFilmModel& owner,
surfaceFilmModel& film,
const dictionary& dict,
const word& baseName,
const word& modelType
......@@ -103,11 +103,11 @@ public:
//- Flag to indicate when to write a property
virtual bool writeTime() const;
//- Return const access to the owner surface film model
inline const surfaceFilmModel& owner() const;
//- Return const access to the film surface film model
inline const surfaceFilmModel& film() const;
//- Return the reference to the owner surface film model
inline surfaceFilmModel& owner();
//- Return the reference to the film surface film model
inline surfaceFilmModel& film();
template<class FilmType>
inline const FilmType& filmType() const;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -34,15 +34,15 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
inline const surfaceFilmModel& filmSubModelBase::owner() const
inline const surfaceFilmModel& filmSubModelBase::film() const
{
return owner_;
return filmModel_;
}
inline surfaceFilmModel& filmSubModelBase::owner()
inline surfaceFilmModel& filmSubModelBase::film()
{
return owner_;
return filmModel_;
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -35,15 +35,15 @@ namespace surfaceFilmModels
template<class FilmType>
const FilmType& filmSubModelBase::filmType() const
{
if (!isA<FilmType>(owner_))
if (!isA<FilmType>(filmModel_))
{
FatalErrorInFunction
<< "Model " << this->modelType() << " requested film type "
<< FilmType::typeName << " but film is type " << owner_.type()
<< FilmType::typeName << " but film is type " << filmModel_.type()
<< abort(FatalError);
}
return refCast<const FilmType>(owner_);
return refCast<const FilmType>(filmModel_);
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -61,11 +61,11 @@ void constantFilmThermo::init(thermoData& td)
constantFilmThermo::constantFilmThermo
(
surfaceFilmModel& owner,
surfaceFilmModel& film,
const dictionary& dict
)
:
filmThermoModel(typeName, owner, dict),
filmThermoModel(typeName, film, dict),
name_(coeffDict_.lookup("specie")),
rho0_("rho0"),
mu0_("mu0"),
......@@ -264,12 +264,12 @@ tmp<volScalarField> constantFilmThermo::rho() const
IOobject
(
type() + ':' + rho0_.name_,
owner().time().timeName(),
owner().regionMesh(),
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
owner().regionMesh(),
film().regionMesh(),
dimensionedScalar("0", dimDensity, 0.0),
extrapolatedCalculatedFvPatchScalarField::typeName
)
......@@ -291,12 +291,12 @@ tmp<volScalarField> constantFilmThermo::mu() const
IOobject
(
type() + ':' + mu0_.name_,
owner().time().timeName(),
owner().regionMesh(),
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
owner().regionMesh(),
film().regionMesh(),
dimensionedScalar("0", dimPressure*dimTime, 0.0),
extrapolatedCalculatedFvPatchScalarField::typeName
)
......@@ -318,12 +318,12 @@ tmp<volScalarField> constantFilmThermo::sigma() const
IOobject
(
type() + ':' + sigma0_.name_,
owner().time().timeName(),
owner().regionMesh(),
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
owner().regionMesh(),
film().regionMesh(),
dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
extrapolatedCalculatedFvPatchScalarField::typeName
)
......@@ -345,12 +345,12 @@ tmp<volScalarField> constantFilmThermo::Cp() const
IOobject
(
type() + ':' + Cp0_.name_,
owner().time().timeName(),
owner().regionMesh(),
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
owner().regionMesh(),
film().regionMesh(),
dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
extrapolatedCalculatedFvPatchScalarField::typeName
)
......@@ -372,12 +372,12 @@ tmp<volScalarField> constantFilmThermo::kappa() const
IOobject
(
type() + ':' + kappa0_.name_,
owner().time().timeName(),
owner().regionMesh(),
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
owner().regionMesh(),
film().regionMesh(),
dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
extrapolatedCalculatedFvPatchScalarField::typeName
)
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -140,7 +140,7 @@ public:
//- Construct from surface film model and dictionary
constantFilmThermo
(
surfaceFilmModel& owner,
surfaceFilmModel& film,
const dictionary& dict
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |