Skip to content

Typo and Parallel run issues in meshSizeObject.C #100

@Vigneshwaran-Sankar

Description

@Vigneshwaran-Sankar

Hi,

I’ve been testing AMR libraries with reactingPimpleCentralDyMFoam and encountered the following issues:

  1. Typo in meshSizeObject.C
    There appears to be a likely copy-paste typo in meshSizeObject.C, lines 103–104. Please verify if this was unintentional.

  2. FPE from densityGradient estimator (from blastFoam repo)
    I compiled the densityGradient error estimator from the blastFoam repo (link), which is currently missing in blastAMR. During parallel runs, I encountered floating point exceptions (FPEs) in meshSizeObject, potentially due to unguarded operations. For example:
    Lined 122-125:

forAll(dx, celli)
{
dx[celli] = sqrt(dx[celli]/scalar(nFaces[celli]));
}

Line 115:
if (mag(Sf[facei]/magSf[facei] & validD) > 0.5)
and so on.
These could benefit from safety guards to prevent division-by-zero or undefined operations. I have attached the workaround I followed for the same.

Mod_meshSizeObject.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions