Skip to content

Commit

Permalink
levelset: rework overall design
Browse files Browse the repository at this point in the history
The main purpose of the rework is to reduce the memory footprint of the
levelset. To achieve this goal, the values computed by the levelset are
stored in separate caches. Each cache can be enabled separately form the
other and can operate in one of the following modes:

    values can be cached as their are evaluated;
    values can be pre-computed inside the narrow band;
    values can be pre-computed on the whole domain.

When no caches are enabled, the only memory used by the levelset is the
memory that each object uses to store its own information (for example
the object that evaluates the levelset of a segmentation stored
information about the normals of the segmentation).

When no cached are enabled, the evaluation of the levelset is thread
safe and this allows to use the levelset object inside parallel OpenMP
regions.

This new levelset aims to be 100% compatible with the existing levelset.
Some functions are now deprecated, but thay should still work as before.
  • Loading branch information
andrea-iob committed Sep 28, 2023
1 parent e66faec commit 638036c
Show file tree
Hide file tree
Showing 47 changed files with 3,766 additions and 6,826 deletions.
2 changes: 1 addition & 1 deletion examples/RBF_example_00001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void run(std::string filename,
levelset.setPropagateSign(true);
levelset.setSizeNarrowBand(sqrt(3.0) * h);
// Compute the levelset
levelset.compute(id0);
levelset.fillCache(id0);
// Write levelset information
mesh.write();
bitpit::log::cout() << "Computed levelset within the narrow band... " << std::endl;
Expand Down
3 changes: 1 addition & 2 deletions src/levelset/bitpit_levelset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@

#include "levelSetObject.hpp"
#include "levelSetProxyObject.hpp"
#include "levelSetCachedObject.hpp"
#include "levelSetCache.hpp"
#include "levelSetSegmentationObject.hpp"
#include "levelSetSignedObject.hpp"
#include "levelSetBooleanObject.hpp"
#include "levelSetMaskObject.hpp"

Expand Down
Loading

0 comments on commit 638036c

Please sign in to comment.