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

@ -5,9 +5,8 @@
#include <sstream> // for stringstream
#include <string>
#include "openmc/tensor.h"
#include "pugixml.hpp"
#include "xtensor/xadapt.hpp"
#include "xtensor/xarray.hpp"
#include "openmc/position.h"
#include "openmc/vector.h"
@ -42,12 +41,11 @@ vector<T> get_node_array(
}
template<typename T>
xt::xarray<T> get_node_xarray(
tensor::Tensor<T> get_node_tensor(
pugi::xml_node node, const char* name, bool lowercase = false)
{
vector<T> v = get_node_array<T>(node, name, lowercase);
vector<std::size_t> shape = {v.size()};
return xt::adapt(v, shape);
return tensor::Tensor<T>(v.data(), v.size());
}
std::vector<Position> get_node_position_array(