Commit 7765aee8 authored by jclamber's avatar jclamber

you must give a directory for ramses input

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@204 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent 659249c0
This diff is collapsed.
# -----------------------------------------------------------------------
#!/usr/bin/python
# -----------------------------------------------------------------------
# The following program shows how to use UNSIO library from
# a Python program
#
......
......@@ -119,13 +119,14 @@ int CPart::loadData(uns::CParticles * particles,
double * agetmp, * metaltmp;
int * id=NULL;
if (nstar>0) { // || 1) { // there are stars
if (req_bits&ID_BIT) {
id = new int[npart];
part.readDataBlock((char *) id); // read identity
} else {
part.skipBlock(); // skip identity
}
if (req_bits&ID_BIT) {
id = new int[npart];
part.readDataBlock((char *) id); // read identity
} else {
part.skipBlock(); // skip identity
}
part.skipBlock(); // skip level
agetmp = new double[npart];
part.readDataBlock((char *) agetmp);
......
......@@ -83,19 +83,26 @@ void CunsIn::init(const std::string _name ,const std::string _comp ,const std::s
tryNemo(); // is standard input and a NEMO stream...
} else {
if (tools::Ctools::isFileExist(simname)) { // file exist
// ! ) { // not a directory
tryGadget(); // try gadget
if (!valid && tools::Ctools::isDirectory(simname)) { // gadget failed
if ( tools::Ctools::isDirectory(simname)) {
tryRamses(); // try ramses
}
if (!valid) { // gadget failed
tryNemo(); // try nemo
}
if (!valid) { // nemo
trySnapList(); // try snapshotlist
}
if (!valid) {
trySimDB(); // try DataBase
if (!valid) {
trySimDB(); // try DataBase
}
} else {
// ! ) { // not a directory
tryGadget(); // try gadget
if (!valid) {
//tryRamses(); // try ramses
}
if (!valid) { // gadget failed
tryNemo(); // try nemo
}
if (!valid) { // nemo
trySnapList(); // try snapshotlist
}
if (!valid) {
trySimDB(); // try DataBase
}
}
}
else { // file does not exist
......
......@@ -22,7 +22,7 @@
namespace uns {
const std::string VERSION="1.0.0"; // UNSIO version
const std::string VERSION="1.0.1-dev"; // UNSIO version
inline std::string getVersion() { return uns::VERSION; }
......
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