mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Boundary conditions: Added extrapolatedCalculatedFvPatchField
To be used instead of zeroGradientFvPatchField for temporary fields for which zero-gradient extrapolation is use to evaluate the boundary field but avoiding fields derived from temporary field using field algebra inheriting the zeroGradient boundary condition by the reuse of the temporary field storage. zeroGradientFvPatchField should not be used as the default patch field for any temporary fields and should be avoided for non-temporary fields except where it is clearly appropriate; extrapolatedCalculatedFvPatchField and calculatedFvPatchField are generally more suitable defaults depending on the manner in which the boundary values are specified or evaluated. The entire OpenFOAM-dev code-base has been updated following the above recommendations. Henry G. Weller CFD Direct
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicXiSubXiEq.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -93,59 +92,43 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
||||
|
||||
const scalarField Cw = pow(mesh.V(), 2.0/3.0);
|
||||
|
||||
tmp<volScalarField> tN
|
||||
volScalarField N
|
||||
(
|
||||
new volScalarField
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tN",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"N",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0)
|
||||
);
|
||||
|
||||
volScalarField& N = tN();
|
||||
|
||||
N.internalField() = Nv.internalField()*Cw;
|
||||
|
||||
tmp<volSymmTensorField> tns
|
||||
volSymmTensorField ns
|
||||
(
|
||||
new volSymmTensorField
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tns",
|
||||
U.mesh().time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"ns",
|
||||
U.mesh().time().timeName(),
|
||||
U.mesh(),
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
),
|
||||
zeroGradientFvPatchSymmTensorField::typeName
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
)
|
||||
);
|
||||
|
||||
volSymmTensorField& ns = tns();
|
||||
|
||||
ns.internalField() = nsv.internalField()*Cw;
|
||||
|
||||
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
|
||||
|
||||
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
|
||||
|
||||
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
|
||||
|
||||
volScalarField XiSubEq
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicXiSubG.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -74,29 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
|
||||
volScalarField& Gtot = tGtot();
|
||||
|
||||
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
|
||||
|
||||
tmp<volScalarField> tN
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tN",
|
||||
Su_.mesh().time().timeName(),
|
||||
Su_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
Su_.mesh(),
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& N = tN();
|
||||
|
||||
N.internalField() = Nv.internalField()*Cw;
|
||||
scalarField N(Nv.internalField()*Cw);
|
||||
|
||||
forAll(N, celli)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basic.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -110,8 +109,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
||||
"zero",
|
||||
dimMass/dimTime/pow(dimLength, 3),
|
||||
pTraits<symmTensor>::zero
|
||||
),
|
||||
zeroGradientFvPatchSymmTensorField::typeName
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -145,8 +143,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U_.mesh(),
|
||||
dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "XiEqModel.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -111,39 +110,30 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& N = tN();
|
||||
|
||||
N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0);
|
||||
|
||||
tmp<volSymmTensorField> tns
|
||||
volSymmTensorField ns
|
||||
(
|
||||
new volSymmTensorField
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tns",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"tns",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
)
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
)
|
||||
);
|
||||
|
||||
volSymmTensorField& ns = tns();
|
||||
|
||||
ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0);
|
||||
|
||||
const volVectorField Uhat
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,7 +34,6 @@ Description
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "fixedRhoFvPatchScalarField.H"
|
||||
#include "directionInterpolate.H"
|
||||
#include "motionSolver.H"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,7 +33,6 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "fixedRhoFvPatchScalarField.H"
|
||||
#include "directionInterpolate.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -59,8 +59,6 @@ void Foam::multiphaseMixtureThermo::calcAlphas()
|
||||
alphas_ += level*phase();
|
||||
level += 1.0;
|
||||
}
|
||||
|
||||
alphas_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -104,8 +102,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("alphas", dimless, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("alphas", dimless, 0.0)
|
||||
),
|
||||
|
||||
sigmas_(lookup("sigmas")),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,8 +54,6 @@ void Foam::multiphaseSystem::calcAlphas()
|
||||
alphas_ += level*iter();
|
||||
level += 1.0;
|
||||
}
|
||||
|
||||
alphas_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -417,8 +415,7 @@ Foam::multiphaseSystem::multiphaseSystem
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("alphas", dimless, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("alphas", dimless, 0.0)
|
||||
),
|
||||
|
||||
sigmas_(lookup("sigmas")),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,8 +52,6 @@ void Foam::multiphaseMixture::calcAlphas()
|
||||
alphas_ += level*iter();
|
||||
level += 1.0;
|
||||
}
|
||||
|
||||
alphas_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -108,8 +106,7 @@ Foam::multiphaseMixture::multiphaseMixture
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("alphas", dimless, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("alphas", dimless, 0.0)
|
||||
),
|
||||
|
||||
nu_
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "phasePair.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,6 +34,7 @@ License
|
||||
#include "fvcDiv.H"
|
||||
#include "fvmSup.H"
|
||||
#include "fvMatrix.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,8 +78,7 @@ Foam::InertPhaseModel<BasePhaseModel>::Sh() const
|
||||
this->mesh()
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,8 +64,6 @@ void Foam::multiphaseSystem::calcAlphas()
|
||||
alphas_ += level*phases()[i];
|
||||
level += 1.0;
|
||||
}
|
||||
|
||||
alphas_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -506,8 +504,7 @@ Foam::multiphaseSystem::multiphaseSystem
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("alphas", dimless, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("alphas", dimless, 0.0)
|
||||
),
|
||||
|
||||
cAlphas_(lookup("interfaceCompression")),
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
EXE_INC = \
|
||||
EXE_INC = -ggdb3 \
|
||||
-ItwoPhaseSystem/lnInclude \
|
||||
-I../phaseSystems/lnInclude \
|
||||
-I../interfacialModels/lnInclude \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "phasePair.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -41,8 +41,7 @@
|
||||
"rho",
|
||||
dimMass/dimVolume,
|
||||
rhoValue
|
||||
),
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -97,8 +96,7 @@
|
||||
"Erho",
|
||||
dimMass/dimLength/sqr(dimTime),
|
||||
rhoEValue
|
||||
),
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -152,8 +150,7 @@
|
||||
"nu",
|
||||
dimless,
|
||||
nuValue
|
||||
),
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -75,8 +75,7 @@ if (thermalStress)
|
||||
"C",
|
||||
dimensionSet(0, 2, -2 , -1, 0),
|
||||
CValue
|
||||
),
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -131,8 +130,7 @@ if (thermalStress)
|
||||
"rhoK",
|
||||
dimensionSet(1, 1, -3 , -1, 0),
|
||||
rhoKValue
|
||||
),
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -188,8 +186,7 @@ if (thermalStress)
|
||||
"alpha",
|
||||
inv(dimTemperature),
|
||||
alphaValue
|
||||
),
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -398,8 +398,7 @@ int main(int argc, char *argv[])
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("cellDist", dimless, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("cellDist", dimless, 0)
|
||||
);
|
||||
|
||||
forAll(procIds, celli)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -236,20 +236,18 @@ void writeDecomposition
|
||||
false // do not register
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(name, dimless, -1),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar(name, dimless, -1)
|
||||
);
|
||||
|
||||
forAll(procCells, cI)
|
||||
{
|
||||
procCells[cI] = decomp[cI];
|
||||
}
|
||||
|
||||
procCells.write();
|
||||
}
|
||||
|
||||
|
||||
// Read vol or surface fields
|
||||
//template<class T, class Mesh>
|
||||
template<class GeoField>
|
||||
void readFields
|
||||
(
|
||||
@ -260,12 +258,12 @@ void readFields
|
||||
PtrList<GeoField>& fields
|
||||
)
|
||||
{
|
||||
//typedef GeometricField<T, fvPatchField, Mesh> fldType;
|
||||
|
||||
// Get my objects of type
|
||||
IOobjectList objects(allObjects.lookupClass(GeoField::typeName));
|
||||
|
||||
// Check that we all have all objects
|
||||
wordList objectNames = objects.toc();
|
||||
|
||||
// Get master names
|
||||
wordList masterNames(objectNames);
|
||||
Pstream::scatter(masterNames);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,6 +35,7 @@ Description
|
||||
|
||||
#include "calc.H"
|
||||
#include "fvc.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -113,12 +113,12 @@ template<class T, class Container>
|
||||
Foam::CompactListList<T, Container>::CompactListList
|
||||
(
|
||||
CompactListList<T, Container>& lst,
|
||||
bool reUse
|
||||
bool reuse
|
||||
)
|
||||
:
|
||||
size_(lst.size()),
|
||||
offsets_(lst.offsets_, reUse),
|
||||
m_(lst.m_, reUse)
|
||||
offsets_(lst.offsets_, reuse),
|
||||
m_(lst.m_, reuse)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ public:
|
||||
explicit CompactListList(const Xfer<CompactListList<T, Container>>&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
CompactListList(CompactListList<T, Container>&, bool reUse);
|
||||
CompactListList(CompactListList<T, Container>&, bool reuse);
|
||||
|
||||
//- Construct from Istream.
|
||||
CompactListList(Istream&);
|
||||
|
||||
@ -34,11 +34,8 @@ License
|
||||
#include "BiIndirectList.H"
|
||||
#include "contiguous.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct with length specified
|
||||
template<class T>
|
||||
Foam::List<T>::List(const label s)
|
||||
:
|
||||
@ -58,7 +55,6 @@ Foam::List<T>::List(const label s)
|
||||
}
|
||||
|
||||
|
||||
// Construct with length and single value specified
|
||||
template<class T>
|
||||
Foam::List<T>::List(const label s, const T& a)
|
||||
:
|
||||
@ -83,7 +79,6 @@ Foam::List<T>::List(const label s, const T& a)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy
|
||||
template<class T>
|
||||
Foam::List<T>::List(const List<T>& a)
|
||||
:
|
||||
@ -93,13 +88,13 @@ Foam::List<T>::List(const List<T>& a)
|
||||
{
|
||||
this->v_ = new T[this->size_];
|
||||
|
||||
# ifdef USEMEMCPY
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
}
|
||||
else
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
@ -111,7 +106,6 @@ Foam::List<T>::List(const List<T>& a)
|
||||
}
|
||||
|
||||
|
||||
// Construct by transferring the parameter contents
|
||||
template<class T>
|
||||
Foam::List<T>::List(const Xfer<List<T>>& lst)
|
||||
{
|
||||
@ -119,13 +113,12 @@ Foam::List<T>::List(const Xfer<List<T>>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy or re-use as specified.
|
||||
template<class T>
|
||||
Foam::List<T>::List(List<T>& a, bool reUse)
|
||||
Foam::List<T>::List(List<T>& a, bool reuse)
|
||||
:
|
||||
UList<T>(NULL, a.size_)
|
||||
{
|
||||
if (reUse)
|
||||
if (reuse)
|
||||
{
|
||||
this->v_ = a.v_;
|
||||
a.v_ = 0;
|
||||
@ -135,13 +128,13 @@ Foam::List<T>::List(List<T>& a, bool reUse)
|
||||
{
|
||||
this->v_ = new T[this->size_];
|
||||
|
||||
# ifdef USEMEMCPY
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
}
|
||||
else
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
@ -153,7 +146,6 @@ Foam::List<T>::List(List<T>& a, bool reUse)
|
||||
}
|
||||
|
||||
|
||||
// Construct as subset
|
||||
template<class T>
|
||||
Foam::List<T>::List(const UList<T>& a, const labelUList& map)
|
||||
:
|
||||
@ -173,7 +165,6 @@ Foam::List<T>::List(const UList<T>& a, const labelUList& map)
|
||||
}
|
||||
|
||||
|
||||
// Construct given start and end iterators.
|
||||
template<class T>
|
||||
template<class InputIterator>
|
||||
Foam::List<T>::List(InputIterator first, InputIterator last)
|
||||
@ -205,7 +196,6 @@ Foam::List<T>::List(InputIterator first, InputIterator last)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy of FixedList<T, Size>
|
||||
template<class T>
|
||||
template<unsigned Size>
|
||||
Foam::List<T>::List(const FixedList<T, Size>& lst)
|
||||
@ -224,7 +214,6 @@ Foam::List<T>::List(const FixedList<T, Size>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy of PtrList<T>
|
||||
template<class T>
|
||||
Foam::List<T>::List(const PtrList<T>& lst)
|
||||
:
|
||||
@ -242,7 +231,6 @@ Foam::List<T>::List(const PtrList<T>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy of SLList<T>
|
||||
template<class T>
|
||||
Foam::List<T>::List(const SLList<T>& lst)
|
||||
:
|
||||
@ -266,7 +254,6 @@ Foam::List<T>::List(const SLList<T>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy of UIndirectList<T>
|
||||
template<class T>
|
||||
Foam::List<T>::List(const UIndirectList<T>& lst)
|
||||
:
|
||||
@ -284,7 +271,6 @@ Foam::List<T>::List(const UIndirectList<T>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy of BiIndirectList<T>
|
||||
template<class T>
|
||||
Foam::List<T>::List(const BiIndirectList<T>& lst)
|
||||
:
|
||||
@ -304,7 +290,6 @@ Foam::List<T>::List(const BiIndirectList<T>& lst)
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Destroy list elements
|
||||
template<class T>
|
||||
Foam::List<T>::~List()
|
||||
{
|
||||
@ -334,13 +319,13 @@ void Foam::List<T>::setSize(const label newSize)
|
||||
{
|
||||
label i = min(this->size_, newSize);
|
||||
|
||||
# ifdef USEMEMCPY
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(nv, this->v_, i*sizeof(T));
|
||||
}
|
||||
else
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
T* vv = &this->v_[i];
|
||||
T* av = &nv[i];
|
||||
@ -384,8 +369,6 @@ void Foam::List<T>::clear()
|
||||
}
|
||||
|
||||
|
||||
// Transfer the contents of the argument List into this List
|
||||
// and annul the argument list
|
||||
template<class T>
|
||||
void Foam::List<T>::transfer(List<T>& a)
|
||||
{
|
||||
@ -398,25 +381,21 @@ void Foam::List<T>::transfer(List<T>& a)
|
||||
}
|
||||
|
||||
|
||||
// Transfer the contents of the argument DynamicList into this List
|
||||
// and annul the argument list
|
||||
template<class T>
|
||||
template<unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
void Foam::List<T>::transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>& a)
|
||||
{
|
||||
// shrink the allocated space to the number of elements used
|
||||
// Shrink the allocated space to the number of elements used
|
||||
a.shrink();
|
||||
transfer(static_cast<List<T>&>(a));
|
||||
a.clearStorage();
|
||||
}
|
||||
|
||||
|
||||
// Transfer the contents of the argument SortableList into this List
|
||||
// and annul the argument list
|
||||
template<class T>
|
||||
void Foam::List<T>::transfer(SortableList<T>& a)
|
||||
{
|
||||
// shrink away the sort indices
|
||||
// Shrink away the sort indices
|
||||
a.shrink();
|
||||
transfer(static_cast<List<T>&>(a));
|
||||
}
|
||||
@ -424,7 +403,6 @@ void Foam::List<T>::transfer(SortableList<T>& a)
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
// Assignment to UList operator. Takes linear time.
|
||||
template<class T>
|
||||
void Foam::List<T>::operator=(const UList<T>& a)
|
||||
{
|
||||
@ -438,13 +416,13 @@ void Foam::List<T>::operator=(const UList<T>& a)
|
||||
|
||||
if (this->size_)
|
||||
{
|
||||
# ifdef USEMEMCPY
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
}
|
||||
else
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
@ -456,7 +434,6 @@ void Foam::List<T>::operator=(const UList<T>& a)
|
||||
}
|
||||
|
||||
|
||||
// Assignment operator. Takes linear time.
|
||||
template<class T>
|
||||
void Foam::List<T>::operator=(const List<T>& a)
|
||||
{
|
||||
@ -471,7 +448,6 @@ void Foam::List<T>::operator=(const List<T>& a)
|
||||
}
|
||||
|
||||
|
||||
// Assignment operator. Takes linear time.
|
||||
template<class T>
|
||||
void Foam::List<T>::operator=(const SLList<T>& lst)
|
||||
{
|
||||
@ -499,7 +475,6 @@ void Foam::List<T>::operator=(const SLList<T>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Assignment operator. Takes linear time.
|
||||
template<class T>
|
||||
void Foam::List<T>::operator=(const UIndirectList<T>& lst)
|
||||
{
|
||||
@ -518,7 +493,6 @@ void Foam::List<T>::operator=(const UIndirectList<T>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Assignment operator. Takes linear time.
|
||||
template<class T>
|
||||
void Foam::List<T>::operator=(const BiIndirectList<T>& lst)
|
||||
{
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
List(const Xfer<List<T>>&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
List(List<T>&, bool reUse);
|
||||
List(List<T>&, bool reuse);
|
||||
|
||||
//- Construct as subset.
|
||||
List(const UList<T>&, const labelUList& mapAddressing);
|
||||
|
||||
@ -31,7 +31,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
// Construct from Istream
|
||||
template<class T>
|
||||
Foam::List<T>::List(Istream& is)
|
||||
:
|
||||
@ -173,12 +172,12 @@ Foam::List<T> Foam::readList(Istream& is)
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
// read via a singly-linked list
|
||||
// Read via a singly-linked list
|
||||
L = SLList<T>(is);
|
||||
}
|
||||
else
|
||||
{
|
||||
// create list with a single item
|
||||
// Create list with a single item
|
||||
L.setSize(1);
|
||||
|
||||
is >> L[0];
|
||||
|
||||
@ -77,20 +77,11 @@ Foam::PtrList<T>::PtrList(const Xfer<PtrList<T>>& lst)
|
||||
|
||||
|
||||
template<class T>
|
||||
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
|
||||
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reuse)
|
||||
:
|
||||
ptrs_(a.size())
|
||||
ptrs_(a.ptrs_, reuse)
|
||||
{
|
||||
if (reUse)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
ptrs_[i] = a.ptrs_[i];
|
||||
a.ptrs_[i] = NULL;
|
||||
}
|
||||
a.setSize(0);
|
||||
}
|
||||
else
|
||||
if (!reuse)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
|
||||
@ -161,7 +161,7 @@ public:
|
||||
PtrList(const Xfer<PtrList<T>>&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
PtrList(PtrList<T>&, bool reUse);
|
||||
PtrList(PtrList<T>&, bool reuse);
|
||||
|
||||
//- Construct as copy of SLPtrList<T>
|
||||
explicit PtrList(const SLPtrList<T>&);
|
||||
|
||||
@ -51,9 +51,9 @@ Foam::UPtrList<T>::UPtrList(const Xfer<UPtrList<T>>& lst)
|
||||
|
||||
|
||||
template<class T>
|
||||
Foam::UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse)
|
||||
Foam::UPtrList<T>::UPtrList(UPtrList<T>& a, bool reuse)
|
||||
:
|
||||
ptrs_(a.ptrs_, reUse)
|
||||
ptrs_(a.ptrs_, reuse)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ public:
|
||||
UPtrList(const Xfer<UPtrList<T>>&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
UPtrList(UPtrList<T>&, bool reUse);
|
||||
UPtrList(UPtrList<T>&, bool reuse);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
@ -131,11 +131,11 @@ template<class Type, class GeoMesh>
|
||||
DimensionedField<Type, GeoMesh>::DimensionedField
|
||||
(
|
||||
DimensionedField<Type, GeoMesh>& df,
|
||||
bool reUse
|
||||
bool reuse
|
||||
)
|
||||
:
|
||||
regIOobject(df, reUse),
|
||||
Field<Type>(df, reUse),
|
||||
regIOobject(df, reuse),
|
||||
Field<Type>(df, reuse),
|
||||
mesh_(df.mesh_),
|
||||
dimensions_(df.dimensions_)
|
||||
{}
|
||||
@ -194,11 +194,11 @@ DimensionedField<Type, GeoMesh>::DimensionedField
|
||||
(
|
||||
const IOobject& io,
|
||||
DimensionedField<Type, GeoMesh>& df,
|
||||
bool reUse
|
||||
bool reuse
|
||||
)
|
||||
:
|
||||
regIOobject(io, df),
|
||||
Field<Type>(df, reUse),
|
||||
Field<Type>(df, reuse),
|
||||
mesh_(df.mesh_),
|
||||
dimensions_(df.dimensions_)
|
||||
{}
|
||||
@ -223,11 +223,11 @@ DimensionedField<Type, GeoMesh>::DimensionedField
|
||||
(
|
||||
const word& newName,
|
||||
DimensionedField<Type, GeoMesh>& df,
|
||||
bool reUse
|
||||
bool reuse
|
||||
)
|
||||
:
|
||||
regIOobject(newName, df, true),
|
||||
Field<Type>(df, reUse),
|
||||
Field<Type>(df, reuse),
|
||||
mesh_(df.mesh_),
|
||||
dimensions_(df.dimensions_)
|
||||
{}
|
||||
|
||||
@ -159,7 +159,7 @@ public:
|
||||
DimensionedField
|
||||
(
|
||||
DimensionedField<Type, GeoMesh>&,
|
||||
bool reUse
|
||||
bool reuse
|
||||
);
|
||||
|
||||
//- Construct by transferring the DimensionedField
|
||||
@ -188,7 +188,7 @@ public:
|
||||
(
|
||||
const IOobject&,
|
||||
DimensionedField<Type, GeoMesh>&,
|
||||
bool reUse
|
||||
bool reuse
|
||||
);
|
||||
|
||||
//- Construct as copy resetting name
|
||||
@ -203,7 +203,7 @@ public:
|
||||
(
|
||||
const word& newName,
|
||||
DimensionedField<Type, GeoMesh>&,
|
||||
bool reUse
|
||||
bool reuse
|
||||
);
|
||||
|
||||
//- Construct by transferring the DimensionedField with a new name
|
||||
|
||||
@ -143,10 +143,10 @@ FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f)
|
||||
|
||||
|
||||
template<template<class> class Field, class Type>
|
||||
FieldField<Field, Type>::FieldField(FieldField<Field, Type>& f, bool reUse)
|
||||
FieldField<Field, Type>::FieldField(FieldField<Field, Type>& f, bool reuse)
|
||||
:
|
||||
refCount(),
|
||||
PtrList<Field<Type>>(f, reUse)
|
||||
PtrList<Field<Type>>(f, reuse)
|
||||
{}
|
||||
|
||||
|
||||
@ -157,7 +157,6 @@ FieldField<Field, Type>::FieldField(const PtrList<Field<Type>>& tl)
|
||||
{}
|
||||
|
||||
|
||||
// Construct as copy of tmp<FieldField>
|
||||
#ifndef NoConstructFromTmp
|
||||
template<template<class> class Field, class Type>
|
||||
FieldField<Field, Type>::FieldField(const tmp<FieldField<Field, Type>>& tf)
|
||||
@ -168,7 +167,7 @@ FieldField<Field, Type>::FieldField(const tmp<FieldField<Field, Type>>& tf)
|
||||
tf.isTmp()
|
||||
)
|
||||
{
|
||||
const_cast<FieldField<Field, Type>&>(tf()).resetRefCount();
|
||||
tf.clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ public:
|
||||
FieldField(const FieldField<Field, Type>&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
FieldField(FieldField<Field, Type>&, bool reUse);
|
||||
FieldField(FieldField<Field, Type>&, bool reuse);
|
||||
|
||||
//- Construct as copy of a PtrList<Field, Type>
|
||||
FieldField(const PtrList<Field<Type>>&);
|
||||
|
||||
@ -63,7 +63,8 @@ public:
|
||||
|
||||
static tmp<FieldField<Field, TypeR>> New
|
||||
(
|
||||
const tmp<FieldField<Field, TypeR>>& tf1
|
||||
const tmp<FieldField<Field, TypeR>>& tf1,
|
||||
const bool initRet = false
|
||||
)
|
||||
{
|
||||
if (tf1.isTmp())
|
||||
@ -72,10 +73,17 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<FieldField<Field, TypeR>>
|
||||
tmp<FieldField<Field, TypeR>> rtf
|
||||
(
|
||||
FieldField<Field, TypeR>::NewCalculatedType(tf1())
|
||||
);
|
||||
|
||||
if (initRet)
|
||||
{
|
||||
rtf() = tf1();
|
||||
}
|
||||
|
||||
return rtf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -202,9 +202,9 @@ Foam::Field<Type>::Field(const Field<Type>& f)
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::Field<Type>::Field(Field<Type>& f, bool reUse)
|
||||
Foam::Field<Type>::Field(Field<Type>& f, bool reuse)
|
||||
:
|
||||
List<Type>(f, reUse)
|
||||
List<Type>(f, reuse)
|
||||
{}
|
||||
|
||||
|
||||
@ -236,7 +236,7 @@ Foam::Field<Type>::Field(const tmp<Field<Type>>& tf)
|
||||
:
|
||||
List<Type>(const_cast<Field<Type>&>(tf()), tf.isTmp())
|
||||
{
|
||||
const_cast<Field<Type>&>(tf()).resetRefCount();
|
||||
tf.clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ public:
|
||||
Field(const Field<Type>&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
Field(Field<Type>&, bool reUse);
|
||||
Field(Field<Type>&, bool reuse);
|
||||
|
||||
//- Construct by transferring the Field contents
|
||||
Field(const Xfer<Field<Type>>&);
|
||||
|
||||
@ -55,7 +55,11 @@ class reuseTmp<TypeR, TypeR>
|
||||
{
|
||||
public:
|
||||
|
||||
static tmp<Field<TypeR>> New(const tmp<Field<TypeR>>& tf1)
|
||||
static tmp<Field<TypeR>> New
|
||||
(
|
||||
const tmp<Field<TypeR>>& tf1,
|
||||
const bool initRet = false
|
||||
)
|
||||
{
|
||||
if (tf1.isTmp())
|
||||
{
|
||||
@ -63,7 +67,14 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<Field<TypeR>>(new Field<TypeR>(tf1().size()));
|
||||
tmp<Field<TypeR>> rtf(new Field<TypeR>(tf1().size()));
|
||||
|
||||
if (initRet)
|
||||
{
|
||||
rtf() = tf1();
|
||||
}
|
||||
|
||||
return rtf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -33,6 +33,48 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template
|
||||
<
|
||||
class Type,
|
||||
template<class> class PatchField,
|
||||
class GeoMesh
|
||||
>
|
||||
bool reusable(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf)
|
||||
{
|
||||
if (tgf.isTmp())
|
||||
{
|
||||
if (GeometricField<Type, PatchField, GeoMesh>::debug)
|
||||
{
|
||||
const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
|
||||
const typename GeometricField<Type, PatchField, GeoMesh>::
|
||||
GeometricBoundaryField& gbf = gf.boundaryField();
|
||||
|
||||
forAll(gbf, patchi)
|
||||
{
|
||||
if
|
||||
(
|
||||
!polyPatch::constraintType(gbf[patchi].patch().type())
|
||||
&& !isA<typename PatchField<Type>::Calculated>(gbf[patchi])
|
||||
)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Attempt to reuse temporary with non-reusable BC "
|
||||
<< gbf[patchi].type() << endl;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
class TypeR,
|
||||
@ -46,12 +88,12 @@ public:
|
||||
|
||||
static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
|
||||
(
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
|
||||
const word& name,
|
||||
const dimensionSet& dimensions
|
||||
)
|
||||
{
|
||||
const GeometricField<Type1, PatchField, GeoMesh>& df1 = tdf1();
|
||||
const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();
|
||||
|
||||
return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
|
||||
(
|
||||
@ -60,10 +102,10 @@ public:
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
df1.instance(),
|
||||
df1.db()
|
||||
gf1.instance(),
|
||||
gf1.db()
|
||||
),
|
||||
df1.mesh(),
|
||||
gf1.mesh(),
|
||||
dimensions
|
||||
)
|
||||
);
|
||||
@ -71,10 +113,10 @@ public:
|
||||
|
||||
static void clear
|
||||
(
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1
|
||||
)
|
||||
{
|
||||
tdf1.clear();
|
||||
tgf1.clear();
|
||||
}
|
||||
};
|
||||
|
||||
@ -86,47 +128,55 @@ public:
|
||||
|
||||
static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
|
||||
(
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
|
||||
const word& name,
|
||||
const dimensionSet& dimensions
|
||||
const dimensionSet& dimensions,
|
||||
const bool initRet = false
|
||||
)
|
||||
{
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& df1 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf1());
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& gf1 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf1());
|
||||
|
||||
if (tdf1.isTmp())
|
||||
if (reusable(tgf1))
|
||||
{
|
||||
df1.rename(name);
|
||||
df1.dimensions().reset(dimensions);
|
||||
return tdf1;
|
||||
gf1.rename(name);
|
||||
gf1.dimensions().reset(dimensions);
|
||||
return tgf1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
|
||||
tmp<GeometricField<TypeR, PatchField, GeoMesh>> rtgf
|
||||
(
|
||||
new GeometricField<TypeR, PatchField, GeoMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
df1.instance(),
|
||||
df1.db()
|
||||
gf1.instance(),
|
||||
gf1.db()
|
||||
),
|
||||
df1.mesh(),
|
||||
gf1.mesh(),
|
||||
dimensions
|
||||
)
|
||||
);
|
||||
|
||||
if (initRet)
|
||||
{
|
||||
rtgf() == tgf1();
|
||||
}
|
||||
|
||||
return rtgf;
|
||||
}
|
||||
}
|
||||
|
||||
static void clear
|
||||
(
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf1
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1
|
||||
)
|
||||
{
|
||||
if (tdf1.isTmp())
|
||||
if (reusable(tgf1))
|
||||
{
|
||||
tdf1.ptr();
|
||||
tgf1.ptr();
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -147,13 +197,13 @@ public:
|
||||
|
||||
static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
|
||||
(
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2,
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2,
|
||||
const word& name,
|
||||
const dimensionSet& dimensions
|
||||
)
|
||||
{
|
||||
const GeometricField<Type1, PatchField, GeoMesh>& df1 = tdf1();
|
||||
const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();
|
||||
|
||||
return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
|
||||
(
|
||||
@ -162,10 +212,10 @@ public:
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
df1.instance(),
|
||||
df1.db()
|
||||
gf1.instance(),
|
||||
gf1.db()
|
||||
),
|
||||
df1.mesh(),
|
||||
gf1.mesh(),
|
||||
dimensions
|
||||
)
|
||||
);
|
||||
@ -173,12 +223,12 @@ public:
|
||||
|
||||
static void clear
|
||||
(
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2
|
||||
)
|
||||
{
|
||||
tdf1.clear();
|
||||
tdf2.clear();
|
||||
tgf1.clear();
|
||||
tgf2.clear();
|
||||
}
|
||||
};
|
||||
|
||||
@ -198,21 +248,21 @@ public:
|
||||
|
||||
static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
|
||||
(
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf2,
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf2,
|
||||
const word& name,
|
||||
const dimensionSet& dimensions
|
||||
)
|
||||
{
|
||||
const GeometricField<Type1, PatchField, GeoMesh>& df1 = tdf1();
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& df2 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf2());
|
||||
const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& gf2 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf2());
|
||||
|
||||
if (tdf2.isTmp())
|
||||
if (reusable(tgf2))
|
||||
{
|
||||
df2.rename(name);
|
||||
df2.dimensions().reset(dimensions);
|
||||
return tdf2;
|
||||
gf2.rename(name);
|
||||
gf2.dimensions().reset(dimensions);
|
||||
return tgf2;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -223,10 +273,10 @@ public:
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
df1.instance(),
|
||||
df1.db()
|
||||
gf1.instance(),
|
||||
gf1.db()
|
||||
),
|
||||
df1.mesh(),
|
||||
gf1.mesh(),
|
||||
dimensions
|
||||
)
|
||||
);
|
||||
@ -235,14 +285,14 @@ public:
|
||||
|
||||
static void clear
|
||||
(
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf2
|
||||
const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf2
|
||||
)
|
||||
{
|
||||
tdf1.clear();
|
||||
if (tdf2.isTmp())
|
||||
tgf1.clear();
|
||||
if (reusable(tgf2))
|
||||
{
|
||||
tdf2.ptr();
|
||||
tgf2.ptr();
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -261,20 +311,20 @@ public:
|
||||
|
||||
static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
|
||||
(
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2,
|
||||
const word& name,
|
||||
const dimensionSet& dimensions
|
||||
)
|
||||
{
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& df1 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf1());
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& gf1 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf1());
|
||||
|
||||
if (tdf1.isTmp())
|
||||
if (reusable(tgf1))
|
||||
{
|
||||
df1.rename(name);
|
||||
df1.dimensions().reset(dimensions);
|
||||
return tdf1;
|
||||
gf1.rename(name);
|
||||
gf1.dimensions().reset(dimensions);
|
||||
return tgf1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -285,10 +335,10 @@ public:
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
df1.instance(),
|
||||
df1.db()
|
||||
gf1.instance(),
|
||||
gf1.db()
|
||||
),
|
||||
df1.mesh(),
|
||||
gf1.mesh(),
|
||||
dimensions
|
||||
)
|
||||
);
|
||||
@ -297,15 +347,15 @@ public:
|
||||
|
||||
static void clear
|
||||
(
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2
|
||||
)
|
||||
{
|
||||
if (tdf1.isTmp())
|
||||
if (reusable(tgf1))
|
||||
{
|
||||
tdf1.ptr();
|
||||
tgf1.ptr();
|
||||
}
|
||||
tdf2.clear();
|
||||
tgf2.clear();
|
||||
}
|
||||
};
|
||||
|
||||
@ -317,28 +367,28 @@ public:
|
||||
|
||||
static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
|
||||
(
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf2,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf2,
|
||||
const word& name,
|
||||
const dimensionSet& dimensions
|
||||
)
|
||||
{
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& df1 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf1());
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& df2 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf2());
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& gf1 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf1());
|
||||
GeometricField<TypeR, PatchField, GeoMesh>& gf2 =
|
||||
const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf2());
|
||||
|
||||
if (tdf1.isTmp())
|
||||
if (reusable(tgf1))
|
||||
{
|
||||
df1.rename(name);
|
||||
df1.dimensions().reset(dimensions);
|
||||
return tdf1;
|
||||
gf1.rename(name);
|
||||
gf1.dimensions().reset(dimensions);
|
||||
return tgf1;
|
||||
}
|
||||
else if (tdf2.isTmp())
|
||||
else if (reusable(tgf2))
|
||||
{
|
||||
df2.rename(name);
|
||||
df2.dimensions().reset(dimensions);
|
||||
return tdf2;
|
||||
gf2.rename(name);
|
||||
gf2.dimensions().reset(dimensions);
|
||||
return tgf2;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -349,10 +399,10 @@ public:
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
df1.instance(),
|
||||
df1.db()
|
||||
gf1.instance(),
|
||||
gf1.db()
|
||||
),
|
||||
df1.mesh(),
|
||||
gf1.mesh(),
|
||||
dimensions
|
||||
)
|
||||
);
|
||||
@ -361,19 +411,19 @@ public:
|
||||
|
||||
static void clear
|
||||
(
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tdf2
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
|
||||
const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf2
|
||||
)
|
||||
{
|
||||
if (tdf1.isTmp())
|
||||
if (reusable(tgf1))
|
||||
{
|
||||
tdf1.ptr();
|
||||
tdf2.clear();
|
||||
tgf1.ptr();
|
||||
tgf2.clear();
|
||||
}
|
||||
else if (tdf2.isTmp())
|
||||
else if (reusable(tgf2))
|
||||
{
|
||||
tdf1.clear();
|
||||
tdf2.ptr();
|
||||
tgf1.clear();
|
||||
tgf2.ptr();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -63,6 +63,9 @@ class pointMesh;
|
||||
template<class Type>
|
||||
class pointPatchField;
|
||||
|
||||
template<class Type>
|
||||
class calculatedPointPatchField;
|
||||
|
||||
template<class Type>
|
||||
Ostream& operator<<
|
||||
(
|
||||
@ -99,6 +102,7 @@ class pointPatchField
|
||||
public:
|
||||
|
||||
typedef pointPatch Patch;
|
||||
typedef calculatedPointPatchField<Type> Calculated;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
@ -239,8 +243,7 @@ public:
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
|
||||
//- Return a pointer to a new CalculatedpointPatchField created on
|
||||
//- Return a pointer to a new calculatedPointPatchField created on
|
||||
// freestore without setting patchField values
|
||||
template<class Type2>
|
||||
static autoPtr<pointPatchField<Type>>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,7 +77,7 @@ Foam::LduMatrix<Type, DType, LUType>::LduMatrix(const LduMatrix& A)
|
||||
|
||||
|
||||
template<class Type, class DType, class LUType>
|
||||
Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reUse)
|
||||
Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reuse)
|
||||
:
|
||||
lduMesh_(A.lduMesh_),
|
||||
diagPtr_(NULL),
|
||||
@ -88,7 +88,7 @@ Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reUse)
|
||||
interfacesUpper_(0),
|
||||
interfacesLower_(0)
|
||||
{
|
||||
if (reUse)
|
||||
if (reuse)
|
||||
{
|
||||
if (A.diagPtr_)
|
||||
{
|
||||
|
||||
@ -470,7 +470,7 @@ public:
|
||||
LduMatrix(const LduMatrix<Type, DType, LUType>&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
LduMatrix(LduMatrix<Type, DType, LUType>&, bool reUse);
|
||||
LduMatrix(LduMatrix<Type, DType, LUType>&, bool reuse);
|
||||
|
||||
//- Construct given an LDU addressed mesh and an Istream
|
||||
// from which the coefficients are read
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,14 +70,14 @@ Foam::lduMatrix::lduMatrix(const lduMatrix& A)
|
||||
}
|
||||
|
||||
|
||||
Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reUse)
|
||||
Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reuse)
|
||||
:
|
||||
lduMesh_(A.lduMesh_),
|
||||
lowerPtr_(NULL),
|
||||
diagPtr_(NULL),
|
||||
upperPtr_(NULL)
|
||||
{
|
||||
if (reUse)
|
||||
if (reuse)
|
||||
{
|
||||
if (A.lowerPtr_)
|
||||
{
|
||||
|
||||
@ -521,7 +521,7 @@ public:
|
||||
lduMatrix(const lduMatrix&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
lduMatrix(lduMatrix&, bool reUse);
|
||||
lduMatrix(lduMatrix&, bool reuse);
|
||||
|
||||
//- Construct given an LDU addressed mesh and an Istream
|
||||
// from which the coefficients are read
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,7 +69,7 @@ public:
|
||||
|
||||
//- Construct either by transferring pointer or cloning. Should
|
||||
// only be called with type that supports cloning.
|
||||
inline autoPtr(const autoPtr<T>&, const bool reUse);
|
||||
inline autoPtr(const autoPtr<T>&, const bool reuse);
|
||||
|
||||
|
||||
//- Destructor, delete object if pointer is not NULL
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,9 +45,9 @@ inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap)
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap, const bool reUse)
|
||||
inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap, const bool reuse)
|
||||
{
|
||||
if (reUse)
|
||||
if (reuse)
|
||||
{
|
||||
ptr_ = ap.ptr_;
|
||||
ap.ptr_ = 0;
|
||||
|
||||
@ -100,7 +100,8 @@ public:
|
||||
|
||||
// Edit
|
||||
|
||||
//- Return tmp pointer for reuse
|
||||
//- Return tmp pointer for reuse.
|
||||
// Returns a clone if the object is not a temporary
|
||||
inline T* ptr() const;
|
||||
|
||||
//- If object pointer points to valid object:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------------------------------------------r-------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
@ -171,7 +171,7 @@ inline T* Foam::tmp<T>::ptr() const
|
||||
template<class T>
|
||||
inline void Foam::tmp<T>::clear() const
|
||||
{
|
||||
if (isTmp_ && ptr_) // skip this bit: && ptr_->okToDelete())
|
||||
if (isTmp_ && ptr_) // Skip this bit: && ptr_->okToDelete())
|
||||
{
|
||||
delete ptr_;
|
||||
ptr_ = 0;
|
||||
@ -326,7 +326,7 @@ inline void Foam::tmp<T>::operator=(const tmp<T>& t)
|
||||
}
|
||||
|
||||
ptr_ = t.ptr_;
|
||||
t.ptr_ = 0;
|
||||
const_cast<tmp<T>&>(t).ptr_ = 0;
|
||||
ptr_->resetRefCount();
|
||||
}
|
||||
else
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -206,12 +206,12 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh
|
||||
labelList& l,
|
||||
labelList& u,
|
||||
const label comm,
|
||||
bool reUse
|
||||
bool reuse
|
||||
)
|
||||
:
|
||||
lduAddressing(nCells),
|
||||
lowerAddr_(l, reUse),
|
||||
upperAddr_(u, reUse),
|
||||
lowerAddr_(l, reuse),
|
||||
upperAddr_(u, reuse),
|
||||
comm_(comm)
|
||||
{}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -117,7 +117,7 @@ public:
|
||||
labelList& l,
|
||||
labelList& u,
|
||||
const label comm,
|
||||
bool reUse
|
||||
bool reuse
|
||||
);
|
||||
|
||||
//- Add interfaces to a mesh constructed without
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -143,38 +143,38 @@ Foam::mapPolyMesh::mapPolyMesh
|
||||
labelList& oldPatchStarts,
|
||||
labelList& oldPatchNMeshPoints,
|
||||
autoPtr<scalarField>& oldCellVolumesPtr,
|
||||
const bool reUse
|
||||
const bool reuse
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
nOldPoints_(nOldPoints),
|
||||
nOldFaces_(nOldFaces),
|
||||
nOldCells_(nOldCells),
|
||||
pointMap_(pointMap, reUse),
|
||||
pointsFromPointsMap_(pointsFromPoints, reUse),
|
||||
faceMap_(faceMap, reUse),
|
||||
facesFromPointsMap_(facesFromPoints, reUse),
|
||||
facesFromEdgesMap_(facesFromEdges, reUse),
|
||||
facesFromFacesMap_(facesFromFaces, reUse),
|
||||
cellMap_(cellMap, reUse),
|
||||
cellsFromPointsMap_(cellsFromPoints, reUse),
|
||||
cellsFromEdgesMap_(cellsFromEdges, reUse),
|
||||
cellsFromFacesMap_(cellsFromFaces, reUse),
|
||||
cellsFromCellsMap_(cellsFromCells, reUse),
|
||||
reversePointMap_(reversePointMap, reUse),
|
||||
reverseFaceMap_(reverseFaceMap, reUse),
|
||||
reverseCellMap_(reverseCellMap, reUse),
|
||||
pointMap_(pointMap, reuse),
|
||||
pointsFromPointsMap_(pointsFromPoints, reuse),
|
||||
faceMap_(faceMap, reuse),
|
||||
facesFromPointsMap_(facesFromPoints, reuse),
|
||||
facesFromEdgesMap_(facesFromEdges, reuse),
|
||||
facesFromFacesMap_(facesFromFaces, reuse),
|
||||
cellMap_(cellMap, reuse),
|
||||
cellsFromPointsMap_(cellsFromPoints, reuse),
|
||||
cellsFromEdgesMap_(cellsFromEdges, reuse),
|
||||
cellsFromFacesMap_(cellsFromFaces, reuse),
|
||||
cellsFromCellsMap_(cellsFromCells, reuse),
|
||||
reversePointMap_(reversePointMap, reuse),
|
||||
reverseFaceMap_(reverseFaceMap, reuse),
|
||||
reverseCellMap_(reverseCellMap, reuse),
|
||||
flipFaceFlux_(flipFaceFlux),
|
||||
patchPointMap_(patchPointMap, reUse),
|
||||
pointZoneMap_(pointZoneMap, reUse),
|
||||
faceZonePointMap_(faceZonePointMap, reUse),
|
||||
faceZoneFaceMap_(faceZoneFaceMap, reUse),
|
||||
cellZoneMap_(cellZoneMap, reUse),
|
||||
preMotionPoints_(preMotionPoints, reUse),
|
||||
patchPointMap_(patchPointMap, reuse),
|
||||
pointZoneMap_(pointZoneMap, reuse),
|
||||
faceZonePointMap_(faceZonePointMap, reuse),
|
||||
faceZoneFaceMap_(faceZoneFaceMap, reuse),
|
||||
cellZoneMap_(cellZoneMap, reuse),
|
||||
preMotionPoints_(preMotionPoints, reuse),
|
||||
oldPatchSizes_(oldPatchStarts.size()),
|
||||
oldPatchStarts_(oldPatchStarts, reUse),
|
||||
oldPatchNMeshPoints_(oldPatchNMeshPoints, reUse),
|
||||
oldCellVolumesPtr_(oldCellVolumesPtr, reUse)
|
||||
oldPatchStarts_(oldPatchStarts, reuse),
|
||||
oldPatchNMeshPoints_(oldPatchNMeshPoints, reuse),
|
||||
oldCellVolumesPtr_(oldCellVolumesPtr, reuse)
|
||||
{
|
||||
if (oldPatchStarts_.size() > 0)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -349,7 +349,7 @@ public:
|
||||
labelList& oldPatchStarts,
|
||||
labelList& oldPatchNMeshPoints,
|
||||
autoPtr<scalarField>& oldCellVolumesPtr,
|
||||
const bool reUse
|
||||
const bool reuse
|
||||
);
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -112,7 +112,7 @@ public:
|
||||
const label exposedPatchID,
|
||||
labelList& oldPatchStarts,
|
||||
labelList& oldPatchNMeshPoints,
|
||||
const bool reUse
|
||||
const bool reuse
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -111,11 +111,11 @@ PrimitivePatch
|
||||
(
|
||||
FaceList<Face>& faces,
|
||||
Field<PointType>& points,
|
||||
const bool reUse
|
||||
const bool reuse
|
||||
)
|
||||
:
|
||||
FaceList<Face>(faces, reUse),
|
||||
points_(points, reUse),
|
||||
FaceList<Face>(faces, reuse),
|
||||
points_(points, reuse),
|
||||
edgesPtr_(NULL),
|
||||
nInternalEdges_(-1),
|
||||
boundaryPointsPtr_(NULL),
|
||||
|
||||
@ -255,7 +255,7 @@ public:
|
||||
(
|
||||
FaceList<Face>& faces,
|
||||
Field<PointType>& points,
|
||||
const bool reUse
|
||||
const bool reuse
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -151,8 +151,7 @@ Foam::combustionModels::laminar<Type>::dQ() const
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -183,8 +182,7 @@ Foam::combustionModels::laminar<Type>::Sh() const
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,8 +90,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::dQ() const
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -117,8 +116,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::Sh() const
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -154,8 +154,7 @@ singleStepCombustion<CombThermoType, ThermoType>::dQ() const
|
||||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -99,6 +99,7 @@ $(fvPatchFields)/fvPatchField/fvPatchFields.C
|
||||
basicFvPatchFields = $(fvPatchFields)/basic
|
||||
$(basicFvPatchFields)/basicSymmetry/basicSymmetryFvPatchScalarField.C
|
||||
$(basicFvPatchFields)/calculated/calculatedFvPatchFields.C
|
||||
$(basicFvPatchFields)/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C
|
||||
$(basicFvPatchFields)/coupled/coupledFvPatchFields.C
|
||||
$(basicFvPatchFields)/directionMixed/directionMixedFvPatchFields.C
|
||||
$(basicFvPatchFields)/fixedGradient/fixedGradientFvPatchFields.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,6 +31,7 @@ License
|
||||
#include "fvmLaplacian.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "adjustPhi.H"
|
||||
#include "fvcMeshPhi.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
@ -221,47 +221,93 @@ void Foam::MRFZoneList::makeRelative(surfaceScalarField& phi) const
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::MRFZoneList::relative
|
||||
(
|
||||
const tmp<surfaceScalarField>& phi
|
||||
const tmp<surfaceScalarField>& tphi
|
||||
) const
|
||||
{
|
||||
tmp<surfaceScalarField> rphi(phi.ptr());
|
||||
makeRelative(rphi());
|
||||
return rphi;
|
||||
if (size())
|
||||
{
|
||||
tmp<surfaceScalarField> rphi
|
||||
(
|
||||
reuseTmpGeometricField<scalar, scalar, fvsPatchField, surfaceMesh>
|
||||
::New
|
||||
(
|
||||
tphi,
|
||||
"relative(" + tphi().name() + ')',
|
||||
tphi().dimensions(),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
makeRelative(rphi());
|
||||
|
||||
reuseTmpGeometricField<scalar, scalar, fvsPatchField, surfaceMesh>
|
||||
::clear(tphi);
|
||||
|
||||
return rphi;
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<surfaceScalarField>(tphi, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Foam::scalar>>
|
||||
Foam::MRFZoneList::relative
|
||||
(
|
||||
const tmp<FieldField<fvsPatchField, scalar>>& phi
|
||||
const tmp<FieldField<fvsPatchField, scalar>>& tphi
|
||||
) const
|
||||
{
|
||||
tmp<FieldField<fvsPatchField, scalar>> rphi(phi.ptr());
|
||||
|
||||
forAll(*this, i)
|
||||
if (size())
|
||||
{
|
||||
operator[](i).makeRelative(rphi());
|
||||
}
|
||||
tmp<FieldField<fvsPatchField, scalar>> rphi
|
||||
(
|
||||
reuseTmpFieldField<fvsPatchField, scalar, scalar>::New(tphi, true)
|
||||
);
|
||||
|
||||
return rphi;
|
||||
forAll(*this, i)
|
||||
{
|
||||
operator[](i).makeRelative(rphi());
|
||||
}
|
||||
|
||||
reuseTmpFieldField<fvsPatchField, scalar, scalar>::clear(tphi);
|
||||
|
||||
return rphi;
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<FieldField<fvsPatchField, scalar>>(tphi, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::Field<Foam::scalar>>
|
||||
Foam::MRFZoneList::relative
|
||||
(
|
||||
const tmp<Field<scalar>>& phi,
|
||||
const tmp<Field<scalar>>& tphi,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<Field<scalar>> rphi(phi.ptr());
|
||||
|
||||
forAll(*this, i)
|
||||
if (size())
|
||||
{
|
||||
operator[](i).makeRelative(rphi(), patchi);
|
||||
}
|
||||
tmp<Field<scalar>> rphi
|
||||
(
|
||||
reuseTmp<scalar, scalar>::New(tphi, true)
|
||||
);
|
||||
|
||||
return rphi;
|
||||
forAll(*this, i)
|
||||
{
|
||||
operator[](i).makeRelative(rphi(), patchi);
|
||||
}
|
||||
|
||||
reuseTmp<scalar, scalar>::clear(tphi);
|
||||
|
||||
return rphi;
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<Field<scalar>>(tphi, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -298,12 +344,34 @@ void Foam::MRFZoneList::makeAbsolute(surfaceScalarField& phi) const
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::MRFZoneList::absolute
|
||||
(
|
||||
const tmp<surfaceScalarField>& phi
|
||||
const tmp<surfaceScalarField>& tphi
|
||||
) const
|
||||
{
|
||||
tmp<surfaceScalarField> rphi(phi.ptr());
|
||||
makeAbsolute(rphi());
|
||||
return rphi;
|
||||
if (size())
|
||||
{
|
||||
tmp<surfaceScalarField> rphi
|
||||
(
|
||||
reuseTmpGeometricField<scalar, scalar, fvsPatchField, surfaceMesh>
|
||||
::New
|
||||
(
|
||||
tphi,
|
||||
"absolute(" + tphi().name() + ')',
|
||||
tphi().dimensions(),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
makeAbsolute(rphi());
|
||||
|
||||
reuseTmpGeometricField<scalar, scalar, fvsPatchField, surfaceMesh>
|
||||
::clear(tphi);
|
||||
|
||||
return rphi;
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<surfaceScalarField>(tphi, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ if (LTS)
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("one", dimless/dimTime, 1),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -11,7 +11,9 @@
|
||||
#include "linear.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "calculatedFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
#include "constrainHbyA.H"
|
||||
#include "constrainPressure.H"
|
||||
|
||||
@ -48,19 +48,6 @@ Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
const calculatedFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
@ -74,6 +61,19 @@ Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
const calculatedFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
@ -154,7 +154,7 @@ Foam::calculatedFvPatchField<Type>::valueInternalCoeffs
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"default boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -174,7 +174,7 @@ Foam::calculatedFvPatchField<Type>::valueBoundaryCoeffs
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"default boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -191,7 +191,7 @@ Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"default boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -208,7 +208,7 @@ Foam::calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"default boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -0,0 +1,112 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "extrapolatedCalculatedFvPatchField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::extrapolatedCalculatedFvPatchField<Type>::
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
calculatedFvPatchField<Type>(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::extrapolatedCalculatedFvPatchField<Type>::
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const dictionary& dict,
|
||||
const bool valueRequired
|
||||
)
|
||||
:
|
||||
calculatedFvPatchField<Type>(p, iF, dict, valueRequired)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::extrapolatedCalculatedFvPatchField<Type>::
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const extrapolatedCalculatedFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
calculatedFvPatchField<Type>(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::extrapolatedCalculatedFvPatchField<Type>::
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const extrapolatedCalculatedFvPatchField<Type>& ptf
|
||||
)
|
||||
:
|
||||
calculatedFvPatchField<Type>(ptf)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::extrapolatedCalculatedFvPatchField<Type>::
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const extrapolatedCalculatedFvPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
calculatedFvPatchField<Type>(ptf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::extrapolatedCalculatedFvPatchField<Type>::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
this->updateCoeffs();
|
||||
}
|
||||
|
||||
calculatedFvPatchField<Type>::operator==(this->patchInternalField());
|
||||
calculatedFvPatchField<Type>::evaluate();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,165 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::extrapolatedCalculatedFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
This boundary condition applies a zero-gradient condition from the patch
|
||||
internal field onto the patch faces when \c evaluated but may also be
|
||||
assigned. \c snGrad returns the patch gradient evaluated from the current
|
||||
internal and patch field values rather than returning zero.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type extrapolatedCalculated;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
extrapolatedCalculatedFvPatchField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef extrapolatedCalculatedFvPatchField_H
|
||||
#define extrapolatedCalculatedFvPatchField_H
|
||||
|
||||
#include "calculatedFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class extrapolatedCalculatedFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class extrapolatedCalculatedFvPatchField
|
||||
:
|
||||
public calculatedFvPatchField<Type>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("extrapolatedCalculated");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const dictionary&,
|
||||
const bool valueRequired=false
|
||||
);
|
||||
|
||||
//- Construct by mapping given patchField<Type> onto a new patch
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const extrapolatedCalculatedFvPatchField<Type>&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const extrapolatedCalculatedFvPatchField<Type>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<fvPatchField<Type>>
|
||||
(
|
||||
new extrapolatedCalculatedFvPatchField<Type>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const extrapolatedCalculatedFvPatchField<Type>&,
|
||||
const DimensionedField<Type, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchField<Type>>
|
||||
(
|
||||
new extrapolatedCalculatedFvPatchField<Type>(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Evaluate the patch field
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "extrapolatedCalculatedFvPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "volMesh.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makePatchFields(extrapolatedCalculated);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef extrapolatedCalculatedFvPatchFields_H
|
||||
#define extrapolatedCalculatedFvPatchFields_H
|
||||
|
||||
#include "extrapolatedCalculatedFvPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeFieldTypedefs(extrapolatedCalculated);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,50 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef extrapolatedCalculatedFvPatchFieldsFwd_H
|
||||
#define extrapolatedCalculatedFvPatchFieldsFwd_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type> class extrapolatedCalculatedFvPatchField;
|
||||
|
||||
makePatchTypeFieldTypedefs(extrapolatedCalculated);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -65,6 +65,9 @@ class volMesh;
|
||||
template<class Type>
|
||||
class fvPatchField;
|
||||
|
||||
template<class Type>
|
||||
class calculatedFvPatchField;
|
||||
|
||||
template<class Type>
|
||||
class fvMatrix;
|
||||
|
||||
@ -106,6 +109,7 @@ class fvPatchField
|
||||
public:
|
||||
|
||||
typedef fvPatch Patch;
|
||||
typedef calculatedFvPatchField<Type> Calculated;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
@ -65,6 +65,9 @@ class surfaceMesh;
|
||||
template<class Type>
|
||||
class fvsPatchField;
|
||||
|
||||
template<class Type>
|
||||
class calculatedFvsPatchField;
|
||||
|
||||
template<class Type>
|
||||
Ostream& operator<<(Ostream&, const fvsPatchField<Type>&);
|
||||
|
||||
@ -90,6 +93,7 @@ class fvsPatchField
|
||||
public:
|
||||
|
||||
typedef fvPatch Patch;
|
||||
typedef calculatedFvsPatchField<Type> Calculated;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
@ -57,7 +57,7 @@ tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT() const
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("CorDeltaT", cofrDeltaT.dimensions(), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT() const
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("rDeltaT", dimless/dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "fvMesh.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -66,7 +66,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero),
|
||||
zeroGradientFvPatchField<Type>::typeName
|
||||
extrapolatedCalculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "fvcSurfaceIntegrate.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -74,7 +74,7 @@ reconstruct
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
inv(surfaceSum(SfHat*mesh.Sf()))&surfaceSum(SfHat*ssf),
|
||||
zeroGradientFvPatchField<GradType>::typeName
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "fvMesh.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -72,7 +72,7 @@ tmp<volScalarField> reconstructMag(const surfaceScalarField& ssf)
|
||||
ssf.dimensions()/dimArea,
|
||||
scalar(0)
|
||||
),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "fvcReconstruct.H"
|
||||
#include "fvMesh.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -81,7 +81,7 @@ reconstruct
|
||||
ssf.dimensions()/dimArea,
|
||||
pTraits<GradType>::zero
|
||||
),
|
||||
zeroGradientFvPatchField<GradType>::typeName
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "fvcSurfaceIntegrate.H"
|
||||
#include "fvMesh.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -104,7 +104,7 @@ surfaceIntegrate
|
||||
ssf.dimensions()/dimVol,
|
||||
pTraits<Type>::zero
|
||||
),
|
||||
zeroGradientFvPatchField<Type>::typeName
|
||||
extrapolatedCalculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
|
||||
@ -155,7 +155,7 @@ surfaceSum
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero),
|
||||
zeroGradientFvPatchField<Type>::typeName
|
||||
extrapolatedCalculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#include "gaussGrad.H"
|
||||
#include "fvMesh.H"
|
||||
#include "volMesh.H"
|
||||
#include "zeroGradientFvPatchField.H"
|
||||
#include "extrapolatedCalculatedFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -77,7 +77,7 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad
|
||||
vtf.dimensions()/dimLength,
|
||||
pTraits<GradType>::zero
|
||||
),
|
||||
zeroGradientFvPatchField<GradType>::typeName
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
);
|
||||
GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad();
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "gaussGrad.H"
|
||||
#include "zeroGradientFvPatchField.H"
|
||||
#include "extrapolatedCalculatedFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -67,7 +67,7 @@ Foam::fv::gaussGrad<Type>::gradf
|
||||
ssf.dimensions()/dimLength,
|
||||
pTraits<GradType>::zero
|
||||
),
|
||||
zeroGradientFvPatchField<GradType>::typeName
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
);
|
||||
GeometricField<GradType, fvPatchField, volMesh>& gGrad = tgGrad();
|
||||
|
||||
@ -30,7 +30,7 @@ License
|
||||
#include "volMesh.H"
|
||||
#include "surfaceMesh.H"
|
||||
#include "GeometricField.H"
|
||||
#include "zeroGradientFvPatchField.H"
|
||||
#include "extrapolatedCalculatedFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -73,7 +73,7 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad
|
||||
vsf.dimensions()/dimLength,
|
||||
pTraits<GradType>::zero
|
||||
),
|
||||
zeroGradientFvPatchField<GradType>::typeName
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
);
|
||||
GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad();
|
||||
|
||||
@ -26,7 +26,7 @@ License
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "calculatedFvPatchFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "coupledFvPatchFields.H"
|
||||
#include "UIndirectList.H"
|
||||
|
||||
@ -739,7 +739,7 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::A() const
|
||||
),
|
||||
psi_.mesh(),
|
||||
dimensions_/psi_.dimensions()/dimVol,
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -768,7 +768,7 @@ Foam::fvMatrix<Type>::H() const
|
||||
),
|
||||
psi_.mesh(),
|
||||
dimensions_/dimVol,
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvPatchField, volMesh>& Hphi = tHphi();
|
||||
@ -830,7 +830,7 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::H1() const
|
||||
),
|
||||
psi_.mesh(),
|
||||
dimensions_/(dimVol*psi_.dimensions()),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
volScalarField& H1_ = tH1();
|
||||
@ -2274,7 +2274,7 @@ Foam::operator&
|
||||
),
|
||||
psi.mesh(),
|
||||
M.dimensions()/dimVol,
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvPatchField, volMesh>& Mphi = tMphi();
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvScalarMatrix.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
@ -224,7 +224,7 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Foam::scalar>::H() const
|
||||
),
|
||||
psi_.mesh(),
|
||||
dimensions_/dimVol,
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
volScalarField& Hphi = tHphi();
|
||||
@ -256,7 +256,7 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Foam::scalar>::H1() const
|
||||
),
|
||||
psi_.mesh(),
|
||||
dimensions_/(dimVol*psi_.dimensions()),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
volScalarField& H1_ = tH1();
|
||||
|
||||
@ -73,7 +73,7 @@ SourceFiles
|
||||
#include "surfaceInterpolationScheme.H"
|
||||
#include "blendedSchemeBase.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "fvcSurfaceIntegrate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -230,7 +230,7 @@ public:
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("Co", dimless, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
scalarField sumPhi
|
||||
|
||||
@ -44,6 +44,7 @@ SourceFiles
|
||||
#include "skewCorrectionVectors.H"
|
||||
#include "linear.H"
|
||||
#include "gaussGrad.H"
|
||||
#include "zeroGradientFvPatchField.H"
|
||||
#include "mixedFvPatchField.H"
|
||||
#include "directionMixedFvPatchField.H"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "basicThermo.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "geometricOneField.H"
|
||||
|
||||
@ -103,7 +104,7 @@ Foam::fv::solidificationMeltingSource::Cp() const
|
||||
dimEnergy/dimMass/dimTemperature,
|
||||
CpRef
|
||||
),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -702,7 +702,7 @@ Foam::genericFvPatchField<Type>::valueInternalCoeffs
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"generic boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -723,7 +723,7 @@ Foam::genericFvPatchField<Type>::valueBoundaryCoeffs
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"generic boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -741,7 +741,7 @@ Foam::genericFvPatchField<Type>::gradientInternalCoeffs() const
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"generic boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -758,7 +758,7 @@ Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< "\n You are probably trying to solve for a field with a "
|
||||
"generic boundary condition."
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -470,7 +470,7 @@ Foam::KinematicCloud<CloudType>::vDotSweep() const
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("zero", dimless/dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -509,7 +509,7 @@ Foam::KinematicCloud<CloudType>::theta() const
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("zero", dimless, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Basic.H"
|
||||
#include "zeroGradientFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ License
|
||||
#include "fvmLaplacian.H"
|
||||
#include "fvcReconstruct.H"
|
||||
#include "volPointInterpolation.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -43,8 +44,17 @@ Foam::PackingModels::Implicit<CloudType>::Implicit
|
||||
PackingModel<CloudType>(dict, owner, typeName),
|
||||
alpha_
|
||||
(
|
||||
this->owner().name() + ":alpha",
|
||||
this->owner().theta()
|
||||
IOobject
|
||||
(
|
||||
this->owner().name() + ":alpha",
|
||||
this->owner().db().time().timeName(),
|
||||
this->owner().mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
this->owner().mesh(),
|
||||
dimensionedScalar("zero", dimless, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
phiCorrect_(NULL),
|
||||
uCorrect_(NULL),
|
||||
@ -53,6 +63,7 @@ Foam::PackingModels::Implicit<CloudType>::Implicit
|
||||
alphaMin_(readScalar(this->coeffDict().lookup("alphaMin"))),
|
||||
rhoMin_(readScalar(this->coeffDict().lookup("rhoMin")))
|
||||
{
|
||||
alpha_ = this->owner().theta();
|
||||
alpha_.oldTime();
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,6 @@ License
|
||||
#include "Random.H"
|
||||
#include "searchableSurfaces.H"
|
||||
#include "treeBoundBox.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "fvMeshTools.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -2789,8 +2788,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("zero", dimless, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("zero", dimless, 0)
|
||||
);
|
||||
|
||||
const labelList& cellLevel = meshCutter_.cellLevel();
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "CourantNo.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "fvcSurfaceIntegrate.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "gaussConvectionScheme.H"
|
||||
#include "blendedSchemeBase.H"
|
||||
#include "fvcCellReduce.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@ License
|
||||
|
||||
#include "reactingOneDim.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvm.H"
|
||||
#include "fvcDiv.H"
|
||||
@ -464,8 +463,6 @@ reactingOneDim::reactingOneDim
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
regionMesh()
|
||||
//dimensionedScalar("zero", dimEnergy/dimArea/dimTime, 0.0),
|
||||
//zeroGradientFvPatchVectorField::typeName
|
||||
),
|
||||
|
||||
lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -223,8 +223,7 @@ inline tmp<volScalarField> kinematicSingleLayer::gNorm() const
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
g_ & nHat(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
g_ & nHat()
|
||||
)
|
||||
);
|
||||
|
||||
@ -246,8 +245,7 @@ inline tmp<volScalarField> kinematicSingleLayer::gNormClipped() const
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
g_ & nHat(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
g_ & nHat()
|
||||
)
|
||||
);
|
||||
|
||||
@ -272,8 +270,7 @@ inline tmp<volVectorField> kinematicSingleLayer::gTan() const
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
g_ - nHat()*gNorm(),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
g_ - nHat()*gNorm()
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,6 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constantFilmThermo.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -270,7 +271,7 @@ tmp<volScalarField> constantFilmThermo::rho() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimDensity, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -297,7 +298,7 @@ tmp<volScalarField> constantFilmThermo::mu() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPressure*dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -324,7 +325,7 @@ tmp<volScalarField> constantFilmThermo::sigma() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -351,7 +352,7 @@ tmp<volScalarField> constantFilmThermo::Cp() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -378,7 +379,7 @@ tmp<volScalarField> constantFilmThermo::kappa() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "demandDrivenData.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -250,7 +251,7 @@ tmp<volScalarField> liquidFilmThermo::rho() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimDensity, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -298,7 +299,7 @@ tmp<volScalarField> liquidFilmThermo::mu() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPressure*dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -346,7 +347,7 @@ tmp<volScalarField> liquidFilmThermo::sigma() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -394,7 +395,7 @@ tmp<volScalarField> liquidFilmThermo::Cp() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -442,7 +443,7 @@ tmp<volScalarField> liquidFilmThermo::kappa() const
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -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-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,7 +31,7 @@ License
|
||||
#include "volFields.H"
|
||||
#include "fvmSup.H"
|
||||
#include "kinematicSingleLayer.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -84,7 +84,7 @@ tmp<volVectorField> laminar::Us() const
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
dimensionedVector("zero", dimVelocity, vector::zero),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
extrapolatedCalculatedFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,6 @@ License
|
||||
|
||||
#include "constantRadiation.H"
|
||||
#include "volFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -117,8 +116,7 @@ tmp<volScalarField> constantRadiation::Shs()
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,7 +26,6 @@ License
|
||||
#include "noRadiation.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -89,8 +88,7 @@ tmp<volScalarField> noRadiation::Shs()
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,6 @@ License
|
||||
|
||||
#include "primaryRadiation.H"
|
||||
#include "volFields.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -104,8 +103,7 @@ tmp<volScalarField> primaryRadiation::Shs()
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user