Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

This commit is contained in:
Andrew Heather
2017-06-01 17:28:21 +01:00
2387 changed files with 119977 additions and 41187 deletions

View File

@ -1,14 +1,13 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/conversion/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/conversion/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \
-ldynamicMesh \
-lfileFormats \
-lgenericPatchFields \
-llagrangian \
-lconversion

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -84,7 +84,7 @@ void Foam::ensightCloud::writePositions
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
pointList points(fromSlave);
forAll(points, pti)
@ -116,7 +116,7 @@ void Foam::ensightCloud::writePositions
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
pointList points(fromSlave);
forAll(points, pti)
@ -145,7 +145,12 @@ void Foam::ensightCloud::writePositions
}
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< points;
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -74,7 +74,7 @@ bool Foam::ensightCloud::writeCloudField
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
Field<Type> slaveData(fromSlave);
forAll(slaveData, i)
@ -107,7 +107,12 @@ bool Foam::ensightCloud::writeCloudField
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< field;
}

View File

@ -1,14 +1,13 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/conversion/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/conversion/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-llagrangian \
-lmeshTools \
-lfileFormats \
-lgenericPatchFields \
-lconversion
-lconversion \
-lgenericPatchFields

View File

@ -114,4 +114,3 @@ if (timeDirs.size())
volumeFields.erase(missing);
}
}

View File

@ -40,4 +40,4 @@
Info<< nl << "Time [" << timeIndex << "] = " << runTime.timeName() << nl;
// end-of-file
// end-of-file

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -100,4 +100,3 @@ int main(int argc, char *argv[])
// ************************************************************************* //

View File

