DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::EulerP::BC_DeviceView< B > Class Template Reference

Device-callable view of a single boundary condition. More...

#include <EulerP_BC.hpp>

Public Member Functions

DNDS_DEVICE_CALLABLE BC_DeviceView (BCStorageVecDeviceView< B > n_values, Geom::t_index n_id, BCType n_type)
 Constructs a BC device view from values, zone ID, and type.
 
DNDS_DEVICE_CALLABLE Geom::t_index getId () const
 Returns the boundary zone ID.
 
DNDS_DEVICE_CALLABLE BCType getType () const
 Returns the boundary condition type.
 
DNDS_DEVICE_CALLABLE int32_t getNValues () const
 Returns the number of BC parameter values.
 
DNDS_DEVICE_CALLABLE real value (int32_t i) const
 Returns the i-th BC parameter value.
 
template<class tU , class tUOut , class tx , class tn >
DNDS_DEVICE_CALLABLE void apply (tU &&U, tUOut &&UOut, int32_t uSiz, tx &&x, tn &&n, PhysicsDeviceView< B > &phy)
 Applies this boundary condition to compute the ghost state.
 

Detailed Description

template<DeviceBackend B>
class DNDS::EulerP::BC_DeviceView< B >

Device-callable view of a single boundary condition.

Holds a device-resident view of BC parameter values, the boundary zone ID, and the BC type. The apply() method uses a runtime switch to dispatch to the appropriate BCFunc_Impl specialization.

Template Parameters
BDevice backend (Host or CUDA).

Definition at line 210 of file EulerP_BC.hpp.

Constructor & Destructor Documentation

◆ BC_DeviceView()

template<DeviceBackend B>
DNDS_DEVICE_CALLABLE DNDS::EulerP::BC_DeviceView< B >::BC_DeviceView ( BCStorageVecDeviceView< B >  n_values,
Geom::t_index  n_id,
BCType  n_type 
)
inline

Constructs a BC device view from values, zone ID, and type.

Parameters
n_valuesDevice view of BC parameter values.
n_idBoundary zone identifier.
n_typeBoundary condition type.

Definition at line 225 of file EulerP_BC.hpp.

Member Function Documentation

◆ apply()

template<DeviceBackend B>
template<class tU , class tUOut , class tx , class tn >
DNDS_DEVICE_CALLABLE void DNDS::EulerP::BC_DeviceView< B >::apply ( tU &&  U,
tUOut &&  UOut,
int32_t  uSiz,
tx &&  x,
tn &&  n,
PhysicsDeviceView< B > &  phy 
)
inline

Applies this boundary condition to compute the ghost state.

Dispatches to the appropriate BCFunc_Impl specialization based on the runtime type field using a switch statement. Asserts on unknown types.

Template Parameters
tUInput conservative state type (deduced).
tUOutOutput ghost state type (deduced).
txCoordinate vector type (deduced).
tnNormal vector type (deduced).
Parameters
UInput conservative state at the boundary face.
[out]UOutOutput ghost conservative state.
uSizNumber of variables.
xFace centroid coordinates.
nOutward face unit normal.
phyPhysics device view for thermodynamic computations.

Definition at line 254 of file EulerP_BC.hpp.

◆ getId()

Returns the boundary zone ID.

Definition at line 231 of file EulerP_BC.hpp.

◆ getNValues()

template<DeviceBackend B>
DNDS_DEVICE_CALLABLE int32_t DNDS::EulerP::BC_DeviceView< B >::getNValues ( ) const
inline

Returns the number of BC parameter values.

Definition at line 233 of file EulerP_BC.hpp.

◆ getType()

template<DeviceBackend B>
DNDS_DEVICE_CALLABLE BCType DNDS::EulerP::BC_DeviceView< B >::getType ( ) const
inline

Returns the boundary condition type.

Definition at line 232 of file EulerP_BC.hpp.

◆ value()

template<DeviceBackend B>
DNDS_DEVICE_CALLABLE real DNDS::EulerP::BC_DeviceView< B >::value ( int32_t  i) const
inline

Returns the i-th BC parameter value.

Definition at line 234 of file EulerP_BC.hpp.


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