core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
adapt.hpp File Reference
#include <array>
#include <cmath>
#include <utility>
#include <vector>
#include "peclet/core/amr/block_octree.hpp"
#include "peclet/core/amr/indicators.hpp"
#include "peclet/core/common/types.hpp"

Go to the source code of this file.

Classes

struct  peclet::core::amr::AdaptResult< Dim, Bits >
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 
namespace  peclet::core::amr
 
namespace  peclet::core::amr::detail
 

Enumerations

enum  peclet::core::amr::AdaptFlag : int { peclet::core::amr::kCoarsen = -1 , peclet::core::amr::kKeep = 0 , peclet::core::amr::kRefine = 1 }
 Per-leaf adaptation flags from an indicator: refine where ind > refineThresh (and the leaf can go finer, level > finestLevel), coarsen where ind < coarsenThresh (and it can go coarser, level < lmax), else keep. More...
 

Functions

double peclet::core::amr::detail::minmod (double a, double b)
 
template<int Dim, unsigned Bits>
std::vector< doublepeclet::core::amr::transferField (const BlockOctree< Dim, Bits > &oldT, const std::vector< double > &oldF, const BlockOctree< Dim, Bits > &newT, bool linear=true)
 Conservative remap of a leaf field from oldT to newT (same domain).
 
template<int Dim, unsigned Bits>
std::vector< intpeclet::core::amr::flagByIndicator (const BlockOctree< Dim, Bits > &t, const std::vector< double > &ind, double refineThresh, double coarsenThresh, unsigned finestLevel=0)
 
template<int Dim, unsigned Bits>
AdaptResult< Dim, Bitspeclet::core::amr::adaptField (const BlockOctree< Dim, Bits > &t, const std::vector< double > &f, const std::vector< int > &flags, bool linear=true)
 Apply adaptation flags (one level of refine/coarsen) to t carrying field f, then 2:1-balance and remap.
 
template<int Dim, unsigned Bits>
AdaptResult< Dim, Bitspeclet::core::amr::adapt (const BlockOctree< Dim, Bits > &t, const std::vector< double > &f, double refineThresh, double coarsenThresh, unsigned finestLevel=0, double eps=0.01, bool linear=true)
 All-in-one solution-adaptive step: Löhner indicator → flags → adaptField.