core 0.5.0
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::amr::DistributedFlowMultigrid< Dim, Bits > Class Template Reference

#include <distributed_flow_mg.hpp>

Public Types

using DO = DistributedOctree< Dim, Bits >
 
using Octree = typename DO::Octree
 
using Poisson = AmrPoisson< Dim, Bits >
 
using M = typename Octree::M
 
using Code = typename Octree::Code
 

Public Member Functions

template<class OpenFn >
void build (const DO &finest, double h0, OpenFn &&openFn, const LeafHalo< Dim, Bits > *shared0=nullptr)
 Build with cut-cell openness openFn(faceCentreWorld, axis) → [0,1] on the flow's distributed octree (graded + cross-block 2:1 balanced).
 
void setRemoveMean (bool on)
 
std::size_t numLevels () const
 
Index numLeaves (std::size_t L=0) const
 
Index extendedSize (std::size_t L=0) const
 
View< doublex (std::size_t L=0)
 
View< doubleb (std::size_t L=0)
 
const FvOpop (std::size_t L=0) const
 
MPI_Comm comm () const
 
const Poissonpoisson (std::size_t L=0) const
 
const LeafHalo< Dim, Bits > & halo (std::size_t L=0) const
 
void sync (std::size_t L, View< double > v) const
 Refresh the ghost tail of a level-L vector (the PCG matvec hook uses level 0).
 
void vcycle (int pre=2, int post=2, int bottom=40, double omega=0.8, std::size_t L=0)
 One V-cycle on level L (correction scheme), the distributed mirror of Multigrid::vcycle: ghost refresh before every Jacobi sweep / residual, local transfers, Allreduce'd mean removal.
 

Detailed Description

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
class peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >

Definition at line 93 of file distributed_flow_mg.hpp.

Member Typedef Documentation

◆ DO

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::DO = DistributedOctree<Dim, Bits>

Definition at line 95 of file distributed_flow_mg.hpp.

◆ Octree

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::Octree = typename DO::Octree

Definition at line 96 of file distributed_flow_mg.hpp.

◆ Poisson

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::Poisson = AmrPoisson<Dim, Bits>

Definition at line 97 of file distributed_flow_mg.hpp.

◆ M

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::M = typename Octree::M

Definition at line 98 of file distributed_flow_mg.hpp.

◆ Code

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::Code = typename Octree::Code

Definition at line 99 of file distributed_flow_mg.hpp.

Member Function Documentation

◆ build()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
template<class OpenFn >
void peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::build ( const DO finest,
double  h0,
OpenFn &&  openFn,
const LeafHalo< Dim, Bits > *  shared0 = nullptr 
)
inline

Build with cut-cell openness openFn(faceCentreWorld, axis) → [0,1] on the flow's distributed octree (graded + cross-block 2:1 balanced).

Collective.

shared0 (optional): a FINALIZED LeafHalo whose registry is a superset of level 0's face probes — the distributed AmrFlow passes its ±2 flow registry so the level-0 operator's ghost columns index the SAME extended layout as the flow's cell vectors (φ, the overlay chains, the PCG/BiCGStab scratch): one layout, no cross-indexing. Level-0 probes (±1 face reach incl. finer sub-neighbours) are a subset of the flow's forEachFaceFull discovery, so every probe resolves from the frozen registry.

Definition at line 111 of file distributed_flow_mg.hpp.

References peclet::core::amr::transferFieldGradients().

◆ setRemoveMean()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::setRemoveMean ( bool  on)
inline

◆ numLevels()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
std::size_t peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::numLevels ( ) const
inline

Definition at line 125 of file distributed_flow_mg.hpp.

◆ numLeaves()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Index peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::numLeaves ( std::size_t  L = 0) const
inline

◆ extendedSize()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Index peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::extendedSize ( std::size_t  L = 0) const
inline

◆ x()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
View< double > peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::x ( std::size_t  L = 0)
inline

◆ b()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
View< double > peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::b ( std::size_t  L = 0)
inline

◆ op()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
const FvOp & peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::op ( std::size_t  L = 0) const
inline

◆ comm()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
MPI_Comm peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::comm ( ) const
inline

Definition at line 131 of file distributed_flow_mg.hpp.

◆ poisson()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
const Poisson & peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::poisson ( std::size_t  L = 0) const
inline

◆ halo()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
const LeafHalo< Dim, Bits > & peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::halo ( std::size_t  L = 0) const
inline

◆ sync()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::sync ( std::size_t  L,
View< double v 
) const
inline

Refresh the ghost tail of a level-L vector (the PCG matvec hook uses level 0).

Definition at line 136 of file distributed_flow_mg.hpp.

References peclet::core::amr::transferFieldGradients().

◆ vcycle()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::DistributedFlowMultigrid< Dim, Bits >::vcycle ( int  pre = 2,
int  post = 2,
int  bottom = 40,
double  omega = 0.8,
std::size_t  L = 0 
)
inline

The documentation for this class was generated from the following file: