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

Host-side physics object managing gas parameters and device-transferable reference values. More...

#include <EulerP_Physics.hpp>

Collaboration diagram for DNDS::EulerP::Physics:
[legend]

Public Types

template<DeviceBackend B>
using t_deviceView = PhysicsDeviceView< B >
 Device view type alias parameterized by backend.
 

Public Member Functions

 DNDS_NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_ORDERED_AND_UNORDERED_JSON (Physics, reference_values, params) void to_host()
 Transfers reference values to host memory.
 
void to_device (DeviceBackend B)
 Transfers reference values to the specified device backend.
 
DeviceBackend device ()
 Returns the current device backend where reference values reside.
 
template<DeviceBackend B>
t_deviceView< B > deviceView ()
 Creates a device-callable view of this Physics object.
 
void setPerfectGas (real Rg, real gamma)
 Configures the physics for a calorically perfect ideal gas.
 

Public Attributes

host_device_vector< realreference_values
 Reference values (e.g., freestream state) for non-dimensionalization.
 
PhysicsParams params
 Gas physical parameters.
 

Detailed Description

Host-side physics object managing gas parameters and device-transferable reference values.

Stores a host_device_vector of reference values (e.g., freestream quantities) and PhysicsParams. Supports JSON serialization and host/device transfer for GPU offloading. Use deviceView<B>() to obtain a PhysicsDeviceView for kernel invocation.

Definition at line 339 of file EulerP_Physics.hpp.

Member Typedef Documentation

◆ t_deviceView

Device view type alias parameterized by backend.

Definition at line 368 of file EulerP_Physics.hpp.

Member Function Documentation

◆ device()

DeviceBackend DNDS::EulerP::Physics::device ( )
inline

Returns the current device backend where reference values reside.

Definition at line 362 of file EulerP_Physics.hpp.

◆ deviceView()

template<DeviceBackend B>
t_deviceView< B > DNDS::EulerP::Physics::deviceView ( )
inline

Creates a device-callable view of this Physics object.

Asserts that the reference values reside on backend B (or Host with Unknown).

Template Parameters
BTarget device backend.
Returns
A PhysicsDeviceView<B> suitable for device kernel invocation.

Definition at line 379 of file EulerP_Physics.hpp.

◆ DNDS_NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_ORDERED_AND_UNORDERED_JSON()

DNDS::EulerP::Physics::DNDS_NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_ORDERED_AND_UNORDERED_JSON ( Physics  ,
reference_values  ,
params   
)
inline

Transfers reference values to host memory.

Definition at line 343 of file EulerP_Physics.hpp.

◆ setPerfectGas()

void DNDS::EulerP::Physics::setPerfectGas ( real  Rg,
real  gamma 
)
inline

Configures the physics for a calorically perfect ideal gas.

Computes cp = Rg * gamma / (gamma - 1) and cv = cp / gamma.

Parameters
RgSpecific gas constant R = Cp - Cv.
gammaRatio of specific heats Cp/Cv.

Definition at line 396 of file EulerP_Physics.hpp.

◆ to_device()

void DNDS::EulerP::Physics::to_device ( DeviceBackend  B)
inline

Transfers reference values to the specified device backend.

Parameters
BTarget device backend (Host or CUDA).

Definition at line 356 of file EulerP_Physics.hpp.

Member Data Documentation

◆ params

PhysicsParams DNDS::EulerP::Physics::params

Gas physical parameters.

Definition at line 342 of file EulerP_Physics.hpp.

◆ reference_values

host_device_vector<real> DNDS::EulerP::Physics::reference_values

Reference values (e.g., freestream state) for non-dimensionalization.

Definition at line 341 of file EulerP_Physics.hpp.


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