Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
e1a8b134
Commit
e1a8b134
authored
Nov 29, 2010
by
mattijs
Browse files
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
parents
a5f056b1
00c77c35
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C
View file @
e1a8b134
...
...
@@ -29,8 +29,9 @@ License
// Note: the use of this tolerance is ad-hoc, there may be extreme
// cases where the resulting tetrahedra still have particle tracking
// problems.
const
Foam
::
scalar
Foam
::
polyMeshTetDecomposition
::
minTetQuality
=
SMALL
;
// problems, or tets with lower quality may track OK.
// const Foam::scalar Foam::polyMeshTetDecomposition::minTetQuality = SMALL;
const
Foam
::
scalar
Foam
::
polyMeshTetDecomposition
::
minTetQuality
=
ROOTVSMALL
;
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
...
...
@@ -104,11 +105,10 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint
{
return
faceBasePtI
;
}
}
// If a base point hasn't triggered a return by now, then there is
// non that can produce a good decomposition
// non
e
that can produce a good decomposition
return
-
1
;
}
...
...
@@ -554,15 +554,17 @@ Foam::List<Foam::tetIndices> Foam::polyMeshTetDecomposition::faceTetIndices
if
(
tetBasePtI
==
-
1
)
{
FatalError
In
Warning
In
(
"Foam::List<Foam::FixedList<Foam::label, 4> >"
"Foam::Cloud<ParticleType>::"
"faceTetIndices(label fI, label cI) const"
)
<<
"No base point for face "
<<
fI
<<
", "
<<
f
<<
"No base point for face "
<<
fI
<<
", "
<<
f
<<
", produces a valid tet decomposition."
<<
abort
(
FatalError
);
<<
endl
;
tetBasePtI
=
0
;
}
for
(
label
tetPtI
=
1
;
tetPtI
<
f
.
size
()
-
1
;
tetPtI
++
)
...
...
src/lagrangian/basic/Cloud/Cloud.H
View file @
e1a8b134
...
...
@@ -253,7 +253,11 @@ public:
//- Increment the nTrackingRescues counter
void
trackingRescue
()
const
{
nTrackingRescues_
++
;
if
(
++
nTrackingRescues_
%
size
()
==
0
)
{
Info
<<
" "
<<
nTrackingRescues_
<<
" tracking rescues "
<<
endl
;
}
}
//- Whether each cell has any wall faces (demand driven data)
...
...
src/lagrangian/basic/Particle/Particle.C
View file @
e1a8b134
...
...
@@ -256,6 +256,17 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
faceI_
=
-
1
;
// Pout<< "Particle " << origId_ << " " << origProc_
// << " Tracking from " << position_
// << " to " << endPosition
// << endl;
// Pout<< "stepFraction " << stepFraction_ << nl
// << "cellI " << cellI_ << nl
// << "tetFaceI " << tetFaceI_ << nl
// << "tetPtI " << tetPtI_
// << endl;
scalar
trackFraction
=
0
.
0
;
// Minimum tetrahedron decomposition of each cell of the mesh into
...
...
@@ -397,6 +408,8 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
triI
=
-
1
;
lambdaMin
=
VGREAT
;
// Pout<< "tris " << tris << endl;
// Sets a value for lambdaMin and faceI_ if a wall face is hit
// by the track.
hitWallFaces
(
position_
,
endPosition
,
lambdaMin
,
faceHitTetIs
);
...
...
@@ -461,6 +474,35 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
faceI_
=
-
1
;
}
// Pout<< "track loop " << position_ << " " << endPosition << nl
// << " " << cellI_
// << " " << faceI_
// << " " << tetFaceI_
// << " " << tetPtI_
// << " " << triI
// << " " << lambdaMin
// << " " << trackFraction
// << endl;
// Pout<< "# Tracking loop tet "
// << origId_ << " " << origProc_<< nl
// << "# face: " << tetFaceI_ << nl
// << "# tetPtI: " << tetPtI_ << nl
// << "# tetBasePtI: " << mesh.tetBasePtIs()[tetFaceI_] << nl
// << "# tet.mag(): " << tet.mag() << nl
// << "# tet.quality(): " << tet.quality()
// << endl;
// meshTools::writeOBJ(Pout, tet.a());
// meshTools::writeOBJ(Pout, tet.b());
// meshTools::writeOBJ(Pout, tet.c());
// meshTools::writeOBJ(Pout, tet.d());
// Pout<< "f 1 3 2" << nl
// << "f 2 3 4" << nl
// << "f 1 4 3" << nl
// << "f 1 2 4" << endl;
// The particle can be 'outside' the tet. This will yield a
// lambda larger than 1, or smaller than 0. For values < 0,
// the particle travels away from the tet and we don't move
...
...
src/lagrangian/basic/Particle/ParticleI.H
View file @
e1a8b134
...
...
@@ -343,9 +343,6 @@ inline void Foam::Particle<ParticleType>::tetNeighbour(label triI)
label
tetBasePtI
=
mesh
.
tetBasePtIs
()[
tetFaceI_
];
label
facePtI
=
(
tetPtI_
+
tetBasePtI
)
%
f
.
size
();
label
otherFacePtI
=
f
.
fcIndex
(
facePtI
);
if
(
tetBasePtI
==
-
1
)
{
FatalErrorIn
...
...
@@ -357,6 +354,9 @@ inline void Foam::Particle<ParticleType>::tetNeighbour(label triI)
<<
abort
(
FatalError
);
}
label
facePtI
=
(
tetPtI_
+
tetBasePtI
)
%
f
.
size
();
label
otherFacePtI
=
f
.
fcIndex
(
facePtI
);
switch
(
triI
)
{
case
0
:
...
...
applications/utilities/miscellaneous/foamFormatConvert
/fieldDictionary.H
→
src/meshTools/sets/cellSources/fieldToCell
/fieldDictionary.H
View file @
e1a8b134
File moved
src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C
View file @
e1a8b134
...
...
@@ -28,6 +28,7 @@ License
#include "cellSet.H"
#include "Time.H"
#include "IFstream.H"
#include "fieldDictionary.H"
#include "addToRunTimeSelectionTable.H"
...
...
@@ -207,7 +208,7 @@ void Foam::fieldToCell::applyToSet
IFstream
str
(
fieldObject
.
filePath
());
// Read dictionary
d
ictionary
fieldDict
(
str
);
fieldD
ictionary
fieldDict
(
fieldObject
,
fieldObject
.
headerClassName
()
);
scalarField
internalVals
(
"internalField"
,
fieldDict
,
mesh
().
nCells
());
...
...
@@ -218,7 +219,7 @@ void Foam::fieldToCell::applyToSet
IFstream
str
(
fieldObject
.
filePath
());
// Read dictionary
d
ictionary
fieldDict
(
str
);
fieldD
ictionary
fieldDict
(
fieldObject
,
fieldObject
.
headerClassName
()
);
vectorField
internalVals
(
"internalField"
,
fieldDict
,
mesh
().
nCells
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment