From 51fc45400d843fa073ae518b404bf0b5f1531aef Mon Sep 17 00:00:00 2001
From: Hrvoje Jasak
Date: Fri, 14 Jan 2011 12:00:15 +0000
Subject: [PATCH 01/19] Bug fix: cyclic debug
---
.../constraint/cyclic/cyclicPolyPatch.C | 90 ++++++++++---------
1 file changed, 48 insertions(+), 42 deletions(-)
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
index a9084a23f..21907baea 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
@@ -260,26 +260,30 @@ void Foam::cyclicPolyPatch::calcTransforms()
// Dump transformed first half
if (debug)
{
- fileName fvPath(boundaryMesh().mesh().time().path()/"VTK");
-
- pointField transformPoints = half0.localPoints();
-
- forAll (transformPoints, pointI)
+ if (reverseT_.size() > 0)
{
- transformPoints[pointI] =
- Foam::transform(reverseT_[0], transformPoints[pointI]);
+ fileName fvPath(boundaryMesh().mesh().time().path()/"VTK");
+
+ pointField transformPoints = half0.localPoints();
+
+ forAll (transformPoints, pointI)
+ {
+ transformPoints[pointI] =
+ Foam::transform(reverseT_[0], transformPoints[pointI]);
+ }
+
+ standAlonePatch transformHalf0
+ (
+ half0.localFaces(),
+ transformPoints
+ );
+
+ fileName nm2(fvPath/name() + "_transform_half0_faces");
+ Pout<< "cyclicPolyPatch::calcTransforms : Writing "
+ << "transform_half0 faces to file " << nm2 << endl;
+
+ transformHalf0.writeVTK(nm2, transformHalf0, transformPoints);
}
-
- standAlonePatch transformHalf0
- (
- half0.localFaces(),
- transformPoints
- );
-
- fileName nm2(fvPath/name() + "_transform_half0_faces");
- Pout<< "cyclicPolyPatch::calcTransforms : Writing transform_half0"
- << " faces to file " << nm2 << endl;
- transformHalf0.writeVTK(nm2, transformHalf0, transformPoints);
}
// Check for error in face matching
@@ -354,31 +358,33 @@ void Foam::cyclicPolyPatch::calcTransforms()
}
else
{
- maxDistance =
- Foam::max
- (
- maxDistance,
- mag
- (
- half0Ctrs[faceI]
- - half1Ctrs[faceI]
- )
- );
+ // Disable checking for translational distance
+ // HJ, 13/Jan/2011
+// maxDistance =
+// Foam::max
+// (
+// maxDistance,
+// mag
+// (
+// half0Ctrs[faceI]
+// - half1Ctrs[faceI]
+// )
+// );
- maxRelDistance =
- Foam::max
- (
- maxRelDistance,
- mag
- (
- half0Ctrs[faceI]
- - half1Ctrs[faceI]
- )
- /(
- mag(half1Ctrs[faceI] - half0Ctrs[faceI])
- + SMALL
- )
- );
+// maxRelDistance =
+// Foam::max
+// (
+// maxRelDistance,
+// mag
+// (
+// half0Ctrs[faceI]
+// - half1Ctrs[faceI]
+// )
+// /(
+// mag(half1Ctrs[faceI] - half0Ctrs[faceI])
+// + SMALL
+// )
+// );
}
}
From 8d901495fb8c2a83b63cd0e5d4c65b1365c5cfd4 Mon Sep 17 00:00:00 2001
From: Hrvoje Jasak
Date: Fri, 14 Jan 2011 12:00:55 +0000
Subject: [PATCH 02/19] Formatting
---
.../directMappedPatchBase.C | 65 +++++++++++--------
.../directMappedPatchBase.H | 2 +-
2 files changed, 38 insertions(+), 29 deletions(-)
diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C
index a3595bab6..721ca9f8f 100644
--- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C
+++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C
@@ -98,7 +98,9 @@ void Foam::directMappedPatchBase::collectSamples
labelListList globalFaces(Pstream::nProcs());
globalFc[Pstream::myProcNo()] = patch_.faceCentres();
- globalSamples[Pstream::myProcNo()] = globalFc[Pstream::myProcNo()]+offsets_;
+ globalSamples[Pstream::myProcNo()] =
+ globalFc[Pstream::myProcNo()] + offsets_;
+
globalFaces[Pstream::myProcNo()] = identity(patch_.size());
// Distribute to all processors
@@ -115,11 +117,13 @@ void Foam::directMappedPatchBase::collectSamples
globalSamples,
accessOp()
);
+
patchFaces = ListListOps::combine
(
globalFaces,
accessOp()
);
+
patchFc = ListListOps::combine
(
globalFc,
@@ -135,8 +139,9 @@ void Foam::directMappedPatchBase::collectSamples
accessOp()
)
);
+
label sampleI = 0;
- forAll(nPerProc, procI)
+ forAll (nPerProc, procI)
{
for (label i = 0; i < nPerProc[procI]; i++)
{
@@ -173,13 +178,14 @@ void Foam::directMappedPatchBase::findSamples
"directMappedPatchBase::findSamples(const pointField&,"
" labelList&, labelList&, pointField&) const"
) << "No need to supply a patch name when in "
- << sampleModeNames_[mode_] << " mode." << exit(FatalError);
+ << sampleModeNames_[mode_] << " mode."
+ << abort(FatalError);
}
// Octree based search engine
meshSearch meshSearchEngine(mesh, false);
- forAll(samples, sampleI)
+ forAll (samples, sampleI)
{
const point& sample = samples[sampleI];
@@ -200,7 +206,7 @@ void Foam::directMappedPatchBase::findSamples
cc,
cellI
);
- nearest[sampleI].second().first() = magSqr(cc-sample);
+ nearest[sampleI].second().first() = magSqr(cc - sample);
nearest[sampleI].second().second() = Pstream::myProcNo();
}
}
@@ -215,7 +221,7 @@ void Foam::directMappedPatchBase::findSamples
if (pp.empty())
{
- forAll(samples, sampleI)
+ forAll (samples, sampleI)
{
nearest[sampleI].second().first() = Foam::sqr(GREAT);
nearest[sampleI].second().second() = Pstream::myProcNo();
@@ -251,7 +257,7 @@ void Foam::directMappedPatchBase::findSamples
3.0 // duplicity
);
- forAll(samples, sampleI)
+ forAll (samples, sampleI)
{
const point& sample = samples[sampleI];
@@ -290,13 +296,14 @@ void Foam::directMappedPatchBase::findSamples
"directMappedPatchBase::findSamples(const pointField&,"
" labelList&, labelList&, pointField&) const"
) << "No need to supply a patch name when in "
- << sampleModeNames_[mode_] << " mode." << exit(FatalError);
+ << sampleModeNames_[mode_] << " mode."
+ << abort(FatalError);
}
// Octree based search engine
meshSearch meshSearchEngine(mesh, false);
- forAll(samples, sampleI)
+ forAll (samples, sampleI)
{
const point& sample = samples[sampleI];
@@ -340,20 +347,21 @@ void Foam::directMappedPatchBase::findSamples
{
Info<< "directMappedPatchBase::findSamples on mesh " << sampleRegion_
<< " : " << endl;
- forAll(nearest, sampleI)
+
+ forAll (nearest, sampleI)
{
label procI = nearest[sampleI].second().second();
label localI = nearest[sampleI].first().index();
- Info<< " " << sampleI << " coord:"<< samples[sampleI]
- << " found on processor:" << procI
- << " in local cell/face:" << localI
- << " with cc:" << nearest[sampleI].first().rawPoint() << endl;
+ Info<< " " << sampleI << " coord: "<< samples[sampleI]
+ << " found on processor: " << procI
+ << " in local cell/face: " << localI
+ << " with cc: " << nearest[sampleI].first().rawPoint() << endl;
}
}
// Check for samples not being found
- forAll(nearest, sampleI)
+ forAll (nearest, sampleI)
{
if (!nearest[sampleI].first().hit())
{
@@ -363,8 +371,8 @@ void Foam::directMappedPatchBase::findSamples
"(const pointField&, labelList&"
", labelList&, pointField&)"
) << "Did not find sample " << samples[sampleI]
- << " on any processor of region" << sampleRegion_
- << exit(FatalError);
+ << " on any processor of region " << sampleRegion_
+ << abort(FatalError);
}
}
@@ -374,7 +382,7 @@ void Foam::directMappedPatchBase::findSamples
sampleIndices.setSize(samples.size());
sampleLocations.setSize(samples.size());
- forAll(nearest, sampleI)
+ forAll (nearest, sampleI)
{
sampleProcs[sampleI] = nearest[sampleI].second().second();
sampleIndices[sampleI] = nearest[sampleI].first().index();
@@ -388,7 +396,8 @@ void Foam::directMappedPatchBase::calcMapping() const
if (mapPtr_.valid())
{
FatalErrorIn("directMappedPatchBase::calcMapping() const")
- << "Mapping already calculated" << exit(FatalError);
+ << "Mapping already calculated"
+ << abort(FatalError);
}
if
@@ -415,7 +424,7 @@ void Foam::directMappedPatchBase::calcMapping() const
}
- // Get global list of all samples and the processor and face they come from.
+ // Get global list of all samples and the processor and face they come from
pointField samples;
labelList patchFaceProcs;
labelList patchFaces;
@@ -435,7 +444,7 @@ void Foam::directMappedPatchBase::calcMapping() const
// - cell/face sample is in (so source when mapping)
// sampleIndices, sampleProcs.
- //forAll(samples, i)
+ //forAll (samples, i)
//{
// Info<< i << " need data in region "
// << patch_.boundaryMesh().mesh().name()
@@ -464,7 +473,7 @@ void Foam::directMappedPatchBase::calcMapping() const
label vertI = 0;
- forAll(patchFc, i)
+ forAll (patchFc, i)
{
meshTools::writeOBJ(str, patchFc[i]);
vertI++;
@@ -482,7 +491,7 @@ void Foam::directMappedPatchBase::calcMapping() const
// const scalarField magOffset(mag(sampleLocations - patchFc));
// const scalar avgOffset(average(magOffset));
//
- // forAll(magOffset, sampleI)
+ // forAll (magOffset, sampleI)
// {
// if
// (
@@ -518,7 +527,7 @@ void Foam::directMappedPatchBase::calcMapping() const
labelListList& subMap = mapPtr_().subMap();
labelListList& constructMap = mapPtr_().constructMap();
- forAll(subMap, procI)
+ forAll (subMap, procI)
{
subMap[procI] = UIndirectList
@@ -45,20 +45,8 @@ horizontal-align: left; ">
class=menuLefton >Source Guide
-
-
-
From 9879c2e62139f958d1b7e594f003836004ef88f8 Mon Sep 17 00:00:00 2001
From: Hrvoje Jasak
Date: Thu, 20 Jan 2011 00:57:58 +0000
Subject: [PATCH 15/19] Formatting
---
src/OpenFOAM/containers/Lists/UList/UList.H | 2 ++
src/OpenFOAM/containers/NamedEnum/NamedEnum.C | 2 +-
src/OpenFOAM/include/OSspecific.H | 14 +++++++-------
.../regionCouple/regionCoupleFvPatchField.C | 5 +++--
4 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H
index 184cee2df..5d3c41346 100644
--- a/src/OpenFOAM/containers/Lists/UList/UList.H
+++ b/src/OpenFOAM/containers/Lists/UList/UList.H
@@ -95,11 +95,13 @@ public:
//- Declare friendship with the SubList class
friend class SubList;
+
// Static Member Functions
//- Return a null UList
inline static const UList& null();
+
// Public classes
//- Less function class that can be used for sorting
diff --git a/src/OpenFOAM/containers/NamedEnum/NamedEnum.C b/src/OpenFOAM/containers/NamedEnum/NamedEnum.C
index 552d5593a..69c28ff5c 100644
--- a/src/OpenFOAM/containers/NamedEnum/NamedEnum.C
+++ b/src/OpenFOAM/containers/NamedEnum/NamedEnum.C
@@ -72,7 +72,7 @@ Enum Foam::NamedEnum::read(Istream& is) const
(
"NamedEnum::read(Istream& is) const",
is
- ) << name << " is not in enumeration " << toc()
+ ) << name << " is not in enumeration " << toc()
<< exit(FatalIOError);
}
diff --git a/src/OpenFOAM/include/OSspecific.H b/src/OpenFOAM/include/OSspecific.H
index 136294f5f..045768e18 100644
--- a/src/OpenFOAM/include/OSspecific.H
+++ b/src/OpenFOAM/include/OSspecific.H
@@ -103,11 +103,11 @@ bool chDir(const fileName& dir);
//
// @return the full path name or fileName() if the name cannot be found
// Optionally abort if the file cannot be found
-fileName findEtcFile(const fileName&, bool mandatory=false);
+fileName findEtcFile(const fileName&, bool mandatory = false);
//- Make a directory and return an error if it could not be created
// and does not already exist
-bool mkDir(const fileName&, mode_t=0777);
+bool mkDir(const fileName&, mode_t = 0777);
//- Set the file mode
bool chMod(const fileName&, const mode_t);
@@ -120,14 +120,14 @@ fileName::Type type(const fileName&);
//- Does the name exist (as DIRECTORY or FILE) in the file system?
// Optionally enable/disable check for gzip file.
-bool exists(const fileName&, const bool checkGzip=true);
+bool exists(const fileName&, const bool checkGzip = true);
//- Does the name exist as a DIRECTORY in the file system?
bool isDir(const fileName&);
//- Does the name exist as a FILE in the file system?
// Optionally enable/disable check for gzip file.
-bool isFile(const fileName&, const bool checkGzip=true);
+bool isFile(const fileName&, const bool checkGzip = true);
//- Return size of file
off_t fileSize(const fileName&);
@@ -139,8 +139,8 @@ time_t lastModified(const fileName&);
fileNameList readDir
(
const fileName&,
- const fileName::Type=fileName::FILE,
- const bool filtergz=true
+ const fileName::Type = fileName::FILE,
+ const bool filtergz = true
);
//- Copy, recursively if necessary, the source to the destination
@@ -172,7 +172,7 @@ void fdClose(const int);
bool ping(const word&, const label port, const label timeOut);
//- Check if machine is up by pinging port 22 (ssh) and 222 (rsh)
-bool ping(const word&, const label timeOut=10);
+bool ping(const word&, const label timeOut = 10);
//- Execute the specified command
int system(const string& command);
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/regionCouple/regionCoupleFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/regionCouple/regionCoupleFvPatchField.C
index 08a8cec38..e306ccf23 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/regionCouple/regionCoupleFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/regionCouple/regionCoupleFvPatchField.C
@@ -168,7 +168,8 @@ void regionCoupleFvPatchField::evaluate
const Pstream::commsTypes
)
{
- // Implement weights-based stabilised harmonic interpolation using magnitude
+ // Implement weights-based stabilised harmonic interpolation using
+ // magnitude of type
// Algorithm:
// 1) calculate magnitude of internal field and neighbour field
// 2) calculate harmonic mean magnitude
@@ -189,7 +190,7 @@ void regionCoupleFvPatchField::evaluate
forAll (weights, faceI)
{
- den = (mOwn[faceI] - mNei[faceI]);
+ den = mOwn[faceI] - mNei[faceI];
if (mag(den) > SMALL)
{
From da5726b2625c7c990a948b42e0b74dedc30a0aa4 Mon Sep 17 00:00:00 2001
From: Hrvoje Jasak
Date: Thu, 20 Jan 2011 14:04:25 +0000
Subject: [PATCH 16/19] Bug fixes, Henrik Rusche
---
.../attachDetach/attachDetach.C | 2 +-
.../attachDetach/detachInterface.C | 35 ++++++++++++++++---
.../layerAdditionRemoval.C | 12 +++++++
.../layerAdditionRemoval.H | 6 ++++
4 files changed, 50 insertions(+), 5 deletions(-)
diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/attachDetach.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/attachDetach.C
index a4f270e2a..a02b01f85 100644
--- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/attachDetach.C
+++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/attachDetach.C
@@ -238,7 +238,7 @@ void Foam::attachDetach::checkDefinition()
{
FatalErrorIn("void attachDetach::checkDefinition()")
<< "Master and slave patch share " << nSharedPoints
- << " point. This is not allowed." << nl
+ << " point. This is not allowed." << nl
<< "Please check mesh for topological errors."
<< abort(FatalError);
}
diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/detachInterface.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/detachInterface.C
index ff60278f2..aade9cc7b 100644
--- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/detachInterface.C
+++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/attachDetach/detachInterface.C
@@ -381,6 +381,33 @@ void Foam::attachDetach::detachInterface
// If the face has changed, create a modification entry
if (changed)
{
+ // Get zone ID and flipMap for the face
+ // Bug fix. Henrik Rusche, 20/Jan/2011
+ const label oldZoneID = zoneMesh.whichZone(curFaceID);
+ bool oldFlip = false;
+
+ if (oldZoneID > -1)
+ {
+ const label oldFaceInZoneID =
+ zoneMesh[oldZoneID].whichFace(curFaceID);
+
+ if (oldFaceInZoneID > -1)
+ {
+ oldFlip = zoneMesh[oldZoneID].flipMap()[oldFaceInZoneID];
+ }
+ else
+ {
+ FatalErrorIn
+ (
+ "attachDetach::detachInterface\n"
+ "(\n"
+ " polyTopoChange& ref\n"
+ ") const\n"
+ ) << "Error in zone access."
+ << abort(FatalError);
+ }
+ }
+
if (mesh.isInternalFace(curFaceID))
{
// No need to check for nei index: internal face.
@@ -396,8 +423,8 @@ void Foam::attachDetach::detachInterface
false, // flip flux
-1, // patch for face
false, // remove from zone
- zoneMesh.whichZone(curFaceID), // zone for face
- false // face zone flip
+ oldZoneID, // zone for face
+ oldFlip // face zone flip
)
);
// Pout << "modifying stick-out face. Internal Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " nei: " << nei[curFaceID] << endl;
@@ -415,8 +442,8 @@ void Foam::attachDetach::detachInterface
false, // flip flux
mesh.boundaryMesh().whichPatch(curFaceID), // patch
false, // remove from zone
- zoneMesh.whichZone(curFaceID), // zone for face
- false // face zone flip
+ oldZoneID, // zone for face
+ oldFlip // face zone flip
)
);
// Pout << "modifying stick-out face. Boundary Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " patch: " << mesh.boundaryMesh().whichPatch(curFaceID) << endl;
diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.C
index 436bd1d90..163f367c4 100644
--- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.C
+++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.C
@@ -217,6 +217,18 @@ Foam::layerAdditionRemoval::~layerAdditionRemoval()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+void Foam::layerAdditionRemoval::setRemoval()
+{
+ triggerRemoval_ = topoChanger().morphIndex();
+}
+
+
+void Foam::layerAdditionRemoval::setAddition()
+{
+ triggerAddition_ = topoChanger().morphIndex();
+}
+
+
bool Foam::layerAdditionRemoval::changeTopology() const
{
// Protect from multiple calculation in the same time-step
diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.H b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.H
index ce55d0d18..1e932ffff 100644
--- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.H
+++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.H
@@ -170,6 +170,12 @@ public:
// Member Functions
+ //- Set layer removal
+ void setRemoval();
+
+ //- Set addition
+ void setAddition();
+
//- Check for topology change
virtual bool changeTopology() const;
From 71885adc91d1bfa926772e55e01563f5ca7f14a4 Mon Sep 17 00:00:00 2001
From: Hrvoje Jasak
Date: Mon, 24 Jan 2011 21:48:14 +0000
Subject: [PATCH 17/19] Removed unnecessary comment and includes
---
src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C | 2 --
src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H | 4 ++--
src/finiteVolume/fvMesh/fvMesh.C | 10 +---------
3 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
index a8a68269f..9bec21322 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
@@ -217,8 +217,6 @@ void Foam::faceZone::calcCellLayers() const
mc[faceI] = curMc;
sc[faceI] = curSc;
}
- //Info << "masterCells: " << mc << endl;
- //Info << "slaveCells: " << sc << endl;
}
}
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H
index b32c43ce8..174d282db 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H
+++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H
@@ -263,8 +263,8 @@ public:
}
//- Map storing the local face index for every global face index.
- // Used to find out the index of face in the zone from the known global
- // face index. If the face is not in the zone, returns -1
+ // Used to find out the index of face in the zone from the known
+ // global face index. If the face is not in the zone, returns -1
label whichFace(const label globalFaceID) const;
//- Return reference to primitive patch
diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C
index 556f93363..86d303a7a 100644
--- a/src/finiteVolume/fvMesh/fvMesh.C
+++ b/src/finiteVolume/fvMesh/fvMesh.C
@@ -39,20 +39,12 @@ License
#include "mapClouds.H"
#include "volPointInterpolation.H"
-#include "extendedLeastSquaresVectors.H"
-#include "extendedLeastSquaresVectors.H"
-#include "leastSquaresVectors.H"
-#include "CentredFitData.H"
-#include "linearFitPolynomial.H"
-#include "quadraticFitPolynomial.H"
-#include "quadraticLinearFitPolynomial.H"
-//#include "quadraticFitSnGradData.H"
-#include "skewCorrectionVectors.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Foam::fvMesh, 0);
+
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::fvMesh::clearGeomNotOldVol()
From f7034cc482fe1498549a734d387b5b01347eab8a Mon Sep 17 00:00:00 2001
From: Hrvoje Jasak
Date: Mon, 24 Jan 2011 21:48:37 +0000
Subject: [PATCH 18/19] Tutorial update
---
.../aachenBomb/constant/polyMesh/boundary | 2 +-
.../dieselFoam/aachenBomb/system/fvSchemes | 16 ++++++++--------
.../dieselFoam/aachenBomb/system/fvSolution | 6 ++++--
.../constant/polyMesh/boundary | 2 +-
.../fluid/constant/dynamicMeshDict | 2 +-
.../fluid/system/tetFemSolution | 2 +-
6 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/tutorials/combustion/dieselFoam/aachenBomb/constant/polyMesh/boundary b/tutorials/combustion/dieselFoam/aachenBomb/constant/polyMesh/boundary
index 434ce0e9d..2e8296d12 100644
--- a/tutorials/combustion/dieselFoam/aachenBomb/constant/polyMesh/boundary
+++ b/tutorials/combustion/dieselFoam/aachenBomb/constant/polyMesh/boundary
@@ -1,6 +1,6 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
-| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
+| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
diff --git a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSchemes b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSchemes
index 19491f4de..d299e2a93 100644
--- a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSchemes
+++ b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSchemes
@@ -29,17 +29,17 @@ gradSchemes
divSchemes
{
default none;
- div(phi,rho) Gauss limitedLinear 1;
- div(phi,U) Gauss limitedLinearV 1;
+ div(phi,rho) Gauss vanLeer;
+ div(phi,U) Gauss linearUpwind Gauss linear;
div(phiU,p) Gauss linear;
- div(phi,k) Gauss limitedLinear 1;
- div(phi,epsilon) Gauss limitedLinear 1;
- div(phi,Yi_h) Gauss upwind;
+ div(phi,k) Gauss upwind;
+ div(phi,epsilon) Gauss upwind;
+ div(phi,Yi_h) Gauss vanLeer;
div(phi,fu_ft_h) Gauss multivariateSelection
{
- fu limitedLinear 1;
- ft limitedLinear 1;
- hs limitedLinear 1;
+ fu vanLeer;
+ ft vanLeer;
+ hs vanLeer;
};
div((muEff*dev2(grad(U).T()))) Gauss linear;
}
diff --git a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution
index a558adcbf..f607fb7a4 100644
--- a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution
+++ b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution
@@ -23,6 +23,7 @@ solvers
preconditioner DIC;
tolerance 1e-09;
relTol 0;
+ minIter 1;
}
rho
@@ -35,14 +36,15 @@ solvers
{
solver PBiCG;
preconditioner DILU;
- tolerance 1e-06;
+ tolerance 1e-08;
relTol 0;
+ minIter 1;
}
}
PISO
{
- nCorrectors 2;
+ nCorrectors 4;
nNonOrthogonalCorrectors 0;
}
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary
index a66cf1dd0..fb91bc8f1 100644
--- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary
@@ -1,6 +1,6 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
-| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
+| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
diff --git a/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/constant/dynamicMeshDict b/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/constant/dynamicMeshDict
index e7f6bcd45..3a8f95e55 100644
--- a/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/constant/dynamicMeshDict
+++ b/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/constant/dynamicMeshDict
@@ -26,7 +26,7 @@ diffusivity quadratic;
frozenDiffusion on;
-distancePatches
+distancePatches
(
consoleFluid
);
diff --git a/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/system/tetFemSolution b/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/system/tetFemSolution
index 1549afc0c..3e429ce96 100644
--- a/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/system/tetFemSolution
+++ b/tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/fluid/system/tetFemSolution
@@ -25,7 +25,7 @@ solvers
tolerance 1e-06;
relTol 0;
- };
+ }
}
From f9d3f6c220ffbd51e1bd09e3a935aa83017f6189 Mon Sep 17 00:00:00 2001
From: Hrvoje Jasak
Date: Mon, 24 Jan 2011 21:49:27 +0000
Subject: [PATCH 19/19] Clean-up
---
etc/controlDict | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/etc/controlDict b/etc/controlDict
index b5a25f98b..9106caabc 100644
--- a/etc/controlDict
+++ b/etc/controlDict
@@ -904,8 +904,7 @@ Tolerances
primitiveMeshFaceFlatnessThreshold 0.8;
// Geometric matching tolerances
- cyclicMatchTol 1e-4;
- processorMatchTol 1e-4;
+ patchFaceMatchTol 1e-4;
// Volumetric closed domain
closedDomainTol 1e-10;