Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2013-07-15 15:33:31 +01:00
51 changed files with 81578 additions and 22 deletions

View File

@ -243,6 +243,21 @@ const Foam::fileName& Foam::IOobject::caseName() const
}
Foam::word Foam::IOobject::group() const
{
word::size_type i = name_.find_last_of('.');
if (i == word::npos || i == 0)
{
return word::null;
}
else
{
return name_.substr(i+1, word::npos);
}
}
const Foam::fileName& Foam::IOobject::rootPath() const
{
return time().rootPath();

View File

@ -154,6 +154,7 @@ private:
//- IOobject state
objectState objState_;
protected:
// Protected Member Functions
@ -187,6 +188,9 @@ public:
word& name
);
template<class Name>
static inline word groupName(Name name, const word& group);
// Constructors
@ -313,6 +317,9 @@ public:
// Path components
//- Return group (extension part of name)
word group() const;
const fileName& rootPath() const;
const fileName& caseName() const;

View File

@ -27,6 +27,20 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Name>
inline Foam::word Foam::IOobject::groupName(Name name, const word& group)
{
if (group != word::null)
{
return name + ('.' + group);
}
else
{
return name;
}
}
template<class Stream>
inline Stream& Foam::IOobject::writeBanner(Stream& os, bool noHint)
{

View File

@ -38,6 +38,7 @@ Description
#define geometricOneField_H
#include "oneFieldField.H"
#include "dimensionSet.H"
#include "scalar.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,6 +66,8 @@ public:
// Member Operators
inline const dimensionSet& dimensions() const;
inline scalar operator[](const label) const;
inline oneField field() const;

View File

@ -27,6 +27,11 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
inline const Foam::dimensionSet& Foam::geometricOneField::dimensions() const
{
return dimless;
}
inline Foam::scalar Foam::geometricOneField::operator[](const label) const
{
return scalar(1);

View File

@ -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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,6 +38,7 @@ Description
#define geometricZeroField_H
#include "zeroFieldField.H"
#include "dimensionSet.H"
#include "scalar.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,6 +66,8 @@ public:
// Member Operators
inline const dimensionSet& dimensions() const;
inline scalar operator[](const label) const;
inline zeroField field() const;

View File

@ -27,6 +27,11 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
inline const Foam::dimensionSet& Foam::geometricZeroField::dimensions() const
{
return dimless;
}
inline Foam::scalar Foam::geometricZeroField::operator[](const label) const
{
return scalar(0);

View File

@ -62,8 +62,6 @@ namespace Foam
Istream,
cyclicSlip
);
}

View File

@ -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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -73,8 +73,18 @@ rotatingWallVelocityFvPatchVectorField
axis_(dict.lookup("axis")),
omega_(DataEntry<scalar>::New("omega", dict))
{
// Evaluate the wall velocity
updateCoeffs();
if (dict.found("value"))
{
fvPatchField<vector>::operator=
(
vectorField("value", dict, p.size())
);
}
else
{
// Evaluate the wall velocity
updateCoeffs();
}
}

View File

@ -182,7 +182,7 @@ public:
const word& phaseName
)
{
return name + phaseName;
return IOobject::groupName(name, phaseName);
}
word phasePropertyName(const word& name) const

View File

@ -69,7 +69,6 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture
IOobject::NO_WRITE
)
),
transportModel(U, phi),
twoPhaseMixture(U.mesh(), *this, alpha1Name, alpha2Name),
nuModel1_

View File

@ -47,7 +47,6 @@ Foam::singlePhaseTransportModel::singlePhaseTransportModel
IOobject::NO_WRITE
)
),
transportModel(U, phi),
viscosityModelPtr_(viscosityModel::New("nu", *this, U, phi))
{}

View File

@ -36,10 +36,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::transportModel::transportModel
(
const volVectorField&,
const surfaceScalarField&
)
()
{}

View File

@ -70,10 +70,7 @@ public:
//- Construct from components
transportModel
(
const volVectorField& U,
const surfaceScalarField& phi
);\
();
//- Destructor