Skip to content
Snippets Groups Projects
Commit 96634fea authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

Merge branch 'SmallFix' into 'master'

[FIX] Old NumPy usage

Closes #206

See merge request !593
parents ad7168aa 9478ffb8
Branches
Tags
No related merge requests found
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -52,7 +52,7 @@ class FieldModuleTest(unittest.TestCase): ...@@ -52,7 +52,7 @@ class FieldModuleTest(unittest.TestCase):
def test_gather(self): def test_gather(self):
blocks = createUniformBlockGrid(blocks=(10, 4, 3), cellsPerBlock=(2, 2, 2), blocks = createUniformBlockGrid(blocks=(10, 4, 3), cellsPerBlock=(2, 2, 2),
periodic=(True, True, True), oneBlockPerProcess=False) periodic=(True, True, True), oneBlockPerProcess=False)
wlb.field.addToStorage(blocks, "test", dtype=np.int, fSize=3) wlb.field.addToStorage(blocks, "test", dtype=np.int64, fSize=3)
for block in blocks: for block in blocks:
offset_in_global_domain = blocks.transformLocalToGlobal(block, wlb.Cell(0, 0, 0))[:] offset_in_global_domain = blocks.transformLocalToGlobal(block, wlb.Cell(0, 0, 0))[:]
......
...@@ -360,7 +360,7 @@ class AddToStorageExporter ...@@ -360,7 +360,7 @@ class AddToStorageExporter
public: public:
AddToStorageExporter(const shared_ptr< StructuredBlockForest >& blocks, const std::string& name, py::object& dtype, uint_t fs, AddToStorageExporter(const shared_ptr< StructuredBlockForest >& blocks, const std::string& name, py::object& dtype, uint_t fs,
uint_t gl, Layout layout, real_t initValue, uint_t alignment) uint_t gl, Layout layout, real_t initValue, uint_t alignment)
: blocks_(blocks), name_(name), dtype_(dtype), fs_(fs), gl_(gl), layout_(layout), initValue_(initValue), alignment_(alignment), found_(false) : blocks_(blocks), name_(name), dtype_(dtype), fs_(fs), gl_(gl), layout_(layout), initValue_(initValue), alignment_(alignment)
{} {}
template< typename FieldType > template< typename FieldType >
...@@ -376,8 +376,8 @@ class AddToStorageExporter ...@@ -376,8 +376,8 @@ class AddToStorageExporter
typedef internal::GhostLayerFieldDataHandling< GhostLayerField< T, F_SIZE > > DataHandling; typedef internal::GhostLayerFieldDataHandling< GhostLayerField< T, F_SIZE > > DataHandling;
auto dataHandling = walberla::make_shared< DataHandling >(blocks_, gl_, initValue_, layout_, alignment_); auto dataHandling = walberla::make_shared< DataHandling >(blocks_, gl_, initValue_, layout_, alignment_);
blocks_->addBlockData(dataHandling, name_); blocks_->addBlockData(dataHandling, name_);
found_ = true;
} }
found_ = true;
} }
bool successful() const { return found_; } bool successful() const { return found_; }
...@@ -391,7 +391,7 @@ class AddToStorageExporter ...@@ -391,7 +391,7 @@ class AddToStorageExporter
Layout layout_; Layout layout_;
real_t initValue_; real_t initValue_;
uint_t alignment_; uint_t alignment_;
mutable bool found_; mutable bool found_{false};
}; };
template< typename... FieldTypes > template< typename... FieldTypes >
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment