• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 22642461683

03 Mar 2026 08:59PM UTC coverage: 81.553% (+0.01%) from 81.539%
22642461683

Pull #3806

github

web-flow
Merge 148550442 into 53d98ce71
Pull Request #3806: Introduce new C API function for slice plots

17635 of 25352 branches covered (69.56%)

Branch coverage included in aggregate %.

198 of 245 new or added lines in 4 files covered. (80.82%)

1 existing line in 1 file now uncovered.

58018 of 67414 relevant lines covered (86.06%)

44724342.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.54
/include/openmc/plot.h
1
#ifndef OPENMC_PLOT_H
2
#define OPENMC_PLOT_H
3

4
#include <cmath>
5
#include <sstream>
6
#include <unordered_map>
7
#include <unordered_set>
8

9
#include "openmc/tensor.h"
10
#include "pugixml.hpp"
11

12
#include "hdf5.h"
13
#include "openmc/cell.h"
14
#include "openmc/constants.h"
15
#include "openmc/error.h"
16
#include "openmc/geometry.h"
17
#include "openmc/particle.h"
18
#include "openmc/position.h"
19
#include "openmc/random_lcg.h"
20
#include "openmc/tallies/filter.h"
21
#include "openmc/tallies/filter_match.h"
22
#include "openmc/xml_interface.h"
23

