FAQ - STFS-TUDa/blastAMR GitHub Wiki
The recommended way to decompose and reconstruct cases which have load-balancing active is redistributePar
:
# for reconstruction
runParallel redistributePar -reconstruct
Some issues were reported about usage of reconstructPar
for case reconstruction, although simple workarounds are possible. See issue #7
Error indicators are the components which generate candidates for refinement and unrefinement routines. Typically, refinement candidates are the mesh cells which the user desires to refine to the maximum level of refinement. Unrefinement candidates are actually mesh vertices but the API is simplified to select vertices of provided cells, to keep the selection process consistent with the refinement part.
A few error indicators are provided. To add more, copy an original one, make the ::update()
member method select the cells you want, and compile your class into its own shared library which you can load at case-level with the libs
keyword in system/controlDict
.
A fast-paced way to come up with specialized error estimators is to take advantage of the coded
one:
- The tutorials show basic usage of the
coded
error indicator. For more info on this head to Options docs. - Invoke
updateMesh
at least once on the case to compile the dynamic code. This will happen regardless if you run a solver too. - Copy the generated shared library to your
$FOAM_USER_LIBBIN
(You can find the library inside<your-case>/dynamicCode
). - Load the copied library by its filename in
system/controlDict
- Adjust
errorEstimator
keyword inconstant/dynamicMeshDict
to use the new class type name. - If you care about the source code, copy
*Template.[HC]
files fromdynamicCode/<yourErrorEstimatorName>
somewhere, clean them up of any dynamic-loading artifacts (some global functions, sha1s .... etc). These are valid c++ files, so you can compile them into a separate library and use it instead.