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
Commits
aee09dd3
Commit
aee09dd3
authored
Nov 15, 2010
by
mattijs
Browse files
BUG: dynamicRefineFvMesh : error calculation, reading dictionary
parent
a0806f5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C
View file @
aee09dd3
...
...
@@ -620,24 +620,23 @@ Foam::dynamicRefineFvMesh::cellToPoint(const scalarField& vFld) const
}
// Calculate error. Is < 0 or distance from inbetween levels
Foam
::
scalarField
Foam
::
dynamicRefineFvMesh
::
error
// Calculate error. Is < 0 or distance to minLevel, maxLevel
Foam
::
scalarField
Foam
::
dynamicRefineFvMesh
::
error
(
const
scalarField
&
fld
,
const
scalar
minLevel
,
const
scalar
maxLevel
)
const
{
const
scalar
halfLevel
=
0
.
5
*
(
minLevel
+
maxLevel
);
scalarField
c
(
fld
.
size
(),
-
1
);
forAll
(
fld
,
i
)
{
if
(
fld
[
i
]
>=
minLevel
&&
fld
[
i
]
<
maxLevel
)
scalar
err
=
min
(
fld
[
i
]
-
minLevel
,
maxLevel
-
fld
[
i
]);
if
(
err
>=
0
)
{
c
[
i
]
=
mag
(
fld
[
i
]
-
halfLevel
)
;
c
[
i
]
=
err
;
}
}
return
c
;
...
...
@@ -877,6 +876,10 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io)
nRefinementIterations_
(
0
),
protectedCell_
(
nCells
(),
0
)
{
// Read static part of dictionary
readDict
();
const
labelList
&
cellLevel
=
meshCutter_
.
cellLevel
();
const
labelList
&
pointLevel
=
meshCutter_
.
pointLevel
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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