24
namespace openmc {
25

26
//===============================================================================
27
// Global variables
28
//===============================================================================
29

30
class PlottableInterface;
31

32
namespace model {
33

34
extern std::unordered_map<int, int> plot_map; //!< map of plot ids to index
35
extern vector<std::unique_ptr<PlottableInterface>>
36
  plots; //!< Plot instance container
37

38
extern uint64_t plotter_seed; // Stream index used by the plotter
39

40
} // namespace model
41

42
//===============================================================================
43
// RGBColor holds color information for plotted objects
44
//===============================================================================
45

46
struct RGBColor {
47
  // Constructors
48
  RGBColor() : red(0), green(0), blue(0) {};
387,622!
49
  RGBColor(const int v[3]) : red(v[0]), green(v[1]), blue(v[2]) {};
50
  RGBColor(int r, int g, int b) : red(r), green(g), blue(b) {};
22✔
51

52
  RGBColor(const vector<int>& v)
308✔
53
  {
308✔
54
    if (v.size() != 3) {
308!
55
      throw std::out_of_range("Incorrect vector size for RGBColor.");
×
56
    }
57
    red = v[0];
308✔
58
    green = v[1];
308✔
59
    blue = v[2];
308✔
60
  }
308✔
61

62
  bool operator==(const RGBColor& other)
6,750✔
63
  {
64
    return red == other.red && green == other.green && blue == other.blue;
3,375!
65
  }
66

67
  RGBColor& operator*=(const double x)
741,631✔
68
  {
69
    red *= x;
741,631✔
70
    green *= x;
741,631✔
71
    blue *= x;
741,631✔
72
    return *this;
741,631✔
73
  }
74

75
  // Members
76
  uint8_t red, green, blue;
77
};
78

79
// some default colors
80
const RGBColor WHITE {255, 255, 255};
81
const RGBColor RED {255, 0, 0};
82
const RGBColor BLACK {0, 0, 0};
83

84
/**
85
 * \class PlottableInterface
86
 * \brief Interface for plottable objects.
87
 *
88
 * PlottableInterface classes must have unique IDs. If no ID (or -1) is
89
 * provided, the next available ID is assigned automatically. They guarantee
90
 * the ability to create output in some form. This interface is designed to be
91
 * implemented by classes that produce plot-relevant data which can be
92
 * visualized.
93
 */
94

95
typedef tensor::Tensor<RGBColor> ImageData;
96
class PlottableInterface {
97
public:
98
  PlottableInterface() = default;
11✔
99

100
  void set_default_colors();
101

102
private:
103
  void set_id(pugi::xml_node plot_node);
104
  int id_ {C_NONE}; // unique plot ID
105

106
  void set_bg_color(pugi::xml_node plot_node);
107
  void set_universe(pugi::xml_node plot_node);
108
  void set_color_by(pugi::xml_node plot_node);
109
  void set_user_colors(pugi::xml_node plot_node);
110
  void set_overlap_color(pugi::xml_node plot_node);
111
  void set_mask(pugi::xml_node plot_node);
112

113
protected:
114
  // Plot output filename, derived classes have logic to set it
115
  std::string path_plot_;
116

117
public:
118
  enum class PlotColorBy { cells = 0, mats = 1 };
119

120
  // Generates image data based on plot parameters and returns it
121
  virtual ImageData create_image() const = 0;
122

123
  // Creates the output image named path_plot_
124
  virtual void create_output() const = 0;
125

126
  // Write populated image data to file
127
  void write_image(const ImageData& data) const;
128

129
  // Print useful info to the terminal
130
  virtual void print_info() const = 0;
131

132
  const std::string& path_plot() const { return path_plot_; }
231✔
133
  std::string& path_plot() { return path_plot_; }
253✔
134
  int id() const { return id_; }
2,191!
135
  void set_id(int id = C_NONE);
136
  int level() const { return level_; }
242✔
137
  PlotColorBy color_by() const { return color_by_; }
138

139
  // Public color-related data
140
  PlottableInterface(pugi::xml_node plot_node);
141
  virtual ~PlottableInterface() = default;
959✔
142
  int level_ {-1};                           // Universe level to plot
143
  bool color_overlaps_ {false};              // Show overlapping cells?
144
  PlotColorBy color_by_ {PlotColorBy::mats}; // Plot coloring (cell/material)
145
  RGBColor not_found_ {WHITE};               // Plot background color
146
  RGBColor overlap_color_ {RED};             // Plot overlap color
147
  vector<RGBColor> colors_;                  // Plot colors
148
};
149

150
struct IdData {
10,302✔
151
  // Constructor
152
  IdData(size_t h_res, size_t v_res, bool include_filter = false);
153

154
  // Methods
155
  void set_value(size_t y, size_t x, const Particle& p, int level,
156
    Filter* filter = nullptr, FilterMatch* match = nullptr);
157
  void set_overlap(size_t y, size_t x);
158

159
  // Members
160
  tensor::Tensor<int32_t> data_; //!< 2D array of cell & material ids
161
};
162

163
struct PropertyData {
22✔
164
  // Constructor
165
  PropertyData(size_t h_res, size_t v_res, bool include_filter = false);
166

167
  // Methods
168
  void set_value(size_t y, size_t x, const Particle& p, int level,
169
    Filter* filter = nullptr, FilterMatch* match = nullptr);
170
  void set_overlap(size_t y, size_t x);
171

172
  // Members
173
  tensor::Tensor<double> data_; //!< 2D array of temperature & density data
174
};
175

176
struct RasterData {
177
  // Constructor
178
  RasterData(size_t h_res, size_t v_res, bool include_filter = false);
179

180
  // Methods
181
  void set_value(size_t y, size_t x, const Particle& p, int level,
182
    Filter* filter = nullptr, FilterMatch* match = nullptr);
183
  void set_overlap(size_t y, size_t x);
184

185
  // Members
186
  tensor::Tensor<int32_t>
187
    id_data_; //!< [v_res, h_res, 3 or 4]: cell, instance, mat, [filter_bin]
188
  tensor::Tensor<double>
189
    property_data_;     //!< [v_res, h_res, 2]: temperature, density
190
  bool include_filter_; //!< Whether filter bin index is included
191
};
192

193
//===============================================================================
194
// Plot class
195
//===============================================================================
196

197
class SlicePlotBase {
1,034✔
198
public:
199
  template<class T>
200
  T get_map(int32_t filter_index = -1) const;
201

202
  enum class PlotBasis { xy = 1, xz = 2, yz = 3 };
203

204
  // Accessors
205

206
  const std::array<size_t, 3>& pixels() const { return pixels_; }
116,347!
207
  std::array<size_t, 3>& pixels() { return pixels_; }
860✔
208

209
  // Members
210
public:
211
  Position origin_;           //!< Plot origin in geometry
212
  Position u_span_;           //!< Full-width span vector in geometry
213
  Position v_span_;           //!< Full-height span vector in geometry
214
  Position width_;            //!< Axis-aligned plot width in geometry
215
  PlotBasis basis_;           //!< Plot basis (XY/XZ/YZ) for axis-aligned slices
216
  array<size_t, 3> pixels_;   //!< Plot size in pixels
217
  bool slice_color_overlaps_; //!< Show overlapping cells?
218
  int slice_level_ {-1};      //!< Plot universe level
219
private:
220
};
221

222
template<class T>
223
T SlicePlotBase::get_map(int32_t filter_index) const
5,272✔
224
{
225

226
  size_t width = pixels_[0];
5,272✔
227
  size_t height = pixels_[1];
5,272✔
228

229
  // Determine if filter is being used
230
  bool include_filter = (filter_index >= 0);
5,272✔
231
  Filter* filter = nullptr;
5,272✔
232
  if (include_filter) {
5,272✔
233
    filter = model::tally_filters[filter_index].get();
22✔
234
  }
235

236
  // size data array
237
  T data(width, height, include_filter);
5,272✔
238

239
  // compute pixel steps and top-left pixel center
240
  Position u_step = u_span_ / static_cast<double>(width);
5,272✔
241
  Position v_step = v_span_ / static_cast<double>(height);
5,272✔
242

243
  Position start =
244
    origin_ - 0.5 * u_span_ + 0.5 * v_span_ + 0.5 * u_step - 0.5 * v_step;
5,272✔
245

246
  // Validate that span vectors define a valid plane
247
  Position cross = u_span_.cross(v_span_);
5,272✔
248
  if (cross.norm() == 0.0) {
5,272!
NEW
249
    fatal_error("Slice span vectors are invalid (zero area).");
×
250
  }
251

252
  // Use an arbitrary direction that is not aligned with any coordinate axis.
253
  // The direction has no physical meaning for plotting but is used by
254
  // Surface::sense() to break ties when a pixel is coincident with a surface.
255
  Direction dir = {1.0 / std::sqrt(2.0), 1.0 / std::sqrt(2.0), 0.0};
5,272✔
256

257
#pragma omp parallel
2,877✔
258
  {
259
    Particle p;
2,395✔
260
    p.r() = start;
2,395✔
261
    p.u() = dir;
2,395✔
262
    p.coord(0).universe() = model::root_universe;
2,395✔
263
    int level = slice_level_;
2,395✔
264
    int j {};
2,395✔
265
    FilterMatch match;
2,395✔
266

267
#pragma omp for
268
    for (int y = 0; y < height; y++) {
443,635✔
269
      Position row = start - v_step * static_cast<double>(y);
441,240✔
270
      for (int x = 0; x < width; x++) {
87,320,640✔
271
        p.r() = row + u_step * static_cast<double>(x);
86,879,400✔
272
        p.n_coord() = 1;
86,879,400✔
273
        // local variables
274
        bool found_cell = exhaustive_find_cell(p);
86,879,400✔
275
        j = p.n_coord() - 1;
86,879,400✔
276
        if (level >= 0) {
86,879,400✔
277
          j = level;
12,500✔
278
        }
279
        if (found_cell) {
86,879,400✔
280
          data.set_value(y, x, p, j, filter, &match);
17,685,190✔
281
        }
282
        if (slice_color_overlaps_ && check_cell_overlap(p, false)) {
86,879,400✔
283
          data.set_overlap(y, x);
170,140✔
284
        }
285
      } // inner for
286
    }
287
  }
2,395✔
288

289
  return data;
5,272✔
290
}
×
291

292
// Represents either a voxel or pixel plot
293
class Plot : public PlottableInterface, public SlicePlotBase {
294

295
public:
296
  enum class PlotType { slice = 1, voxel = 2 };
297

298
  Plot(pugi::xml_node plot, PlotType type);
299

300
private:
301
  void set_output_path(pugi::xml_node plot_node);
302
  void set_basis(pugi::xml_node plot_node);
303
  void set_origin(pugi::xml_node plot_node);
304
  void set_width(pugi::xml_node plot_node);
305
  void set_meshlines(pugi::xml_node plot_node);
306

307
public:
308
  // Add mesh lines to ImageData
309
  void draw_mesh_lines(ImageData& data) const;
310
  ImageData create_image() const override;
311
  void create_voxel() const;
312

313
  void create_output() const override;
314
  void print_info() const override;
315

316
  PlotType type_;                 //!< Plot type (Slice/Voxel)
317
  int meshlines_width_;           //!< Width of lines added to the plot
318
  int index_meshlines_mesh_ {-1}; //!< Index of the mesh to draw on the plot
319
  RGBColor meshlines_color_;      //!< Color of meshlines on the plot
320
};
321

322
/**
323
 * \class RaytracePlot
324
 * \brief Base class for plots that generate images through ray tracing.
325
 *
326
 * This class serves as a base for plots that create their visuals by tracing
327
 * rays from a camera through the problem geometry. It inherits from
328
 * PlottableInterface, ensuring that it provides an implementation for
329
 * generating output specific to ray-traced visualization. WireframeRayTracePlot
330
 * and SolidRayTracePlot provide concrete implementations of this class.
331
 */
332
class RayTracePlot : public PlottableInterface {
×
333
public:
334
  RayTracePlot() = default;
11✔
335
  RayTracePlot(pugi::xml_node plot);
336

337
  // Standard getters. No setting since it's done from XML.
338
  const Position& camera_position() const { return camera_position_; }
339
  Position& camera_position() { return camera_position_; }
11✔
340
  const Position& look_at() const { return look_at_; }
341
  Position& look_at() { return look_at_; }
11✔
342

343
  const double& horizontal_field_of_view() const
344
  {
345
    return horizontal_field_of_view_;
346
  }
347
  double& horizontal_field_of_view() { return horizontal_field_of_view_; }
348

349
  void print_info() const override;
350

351
  const std::array<int, 2>& pixels() const { return pixels_; }
9,190,381!
352
  std::array<int, 2>& pixels() { return pixels_; }
154!
353

354
  const Direction& up() const { return up_; }
355
  Direction& up() { return up_; }
11✔
356

357
  //! brief Updates the cached camera-to-model matrix after changes to
358
  //! camera parameters.
359
  void update_view();
360

361
protected:
362
  Direction camera_x_axis() const
440,000✔
363
  {
364
    return {camera_to_model_[0], camera_to_model_[3], camera_to_model_[6]};
440,000✔
365
  }
366

367
  Direction camera_y_axis() const
440,000✔
368
  {
369
    return {camera_to_model_[1], camera_to_model_[4], camera_to_model_[7]};
440,000✔
370
  }
371

372
  Direction camera_z_axis() const
440,000✔
373
  {
374
    return {camera_to_model_[2], camera_to_model_[5], camera_to_model_[8]};
440,000✔
375
  }
376

377
  void set_output_path(pugi::xml_node plot_node);
378

379
  /*
380
   * Gets the starting position and direction for the pixel corresponding
381
   * to this horizontal and vertical position.
382
   */
383
  std::pair<Position, Direction> get_pixel_ray(int horiz, int vert) const;
384

385
private:
386
  void set_look_at(pugi::xml_node node);
387
  void set_camera_position(pugi::xml_node node);
388
  void set_field_of_view(pugi::xml_node node);
389
  void set_pixels(pugi::xml_node node);
390
  void set_orthographic_width(pugi::xml_node node);
391

392
  double horizontal_field_of_view_ {70.0}; // horiz. f.o.v. in degrees
393
  Position camera_position_;               // where camera is
394
  Position look_at_;                     // point camera is centered looking at
395
  std::array<int, 2> pixels_ {100, 100}; // pixel dimension of resulting image
396
  Direction up_ {0.0, 0.0, 1.0};         // which way is up
397

398
  /* The horizontal thickness, if using an orthographic projection.
399
   * If set to zero, we assume using a perspective projection.
400
   */
401
  double orthographic_width_ {C_NONE};
402

403
  /*
404
   * Cached camera-to-model matrix with column vectors of axes. The x-axis is
405
   * the vector between the camera_position_ and look_at_; the y-axis is the
406
   * cross product of the x-axis with the up_ vector, and the z-axis is the
407
   * cross product of the x and y axes.
408
   */
409
  std::array<double, 9> camera_to_model_;
410
};
411

412
class ProjectionRay;
413

414
/**
415
 * \class WireframeRayTracePlot
416
 * \brief Creates plots that are like colorful x-ray imaging
417
 *
418
 * WireframeRayTracePlot is a specialized form of RayTracePlot designed for
419
 * creating projection plots. This involves tracing rays from a camera through
420
 * the problem geometry and rendering the results based on depth of penetration
421
 * through materials or cells and their colors.
422
 */
423
class WireframeRayTracePlot : public RayTracePlot {
424

425
  friend class ProjectionRay;
426

427
public:
428
  WireframeRayTracePlot(pugi::xml_node plot);
429

430
  ImageData create_image() const override;
431
  void create_output() const override;
432
  void print_info() const override;
433

434
private:
435
  void set_opacities(pugi::xml_node node);
436
  void set_wireframe_thickness(pugi::xml_node node);
437
  void set_wireframe_ids(pugi::xml_node node);
438
  void set_wireframe_color(pugi::xml_node node);
439

440
  /* Checks if a vector of two TrackSegments is equivalent. We define this
441
   * to mean not having matching intersection lengths, but rather having
442
   * a matching sequence of surface/cell/material intersections.
443
   */
444
  struct TrackSegment;
445
  bool trackstack_equivalent(const vector<TrackSegment>& track1,
446
    const vector<TrackSegment>& track2) const;
447

448
  /* Used for drawing wireframe and colors. We record the list of
449
   * surface/cell/material intersections and the corresponding lengths as a ray
450
   * traverses the geometry, then color by iterating in reverse.
451
   */
452
  struct TrackSegment {
453
    int id;        // material or cell ID (which is being colored)
454
    double length; // length of this track intersection
455

456
    /* Recording this allows us to draw edges on the wireframe. For instance
457
     * if two surfaces bound a single cell, it allows drawing that sharp edge
458
     * where the surfaces intersect.
459
     */
460
    int surface_index {-1}; // last surface index intersected in this segment
461
    TrackSegment(int id_a, double length_a, int surface_a)
2,359,148✔
462
      : id(id_a), length(length_a), surface_index(surface_a)
2,359,148✔
463
    {}
464
  };
465

466
  // which color IDs should be wireframed. If empty, all cells are wireframed.
467
  vector<int> wireframe_ids_;
468

469
  // Thickness of the wireframe lines. Can set to zero for no wireframe.
470
  int wireframe_thickness_ {1};
471

472
  RGBColor wireframe_color_ {BLACK}; // wireframe color
473
  vector<double> xs_; // macro cross section values for cell volume rendering
474
};
475

476
/**
477
 * \class SolidRayTracePlot
478
 * \brief Plots 3D objects as the eye might see them.
479
 *
480
 * Plots a geometry with single-scattered Phong lighting plus a diffuse lighting
481
 * contribution. The result is a physically reasonable, aesthetic 3D view of a
482
 * geometry.
483
 */
484
class SolidRayTracePlot : public RayTracePlot {
485
  friend class PhongRay;
486

487
public:
488
  SolidRayTracePlot() = default;
11✔
489

490
  SolidRayTracePlot(pugi::xml_node plot);
491

492
  ImageData create_image() const override;
493
  void create_output() const override;
494
  void print_info() const override;
495

496
  const std::unordered_set<int>& opaque_ids() const { return opaque_ids_; }
497
  std::unordered_set<int>& opaque_ids() { return opaque_ids_; }
22✔
498

499
  const Position& light_location() const { return light_location_; }
500
  Position& light_location() { return light_location_; }
11✔
501

502
  const double& diffuse_fraction() const { return diffuse_fraction_; }
503
  double& diffuse_fraction() { return diffuse_fraction_; }
504

505
private:
506
  void set_opaque_ids(pugi::xml_node node);
507
  void set_light_position(pugi::xml_node node);
508
  void set_diffuse_fraction(pugi::xml_node node);
509

510
  std::unordered_set<int> opaque_ids_;
511

512
  double diffuse_fraction_ {0.1};
513

514
  // By default, the light is at the camera unless otherwise specified.
515
  Position light_location_;
516
};
517

518
// Base class that implements ray tracing logic, not necessarily through
519
// defined regions of the geometry but also outside of it.
520
class Ray : public GeometryState {
1,600,480✔
521

522
public:
523
  // Initialize from location and direction
524
  Ray(Position r, Direction u) { init_from_r_u(r, u); }
3,521,056✔
525

526
  // Initialize from known geometry state
527
  Ray(const GeometryState& p) : GeometryState(p) {}
528

529
  // Called at every surface intersection within the model
530
  virtual void on_intersection() = 0;
531

532
  /*
533
   * Traces the ray through the geometry, calling on_intersection
534
   * at every surface boundary.
535
   */
536
  void trace();
537

538
  // Stops the ray and exits tracing when called from on_intersection
539
  void stop() { stop_ = true; }
35,563✔
540

541
  // Sets the dist_ variable
542
  void compute_distance();
543

544
protected:
545
  // Records how far the ray has traveled
546
  double traversal_distance_ {0.0};
547

548
private:
549
  // Max intersections before we assume ray tracing is caught in an infinite
550
  // loop:
551
  static const int MAX_INTERSECTIONS = 1000000;
552

553
  bool hit_something_ {false};
554
  bool stop_ {false};
555

556
  unsigned event_counter_ {0};
557
};
558

559
class ProjectionRay : public Ray {
1,000,000✔
560
public:
561
  ProjectionRay(Position r, Direction u, const WireframeRayTracePlot& plot,
1,000,000✔
562
    vector<WireframeRayTracePlot::TrackSegment>& line_segments)
563
    : Ray(r, u), plot_(plot), line_segments_(line_segments)
1,000,000✔
564
  {}
565

566
  void on_intersection() override;
567

568
private:
569
  /* Store a reference to the plot object which is running this ray, in order
570
   * to access some of the plot settings which influence the behavior where
571
   * intersections are.
572
   */
573
  const WireframeRayTracePlot& plot_;
574

575
  /* The ray runs through the geometry, and records the lengths of ray segments
576
   * and cells they lie in along the way.
577
   */
578
  vector<WireframeRayTracePlot::TrackSegment>& line_segments_;
579
};
580

581
class PhongRay : public Ray {
600,480✔
582
public:
583
  PhongRay(Position r, Direction u, const SolidRayTracePlot& plot)
1,321,056✔
584
    : Ray(r, u), plot_(plot)
1,321,056✔
585
  {
586
    result_color_ = plot_.not_found_;
1,321,056✔
587
  }
1,321,056✔
588

589
  void on_intersection() override;
590

591
  const RGBColor& result_color() { return result_color_; }
592

593
private:
594
  const SolidRayTracePlot& plot_;
595

596
  /* After the ray is reflected, it is moving towards the
597
   * camera. It does that in order to see if the exposed surface
598
   * is shadowed by something else.
599
   */
600
  bool reflected_ {false};
601

602
  // Have to record the first hit ID, so that if the region
603
  // does get shadowed, we recall what its color should be
604
  // when tracing from the surface to the light.
605
  int orig_hit_id_ {-1};
606

607
  RGBColor result_color_;
608
};
609

610
//===============================================================================
611
// Non-member functions
612
//===============================================================================
613

614
/* Write a PPM image
615
 * filename - name of output file
616
 * data - image data to write
617
 */
618
void output_ppm(const std::string& filename, const ImageData& data);
619

620
#ifdef USE_LIBPNG
621
/* Write a PNG image
622
 * filename - name of output file
623
 * data - image data to write
624
 */
625
void output_png(const std::string& filename, const ImageData& data);
626
#endif
627

628
//! Initialize a voxel file
629
//! \param[in] id of an open hdf5 file
630
//! \param[in] dimensions of the voxel file (dx, dy, dz)
631
//! \param[out] dataspace pointer to voxel data
632
//! \param[out] dataset pointer to voxesl data
633
//! \param[out] pointer to memory space of voxel data
634
void voxel_init(hid_t file_id, const hsize_t* dims, hid_t* dspace, hid_t* dset,
635
  hid_t* memspace);
636

637
//! Write a section of the voxel data to hdf5
638
//! \param[in] voxel slice
639
//! \param[out] dataspace pointer to voxel data
640
//! \param[out] dataset pointer to voxesl data
641
//! \param[out] pointer to data to write
642
void voxel_write_slice(
643
  int x, hid_t dspace, hid_t dset, hid_t memspace, void* buf);
644

645
//! Close voxel file entities
646
//! \param[in] data space to close
647
//! \param[in] dataset to close
648
//! \param[in] memory space to close
649
void voxel_finalize(hid_t dspace, hid_t dset, hid_t memspace);
650

651
//===============================================================================
652
// External functions
653
//===============================================================================
654

655
//! Read plot specifications from a plots.xml file
656
void read_plots_xml();
657

658
//! Read plot specifications from an XML Node
659
//! \param[in] XML node containing plot info
660
void read_plots_xml(pugi::xml_node root);
661

662
//! Clear memory
663
void free_memory_plot();
664

665
//! Create a randomly generated RGB color
666
//! \return RGBColor with random value
667
RGBColor random_color();
668

669
} // namespace openmc
670
#endif // OPENMC_PLOT_H
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc