aboutsummaryrefslogtreecommitdiff
path: root/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc
diff options
context:
space:
mode:
Diffstat (limited to 'CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc')
-rw-r--r--CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc b/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc
index 21b3b26ad..0da2dfb16 100644
--- a/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc
+++ b/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc
@@ -45,7 +45,7 @@
extern "C" {
- static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc,v 1.10 2003/10/02 11:34:03 cvs_anon Exp $";
+ static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc,v 1.11 2003/12/01 13:15:21 cott Exp $";
CCTK_FILEVERSION(Carpet_CarpetIOFlexIO_ioflexio_cc);
}
@@ -275,12 +275,14 @@ namespace CarpetIOFlexIO {
ext = bbox<int,dim>(lo,hi,str);
- gdata<dim>* const tmp = data->make_typed ();
+ gdata<dim>* const tmp = data->make_typed (varindex);
tmp->allocate (ext, 0);
- tmp->copy_from (data, ext);
-
+ for (comm_state<dim> state; !state.done(); state.step()) {
+ tmp->copy_from (state, data, ext);
+ }
+
// Write data
if (CCTK_MyProc(cgh)==0) {
int origin[dim], dims[dim];
@@ -290,7 +292,6 @@ namespace CarpetIOFlexIO {
}
amrwriter->write (origin, dims, (void*)tmp->storage());
-
// dump attributes
DumpCommonAttributes(cgh,writer,request);
@@ -780,7 +781,7 @@ namespace CarpetIOFlexIO {
const vect<int,dim> ub
= lb + (vect<int,dim>(amr_dims) - 1) * str;
const bbox<int,dim> ext(lb,ub,str);
- gdata<dim>* const tmp = data->make_typed ();
+ gdata<dim>* const tmp = data->make_typed (n);
if (CCTK_MyProc(cgh)==0) {
tmp->allocate (ext, 0, amrgrid->data);
@@ -789,7 +790,9 @@ namespace CarpetIOFlexIO {
}
// Copy into grid function
- data->copy_from (tmp, ext);
+ for (comm_state<dim> state; !state.done(); state.step()) {
+ data->copy_from (state, tmp, ext);
+ }
// Delete temporary copy
delete tmp;