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
);
}