Commit b16f8052 authored by jclamber's avatar jclamber

add useful methods in fortran interface

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@134 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent d98fc770
......@@ -53,7 +53,11 @@ namespace uns {
int uns_get_array_i_( const int * id, const char * comp, const char * tag, int * array , int * size, const int l1, const int l2);
int uns_get_value_f_ ( const int * id, const char * tag, float * data, const int l1);
int uns_get_value_i_ ( const int * id, const char * tag, int * data, const int l1);
void uns_get_file_structure_(const int * id, char * filestruct, const int l1);
void uns_get_interface_type_(const int * id, char * inter_type, const int l1);
void uns_get_file_name_(const int * id, char * file_name, const int l1);
// save protocol
int uns_save_init_(const char *,const char *, const int l1, const int l2);
// save data
......@@ -600,6 +604,48 @@ void uns_sim_dir_(const int * id, char * simdir, int lenstring)
}
}
// ----------------------------------------------------------------------------
// uns_get_file_structure:
// return snapshot file structure of the requested simulation
// and belonging to the simulation with the identifier ident
void uns_get_file_structure_(const int * id, char * dest, int lenstring)
{
int index=getUnsvIndex(*id);
std::string source= ((CunsIn *)unsv[index].obj)->snapshot->getFileStructure();
assert(source.length() <= (unsigned int) lenstring);
strcpy(dest,source.c_str());
for (int i=strlen(dest); i<lenstring; i++) {
dest[i] = ' ';
}
}
// ----------------------------------------------------------------------------
// uns_get_file_name:
// return snapshot file name of the requested simulation
// and belonging to the simulation with the identifier ident
void uns_get_file_name_(const int * id, char * dest, int lenstring)
{
int index=getUnsvIndex(*id);
std::string source= ((CunsIn *)unsv[index].obj)->snapshot->getFileName();
assert(source.length() <= (unsigned int) lenstring);
strcpy(dest,source.c_str());
for (int i=strlen(dest); i<lenstring; i++) {
dest[i] = ' ';
}
}
// ----------------------------------------------------------------------------
// uns_get_interface_type:
// return interface type of the requested simulation
// and belonging to the simulation with the identifier ident
void uns_get_interface_type_(const int * id, char * dest, int lenstring)
{
int index=getUnsvIndex(*id);
std::string source= ((CunsIn *)unsv[index].obj)->snapshot->getInterfaceType();
assert(source.length() <= (unsigned int) lenstring);
strcpy(dest,source.c_str());
for (int i=strlen(dest); i<lenstring; i++) {
dest[i] = ' ';
}
}
// ----------------------------------------------------------------------------
// getCrv:
// return the Component Range Vector belonging to the UNS's object "index"
void getCrv(int index)
......
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