Merge remote-tracking branch 'origin/master' into feature/procAgglom

This commit is contained in:
mattijs
2013-07-16 09:08:22 +01:00
56 changed files with 81646 additions and 44 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

@ -45,6 +45,23 @@ namespace Foam
cyclicGAMGInterface,
Istream
);
// Add under name cyclicSlip
addNamedToRunTimeSelectionTable
(
GAMGInterface,
cyclicGAMGInterface,
lduInterface,
cyclicSlip
);
addNamedToRunTimeSelectionTable
(
GAMGInterface,
cyclicGAMGInterface,
Istream,
cyclicSlip
);
}
@ -61,15 +78,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
const label coarseComm
)
:
GAMGInterface
(
index,
coarseInterfaces
// fineInterface,
// localRestrictAddressing,
// neighbourRestrictAddressing
),
//fineCyclicInterface_(refCast<const cyclicLduInterface>(fineInterface))
GAMGInterface(index, coarseInterfaces),
neighbPatchID_
(
refCast<const cyclicLduInterface>(fineInterface).neighbPatchID()
@ -169,11 +178,7 @@ Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer
const labelUList& iF
) const
{
const cyclicGAMGInterface& nbr =
//dynamic_cast<const cyclicGAMGInterface&>
//(
neighbPatch();
//);
const cyclicGAMGInterface& nbr = neighbPatch();
const labelUList& nbrFaceCells = nbr.faceCells();
tmp<labelField> tpnf(new labelField(size()));

View File

@ -54,10 +54,6 @@ class cyclicGAMGInterface
{
// Private data
// //- Reference tor the cyclicLduInterface from which this is
// // agglomerated
// const cyclicLduInterface& fineCyclicInterface_;
//- Neigbour patch number
label neighbPatchID_;
@ -131,13 +127,11 @@ public:
//- Return neigbour processor number
virtual label neighbPatchID() const
{
//return fineCyclicInterface_.neighbPatchID();
return neighbPatchID_;
}
virtual bool owner() const
{
//return fineCyclicInterface_.owner();
return owner_;
}
@ -152,14 +146,12 @@ public:
//- Return face transformation tensor
virtual const tensorField& forwardT() const
{
//return fineCyclicInterface_.forwardT();
return forwardT_;
}
//- Return neighbour-cell transformation tensor
virtual const tensorField& reverseT() const
{
//return fineCyclicInterface_.reverseT();
return reverseT_;
}

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

@ -115,7 +115,7 @@ Foam::fv::pressureGradientExplicitSource::pressureGradientExplicitSource
// Read the initial pressure gradient from file if it exists
IFstream propsFile
(
mesh_.time().timeName()/"uniform"/(name_ + "Properties")
mesh_.time().timePath()/"uniform"/(name_ + "Properties")
);
if (propsFile.good())

View File

@ -259,7 +259,7 @@ void Foam::surfaceFeatures::classifyFeatureAngles
if (eFaces.size() != 2)
{
// Non-manifold. What to do here? Is region edge? external edge?
edgeStat[edgeI] = NONE;
edgeStat[edgeI] = REGION;
}
else
{

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