DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Euler::AnchorPointRecorder< nVarsFixed > Struct Template Reference

Finds the cell closest to a specified anchor point across all MPI ranks. More...

#include <EulerBC.hpp>

Collaboration diagram for DNDS::Euler::AnchorPointRecorder< nVarsFixed >:
[legend]

Public Types

using TU = Eigen::Vector< real, nVarsFixed >
 State vector type.
 

Public Member Functions

 AnchorPointRecorder (const MPIInfo &_mpi)
 Construct with MPI communicator.
 
void Reset ()
 Reset the recorded distance to veryLargeReal (invalidate current anchor).
 
void AddAnchor (const TU &vin, real nDist)
 Submit a candidate anchor cell on this rank.
 
void ObtainAnchorMPI ()
 Global MPI reduction to find the closest anchor across all ranks.
 

Public Attributes

MPIInfo mpi
 MPI communicator info.
 
TU val
 State vector of the closest cell found so far.
 
real dist {veryLargeReal}
 Distance to the closest cell found so far.
 

Detailed Description

template<int nVarsFixed>
struct DNDS::Euler::AnchorPointRecorder< nVarsFixed >

Finds the cell closest to a specified anchor point across all MPI ranks.

Each rank calls AddAnchor() with candidate cells; ObtainAnchorMPI() then performs an MPI_MINLOC reduction to identify the globally closest cell and broadcasts its state vector to all ranks. Used for inlet/outlet reference state anchoring.

Template Parameters
nVarsFixedCompile-time number of conservative variables (or Eigen::Dynamic).

Definition at line 646 of file EulerBC.hpp.

Member Typedef Documentation

◆ TU

template<int nVarsFixed>
using DNDS::Euler::AnchorPointRecorder< nVarsFixed >::TU = Eigen::Vector<real, nVarsFixed>

State vector type.

Definition at line 648 of file EulerBC.hpp.

Constructor & Destructor Documentation

◆ AnchorPointRecorder()

template<int nVarsFixed>
DNDS::Euler::AnchorPointRecorder< nVarsFixed >::AnchorPointRecorder ( const MPIInfo _mpi)
inline

Construct with MPI communicator.

Parameters
_mpiMPI communicator wrapper.

Definition at line 655 of file EulerBC.hpp.

Member Function Documentation

◆ AddAnchor()

template<int nVarsFixed>
void DNDS::Euler::AnchorPointRecorder< nVarsFixed >::AddAnchor ( const TU vin,
real  nDist 
)
inline

Submit a candidate anchor cell on this rank.

Keeps the candidate only if nDist is less than the current best.

Parameters
vinState vector of the candidate cell.
nDistDistance from the candidate cell center to the anchor point.

Definition at line 668 of file EulerBC.hpp.

◆ ObtainAnchorMPI()

template<int nVarsFixed>
void DNDS::Euler::AnchorPointRecorder< nVarsFixed >::ObtainAnchorMPI ( )
inline

Global MPI reduction to find the closest anchor across all ranks.

Uses MPI_DOUBLE_INT + MPI_MINLOC to identify the rank holding the minimum distance, then broadcasts that rank's state vector to all ranks.

Definition at line 680 of file EulerBC.hpp.

Here is the call graph for this function:

◆ Reset()

template<int nVarsFixed>
void DNDS::Euler::AnchorPointRecorder< nVarsFixed >::Reset ( )
inline

Reset the recorded distance to veryLargeReal (invalidate current anchor).

Definition at line 658 of file EulerBC.hpp.

Member Data Documentation

◆ dist

template<int nVarsFixed>
real DNDS::Euler::AnchorPointRecorder< nVarsFixed >::dist {veryLargeReal}

Distance to the closest cell found so far.

Definition at line 651 of file EulerBC.hpp.

◆ mpi

template<int nVarsFixed>
MPIInfo DNDS::Euler::AnchorPointRecorder< nVarsFixed >::mpi

MPI communicator info.

Definition at line 649 of file EulerBC.hpp.

◆ val

template<int nVarsFixed>
TU DNDS::Euler::AnchorPointRecorder< nVarsFixed >::val

State vector of the closest cell found so far.

Definition at line 650 of file EulerBC.hpp.


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