diff --git a/.gitignore b/.gitignore index e4914e5a7..79eb72b26 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ # file-browser settings - anywhere .directory +# KDevelop include-path files - anywhere +.kdev_include_paths + # CVS recovered versions - anywhere .#* @@ -104,8 +107,8 @@ etc/cshrc etc/bashrc etc/settings.csh etc/settings.sh -etc/pref.csh -etc/pref.sh +etc/prefs.csh +etc/prefs.sh # make sure that this settings file is not used etc/bashrc.preset diff --git a/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C b/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C index 5a155a806..66458407c 100644 --- a/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C +++ b/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C @@ -37,9 +37,11 @@ using namespace Foam; int main(int argc, char *argv[]) { +# include "addRegionOption.H" + # include "setRootCase.H" # include "createTime.H" -# include "createMesh.H" +# include "createNamedMesh.H" # include "createFaMesh.H" Info<< "Time = " << runTime.timeName() << nl << endl; diff --git a/applications/utilities/finiteArea/createFaMeshFromStl/createFaMeshFromStl.C b/applications/utilities/finiteArea/createFaMeshFromStl/createFaMeshFromStl.C index 1ea27f407..e5253a028 100644 --- a/applications/utilities/finiteArea/createFaMeshFromStl/createFaMeshFromStl.C +++ b/applications/utilities/finiteArea/createFaMeshFromStl/createFaMeshFromStl.C @@ -50,6 +50,8 @@ using namespace Foam; int main(int argc, char *argv[]) { +# include "addRegionOption.H" + argList::validArgs.append("STL mesh file"); argList args(argc, argv); diff --git a/applications/utilities/finiteArea/createFaMeshFromStl/makePolyMesh.H b/applications/utilities/finiteArea/createFaMeshFromStl/makePolyMesh.H index 13872316c..decbd99ac 100644 --- a/applications/utilities/finiteArea/createFaMeshFromStl/makePolyMesh.H +++ b/applications/utilities/finiteArea/createFaMeshFromStl/makePolyMesh.H @@ -23,11 +23,18 @@ faceRegion[faceI] = patch[faceI].region(); } + word polyRegionName; + + if (!args.optionReadIfPresent("region", polyRegionName)) + { + polyRegionName = polyMesh::defaultRegion; + } + polyMesh mesh ( IOobject ( - polyMesh::defaultRegion, + polyRegionName, runTime.constant(), runTime ), diff --git a/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C b/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C index 725b1defb..372e122e4 100644 --- a/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C +++ b/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C @@ -63,9 +63,11 @@ public: int main(int argc, char *argv[]) { +# include "addRegionOption.H" + # include "setRootCase.H" # include "createTime.H" -# include "createMesh.H" +# include "createNamedMesh.H" // Reading faMeshDefinition dictionary IOdictionary faMeshDefinition diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 86ace70ca..abdfe6ba1 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -325,7 +325,7 @@ void printAllSets(const polyMesh& mesh, Ostream& os) // Physically remove a set -void removeSet +bool removeSet ( const polyMesh& mesh, const word& setType, @@ -346,7 +346,11 @@ void removeSet fileName object = objects[setName]->objectPath(); Info<< "Removing file " << object << endl; rm(object); + + return true; } + + return false; } @@ -392,11 +396,7 @@ bool doCommand IOobject::readOption r; - if (action == topoSetSource::REMOVE) - { - removeSet(mesh, setType, setName); - } - else if + if ( (action == topoSetSource::NEW) || (action == topoSetSource::CLEAR) @@ -414,7 +414,11 @@ bool doCommand currentSet.resize(max(currentSet.size(), typSize)); } - if (!currentSetPtr.valid()) + if (action == topoSetSource::REMOVE) + { + ok = removeSet(mesh, setType, setName); + } + else if (!currentSetPtr.valid()) { Info<< " Cannot construct/load set " << topoSet::localPath(mesh, setName) << endl; diff --git a/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C index ec06c6705..effd4cd06 100644 --- a/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C @@ -55,7 +55,7 @@ void faMeshDecomposition::distributeFaces() ( IOobject ( - fvMesh::defaultRegion, + GeoMesh::mesh_.name(), processorDb.timeName(), processorDb ) @@ -252,7 +252,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches) ( IOobject ( - fvMesh::defaultRegion, + GeoMesh::mesh_.name(), processorDb.timeName(), processorDb ) @@ -1073,7 +1073,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches) ( IOobject ( - fvMesh::defaultRegion, + GeoMesh::mesh_.name(), processorDb.timeName(), processorDb ) @@ -1191,7 +1191,7 @@ bool faMeshDecomposition::writeDecomposition() ( IOobject ( - fvMesh::defaultRegion, + GeoMesh::mesh_.name(), processorDb.timeName(), processorDb ) diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/newDynamicFvMesh.C b/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/newDynamicFvMesh.C index f163d165e..629690e58 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/newDynamicFvMesh.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicFvMesh/newDynamicFvMesh.C @@ -37,13 +37,29 @@ Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) forAll(libNames,i) { const word libName("lib"+libNames[i]+".so"); - bool ok=dlLibraryTable::open(libName); - if(!ok) { - WarningIn("dynamicFvMesh::New(const IOobject& io)") - << "Loading of dynamic mesh library " << libName + bool libLoaded = false; + + dlLibraryTable& ll = dlLibraryTable::loadedLibraries; + + forAllConstIter(dlLibraryTable, ll, llI) + { + if (ll(llI.key()) == libName) + { + libLoaded = true; + break; + } + } + + if (!libLoaded) + { + bool ok=dlLibraryTable::open(libName); + if(!ok) { + WarningIn("dynamicFvMesh::New(const IOobject& io)") + << "Loading of dynamic mesh library " << libName << " unsuccesful. Some dynamic mesh methods may not be " << " available" << endl; + } } } diff --git a/src/foam/meshes/polyMesh/polyMesh.H b/src/foam/meshes/polyMesh/polyMesh.H index ba7c7a396..01fe6e65e 100644 --- a/src/foam/meshes/polyMesh/polyMesh.H +++ b/src/foam/meshes/polyMesh/polyMesh.H @@ -425,7 +425,7 @@ public: //- Return current motion time index label curMotionTimeIndex() const { - return moving_; + return curMotionTimeIndex_; } //- Set the mesh to be moving diff --git a/src/meshTools/Make/files b/src/meshTools/Make/files index fcd0d492c..8675cad0d 100644 --- a/src/meshTools/Make/files +++ b/src/meshTools/Make/files @@ -73,6 +73,7 @@ $(faceSources)/boundaryToFace/boundaryToFace.C $(faceSources)/zoneToFace/zoneToFace.C $(faceSources)/setToFace/setToFace.C $(faceSources)/boxToFace/boxToFace.C +$(faceSources)/rotatedBoxToFace/rotatedBoxToFace.C pointSources = sets/pointSources $(pointSources)/labelToPoint/labelToPoint.C diff --git a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C index 7c78a1db2..d522a722c 100644 --- a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C +++ b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C @@ -46,18 +46,21 @@ addToRunTimeSelectionTable(topoSetSource, pointToCell, istream); Foam::topoSetSource::addToUsageTable Foam::pointToCell::usage_ ( pointToCell::typeName, - "\n Usage: pointToCell any\n\n" - " Select all cells with any point in the pointSet\n\n" + "\n Usage: pointToCell any|all\n\n" + " Select cells with\n" + " -any point in the pointSet\n" + " -all points in the pointSet\n\n" ); template<> -const char* Foam::NamedEnum::names[] = +const char* Foam::NamedEnum::names[] = { - "any" + "any", + "all" }; -const Foam::NamedEnum +const Foam::NamedEnum Foam::pointToCell::pointActionNames_; @@ -69,9 +72,9 @@ void Foam::pointToCell::combine(topoSet& set, const bool add) const pointSet loadedSet(mesh_, setName_); - // Handle any selection if (option_ == ANY) { + // Add cells with any point in loadedSet for ( pointSet::const_iterator iter = loadedSet.begin(); @@ -89,6 +92,53 @@ void Foam::pointToCell::combine(topoSet& set, const bool add) const } } } + else if (option_ == ALL) + { + // Add all cells whose points are all in set. + + Map