@ -341,6 +341,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
const bool decomposePoly = !args.optionFound("poly");
const bool doWriteInternal = !args.optionFound("noInternal");
const bool doFaceZones = !args.optionFound("noFaceZones");
const bool doLinks = !args.optionFound("noLinks");
@ -349,7 +350,7 @@ int main(int argc, char *argv[])
const bool noLagrangian = args.optionFound("noLagrangian");
// Decomposition of polyhedral cells into tets/pyramids cells
vtkTopo::decomposePoly = !args.optionFound("poly");
vtkTopo::decomposePoly = decomposePoly;
if (binary && (sizeof(floatScalar) != 4 || sizeof(label) != 4))
{
@ -410,8 +411,6 @@ int main(int argc, char *argv[])
args.optionReadIfPresent("pointSet", pointSetName);
instantList timeDirs = timeSelector::select0(runTime, args);
#include "createNamedMesh.H"
// VTK/ directory in the case
@ -449,6 +448,9 @@ int main(int argc, char *argv[])
mkDir(fvPath);
instantList timeDirs = timeSelector::select0(runTime, args);
// Mesh wrapper: does subsetting and decomposition
vtkMesh vMesh(mesh, cellSetName);
@ -492,7 +494,7 @@ int main(int argc, char *argv[])
// Filename as if patch with same name.
mkDir(fvPath/set.name());
fileName patchFileName
fileName outputName
(
fvPath/set.name()/set.name()
+ "_"
@ -500,12 +502,12 @@ int main(int argc, char *argv[])
+ ".vtk"
);
Info<< " FaceSet : " << patchFileName << endl;
writeFaceSet(binary, vMesh.mesh(), set, patchFileName);
Info<< " faceSet : " << outputName << endl;
writeFaceSet(binary, vMesh.mesh(), set, outputName);
continue;
}
// If pointSet: write pointSet only (as polydata)
if (pointSetName.size())
{
@ -515,7 +517,7 @@ int main(int argc, char *argv[])
// Filename as if patch with same name.
mkDir(fvPath/set.name());
fileName patchFileName
fileName outputName
(
fvPath/set.name()/set.name()
+ "_"
@ -523,10 +525,9 @@ int main(int argc, char *argv[])
+ ".vtk"
);
Info<< " pointSet : " << patchFileName << endl;
writePointSet(binary, vMesh.mesh(), set, patchFileName);
Info<< " pointSet : " << outputName << endl;
writePointSet(binary, vMesh.mesh(), set, outputName);
continue;
}
@ -868,11 +869,11 @@ int main(int argc, char *argv[])
{
mkDir(fvPath/"allPatches");
fileName patchFileName;
fileName outputName;
if (vMesh.useSubMesh())
{
patchFileName =
outputName =
fvPath/"allPatches"/cellSetName
+ "_"
+ timeDesc
@ -880,21 +881,21 @@ int main(int argc, char *argv[])
}
else
{
patchFileName =
outputName =
fvPath/"allPatches"/"allPatches"
+ "_"
+ timeDesc
+ ".vtk";
}
Info<< " Combined patches : " << patchFileName << endl;
Info<< " Combined patches : " << outputName << endl;
patchWriter writer
(
vMesh.mesh(),
binary,
nearCellValue,
patchFileName,
outputName,
getSelectedPatches(patches, excludePatches)
);
@ -946,11 +947,11 @@ int main(int argc, char *argv[])
{
mkDir(fvPath/pp.name());
fileName patchFileName;
fileName outputName;
if (vMesh.useSubMesh())
{
patchFileName =
outputName =
fvPath/pp.name()/cellSetName
+ "_"
+ timeDesc
@ -958,22 +959,22 @@ int main(int argc, char *argv[])
}
else
{
patchFileName =
outputName =
fvPath/pp.name()/pp.name()
+ "_"
+ timeDesc
+ ".vtk";
}
Info<< " Patch : " << patchFileName << endl;
Info<< " Patch : " << outputName << endl;
patchWriter writer
(
vMesh.mesh(),
binary,
nearCellValue,
patchFileName,
labelList(1, patchi)
outputName,
labelList{patchi}
);
if (!isA<emptyPolyPatch>(pp))
@ -1068,11 +1069,11 @@ int main(int argc, char *argv[])
mkDir(fvPath/fz.name());
fileName patchFileName;
fileName outputName;
if (vMesh.useSubMesh())
{
patchFileName =
outputName =
fvPath/fz.name()/cellSetName
+ "_"
+ timeDesc
@ -1080,14 +1081,14 @@ int main(int argc, char *argv[])
}
else
{
patchFileName =
outputName =
fvPath/fz.name()/fz.name()
+ "_"
+ timeDesc
+ ".vtk";
}
Info<< " FaceZone : " << patchFileName << endl;
Info<< " FaceZone : " << outputName << endl;
indirectPrimitivePatch pp
(
@ -1100,7 +1101,7 @@ int main(int argc, char *argv[])
binary,
pp,
fz.name(),
patchFileName
outputName
);
// Number of fields
@ -1131,14 +1132,13 @@ int main(int argc, char *argv[])
// Always create the cloud directory.
mkDir(fvPath/cloud::prefix/cloudName);
fileName lagrFileName
fileName outputName
(
fvPath/cloud::prefix/cloudName/cloudName
+ "_" + timeDesc + ".vtk"
);
Info<< " Lagrangian: " << lagrFileName << endl;
Info<< " Lagrangian: " << outputName << endl;
IOobjectList sprayObjs
(
@ -1189,7 +1189,7 @@ int main(int argc, char *argv[])
(
vMesh.mesh(),
binary,
lagrFileName,
outputName,
cloudName,
false
);
@ -1219,7 +1219,7 @@ int main(int argc, char *argv[])
(
vMesh.mesh(),
binary,
lagrFileName,
outputName,
cloudName,
true
);

View File

@ -104,6 +104,7 @@ public:
//- Append elements to DynamicList
static void insert(const labelList&, DynamicList<label>&);
template<class Type>
static void insert(const List<Type>&, DynamicList<floatScalar>&);
@ -140,36 +141,6 @@ public:
const vtkMesh&
);
//- Write generic GeometricFields
template<class Type, template<class> class PatchField, class GeoMesh>
static void write
(
std::ostream&,
const bool binary,
const PtrList<GeometricField<Type, PatchField, GeoMesh>>&,
const vtkMesh&
);
//- Write generic dimensioned internal fields
template<class Type>
static void write
(
std::ostream&,
const bool binary,
const PtrList<DimensionedField<Type, volMesh>>&,
const vtkMesh&
);
//- Interpolate and write volFields
template<class Type>
static void write
(
std::ostream&,
const bool binary,
const volPointInterpolation&,
const PtrList<GeometricField<Type, fvPatchField, volMesh>>&,
const vtkMesh&
);
};

View File

@ -43,22 +43,6 @@ void Foam::writeFuns::insert
}
//// Store List (indexed through map) in dest
//template<class Type>
//void Foam::writeFuns::insert
//(
// const labelList& map,
// const List<Type>& source,
// DynamicList<floatScalar>& dest
//)
//{
// forAll(map, i)
// {
// insert(source[map[i]], dest);
// }
//}
template<class Type>
void Foam::writeFuns::write
(
@ -159,53 +143,4 @@ void Foam::writeFuns::write
}
template<class Type, template<class> class PatchField, class GeoMesh>
void Foam::writeFuns::write
(
std::ostream& os,
const bool binary,
const PtrList<GeometricField<Type, PatchField, GeoMesh>>& flds,
const vtkMesh& vMesh
)
{
forAll(flds, i)
{
write(os, binary, flds[i].dimensionedInternalField(), vMesh);
}
}
template<class Type>
void Foam::writeFuns::write
(
std::ostream& os,
const bool binary,
const PtrList<DimensionedField<Type, volMesh>>& flds,
const vtkMesh& vMesh
)
{
forAll(flds, i)
{
write(os, binary, flds[i], vMesh);
}
}
template<class Type>
void Foam::writeFuns::write
(
std::ostream& os,
const bool binary,
const volPointInterpolation& pInterp,
const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds,
const vtkMesh& vMesh
)
{
forAll(flds, i)
{
write(os, binary, flds[i], pInterp.interpolate(flds[i])(), vMesh);
}
}
// ************************************************************************* //

