Added ERT as source code based on https://github.com/Ensembles/ert/ and commit 7b53b5f61f5b47e8169b72098b562071df394bc3

This is SVN commit 4117
Updated ResInsight cmakelists to build ERT and link directly
Removed precompiled ERT binaries
p4#: 20183
This commit is contained in:
Magne Sjaastad
2013-01-17 13:33:59 +01:00
parent 8a5ac934c8
commit 04006370ac
1266 changed files with 244003 additions and 13400 deletions

View File

@@ -0,0 +1,60 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'test.c' is part of ERT - Ensemble based Reservoir Tool.
ERT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ERT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
for more details.
*/
#include <ecl_grav.h>
#include <ecl_file.h>
#include <signal.h>
#include <util.h>
void install_SIGNALS(void) {
signal(SIGSEGV , util_abort_signal); /* Segmentation violation, i.e. overwriting memory ... */
signal(SIGINT , util_abort_signal); /* Control C */
signal(SIGTERM , util_abort_signal); /* If killing the program with SIGTERM (the default kill signal) you will get a backtrace.
Killing with SIGKILL (-9) will not give a backtrace.*/
}
int test_ecl_file_save() {
ecl_file_type * ecl_file = ecl_file_open_writable( "/tmp/ECLIPSE.UNRST" );
ecl_kw_type * swat = ecl_file_iget_named_kw( ecl_file , "SWAT" , 0 );
ecl_file_save_kw( ecl_file , swat );
ecl_file_close( ecl_file );
}
int test_grdecl_loader() {
FILE * stream = util_fopen("/private/joaho/ERT/NR/python/ctypes/test/data/eclipse/case/PERMX.grdecl" , "r");
ecl_kw_type * kw = ecl_kw_fscanf_alloc_grdecl_dynamic( stream , "PERMX" , ECL_FLOAT_TYPE );
ecl_kw_free( kw );
fclose( stream );
return 1;
}
int main (int argc, char **argv) {
install_SIGNALS();
{
test_grdecl_loader();
test_ecl_file_save();
}
}