diff options
author | cott <> | 2003-12-01 12:15:00 +0000 |
---|---|---|
committer | cott <> | 2003-12-01 12:15:00 +0000 |
commit | cce8074a9661db4089ca4af2635a3f6af275d796 (patch) | |
tree | 5abac13159eb460b19341c50b9a11545cb4a4e9d /CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc | |
parent | 7035064b370c686b8257f3f692d1bd160b9dcb04 (diff) |
New development version. Writing a checkpoint file should work fine. Don't try to restart...
darcs-hash:20031201121521-19929-ece689faa551c47b92903400ac6c2a0ea2c6bdeb.gz
Diffstat (limited to 'CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc')
-rw-r--r-- | CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.cc | 17 |
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; |