Formatting

This commit is contained in:
Hrvoje Jasak 2011-05-24 17:20:38 +01:00
parent 743301de42
commit 7e04c9bcb9
8 changed files with 34 additions and 33 deletions

View file

@ -161,7 +161,8 @@ void fixedNormalSlipFvPatchField<Type>::evaluate(const Pstream::commsTypes)
template<class Type> template<class Type>
tmp<Field<Type> > fixedNormalSlipFvPatchField<Type>::snGradTransformDiag() const tmp<Field<Type> >
fixedNormalSlipFvPatchField<Type>::snGradTransformDiag() const
{ {
vectorField nHat = this->patch().nf(); vectorField nHat = this->patch().nf();
vectorField diag(nHat.size()); vectorField diag(nHat.size());

View file

@ -170,7 +170,7 @@ tmp<Field<Type> > partialSlipFvPatchField<Type>::snGradTransformDiag() const
diag.replace(vector::Y, mag(nHat.component(vector::Y))); diag.replace(vector::Y, mag(nHat.component(vector::Y)));
diag.replace(vector::Z, mag(nHat.component(vector::Z))); diag.replace(vector::Z, mag(nHat.component(vector::Z)));
return return
valueFraction_*pTraits<Type>::one valueFraction_*pTraits<Type>::one
+ (1.0 - valueFraction_) + (1.0 - valueFraction_)
*transformFieldMask<Type>(pow<vector, pTraits<Type>::rank>(diag)); *transformFieldMask<Type>(pow<vector, pTraits<Type>::rank>(diag));

View file

@ -50,6 +50,21 @@ waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField
{} {}
template<class Type>
waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
advectiveFvPatchField<Type>(p, iF, dict),
psiName_(dict.lookupOrDefault<word>("psi", "psi")),
UName_(dict.lookupOrDefault<word>("U", "U")),
gamma_(readScalar(dict.lookup("gamma")))
{}
template<class Type> template<class Type>
waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField
( (
@ -66,21 +81,6 @@ waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField
{} {}
template<class Type>
waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
advectiveFvPatchField<Type>(p, iF, dict),
psiName_(dict.lookupOrDefault<word>("psi", "psi")),
UName_(dict.lookupOrDefault<word>("U", "U")),
gamma_(readScalar(dict.lookup("gamma")))
{}
template<class Type> template<class Type>
waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField
( (
@ -89,7 +89,7 @@ waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField
: :
advectiveFvPatchField<Type>(ptpsf), advectiveFvPatchField<Type>(ptpsf),
psiName_(ptpsf.psiName_), psiName_(ptpsf.psiName_),
UName_(ptpsf.psiName_), UName_(ptpsf.UName_),
gamma_(ptpsf.gamma_) gamma_(ptpsf.gamma_)
{} {}
@ -201,7 +201,7 @@ void waveTransmissiveFvPatchField<Type>::write(Ostream& os) const
{ {
os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl; os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl;
} }
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl; os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
if (this->lInf_ > SMALL) if (this->lInf_ > SMALL)

View file

@ -166,19 +166,19 @@ public:
// Add the patch constructor functions to the hash tables // Add the patch constructor functions to the hash tables
#define makeFvDivTypeScheme(SS, Type) \ #define makeFvDivTypeScheme(SS, Type) \
\ \
defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \ defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
\ \
divScheme<Type>::addIstreamConstructorToTable<SS<Type> > \ divScheme<Type>::addIstreamConstructorToTable<SS<Type> > \
add##SS##Type##IstreamConstructorToTable_; add##SS##Type##IstreamConstructorToTable_;
#define makeFvDivScheme(SS) \ #define makeFvDivScheme(SS) \
\ \
makeFvDivTypeScheme(SS, vector) \ makeFvDivTypeScheme(SS, vector) \
makeFvDivTypeScheme(SS, sphericalTensor) \ makeFvDivTypeScheme(SS, sphericalTensor) \
makeFvDivTypeScheme(SS, symmTensor) \ makeFvDivTypeScheme(SS, symmTensor) \
makeFvDivTypeScheme(SS, tensor) makeFvDivTypeScheme(SS, tensor)

View file

@ -21,7 +21,7 @@ License
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "gaussGrad.H" #include "gaussGrad.H"

View file

@ -85,7 +85,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::meshToMesh
{ {
label baseFaceI = faceMap[subPatch.patch().start()+i]; label baseFaceI = faceMap[subPatch.patch().start()+i];
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) if (baseFaceI >= baseStart && baseFaceI < baseStart + baseSize)
{ {
directAddressing[i] = baseFaceI-baseStart; directAddressing[i] = baseFaceI-baseStart;
} }

View file

@ -116,7 +116,7 @@ DeferredCorrectionLimitedScheme<Type, Limiter, LimitFunc>::limiter
surfaceScalarField::GeometricBoundaryField& bLim = lim.boundaryField(); surfaceScalarField::GeometricBoundaryField& bLim = lim.boundaryField();
forAll(bLim, patchi) forAll (bLim, patchi)
{ {
scalarField& pLim = bLim[patchi]; scalarField& pLim = bLim[patchi];

View file

@ -111,7 +111,7 @@ public:
upwindScheme_(mesh, faceFlux) upwindScheme_(mesh, faceFlux)
{} {}
//- Construct from mesh and Istream. //- Construct from mesh and Istream
// The name of the flux field is read from the Istream and looked-up // The name of the flux field is read from the Istream and looked-up
// from the mesh objectRegistry // from the mesh objectRegistry
DeferredCorrectionLimitedScheme DeferredCorrectionLimitedScheme