Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry authored and Henry committed Feb 11, 2013
2 parents c6b00a1 + f8059ab commit f1e9eae
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 21 deletions.
2 changes: 0 additions & 2 deletions applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
}
}

#include "continuityErrs.H"

p == p_rgh + rho*gh;

if (p_rgh.needReference())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -68,7 +68,7 @@ void ensightCloudField
ensightCaseFile.setf(ios_base::left);
ensightCaseFile
<< ("c" + fieldObject.name()).c_str()
<< (' ' + prepend + "***." + cloudName
<< (' ' + prepend + "****." + cloudName
+ "." + fieldObject.name()).c_str()
<< nl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -201,7 +201,7 @@ void writePatchField
<< pTraits<Type>::typeName
<< " per element: 1 "
<< setw(15) << pfName
<< (' ' + prepend + "***." + pfName).c_str()
<< (' ' + prepend + "****." + pfName).c_str()
<< nl;
}

Expand Down Expand Up @@ -344,7 +344,7 @@ void ensightField
<< pTraits<Type>::typeName
<< " per element: 1 "
<< setw(15) << vf.name()
<< (' ' + prepend + "***." + vf.name()).c_str()
<< (' ' + prepend + "****." + vf.name()).c_str()
<< nl;
}

Expand Down Expand Up @@ -558,7 +558,7 @@ void ensightPointField
<< pTraits<Type>::typeName
<< " per node: 1 "
<< setw(15) << pf.name()
<< (' ' + prepend + "***." + pf.name()).c_str()
<< (' ' + prepend + "****." + pf.name()).c_str()
<< nl;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -243,7 +243,7 @@ int main(int argc, char *argv[])
// test pre check variable if there is a moving mesh
if (meshMoving)
{
geomFileName = prepend + "***";
geomFileName = prepend + "****";
}

ensightCaseFile
Expand Down Expand Up @@ -292,7 +292,7 @@ int main(int argc, char *argv[])
<< (
"measured: 1 "
+ prepend
+ "***."
+ "****."
+ cloudIter.key()
).c_str()
<< nl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace Foam
word itoa(const label n)
{
const label offset = '0';
const label length = 3;
const label length = 4;

char val[length + 1];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -209,6 +209,7 @@ template<class Type>
void timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
{
// Initialise

if (mapperPtr_.empty())
{
pointIOField samplePoints
Expand Down Expand Up @@ -338,6 +339,18 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
)
);

if (vals.size() != mapperPtr_().sourceSize())
{
FatalErrorIn
(
"timeVaryingMappedFixedValueFvPatchField<Type>::"
"checkTable()"
) << "Number of values (" << vals.size()
<< ") differs from the number of points ("
<< mapperPtr_().sourceSize()
<< ") in file " << vals.objectPath() << exit(FatalError);
}

startAverage_ = vals.average();
startSampledValues_ = mapperPtr_().interpolate(vals);
}
Expand Down Expand Up @@ -382,6 +395,19 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
false
)
);

if (vals.size() != mapperPtr_().sourceSize())
{
FatalErrorIn
(
"timeVaryingMappedFixedValueFvPatchField<Type>::"
"checkTable()"
) << "Number of values (" << vals.size()
<< ") differs from the number of points ("
<< mapperPtr_().sourceSize()
<< ") in file " << vals.objectPath() << exit(FatalError);
}

endAverage_ = vals.average();
endSampledValues_ = mapperPtr_().interpolate(vals);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -313,6 +313,18 @@ void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::checkTable()
)
);

if (vals.size() != mapperPtr_().sourceSize())
{
FatalErrorIn
(
"timeVaryingMappedFixedValuePointPatchField<Type>::"
"checkTable()"
) << "Number of values (" << vals.size()
<< ") differs from the number of points ("
<< mapperPtr_().sourceSize()
<< ") in file " << vals.objectPath() << exit(FatalError);
}

startAverage_ = vals.average();
startSampledValues_ = mapperPtr_().interpolate(vals);
}
Expand Down Expand Up @@ -357,6 +369,19 @@ void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::checkTable()
false
)
);

if (vals.size() != mapperPtr_().sourceSize())
{
FatalErrorIn
(
"timeVaryingMappedFixedValuePointPatchField<Type>::"
"checkTable()"
) << "Number of values (" << vals.size()
<< ") differs from the number of points ("
<< mapperPtr_().sourceSize()
<< ") in file " << vals.objectPath() << exit(FatalError);
}

endAverage_ = vals.average();
endSampledValues_ = mapperPtr_().interpolate(vals);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -219,7 +219,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation
)
:
perturb_(perturb),
referenceCS_(calcCoordinateSystem(sourcePoints))
referenceCS_(calcCoordinateSystem(sourcePoints)),
nPoints_(sourcePoints.size())

{
calcWeights(sourcePoints, destPoints);
Expand All @@ -235,7 +236,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation
)
:
perturb_(perturb),
referenceCS_(referenceCS)
referenceCS_(referenceCS),
nPoints_(sourcePoints.size())
{
calcWeights(sourcePoints, destPoints);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -59,6 +59,9 @@ class pointToPointPlanarInterpolation
//- Coordinate system
coordinateSystem referenceCS_;

//- Number of source points (for checking)
label nPoints_;

//- Current interpolation addressing to face centres of underlying
// patch
List<FixedList<label, 3> > nearestVertex_;
Expand Down Expand Up @@ -114,6 +117,12 @@ public:
return referenceCS_;
}

//- Number of source points
label sourceSize() const
{
return nPoints_;
}

// patch
const List<FixedList<label, 3> >& nearestVertex() const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -33,6 +33,17 @@ Foam::tmp<Foam::Field<Type> > Foam::pointToPointPlanarInterpolation::interpolate
const Field<Type>& sourceFld
) const
{
if (nPoints_ != sourceFld.size())
{
FatalErrorIn
(
"pointToPointPlanarInterpolation::interpolate"
"(const Field<Type>&) const"
) << "Number of source points = " << nPoints_
<< " number of values = " << sourceFld.size()
<< exit(FatalError);
}

tmp<Field<Type> > tfld(new Field<Type>(nearestVertex_.size()));
Field<Type>& fld = tfld();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gradSchemes
divSchemes
{
default none;
div(rhoFlux,rho) Gauss limitedLinear 1;
div(rhoFlux,rho) Gauss upwind;
}

laplacianSchemes
Expand Down

0 comments on commit f1e9eae

Please sign in to comment.