Commit 9f5d426d authored by Alain O' Miniussi's avatar Alain O' Miniussi
Browse files

ename markers->tracers and update test.

refs $104


Former-commit-id: ddd6fd8e482414e7c97715a66feb6a2e179b6a66
parent 633e89c8
......@@ -624,14 +624,14 @@ namespace fargOCA {
namespace {
std::vector<std::string>
extractTracerNames(H5::Group const& root) {
auto markers = h5::openSubGroup(root, "markers");
if (!markers) {
auto tracers = h5::openSubGroup(root, "tracers");
if (!tracers) {
return std::vector<std::string>();
} else {
int nbMarkers = markers->getNumObjs();
int nbMarkers = tracers->getNumObjs();
std::vector<std::string> names;
for (int i = 0; i < nbMarkers; ++i) {
std::string name = markers->getObjnameByIdx(i);
std::string name = tracers->getObjnameByIdx(i);
names.push_back(name);
}
return names;
......@@ -672,7 +672,7 @@ namespace fargOCA {
for (std::string marker : extractTracerNames(root)) {
using namespace boost;
addTracer(ScalarField(marker, grid()));
fields.insert(pair(str(format("markers/%1%")%marker), myTracers.find(marker)->second));
fields.insert(pair(str(format("tracers/%1%")%marker), myTracers.find(marker)->second));
}
for(auto const& p : fields ) {
std::string path = p.first;
......@@ -717,7 +717,7 @@ namespace fargOCA {
if (!myUserFields.empty()) {
root.createGroup("user");
}
root.createGroup("markers");
root.createGroup("tracers");
h5::writeAttribute(root, "frame_omega", myFrameOmega);
h5::writeAttribute(root, "physical_time", myPhysicalTime);
if (index) {
......@@ -747,7 +747,7 @@ namespace fargOCA {
for (auto const& p : myTracers) {
using namespace boost;
ScalarField const& f = p.second;
fields.insert(pair(str(format("markers/%1%")%f.name()), f));
fields.insert(pair(str(format("tracers/%1%")%f.name()), f));
}
for (auto& uf : myUserFields) {
std::ostringstream fmt;
......
......@@ -20,7 +20,8 @@
source @CMAKE_CURRENT_BINARY_DIR@/runTestCommon.sh $* -x fargo3D
$mpilaunchcmd $binary -o $outdir --iofmt=hdf5 -a -w -v @CMAKE_CURRENT_BINARY_DIR@/config.info --prepare || exit -1
@CMAKE_BINARY_DIR@/utils/add_tracer $outdir/disk0.h5 default --hill --planet BigEart --min 0.2 --max 0.5 || exit -1
@CMAKE_BINARY_DIR@/utils/add_tracer $outdir/disk0.h5 Hill --hill --planet BigEart --min 0.2 --max 0.5 || exit -1
@CMAKE_BINARY_DIR@/utils/add_tracer $outdir/disk0.h5 radius --radius --min 0.5 --max 0.7 || exit -1
$mpilaunchcmd @CMAKE_BINARY_DIR@/fargOCA $outdir || exit -1
@CMAKE_CURRENT_BINARY_DIR@/check.sh $nmpi
......@@ -20,7 +20,7 @@
source @CMAKE_CURRENT_BINARY_DIR@/runTestCommon.sh $* -x fargo3D
$mpilaunchcmd $binary -o $outdir --iofmt=hdf5 -a -w -v @CMAKE_CURRENT_BINARY_DIR@/config.info --prepare || exit -1
@CMAKE_BINARY_DIR@/utils/add_tracer $outdir/disk0.h5 default --radius --min 1.5 --max 2 || exit -1
@CMAKE_BINARY_DIR@/utils/add_tracer $outdir/disk0.h5 radius --radius --min 1.5 --max 2 || exit -1
$mpilaunchcmd @CMAKE_BINARY_DIR@/fargOCA $outdir || exit -1
......
Markdown is supported
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