Commit f89bcd33 authored by mattijs's avatar mattijs
Browse files

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

parents 1cf850f1 652e3184
......@@ -5,7 +5,7 @@ tmp<fvVectorMatrix> UEqn
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
==
fvOptions(U)
);
......@@ -17,7 +17,7 @@ rAU = 1.0/UEqn().A();
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p) + fvOptions(U));
solve(UEqn() == -fvc::grad(p));
fvOptions.correct(U);
}
......@@ -2,21 +2,26 @@
cd ${0%/*} || exit 1 # run from this directory
#set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
[ -n "$PV_PLUGIN_PATH" ] || {
echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
exit 1
}
if [ "$ParaView_VERSION" == "3.98.1" ]
then
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
[ -n "$PV_PLUGIN_PATH" ] || {
echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
exit 1
}
# ensure CMake gets the correct C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# ensure CMake gets the correct C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
wmake libso vtkPV398Readers
PV398blockMeshReader/Allwmake
PV398FoamReader/Allwmake
wmake libso vtkPV398Readers
PV398blockMeshReader/Allwmake
PV398FoamReader/Allwmake
else
echo "ERROR: ParaView not found in $ParaView_DIR"
fi
else
echo "ERROR: ParaView not found in $ParaView_DIR"
echo "WARN: PV398 readers not building: ParaView_VERSION=$ParaView_VERSION"
fi
# ----------------------------------------------------------------- end-of-file
......@@ -2,21 +2,26 @@
cd ${0%/*} || exit 1 # run from this directory
#set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
[ -n "$PV_PLUGIN_PATH" ] || {
echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
exit 1
}
if [ "$ParaView_VERSION" != "3.98.1" ]
then
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
[ -n "$PV_PLUGIN_PATH" ] || {
echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
exit 1
}
# ensure CMake gets the correct C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# ensure CMake gets the correct C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
wmake libso vtkPV3Readers
PV3blockMeshReader/Allwmake
PV3FoamReader/Allwmake
wmake libso vtkPV3Readers
PV3blockMeshReader/Allwmake
PV3FoamReader/Allwmake
else
echo "ERROR: ParaView not found in $ParaView_DIR"
fi
else
echo "ERROR: ParaView not found in $ParaView_DIR"
echo "WARN: PV3 readers not building: ParaView_VERSION=$ParaView_VERSION"
fi
# ----------------------------------------------------------------- end-of-file
......@@ -45,7 +45,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class processorCyclicPolyPatch Declaration
Class processorCyclicPolyPatch Declaration
\*---------------------------------------------------------------------------*/
class processorCyclicPolyPatch
......@@ -63,8 +63,6 @@ class processorCyclicPolyPatch
//- Index of originating patch
mutable label referPatchID_;
// Private member functions
protected:
......@@ -223,8 +221,7 @@ public:
// Destructor
virtual ~processorCyclicPolyPatch();
virtual ~processorCyclicPolyPatch();
// Member functions
......
......@@ -65,8 +65,7 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
labelListList featurePointFeatureEdges(nFeatPts);
forAll(featurePointFeatureEdges, pI)
{
featurePointFeatureEdges[pI] =
labelList(pointEdges[featurePoints[pI]].size(), -1);
featurePointFeatureEdges[pI] = pointEdges[featurePoints[pI]];
}
// Mapping between old and new indices, there is entry in the map for each
......@@ -74,6 +73,10 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
// >= 0 corresponds to the index
labelList pointMap(sFeatLocalPts.size(), -1);
// Mapping between surface edge index and its feature edge index. -1 if it
// is not a feature edge
labelList edgeMap(sFeatEds.size(), -1);
// Noting when the normal of a face has been used so not to duplicate
labelList faceMap(surf.size(), -1);
......@@ -98,6 +101,8 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
{
label sFEI = featureEdges[i];
edgeMap[sFEI] = i;
const edge& fE(sFeatEds[sFEI]);
// Check to see if the points have been already used
......@@ -156,43 +161,31 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
{
regionEdges.append(i);
}
forAll(featurePointFeatureEdges, pI)
{
const labelList& fpfEdges = pointEdges[featurePoints[pI]];
labelList& fpfe = featurePointFeatureEdges[pI];
forAll(fpfEdges, eI)
{
if (sFEI == fpfEdges[eI])
{
fpfe[eI] = i;
}
}
}
}
// Populate feature point feature edges
DynamicList<label> newFeatureEdges;
forAll(featurePointFeatureEdges, pI)
{
const labelList& fpfe = featurePointFeatureEdges[pI];
DynamicList<label> newFeatureEdges(fpfe.size());
newFeatureEdges.setCapacity(fpfe.size());
forAll(fpfe, eI)
{
const label edgeIndex = fpfe[eI];
const label oldEdgeIndex = fpfe[eI];
const label newFeatureEdgeIndex = edgeMap[oldEdgeIndex];
if (edgeIndex != -1)
if (newFeatureEdgeIndex != -1)
{
newFeatureEdges.append(edgeIndex);
newFeatureEdges.append(newFeatureEdgeIndex);
}
}
featurePointFeatureEdges[pI] = newFeatureEdges;
featurePointFeatureEdges[pI].transfer(newFeatureEdges);
}
// Reorder the edges by classification
List<DynamicList<label> > allEds(nEdgeTypes);
......@@ -277,7 +270,7 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
edgeMesh::operator=(edgeMesh(pts, eds));
// Initialise sorted edge related data
edgeDirections_ = edgeDirections/mag(edgeDirections);
edgeDirections_ = edgeDirections/(mag(edgeDirections) + VSMALL);
edgeNormals_ = edgeNormals;
regionEdges_ = regionEdges;
......
......@@ -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
......@@ -62,7 +62,11 @@ Foam::fv::fourthGrad<Type>::calcGrad
// Assemble the second-order least-square gradient
// Calculate the second-order least-square gradient
tmp<GeometricField<GradType, fvPatchField, volMesh> > tsecondfGrad
= leastSquaresGrad<Type>(mesh).grad(vsf);
= leastSquaresGrad<Type>(mesh).grad
(
vsf,
"leastSquaresGrad(" + vsf.name() + ")"
);
const GeometricField<GradType, fvPatchField, volMesh>& secondfGrad =
tsecondfGrad();
......
......@@ -25,9 +25,7 @@ License
#include "CentredFitSnGradData.H"
#include "surfaceFields.H"
#include "volFields.H"
#include "SVD.H"
#include "syncTools.H"
#include "extendedCentredCellToFaceStencil.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
......@@ -226,7 +224,7 @@ void Foam::CentredFitSnGradData<Polynomial>::calcFit()
// find the fit coefficients for every face in the mesh
const surfaceScalarField& w = mesh.surfaceInterpolation::weights();
const surfaceScalarField& dC = mesh.deltaCoeffs();
const surfaceScalarField& dC = mesh.nonOrthDeltaCoeffs();
for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
{
......
......@@ -25,7 +25,7 @@ Class
Foam::CentredFitSnGradData
Description
Data for the quadratic fit correction interpolation scheme
Data for centred fit snGrad schemes
SourceFiles
CentredFitSnGradData.C
......@@ -64,6 +64,7 @@ class CentredFitSnGradData
// values of the stencil to obtain the gradient for each direction
List<scalarList> coeffs_;
public:
TypeName("CentredFitSnGradData");
......
......@@ -100,7 +100,7 @@ public:
const GeometricField<Type, fvPatchField, volMesh>&
) const
{
return this->mesh().deltaCoeffs();
return this->mesh().nonOrthDeltaCoeffs();
}
//- Return true if this scheme uses an explicit correction
......@@ -124,18 +124,18 @@ public:
);
const CentredFitSnGradData<Polynomial>& cfd =
CentredFitSnGradData<Polynomial>::New
(
mesh,
stencil,
linearLimitFactor_,
centralWeight_
);
const List<scalarList>& f = cfd.coeffs();
CentredFitSnGradData<Polynomial>::New
(
mesh,
stencil,
linearLimitFactor_,
centralWeight_
);
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > sft
= stencil.weightedSum(vf, f);
(
stencil.weightedSum(vf, cfd.coeffs())
);
sft().dimensions() /= dimLength;
......@@ -143,6 +143,7 @@ public:
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace fv
......
......@@ -168,18 +168,32 @@ void Foam::sampledSurfaces::sampleAndWrite
template<class GeoField>
void Foam::sampledSurfaces::sampleAndWrite(const IOobjectList& objects)
{
wordList names;
if (loadFromFiles_)
{
IOobjectList fieldObjects(objects.lookupClass(GeoField::typeName));
names = fieldObjects.names();
}
else
{
names = mesh_.thisDb().names<GeoField>();
}
labelList nameIDs(findStrings(fieldSelection_, names));
wordList names(fieldObjects.names());
wordHashSet fieldNames(wordList(names, nameIDs));
labelList fieldNames(findStrings(fieldSelection_, names));
forAllConstIter(wordHashSet, fieldNames, iter)
{
const word& fieldName = iter.key();
forAll(fieldNames, fieldI)
if ((Pstream::master()) && verbose_)
{
const word& fieldName = names[fieldNames[fieldI]];
Pout<< "sampleAndWrite: " << fieldName << endl;
}
if (loadFromFiles_)
{
const GeoField fld
(
IOobject
......@@ -192,30 +206,10 @@ void Foam::sampledSurfaces::sampleAndWrite(const IOobjectList& objects)
mesh_
);
if ((Pstream::master()) && verbose_)
{
Pout<< "sampleAndWrite: " << fieldName << endl;
}
sampleAndWrite(fld);
}
}
else
{
const wordList fieldNames
(
mesh_.thisDb().names<GeoField>(fieldSelection_)
);
forAll(fieldNames, i)
else
{
const word& fieldName = fieldNames[i];
if ((Pstream::master()) && verbose_)
{
Pout<< "sampleAndWrite: " << fieldName << endl;
}
sampleAndWrite
(
mesh_.thisDb().lookupObject<GeoField>(fieldName)
......
......@@ -53,11 +53,12 @@ New
Info<< "Selecting chemistry type " << chemistryTypeDict << endl;
const int nCmpt = 12;
const int nCmpt = 13;
const char* cmptNames[nCmpt] =
{
"chemistrySolver",
"chemistryThermo",
"baseChemistry",
"transport",
"thermo",
"equationOfState",
......@@ -107,8 +108,9 @@ New
word chemistryTypeName
(
word(chemistryTypeDict.lookup("chemistrySolver")) + '<'
+ word(chemistryTypeDict.lookup("chemistryThermo")) + ','
+ solidThermoTypeName + ',' + gasThermoTypeName + ">"
+ word(chemistryTypeDict.lookup("chemistryThermo")) + '<'
+ typeName + ','
+ solidThermoTypeName + ',' + gasThermoTypeName + ">>"
);
Info<< "chemistryTypeName " << chemistryTypeName << endl;
......
......@@ -48,7 +48,8 @@ namespace Foam
defineTemplateTypeNameAndDebugWithName \
( \
sChemistryl##Comp##SThermo, \
(#sChemistry"<"#Comp"," + SThermo::typeName() + ">").c_str(), \
(word(sChemistry::typeName_()) + "<"#Comp"," + SThermo::typeName() + \
+ ">").c_str(), \
0 \
); \
\
......
......@@ -47,8 +47,8 @@ namespace Foam
defineTemplateTypeNameAndDebugWithName \
( \
SS##Schem##Comp##SThermo##GThermo, \
(#SS"<"#Schem"<"#Comp"," + SThermo::typeName() + "," \
+ GThermo::typeName() + ">>").c_str(), \
(#SS"<" + word(Schem::typeName_()) +"<"#Comp"," + SThermo::typeName() \
+ "," + GThermo::typeName() + ">>").c_str(), \
0 \
); \
\
......
......@@ -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
......@@ -175,6 +175,7 @@ class triSurface
void writeDXGeometry(const bool, Ostream&) const;
void writeDXTrailer(Ostream&) const;
// Static private functions
//- Convert faces to labelledTri. All get same region.
......@@ -203,6 +204,7 @@ class triSurface
//- read non-comment line
static string getLineNoComment(IFstream&);
protected:
// Protected Member Functions
......@@ -219,6 +221,7 @@ protected:
return static_cast<List<Face>&>(*this);
}
public:
// Public typedefs
......@@ -287,7 +290,6 @@ public:
triSurface(const triSurface&);
//- Destructor
~triSurface();
......@@ -324,6 +326,7 @@ public:
// If >2 neighbours: undetermined.
const labelList& edgeOwner() const;
// Edit
//- Move points
......@@ -381,6 +384,7 @@ public:
labelList& faceMap
) const;
// Write
//- Write to Ostream in simple FOAM format
......
......@@ -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
......@@ -122,7 +122,7 @@ class alphatJayatillekeWallFunctionFvPatchScalarField
public:
//- Runtime type information
TypeName("alphatJayatillekeWallFunction");
TypeName("compressible::alphatJayatillekeWallFunction");
// Constructors
......
......@@ -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
......@@ -105,7 +105,7 @@ class alphatWallFunctionFvPatchScalarField
public:
//- Runtime type information
TypeName("alphatWallFunction");
TypeName("compressible::alphatWallFunction");
// Constructors
......
......@@ -28,19 +28,19 @@ boundaryField
}
ground
{
type alphatWallFunction;
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
blockedFaces
{
type alphatWallFunction;
type compressible::alphatWallFunction;
Prt 0.85;
value nonuniform 0();
}
baffleWall
{
type alphatWallFunction;
type compressible::alphatWallFunction;
Prt 0.85;
value nonuniform 0();
}
......
......@@ -23,19 +23,19 @@ boundaryField
{
piston
{
type alphatWallFunction;
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
liner
{
type alphatWallFunction;
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
cylinderHead
{
type alphatWallFunction;
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
......
......@@ -23,7 +23,7 @@ boundaryField
{
ground
{
type alphatWallFunction;
type compressible::alphatWallFunction;
mut muSgs;
value uniform 0;
}
......@@ -45,7 +45,7 @@ boundaryField
"(region0_to.*)"
{
type alphatWallFunction;
type compressible::alphatWallFunction;
mut muSgs;
value uniform 0;
}
......