Replace xtensor with internal Tensor/View classes (#3805)

Co-authored-by: John Tramm <jtramm@gmail.com>
This commit is contained in:
John Tramm 2026-02-17 09:50:38 -06:00 committed by GitHub
parent c6ef84d1d5
commit 977ade79a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
73 changed files with 3111 additions and 908 deletions

View file

@ -6,8 +6,8 @@
#include <unordered_map>
#include <unordered_set>
#include "openmc/tensor.h"
#include "pugixml.hpp"
#include "xtensor/xarray.hpp"
#include "hdf5.h"
#include "openmc/cell.h"
@ -90,7 +90,7 @@ const RGBColor BLACK {0, 0, 0};
* visualized.
*/
typedef xt::xtensor<RGBColor, 2> ImageData;
typedef tensor::Tensor<RGBColor> ImageData;
class PlottableInterface {
public:
PlottableInterface() = default;
@ -154,7 +154,7 @@ struct IdData {
void set_overlap(size_t y, size_t x);
// Members
xt::xtensor<int32_t, 3> data_; //!< 2D array of cell & material ids
tensor::Tensor<int32_t> data_; //!< 2D array of cell & material ids
};
struct PropertyData {
@ -166,7 +166,7 @@ struct PropertyData {
void set_overlap(size_t y, size_t x);
// Members
xt::xtensor<double, 3> data_; //!< 2D array of temperature & density data
tensor::Tensor<double> data_; //!< 2D array of temperature & density data
};
//===============================================================================