View File

@ -2,8 +2,8 @@ sinclude $(GENERAL_RULES)/paraview
EXE_INC = \
${c++LESSWARN} \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
-I$(ParaView_INCLUDE_DIR) \
-I$(ParaView_INCLUDE_DIR)/vtkkwiml \
@ -12,7 +12,6 @@ EXE_INC = \
LIB_LIBS = \
-lmeshTools \
-lfileFormats \
-lblockMesh \
-L$(FOAM_LIBBIN) -lfoamPv-pv${ParaView_MAJOR} \
$(GLIBS)

View File

@ -1,4 +1,3 @@
// Do nothing
void USERD_exit_routine
(
void
@ -10,4 +9,3 @@ void USERD_exit_routine
#endif
}

View File

@ -8,4 +8,3 @@ int USERD_get_changing_geometry_status(void)
// Choose the most general option
return Z_CHANGE_CONN;
}

View File

@ -29,4 +29,3 @@ int USERD_get_descrip_lines
#endif
return Z_OK;
}

View File

@ -8,4 +8,3 @@ int USERD_get_element_label_status(void)
#endif
return TRUE;
}

View File

@ -118,6 +118,3 @@ int USERD_get_gold_variable_info
return Z_OK;
}

View File

@ -9,4 +9,3 @@ int USERD_get_node_label_status(void)
return TRUE;
}

View File

@ -41,4 +41,3 @@ int USERD_get_sol_times
return Z_OK;
}

View File

@ -68,4 +68,3 @@ int USERD_get_var_value_at_specific
#endif
return Z_OK;
}

View File

@ -59,4 +59,3 @@ int USERD_get_block_ghost_flags
{
return(Z_OK);
}

View File

@ -32,4 +32,3 @@ else
// Info<< "getLagrangianScalar: nVar = " << nVar << endl;
return Z_UNDEF;
}

View File

@ -44,4 +44,3 @@ else
// Info<< "getLagrangianVector: nVar = " << nVar << endl;
return Z_UNDEF;
}

View File

@ -1,12 +1,11 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lfileFormats \
-lgenericPatchFields \
-llagrangian

View File

@ -22,9 +22,9 @@
Random rndGen;
autoPtr<distributionModels::distributionModel> p
autoPtr<distributionModel> p
(
distributionModels::distributionModel::New
distributionModel::New
(
pdfDictionary,
rndGen
@ -45,4 +45,3 @@
}
scalarField samples(nIntervals, 0);