aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gdata.cc
diff options
context:
space:
mode:
authoreschnett <>2001-03-10 19:54:00 +0000
committereschnett <>2001-03-10 19:54:00 +0000
commit221dcbf0bd2211f5bd64dcf6bd5560765f91a101 (patch)
treefe9a01ca3c2dea72092af7731244e25453acc607 /Carpet/CarpetLib/src/gdata.cc
parentbf79e13766e3d17d8614f7b662bdc46a45e54b03 (diff)
Carpet now passes the Cart3d test suite. This required a rewrite of
Carpet now passes the Cart3d test suite. This required a rewrite of CarpetSlabe, which now uses the data<> class instead of doing things its own way. This in turn required some updates to data<>. CarpetSlab now ignores (i. e. does not use) boundaries, except outer boundaries. For that to work, the dh<> class has been given the notion of an outer boundary. In order to increase performance, the cctk_bbox[] information in Carpet is not set correctly. As an approximation, it just reflects whether the current grid component lies at the outer boundary, as calculated using cctk_lbnd, cctk_ubnd, and cctk_gsh. darcs-hash:20010310195459-f6438-8ee874d722de4df717e5eb3002722ceb8d4a9bb7.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gdata.cc')
-rw-r--r--Carpet/CarpetLib/src/gdata.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc
index 36889de97..288eb9aa6 100644
--- a/Carpet/CarpetLib/src/gdata.cc
+++ b/Carpet/CarpetLib/src/gdata.cc
@@ -5,7 +5,7 @@
copyright : (C) 2000 by Erik Schnetter
email : schnetter@astro.psu.edu
- $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/gdata.cc,v 1.4 2001/03/07 13:00:57 eschnett Exp $
+ $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/gdata.cc,v 1.5 2001/03/10 20:55:06 eschnett Exp $
***************************************************************************/
@@ -20,6 +20,7 @@
#include <cassert>
#include <fstream>
+#include <iomanip>
#include "bbox.hh"
#include "defs.hh"
@@ -67,6 +68,8 @@ void generic_data<D>::write_ascii (const string name, const int time,
ofstream file(name.c_str(), ios::app);
assert (file.good());
+ file << setprecision(15);
+
file << "#" << endl
<< "# iteration " << time << endl
<< "# time level " << tl << " refinement level " << rl
@@ -111,7 +114,8 @@ void generic_data<D>::write_ascii (const string name, const int time,
} else {
// copy to processor 0 and output there
- generic_data* tmp = make_typed(_extent, 0);
+ generic_data* const tmp = make_typed();
+ tmp->allocate(_extent, 0);
tmp->copy_from (this, _extent);
tmp->write_ascii (name, time, org, dirs, tl, rl, c, ml);
delete tmp;