Skip to content
Snippets Groups Projects
Commit 9478ffb8 authored by Markus Holzer's avatar Markus Holzer
Browse files

Use int64 instead of int32 and small fix

parent 0c789452
Branches
No related merge requests found
......@@ -52,7 +52,7 @@ class FieldModuleTest(unittest.TestCase):
def test_gather(self):
blocks = createUniformBlockGrid(blocks=(10, 4, 3), cellsPerBlock=(2, 2, 2),
periodic=(True, True, True), oneBlockPerProcess=False)
wlb.field.addToStorage(blocks, "test", dtype=np.int32, fSize=3)
wlb.field.addToStorage(blocks, "test", dtype=np.int64, fSize=3)
for block in blocks:
offset_in_global_domain = blocks.transformLocalToGlobal(block, wlb.Cell(0, 0, 0))[:]
......
......@@ -360,7 +360,7 @@ class AddToStorageExporter
public:
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)
: 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 >
......@@ -376,8 +376,8 @@ class AddToStorageExporter
typedef internal::GhostLayerFieldDataHandling< GhostLayerField< T, F_SIZE > > DataHandling;
auto dataHandling = walberla::make_shared< DataHandling >(blocks_, gl_, initValue_, layout_, alignment_);
blocks_->addBlockData(dataHandling, name_);
found_ = true;
}
found_ = true;
}
bool successful() const { return found_; }
......@@ -391,7 +391,7 @@ class AddToStorageExporter
Layout layout_;
real_t initValue_;
uint_t alignment_;
mutable bool found_;
mutable bool found_{false};
};
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