|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
#include <distributed_fv.hpp>
Public Types | |
| using | DO = DistributedOctree< Dim, Bits > |
| using | M = typename DO::M |
| using | Code = typename DO::Code |
| using | Coord = typename DO::Coord |
Public Member Functions | |
| void | init (DO &d) |
| Build the consistent face stencil, openness-free (w_f = A_f/d_f). | |
| template<class OpenFn > | |
| void | init (DO &d, OpenFn &&openFn) |
| Build with cut-cell openness: w_f = α_f · A_f/d_f, where α_f = openFn(face
centroid, axis) ∈ [0,1] (1 fluid, 0 solid) evaluated at the finer side's (sub-)face centroid in world coords. | |
| Index | numLeaves () const |
| void | apply (const std::vector< double > &u, std::vector< double > &Lu) const |
| Lu = L u (consistent conservative FV Laplacian, negative-definite). | |
| double | residual (const std::vector< double > &u, const std::vector< double > &rhs, std::vector< double > &res) const |
| res = rhs − L u; returns the global L2 norm (volume-weighted). | |
| double | residualNorm (const std::vector< double > &u, const std::vector< double > &rhs) const |
| void | jacobi (std::vector< double > &u, const std::vector< double > &rhs, int sweeps, double omega=0.8) const |
sweeps weighted-Jacobi relaxations of L u = rhs (point solve u_i ← (Σ w u_nb − V_i rhs_i)/Σ w). | |
Definition at line 45 of file distributed_fv.hpp.
| using peclet::core::amr::DistributedFvOperator< Dim, Bits >::DO = DistributedOctree<Dim, Bits> |
Definition at line 47 of file distributed_fv.hpp.
| using peclet::core::amr::DistributedFvOperator< Dim, Bits >::M = typename DO::M |
Definition at line 48 of file distributed_fv.hpp.
| using peclet::core::amr::DistributedFvOperator< Dim, Bits >::Code = typename DO::Code |
Definition at line 49 of file distributed_fv.hpp.
| using peclet::core::amr::DistributedFvOperator< Dim, Bits >::Coord = typename DO::Coord |
Definition at line 50 of file distributed_fv.hpp.
|
inline |
Build the consistent face stencil, openness-free (w_f = A_f/d_f).
Definition at line 53 of file distributed_fv.hpp.
References peclet::core::amr::DistributedFvOperator< Dim, Bits >::init().
Referenced by peclet::core::amr::DistributedFvOperator< Dim, Bits >::init().
|
inline |
Build with cut-cell openness: w_f = α_f · A_f/d_f, where α_f = openFn(face centroid, axis) ∈ [0,1] (1 fluid, 0 solid) evaluated at the finer side's (sub-)face centroid in world coords.
Both sides of a face — even across a block boundary — evaluate openFn at the same point, so α is symmetric (no exchange needed) and the operator stays conservative. Matches AmrPoisson::buildOpenness. (One owner round to learn cross-block covering levels; octree must be 2:1.)
Definition at line 64 of file distributed_fv.hpp.
References peclet::core::amr::DistributedOctree< Dim, Bits >::blockFineOrigin(), peclet::core::amr::DistributedOctree< Dim, Bits >::coverLevels(), peclet::core::amr::DistributedOctree< Dim, Bits >::faceAcross(), peclet::core::amr::DistributedOctree< Dim, Bits >::globalFineSize(), peclet::core::amr::DistributedOctree< Dim, Bits >::globalGeometry(), peclet::core::amr::DistributedOctree< Dim, Bits >::h0(), peclet::core::amr::DistributedOctree< Dim, Bits >::local(), and peclet::core::amr::BlockOctree< Dim, Bits >::numLeaves().
|
inline |
Definition at line 245 of file distributed_fv.hpp.
|
inline |
Lu = L u (consistent conservative FV Laplacian, negative-definite).
Definition at line 248 of file distributed_fv.hpp.
References peclet::core::amr::DistributedOctree< Dim, Bits >::coverValues().
Referenced by peclet::core::amr::DistributedFvOperator< Dim, Bits >::residual().
|
inline |
res = rhs − L u; returns the global L2 norm (volume-weighted).
Definition at line 266 of file distributed_fv.hpp.
References peclet::core::amr::DistributedFvOperator< Dim, Bits >::apply(), peclet::core::amr::DistributedOctree< Dim, Bits >::comm(), MPI_Allreduce(), MPI_DOUBLE, and MPI_SUM.
Referenced by peclet::core::amr::DistributedFvOperator< Dim, Bits >::residualNorm().
|
inline |
Definition at line 282 of file distributed_fv.hpp.
References peclet::core::amr::DistributedFvOperator< Dim, Bits >::residual().
|
inline |
sweeps weighted-Jacobi relaxations of L u = rhs (point solve u_i ← (Σ w u_nb − V_i rhs_i)/Σ w).
Reads only the previous iterate (one ghost gather per sweep) ⇒ bit-identical across rank counts.
Definition at line 290 of file distributed_fv.hpp.
References peclet::core::amr::DistributedOctree< Dim, Bits >::coverValues().