Skip to main content

Rocky Solver SDK 2025 R2

rocky_boundary_scalars

Last update: 16.07.2025
1// (C) 2024 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
2#pragma once
3
4#include "rocky_scalars.h"
5
6
7
8// =================================================================================================
9// IRockyGeometryScalarsModel
10// =================================================================================================
11
17struct IRockyGeometryScalarsModel : ScalarsModel<rocky20::BoundaryScalarsController>
18{
21 IRockyGeometryScalarsModel(RockyModel* solver_model) :
22 ScalarsModel<rocky20::BoundaryScalarsController>(solver_model->boundary_scalars_controller,
23 solver_model->gpu_device_ids)
24 {}
25
38
40 [[deprecated("IRockyStatisticsCounter is no longer needed for statistics")]]
41 IRockyStatisticsCounter* get_statistics_counter_array(int scalar_index);
54
55#ifdef ONLY_FOR_DOXYGEN
56
58 int find(const char* name);
59
61 int add(const char* name, const char* unit, bool output = true);
62
64 void reset(int scalar_index);
65
67 void set_dimension(int scalar_index, double dimension_factor);
68
69#endif
70};
71
73{
74 return this->_impl.template get_scalars<IRockyStatisticsAdder>(scalar_index);
75}
76
77inline IRockyStatisticsCounter* IRockyGeometryScalarsModel::get_statistics_counter_array(int scalar_index)
78{
79 return this->_impl.template get_scalars<IRockyStatisticsCounter>(scalar_index);
80}
81
83{
84 return this->_impl.template get_scalars<IRockyStatisticsAccumulator>(scalar_index);
85}
86
87// =================================================================================================
88// IRockyGeometryScalars
89// =================================================================================================
90
96struct IRockyGeometryScalars : EntityScalars<rocky20::BoundaryScalars>
97{
100 __host__ __device__
101 IRockyGeometryScalars(rocky20::BoundaryScalars &_scalars, int _element_index) :
102 EntityScalars< rocky20::BoundaryScalars>(_scalars, _element_index)
103 {}
104
107#ifdef ONLY_FOR_DOXYGEN
108
110 ROCKY_FUNCTIONS double get_scalar(int scalar_index) const;
111
113 ROCKY_FUNCTIONS void set_scalar(int scalar_index, double value) const;
114
116 ROCKY_FUNCTIONS void add_scalar(int scalar_index, double value) const;
117
119 ROCKY_FUNCTIONS void max_scalar(int scalar_index, double value) const;
120
121#endif
122};
123
Definition rocky_boundary_scalars.hpp:18
void reset(int scalar_index)
IRockyStatisticsAdder * get_statistics_adder_array(int scalar_index)
Definition rocky_boundary_scalars.hpp:72
int find(const char *name)
void set_dimension(int scalar_index, double dimension_factor)
int add(const char *name, const char *unit, bool output=true)
IRockyStatisticsAccumulator * get_statistics_accumulator_array(int scalar_index)
Definition rocky_boundary_scalars.hpp:82
Definition rocky_boundary_scalars.hpp:97
ROCKY_FUNCTIONS void set_scalar(int scalar_index, double value) const
ROCKY_FUNCTIONS void add_scalar(int scalar_index, double value) const
ROCKY_FUNCTIONS void max_scalar(int scalar_index, double value) const
ROCKY_FUNCTIONS double get_scalar(int scalar_index) const
Definition rocky_statistics_data.hpp:182
Definition rocky_statistics_data.hpp:22

Connect with Ansys