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

This commit is contained in:
mattijs
2013-05-14 20:52:27 +01:00
14 changed files with 67 additions and 69 deletions

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
@ -43,7 +43,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> >
Su
(
const GeometricField<Type, fvPatchField, volMesh>& su,
GeometricField<Type, fvPatchField, volMesh>& vf
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
return su;
@ -54,7 +54,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> >
Su
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu,
GeometricField<Type, fvPatchField, volMesh>& vf
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
return tsu;
@ -66,7 +66,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> >
Sp
(
const volScalarField& sp,
GeometricField<Type, fvPatchField, volMesh>& vf
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
return sp*vf;
@ -77,7 +77,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> >
Sp
(
const tmp<volScalarField>& tsp,
GeometricField<Type, fvPatchField, volMesh>& vf
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
return tsp*vf;
@ -89,7 +89,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> >
Sp
(
const dimensionedScalar& sp,
GeometricField<Type, fvPatchField, volMesh>& vf
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
return sp*vf;
@ -101,7 +101,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> >
SuSp
(
const volScalarField& sp,
GeometricField<Type, fvPatchField, volMesh>& vf
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
return sp*vf;
@ -112,7 +112,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> >
SuSp
(
const tmp<volScalarField>& tsp,
GeometricField<Type, fvPatchField, volMesh>& vf
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
return tsp*vf;

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
@ -55,14 +55,14 @@ namespace fvc
tmp<GeometricField<Type, fvPatchField, volMesh> > Su
(
const GeometricField<Type, fvPatchField, volMesh>&,
GeometricField<Type, fvPatchField, volMesh>&
const GeometricField<Type, fvPatchField, volMesh>&
);
template<class Type>
tmp<GeometricField<Type, fvPatchField, volMesh> > Su
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
GeometricField<Type, fvPatchField, volMesh>&
const GeometricField<Type, fvPatchField, volMesh>&
);
@ -72,14 +72,14 @@ namespace fvc
tmp<GeometricField<Type, fvPatchField, volMesh> > Sp
(
const volScalarField&,
GeometricField<Type, fvPatchField, volMesh>&
const GeometricField<Type, fvPatchField, volMesh>&
);
template<class Type>
tmp<GeometricField<Type, fvPatchField, volMesh> > Sp
(
const tmp<volScalarField>&,
GeometricField<Type, fvPatchField, volMesh>&
const GeometricField<Type, fvPatchField, volMesh>&
);
@ -87,7 +87,7 @@ namespace fvc
tmp<GeometricField<Type, fvPatchField, volMesh> > Sp
(
const dimensionedScalar&,
GeometricField<Type, fvPatchField, volMesh>&
const GeometricField<Type, fvPatchField, volMesh>&
);
@ -97,14 +97,14 @@ namespace fvc
tmp<GeometricField<Type, fvPatchField, volMesh> > SuSp
(
const volScalarField&,
GeometricField<Type, fvPatchField, volMesh>&
const GeometricField<Type, fvPatchField, volMesh>&
);
template<class Type>
tmp<GeometricField<Type, fvPatchField, volMesh> > SuSp
(
const tmp<volScalarField>&,
GeometricField<Type, fvPatchField, volMesh>&
const GeometricField<Type, fvPatchField, volMesh>&
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,7 @@ public:
// up to the user.
virtual bool parallelAware() const
{
return false;
return true;
}
//- Return for every coordinate the wanted processor number. Use the
@ -90,12 +90,7 @@ public:
const scalarField& cWeights
)
{
notImplemented
(
"decompose(const polyMesh&, const pointField&"
", const scalarField&)"
);
return labelList(0);
return labelList(cc.size(), Pstream::myProcNo());
}
//- Return for every coordinate the wanted processor number. Explicitly
@ -112,12 +107,7 @@ public:
const scalarField& cWeights
)
{
notImplemented
(
"decompose(const labelListList&, const pointField&"
", const scalarField&)"
);
return labelList(0);
return labelList(globalCellCells.size(), Pstream::myProcNo());
}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -241,6 +241,20 @@ Foam::Ostream& Foam::OBJstream::write(const linePointRef& ln)
}
Foam::Ostream& Foam::OBJstream::write
(
const linePointRef& ln,
const vector& n0,
const vector& n1
)
{
write(ln.start(), n0);
write(ln.end(), n1);
write("l ") << nVertices_-1 << ' ' << nVertices_ << nl;
return *this;
}
Foam::Ostream& Foam::OBJstream::write
(
const triPointRef& f,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,7 +92,7 @@ public:
// Access
//- Return the name of the stream
//- Return the number of vertices written
label nVertices() const
{
return nVertices_;
@ -135,6 +135,14 @@ public:
//- Write line
Ostream& write(const linePointRef&);
//- Write line with points and vector normals ('vn')
Ostream& write
(
const linePointRef&,
const vector& n0,
const vector& n1
);
//- Write triangle as points with lines or filled polygon
Ostream& write(const triPointRef&, const bool lines = true);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,7 +34,7 @@ Description
The porous baffle introduces a pressure jump defined by:
\f[
\Delta p = -(I \mu U + 0.5 D \rho |U|^2 L)
\Delta p = -(I \mu U + 0.5 D \rho |U|^2 )L
\f]
where

View File

@ -78,7 +78,7 @@ void Foam::porousBafflePressureFvPatchField<Foam::scalar>::updateCoeffs()
const scalarField nuEffw = turbModel.nuEff()().boundaryField()[patchI];
jump_ = -sign(Un)*(I_*nuEffw + D_*0.5*magUn*length_)*magUn;
jump_ = -sign(Un)*(I_*nuEffw + D_*0.5*magUn)*magUn*length_;
}
else
{
@ -95,7 +95,7 @@ void Foam::porousBafflePressureFvPatchField<Foam::scalar>::updateCoeffs()
Un /= rhow;
jump_ = -sign(Un)*(I_*muEffw + D_*0.5*rhow*magUn*length_)*magUn;
jump_ = -sign(Un)*(I_*muEffw + D_*0.5*rhow*magUn)*magUn*length_;
}
if (debug)