mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use calculatedType() and zeroGradientType() methods
This commit is contained in:
@ -75,7 +75,7 @@ void Foam::functionObjects::nearWallFields::createFields
|
||||
io,
|
||||
fld,
|
||||
patchSet_.toc(),
|
||||
calculatedFvPatchField<Type>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::rhoScale
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
p,
|
||||
fvPatchField<scalar>::calculatedType()
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
|
||||
IOobject::NO_READ
|
||||
),
|
||||
alpha,
|
||||
fvPatchField<scalar>::calculatedType()
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
volScalarField backgroundAlpha
|
||||
@ -134,7 +134,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
|
||||
IOobject::NO_READ
|
||||
),
|
||||
alpha,
|
||||
fvPatchField<scalar>::calculatedType()
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ bool Foam::functionObjects::writeCellCentres::write()
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"C",
|
||||
mesh_.C().name(),
|
||||
time_.timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
@ -85,11 +85,11 @@ bool Foam::functionObjects::writeCellCentres::write()
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
mesh_.C(),
|
||||
calculatedFvPatchScalarField::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
Log << type() << " " << name() << " write:" << nl
|
||||
<< " writing cell-volumes field " << C.name()
|
||||
<< " writing cell-centres field " << C.name()
|
||||
<< " to " << time_.timeName() << endl;
|
||||
|
||||
C.write();
|
||||
|
||||
@ -86,11 +86,13 @@ bool Foam::functionObjects::writeCellVolumes::write()
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(mesh_.V().dimensions(), Zero),
|
||||
calculatedFvPatchField<scalar>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
V.ref() = mesh_.V();
|
||||
|
||||
// Without correctBoundaryConditions() - boundary faces have zero volume
|
||||
|
||||
Log << type() << " " << name() << " write:" << nl
|
||||
<< " writing cell-volumes field " << V.name()
|
||||
<< " to " << time_.timeName() << endl;
|
||||
|
||||
@ -28,7 +28,6 @@ License
|
||||
#include "electricPotential.H"
|
||||
#include "fvc.H"
|
||||
#include "fvm.H"
|
||||
#include "calculatedFvPatchField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -95,7 +94,7 @@ Foam::functionObjects::electricPotential::sigma() const
|
||||
(
|
||||
sigmaIO,
|
||||
tsigma,
|
||||
calculatedFvPatchField<scalar>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,7 +103,7 @@ Foam::functionObjects::electricPotential::sigma() const
|
||||
sigmaIO,
|
||||
mesh_,
|
||||
sigma_,
|
||||
calculatedFvPatchField<scalar>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
}
|
||||
|
||||
@ -142,7 +141,7 @@ Foam::functionObjects::electricPotential::epsilonm() const
|
||||
(
|
||||
epsilonrIO,
|
||||
epsilon0*tepsilonr,
|
||||
calculatedFvPatchField<scalar>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
}
|
||||
|
||||
@ -151,7 +150,7 @@ Foam::functionObjects::electricPotential::epsilonm() const
|
||||
epsilonrIO,
|
||||
mesh_,
|
||||
epsilon0*epsilonr_,
|
||||
calculatedFvPatchField<scalar>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
}
|
||||
|
||||
@ -359,7 +358,7 @@ bool Foam::functionObjects::electricPotential::write()
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
-fvc::grad(eV),
|
||||
calculatedFvPatchField<vector>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
Log << tab << E.name() << endl;
|
||||
@ -382,7 +381,7 @@ bool Foam::functionObjects::electricPotential::write()
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
-tsigma*fvc::grad(eV),
|
||||
calculatedFvPatchField<vector>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
Log << tab << eJ().name() << endl;
|
||||
@ -405,7 +404,7 @@ bool Foam::functionObjects::electricPotential::write()
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
fvc::div(tepsilonm*E),
|
||||
calculatedFvPatchField<scalar>::typeName
|
||||
fvPatchFieldBase::calculatedType()
|
||||
);
|
||||
|
||||
Log << tab << erho().name() << endl;
|
||||
|
||||
Reference in New Issue
Block a user