Skip to main content

Rocky Solver SDK 2025 R2

rocky_output_properties

Last update: 16.07.2025
1// (C) 2024 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
2#pragma once
3
4#include <string>
5#include <vector>
6#include <rocky20/model/rocky_enums.h>
7#include <rocky20/core/utils/rocky_exception.hpp>
8#include <rocky20/model/scalars.h>
9
10
11struct OutputPropertyInfo
12{
13 enum Location
14 {
15 onBoundaryCell,
16 onBoundaryVertex,
17 onParticle,
18 onJoint,
19 onSPH,
20 };
21
22 std::string name, unit;
23 Location location;
24 rocky20::EvaluationType evaluation;
25 double dimension{ 1.0 };
26 // Data type holds its corresponding ScalarsInfo, default to double
27 rocky20::ScalarsInfo::DataType data_type { rocky20::ScalarsInfo::DataType::stDouble };
28};
29
30
31struct OutputPropertiesSetup
32{
33 int create_particles_instantaneous_property(std::string name, std::string unit, double dimension = 1.0);
34 int create_particles_statistical_property(std::string name, std::string unit, double dimension = 1.0);
35
36 int create_triangles_instantaneous_property(std::string name, std::string unit, double dimension = 1.0);
37 int create_triangles_statistical_property(std::string name, std::string unit, double dimension = 1.0);
38
39 int create_vertex_triangles_instantaneous_property(std::string name, std::string unit, double dimension = 1.0);
40 int create_vertex_triangles_statistical_property(std::string name, std::string unit, double dimension = 1.0);
41
42 std::vector<OutputPropertyInfo> particle_property_infos;
43 std::vector<OutputPropertyInfo> boundary_property_infos;
44};
45

Connect with Ansys