Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
8c4f6b8f
Commit
8c4f6b8f
authored
Apr 25, 2016
by
Henry Weller
Browse files
Standardized cell, patch and face loop index names
parent
6a27f7af
Changes
849
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C
View file @
8c4f6b8f
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
5
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -131,11 +131,11 @@ int main(int argc, char *argv[])
protectedCell
=
0
;
}
forAll
(
betav
,
cell
I
)
forAll
(
betav
,
cell
i
)
{
if
(
betav
[
cell
I
]
<
0
.
99
)
if
(
betav
[
cell
i
]
<
0
.
99
)
{
protectedCell
[
cell
I
]
=
1
;
protectedCell
[
cell
i
]
=
1
;
}
}
...
...
applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C
View file @
8c4f6b8f
...
...
@@ -155,11 +155,11 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::D
volScalarField
&
D
(
tmpD
.
ref
());
forAll
(
p
,
cell
I
)
forAll
(
p
,
cell
i
)
{
D
[
cell
I
]
=
localThermo
.
alphah
(
p
[
cell
I
],
T
[
cell
I
])
/
localThermo
.
rho
(
p
[
cell
I
],
T
[
cell
I
]);
D
[
cell
i
]
=
localThermo
.
alphah
(
p
[
cell
i
],
T
[
cell
i
])
/
localThermo
.
rho
(
p
[
cell
i
],
T
[
cell
i
]);
}
D
/=
Le_
;
...
...
@@ -209,11 +209,11 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L
volScalarField
&
L
(
tmpL
.
ref
());
forAll
(
p
,
cell
I
)
forAll
(
p
,
cell
i
)
{
L
[
cell
I
]
=
localThermo
.
Ha
(
p
[
cell
I
],
Tf
[
cell
I
])
-
otherLocalThermo
.
Ha
(
otherP
[
cell
I
],
Tf
[
cell
I
]);
L
[
cell
i
]
=
localThermo
.
Ha
(
p
[
cell
i
],
Tf
[
cell
i
])
-
otherLocalThermo
.
Ha
(
otherP
[
cell
i
],
Tf
[
cell
i
]);
}
return
tmpL
;
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
View file @
8c4f6b8f
...
...
@@ -85,23 +85,23 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
tmp
<
scalarField
>
typsf
(
new
scalarField
(
this
->
size
()));
scalarField
&
ypsf
=
typsf
.
ref
();
forAll
(
ypsf
,
face
I
)
forAll
(
ypsf
,
face
i
)
{
scalar
ypt
=
11
.
0
;
for
(
int
i
=
0
;
i
<
maxIters_
;
i
++
)
{
scalar
f
=
ypt
-
(
log
(
E_
*
ypt
)
/
kappa_
+
P
[
face
I
])
/
Prat
[
face
I
];
scalar
df
=
1
-
1
.
0
/
(
ypt
*
kappa_
*
Prat
[
face
I
]);
scalar
f
=
ypt
-
(
log
(
E_
*
ypt
)
/
kappa_
+
P
[
face
i
])
/
Prat
[
face
i
];
scalar
df
=
1
-
1
.
0
/
(
ypt
*
kappa_
*
Prat
[
face
i
]);
scalar
yptNew
=
ypt
-
f
/
df
;
if
(
yptNew
<
VSMALL
)
{
ypsf
[
face
I
]
=
0
;
ypsf
[
face
i
]
=
0
;
}
else
if
(
mag
(
yptNew
-
ypt
)
<
tolerance_
)
{
ypsf
[
face
I
]
=
yptNew
;
ypsf
[
face
i
]
=
yptNew
;
}
else
{
...
...
@@ -109,7 +109,7 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
}
}
ypsf
[
face
I
]
=
ypt
;
ypsf
[
face
i
]
=
ypt
;
}
return
typsf
;
...
...
@@ -200,32 +200,32 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat
scalarField
&
alphatConv
=
talphatConv
.
ref
();
// Populate boundary values
forAll
(
alphatConv
,
face
I
)
forAll
(
alphatConv
,
face
i
)
{
// Evaluate new effective thermal diffusivity
scalar
alphaEff
=
0
.
0
;
if
(
yPlus
[
face
I
]
<
yPlusTherm
[
face
I
])
if
(
yPlus
[
face
i
]
<
yPlusTherm
[
face
i
])
{
scalar
A
=
qDot
[
face
I
]
*
rhow
[
face
I
]
*
uTau
[
face
I
]
*
y
[
face
I
];
scalar
B
=
qDot
[
face
I
]
*
Pr
[
face
I
]
*
yPlus
[
face
I
];
scalar
C
=
Pr
[
face
I
]
*
0
.
5
*
rhow
[
face
I
]
*
uTau
[
face
I
]
*
sqr
(
magUp
[
face
I
]);
scalar
A
=
qDot
[
face
i
]
*
rhow
[
face
i
]
*
uTau
[
face
i
]
*
y
[
face
i
];
scalar
B
=
qDot
[
face
i
]
*
Pr
[
face
i
]
*
yPlus
[
face
i
];
scalar
C
=
Pr
[
face
i
]
*
0
.
5
*
rhow
[
face
i
]
*
uTau
[
face
i
]
*
sqr
(
magUp
[
face
i
]);
alphaEff
=
A
/
(
B
+
C
+
VSMALL
);
}
else
{
scalar
A
=
qDot
[
face
I
]
*
rhow
[
face
I
]
*
uTau
[
face
I
]
*
y
[
face
I
];
scalar
A
=
qDot
[
face
i
]
*
rhow
[
face
i
]
*
uTau
[
face
i
]
*
y
[
face
i
];
scalar
B
=
qDot
[
face
I
]
*
Prt_
*
(
1
.
0
/
kappa_
*
log
(
E_
*
yPlus
[
face
I
])
+
P
[
face
I
]);
qDot
[
face
i
]
*
Prt_
*
(
1
.
0
/
kappa_
*
log
(
E_
*
yPlus
[
face
i
])
+
P
[
face
i
]);
scalar
magUc
=
uTau
[
face
I
]
/
kappa_
*
log
(
E_
*
yPlusTherm
[
face
I
])
-
mag
(
Uw
[
face
I
]);
uTau
[
face
i
]
/
kappa_
*
log
(
E_
*
yPlusTherm
[
face
i
])
-
mag
(
Uw
[
face
i
]);
scalar
C
=
0
.
5
*
rhow
[
face
I
]
*
uTau
[
face
I
]
*
(
Prt_
*
sqr
(
magUp
[
face
I
])
+
(
Pr
[
face
I
]
-
Prt_
)
*
sqr
(
magUc
));
0
.
5
*
rhow
[
face
i
]
*
uTau
[
face
i
]
*
(
Prt_
*
sqr
(
magUp
[
face
i
])
+
(
Pr
[
face
i
]
-
Prt_
)
*
sqr
(
magUc
));
alphaEff
=
A
/
(
B
+
C
+
VSMALL
);
}
// Update convective heat transfer turbulent thermal diffusivity
alphatConv
[
face
I
]
=
max
(
0
.
0
,
alphaEff
-
alphaw
[
face
I
]);
alphatConv
[
face
i
]
=
max
(
0
.
0
,
alphaEff
-
alphaw
[
face
i
]);
}
return
talphatConv
;
...
...
applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C
View file @
8c4f6b8f
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
5
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -88,9 +88,9 @@ int main(int argc, char *argv[])
dimensionedScalar
(
"aggomeration"
,
dimless
,
0
.
0
)
);
scalarField
&
fld
=
scalarAgglomeration
.
internalField
();
forAll
(
fld
,
cell
I
)
forAll
(
fld
,
cell
i
)
{
fld
[
cell
I
]
=
cellToCoarse
[
cell
I
];
fld
[
cell
i
]
=
cellToCoarse
[
cell
i
];
}
fld
/=
max
(
fld
);
scalarAgglomeration
.
correctBoundaryConditions
();
...
...
@@ -167,9 +167,9 @@ int main(int argc, char *argv[])
dimensionedScalar
(
"aggomeration"
,
dimless
,
0
.
0
)
);
scalarField
&
fld
=
scalarAgglomeration
.
internalField
();
forAll
(
fld
,
cell
I
)
forAll
(
fld
,
cell
i
)
{
fld
[
cell
I
]
=
cellToCoarse
[
cell
I
];
fld
[
cell
i
]
=
cellToCoarse
[
cell
i
];
}
if
(
normalise
)
{
...
...
@@ -185,9 +185,9 @@ int main(int argc, char *argv[])
label
vertI
=
0
;
// Write all mesh cc
forAll
(
mesh
.
cellCentres
(),
cell
I
)
forAll
(
mesh
.
cellCentres
(),
cell
i
)
{
meshTools
::
writeOBJ
(
str
,
mesh
.
cellCentres
()[
cell
I
]);
meshTools
::
writeOBJ
(
str
,
mesh
.
cellCentres
()[
cell
i
]);
vertI
++
;
}
...
...
@@ -205,9 +205,9 @@ int main(int argc, char *argv[])
forAll
(
cellLabels
,
i
)
{
label
cell
I
=
cellLabels
[
i
];
label
cell
i
=
cellLabels
[
i
];
str
<<
"l "
<<
cell
I
+
1
<<
' '
<<
vertI
<<
nl
;
str
<<
"l "
<<
cell
i
+
1
<<
' '
<<
vertI
<<
nl
;
}
}
}
...
...
applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C
View file @
8c4f6b8f
...
...
@@ -114,9 +114,9 @@ int main(int argc, char *argv[])
dimensionedScalar
(
"patchDist"
,
dimLength
,
0
.
0
)
);
scalarField
pf
(
vsf
.
boundaryField
()[
patch
.
index
()].
size
());
forAll
(
pf
,
face
I
)
forAll
(
pf
,
face
i
)
{
pf
[
face
I
]
=
Foam
::
sqrt
(
allFaceInfo
[
face
I
].
distSqr
());
pf
[
face
i
]
=
Foam
::
sqrt
(
allFaceInfo
[
face
i
].
distSqr
());
}
vsf
.
boundaryFieldRef
()[
patch
.
index
()]
=
pf
;
...
...
applications/test/PatchTools/Test-PatchTools.C
View file @
8c4f6b8f
...
...
@@ -72,10 +72,10 @@ using namespace Foam;
// const faceList& localFaces = p.localFaces();
// const vectorField& faceAreas = mesh.faceAreas();
//
// forAll(localFaces, face
I
)
// forAll(localFaces, face
i
)
// {
// const face& f = localFaces[face
I
];
// const vector& n = faceAreas[meshFaces[face
I
]];
// const face& f = localFaces[face
i
];
// const vector& n = faceAreas[meshFaces[face
i
]];
// forAll(f, fp)
// {
// extrudeN[f[fp]] += n;
...
...
applications/test/extendedStencil/Test-ExtendedStencil.C
View file @
8c4f6b8f
...
...
@@ -168,13 +168,13 @@ int main(int argc, char *argv[])
// stencilPoints
// );
//
// forAll(stencilPoints, face
I
)
// forAll(stencilPoints, face
i
)
// {
// writeStencilOBJ
// (
// runTime.path()/"faceEdgeCell" + Foam::name(face
I
) + ".obj",
// mesh.faceCentres()[face
I
],
// stencilPoints[face
I
]
// runTime.path()/"faceEdgeCell" + Foam::name(face
i
) + ".obj",
// mesh.faceCentres()[face
i
],
// stencilPoints[face
i
]
// );
// }
// }
...
...
@@ -200,14 +200,14 @@ int main(int argc, char *argv[])
// //{
// // const labelListList& stencil = addressing.stencil();
// // List<List<scalar>> stencilWeights(stencil.size());
// // forAll(stencil, face
I
)
// // forAll(stencil, face
i
)
// // {
// // const labelList& fStencil = stencil[face
I
];
// // const labelList& fStencil = stencil[face
i
];
// //
// // if (fStencil.size() > 0)
// // {
// // // Uniform weights
// // stencilWeights[face
I
] = scalarList
// // stencilWeights[face
i
] = scalarList
// // (
// // fStencil.size(),
// // 1.0/fStencil.size()
...
...
@@ -230,15 +230,15 @@ int main(int argc, char *argv[])
// stencilPoints
// );
//
// forAll(stencilPoints, face
I
)
// forAll(stencilPoints, face
i
)
// {
// if (stencilPoints[face
I
].size() >= 15)
// if (stencilPoints[face
i
].size() >= 15)
// {
// writeStencilOBJ
// (
// runTime.path()/"centredFace" + Foam::name(face
I
) + ".obj",
// mesh.faceCentres()[face
I
],
// stencilPoints[face
I
]
// runTime.path()/"centredFace" + Foam::name(face
i
) + ".obj",
// mesh.faceCentres()[face
i
],
// stencilPoints[face
i
]
// );
// }
// }
...
...
@@ -267,13 +267,13 @@ int main(int argc, char *argv[])
// // stencilPoints
// //);
// //
// //forAll(stencilPoints, face
I
)
// //forAll(stencilPoints, face
i
)
// //{
// // writeStencilOBJ
// // (
// // runTime.path()/"centredPoint" + Foam::name(face
I
) + ".obj",
// // mesh.faceCentres()[face
I
],
// // stencilPoints[face
I
]
// // runTime.path()/"centredPoint" + Foam::name(face
i
) + ".obj",
// // mesh.faceCentres()[face
i
],
// // stencilPoints[face
i
]
// // );
// //}
// }
...
...
@@ -302,13 +302,13 @@ int main(int argc, char *argv[])
// // stencilPoints
// //);
// //
// //forAll(stencilPoints, face
I
)
// //forAll(stencilPoints, face
i
)
// //{
// // writeStencilOBJ
// // (
// // runTime.path()/"centredEdge" + Foam::name(face
I
) + ".obj",
// // mesh.faceCentres()[face
I
],
// // stencilPoints[face
I
]
// // runTime.path()/"centredEdge" + Foam::name(face
i
) + ".obj",
// // mesh.faceCentres()[face
i
],
// // stencilPoints[face
i
]
// // );
// //}
// }
...
...
@@ -340,13 +340,13 @@ int main(int argc, char *argv[])
// ownPoints
// );
//
// forAll(ownPoints, face
I
)
// forAll(ownPoints, face
i
)
// {
// writeStencilOBJ
// (
// runTime.path()/"ownFEC" + Foam::name(face
I
) + ".obj",
// mesh.faceCentres()[face
I
],
// ownPoints[face
I
]
// runTime.path()/"ownFEC" + Foam::name(face
i
) + ".obj",
// mesh.faceCentres()[face
i
],
// ownPoints[face
i
]
// );
// }
// }
...
...
@@ -361,13 +361,13 @@ int main(int argc, char *argv[])
// neiPoints
// );
//
// forAll(neiPoints, face
I
)
// forAll(neiPoints, face
i
)
// {
// writeStencilOBJ
// (
// runTime.path()/"neiFEC" + Foam::name(face
I
) + ".obj",
// mesh.faceCentres()[face
I
],
// neiPoints[face
I
]
// runTime.path()/"neiFEC" + Foam::name(face
i
) + ".obj",
// mesh.faceCentres()[face
i
],
// neiPoints[face
i
]
// );
// }
// }
...
...
@@ -400,13 +400,13 @@ int main(int argc, char *argv[])
// ownPoints
// );
//
// forAll(ownPoints, face
I
)
// forAll(ownPoints, face
i
)
// {
// writeStencilOBJ
// (
// runTime.path()/"ownCFC" + Foam::name(face
I
) + ".obj",
// mesh.faceCentres()[face
I
],
// ownPoints[face
I
]
// runTime.path()/"ownCFC" + Foam::name(face
i
) + ".obj",
// mesh.faceCentres()[face
i
],
// ownPoints[face
i
]
// );
// }
// }
...
...
@@ -421,13 +421,13 @@ int main(int argc, char *argv[])
// neiPoints
// );
//
// forAll(neiPoints, face
I
)
// forAll(neiPoints, face
i
)
// {
// writeStencilOBJ
// (
// runTime.path()/"neiCFC" + Foam::name(face
I
) + ".obj",
// mesh.faceCentres()[face
I
],
// neiPoints[face
I
]
// runTime.path()/"neiCFC" + Foam::name(face
i
) + ".obj",
// mesh.faceCentres()[face
i
],
// neiPoints[face
i
]
// );
// }
// }
...
...
@@ -458,13 +458,13 @@ int main(int argc, char *argv[])
stencilPoints
);
forAll
(
stencilPoints
,
cell
I
)
forAll
(
stencilPoints
,
cell
i
)
{
writeStencilOBJ
(
runTime
.
path
()
/
"centredCECCell"
+
Foam
::
name
(
cell
I
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
I
],
stencilPoints
[
cell
I
]
runTime
.
path
()
/
"centredCECCell"
+
Foam
::
name
(
cell
i
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
i
],
stencilPoints
[
cell
i
]
);
}
}
...
...
@@ -486,13 +486,13 @@ int main(int argc, char *argv[])
stencilPoints
);
forAll
(
stencilPoints
,
cell
I
)
forAll
(
stencilPoints
,
cell
i
)
{
writeStencilOBJ
(
runTime
.
path
()
/
"centredCPCCell"
+
Foam
::
name
(
cell
I
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
I
],
stencilPoints
[
cell
I
]
runTime
.
path
()
/
"centredCPCCell"
+
Foam
::
name
(
cell
i
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
i
],
stencilPoints
[
cell
i
]
);
}
}
...
...
@@ -514,13 +514,13 @@ int main(int argc, char *argv[])
stencilPoints
);
forAll
(
stencilPoints
,
cell
I
)
forAll
(
stencilPoints
,
cell
i
)
{
writeStencilOBJ
(
runTime
.
path
()
/
"centredCFCCell"
+
Foam
::
name
(
cell
I
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
I
],
stencilPoints
[
cell
I
]
runTime
.
path
()
/
"centredCFCCell"
+
Foam
::
name
(
cell
i
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
i
],
stencilPoints
[
cell
i
]
);
}
}
...
...
@@ -538,12 +538,12 @@ int main(int argc, char *argv[])
// );
// for (label faci = 0; faci < mesh.nInternalFaces(); faci++)
// {
// const scalarList& stData = stencilData[face
I
];
// const scalarList& stWeight = fit[face
I
];
// const scalarList& stData = stencilData[face
i
];
// const scalarList& stWeight = fit[face
i
];
//
// forAll(stData, i)
// {
// sf[face
I
] += stWeight[i]*stData[i];
// sf[face
i
] += stWeight[i]*stData[i];
// }
// }
// See finiteVolume/lnInclude/leastSquaresGrad.C
...
...
applications/test/extendedStencil/Test-ExtendedStencil2.C
View file @
8c4f6b8f
...
...
@@ -150,9 +150,9 @@ int main(int argc, char *argv[])
List
<
point
>
compactFld
(
map
.
constructSize
(),
Zero
);
// Insert my internal values
forAll
(
fld
,
cell
I
)
forAll
(
fld
,
cell
i
)
{
compactFld
[
cell
I
]
=
fld
[
cell
I
];
compactFld
[
cell
i
]
=
fld
[
cell
i
];
}
// Insert my boundary values
label
nCompact
=
fld
.
size
();
...
...
@@ -172,27 +172,27 @@ int main(int argc, char *argv[])
// 2. Pull to stencil
stencilPoints
.
setSize
(
stencil
.
size
());
forAll
(
stencil
,
cell
I
)
forAll
(
stencil
,
cell
i
)
{
const
labelList
&
compactCells
=
stencil
[
cell
I
];
const
labelList
&
compactCells
=
stencil
[
cell
i
];
stencilPoints
[
cell
I
].
setSize
(
compactCells
.
size
());
stencilPoints
[
cell
i
].
setSize
(
compactCells
.
size
());
forAll
(
compactCells
,
i
)
{
stencilPoints
[
cell
I
][
i
]
=
compactFld
[
compactCells
[
i
]];
stencilPoints
[
cell
i
][
i
]
=
compactFld
[
compactCells
[
i
]];
}
}
}
forAll
(
stencilPoints
,
cell
I
)
forAll
(
stencilPoints
,
cell
i
)
{
writeStencilOBJ
(
runTime
.
path
()
/
"centredCell"
+
Foam
::
name
(
cell
I
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
I
],
stencilPoints
[
cell
I
]
runTime
.
path
()
/
"centredCell"
+
Foam
::
name
(
cell
i
)
+
".obj"
,
mesh
.
cellCentres
()[
cell
i
],
stencilPoints
[
cell
i
]
);
}
}
...
...
applications/test/globalIndex/Test-globalIndex.C
View file @
8c4f6b8f
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
5
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -66,26 +66,26 @@ int main(int argc, char *argv[])
}
// convert from local to global and back.
for
(
label
cell
I
=
0
;
cell
I
<
mesh
.
nCells
();
cell
I
++
)
for
(
label
cell
i
=
0
;
cell
i
<
mesh
.
nCells
();
cell
i
++
)
{
// to global index
label
globalCellI
=
globalNumbering
.
toGlobal
(
cell
I
);
label
globalCellI
=
globalNumbering
.
toGlobal
(
cell
i
);
// and back
label
procI
=
globalNumbering
.
whichProcID
(
globalCellI
);
label
localCellI
=
globalNumbering
.
toLocal
(
globalCellI
);
if
(
procI
!=
Pstream
::
myProcNo
()
||
localCellI
!=
cell
I
)
if
(
procI
!=
Pstream
::
myProcNo
()
||
localCellI
!=
cell
i
)
{
FatalErrorInFunction
<<
"Problem. cell
I
:"
<<
cell
I
<<
" localCellI:"
<<
localCellI
<<
"Problem. cell
i
:"
<<
cell
i
<<
" localCellI:"
<<
localCellI
<<
" procI:"
<<
procI
<<
abort
(
FatalError
);
}
if
(
!
globalNumbering
.
isLocal
(
globalCellI
))
{
FatalErrorInFunction
<<
"Problem. cell
I
:"
<<
cell
I
<<
" globalCellI:"
<<
globalCellI
<<
"Problem. cell
i
:"
<<
cell
i
<<
" globalCellI:"
<<
globalCellI
<<
" not local"
<<
abort
(
FatalError
);
}
}
...
...
applications/test/momentOfInertia/Test-momentOfInertia.C
View file @
8c4f6b8f
...
...
@@ -196,16 +196,16 @@ int main(int argc, char *argv[])
}
{
const
label
cell
I
=
args
.
optionLookupOrDefault
(
"cell"
,
0
);
const
label
cell
i
=
args
.
optionLookupOrDefault
(
"cell"
,
0
);
tensorField
mI
(
momentOfInertia
::
meshInertia
(
mesh
));
tensor
&
J
=
mI
[
cell
I
];
tensor
&
J
=
mI
[
cell
i
];
vector
eVal
=
eigenValues
(
J
);
Info
<<
nl
<<
"Inertia tensor of cell "
<<
cell
I
<<
" "
<<
J
<<
nl
<<
"Inertia tensor of cell "
<<
cell
i
<<
" "
<<
J
<<
nl
<<
"eigenValues (principal moments) "
<<
eVal
<<
endl
;
J
/=
cmptMax
(
eVal
);
...
...
@@ -215,16 +215,16 @@ int main(int argc, char *argv[])
Info
<<
"eigenVectors (principal axes, from normalised inertia) "
<<
eVec
<<
endl
;
OFstream
str
(
"cell_"
+
name
(
cell
I
)
+
"_inertia.obj"
);
OFstream
str
(
"cell_"
+
name
(
cell
i
)
+
"_inertia.obj"
);
Info
<<
nl
<<
"Writing scaled principal axes of cell "
<<
cell
I
<<
" to "
Info
<<
nl
<<
"Writing scaled principal axes of cell "
<<
cell
i
<<
" to "