DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Euler::IntegrationRecorder Struct Reference

Accumulator for MPI-reduced boundary-face integrals. More...

#include <EulerBC.hpp>

Collaboration diagram for DNDS::Euler::IntegrationRecorder:
[legend]

Public Member Functions

 IntegrationRecorder (const MPIInfo &_nmpi, int siz)
 Construct and zero-initialize the integration recorder.
 
void Reset ()
 Reset the integral vector and divisor to zero.
 
template<class TU >
void Add (TU &&add, real dAdd)
 Accumulate a contribution from a single boundary face.
 
void Reduce ()
 MPI Allreduce (SUM) both the integral vector and the divisor.
 

Public Attributes

Eigen::Vector< real, Eigen::Dynamic > v
 Accumulated integral vector.
 
real div
 Accumulated divisor (area weight).
 
MPIInfo mpi
 MPI communicator info.
 

Detailed Description

Accumulator for MPI-reduced boundary-face integrals.

Collects integrated quantities (e.g. force components, mass flux) over boundary faces on each MPI rank, then performs an MPI_SUM Allreduce to obtain global totals. The divisor div is reduced in parallel and can be used for area-weighted averaging.

Definition at line 587 of file EulerBC.hpp.

Constructor & Destructor Documentation

◆ IntegrationRecorder()

DNDS::Euler::IntegrationRecorder::IntegrationRecorder ( const MPIInfo _nmpi,
int  siz 
)
inline

Construct and zero-initialize the integration recorder.

Parameters
_nmpiMPI communicator wrapper.
sizLength of the integral vector.

Definition at line 598 of file EulerBC.hpp.

Member Function Documentation

◆ Add()

template<class TU >
void DNDS::Euler::IntegrationRecorder::Add ( TU &&  add,
real  dAdd 
)
inline

Accumulate a contribution from a single boundary face.

Template Parameters
TUVector type compatible with Eigen addition.
Parameters
addIntegral contribution vector to add.
dAddCorresponding divisor (area) contribution.

Definition at line 619 of file EulerBC.hpp.

◆ Reduce()

void DNDS::Euler::IntegrationRecorder::Reduce ( )
inline

MPI Allreduce (SUM) both the integral vector and the divisor.

Definition at line 626 of file EulerBC.hpp.

Here is the call graph for this function:

◆ Reset()

void DNDS::Euler::IntegrationRecorder::Reset ( )
inline

Reset the integral vector and divisor to zero.

Definition at line 606 of file EulerBC.hpp.

Member Data Documentation

◆ div

real DNDS::Euler::IntegrationRecorder::div

Accumulated divisor (area weight).

Definition at line 590 of file EulerBC.hpp.

◆ mpi

MPIInfo DNDS::Euler::IntegrationRecorder::mpi

MPI communicator info.

Definition at line 591 of file EulerBC.hpp.

◆ v

Eigen::Vector<real, Eigen::Dynamic> DNDS::Euler::IntegrationRecorder::v

Accumulated integral vector.

Definition at line 589 of file EulerBC.hpp.


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