Skip to main content

Rocky Solver SDK 2024 R2

rocky_boundary_scalars

Last update: 17.07.2025
1#pragma once
2
3#include "rocky_scalars.h"
4
5
6
7// =================================================================================================
8// IRockyGeometryScalarsModel
9// =================================================================================================
10
16struct IRockyGeometryScalarsModel : ScalarsModel<rocky20::BoundaryScalarsController>
17{
20 IRockyGeometryScalarsModel(RockyModel* solver_model) :
21 ScalarsModel<rocky20::BoundaryScalarsController>(solver_model->boundary_scalars_controller,
22 solver_model->gpu_device_ids)
23 {}
24
37
39 [[deprecated("IRockyStatisticsCounter is no longer needed for statistics")]]
40 IRockyStatisticsCounter* get_statistics_counter_array(int scalar_index);
53
54#ifdef ONLY_FOR_DOXYGEN
55
57 int find(const char* name);
58
60 int add(const char* name, const char* unit, bool output = true);
61
63 void reset(int scalar_index);
64
66 void set_dimension(int scalar_index, double dimension_factor);
67
68#endif
69};
70
72{
73 return this->_impl.template get_scalars<IRockyStatisticsAdder>(scalar_index);
74}
75
76inline IRockyStatisticsCounter* IRockyGeometryScalarsModel::get_statistics_counter_array(int scalar_index)
77{
78 return this->_impl.template get_scalars<IRockyStatisticsCounter>(scalar_index);
79}
80
82{
83 return this->_impl.template get_scalars<IRockyStatisticsAccumulator>(scalar_index);
84}
85
86// =================================================================================================
87// IRockyGeometryScalars
88// =================================================================================================
89
95struct IRockyGeometryScalars : EntityScalars<rocky20::BoundaryScalars>
96{
99 __host__ __device__
100 IRockyGeometryScalars(rocky20::BoundaryScalars &_scalars, int _element_index) :
101 EntityScalars< rocky20::BoundaryScalars>(_scalars, _element_index)
102 {}
103
106#ifdef ONLY_FOR_DOXYGEN
107
109 ROCKY_FUNCTIONS double get_scalar(int scalar_index) const;
110
112 ROCKY_FUNCTIONS void set_scalar(int scalar_index, double value) const;
113
115 ROCKY_FUNCTIONS void add_scalar(int scalar_index, double value) const;
116
118 ROCKY_FUNCTIONS void max_scalar(int scalar_index, double value) const;
119
120#endif
121};
122
Definition rocky_boundary_scalars.hpp:17
void reset(int scalar_index)
IRockyStatisticsAdder * get_statistics_adder_array(int scalar_index)
Definition rocky_boundary_scalars.hpp:71
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:81
Definition rocky_boundary_scalars.hpp:96
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:181
Definition rocky_statistics_data.hpp:21

Connect with Ansys