View Issue Details

IDProjectCategoryView StatusLast Update
0000075OpenFOAMBugpublic2010-11-15 16:21
Reporteruser71Assigned Touser4 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0000075: Code inconsistency in dynamicRefineFvMesh.C
DescriptionIn file src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C, function dynamicRefineFvMesh::selectRefineCandidates

1. Comment in function says:
// Get error per cell. Is -1 (not to be refined) to >0 (to be refined,
// higher more desirable to be refined).

but 'error' function assigns 0 value for middle value of vFld and largest value for boundary values (lowerRefineLevel and upperRefineLevel). I would expect the opposite.

I know that this value is not actually used, but this inconsistency is not good anyway.

2. If vFld is exactly the same as 0.5 * (lowerRefineLevel + upperRefineLevel), the mesh will not be refined, because the criterion is cellError[cellI] > 0
TagsNo tags attached.

Activities

user4

2010-11-08 13:19

  ~0000116

Good point. Shall I change the error into the distance to the extrema?

    forAll(fld, i)
    {
        if (fld[i] >= minLevel && fld[i] < maxLevel)
        {
            c[i] = min(fld[i]-minLevel, fld[i]-maxLevel)
        }
    }

This would also solve 2)

user71

2010-11-08 13:21

  ~0000117

Better like this (fld[i]-maxLevel is negative):

 c[i] = min(fld[i]-minLevel, maxLevel-fld[i])

user4

2010-11-15 16:21

  ~0000124

fixed in 7e2e27b455edef40f53c827b8c688f39f786c47b

- changed the error calculation
- fixed 'dumpLevel' and flux mapping functionality (dictionary was never read)

Thanks for reporting.

Issue History

Date Modified Username Field Change
2010-11-08 12:43 user71 New Issue
2010-11-08 13:08 user4 Assigned To => user4
2010-11-08 13:08 user4 Status new => assigned
2010-11-08 13:19 user4 Note Added: 0000116
2010-11-08 13:21 user71 Note Added: 0000117
2010-11-15 16:21 user4 Note Added: 0000124
2010-11-15 16:21 user4 Status assigned => resolved
2010-11-15 16:21 user4 Fixed in Version => 1.7.x
2010-11-15 16:21 user4 Resolution open => fixed