Update ecllib from statoil master repo commit a165d636552fa0c0f96219d341f7f2c17c08dc9d

This commit is contained in:
Bjørn Erik Jensen
2018-08-13 10:20:34 +02:00
parent bffdef1c78
commit 23024b790f
471 changed files with 28319 additions and 13959 deletions

View File

@@ -1,52 +1,9 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_pointset.h' 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.
Warning: The libecl code has changed to be compiled as a C++ project. This
header file is retained for a period for compatibility, but you are encouraged
to switch to include the new hpp header directly in your code.
*/
#ifndef ERT_GEO_POINTSET_H
#define ERT_GEO_POINTSET_H
#include <ert/geometry/geo_pointset.hpp>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct geo_pointset_struct geo_pointset_type;
geo_pointset_type * geo_pointset_alloc( bool external_z );
void geo_pointset_free( geo_pointset_type * pointset );
void geo_pointset_add_xyz( geo_pointset_type * pointset , double x , double y, double z);
int geo_pointset_get_size( const geo_pointset_type * pointset );
void geo_pointset_iget_xy( const geo_pointset_type * pointset , int index , double * x , double * y);
const double * geo_pointset_get_zcoord( const geo_pointset_type * pointset );
bool geo_pointset_equal( const geo_pointset_type * pointset1 , const geo_pointset_type * pointset2);
double geo_pointset_iget_z( const geo_pointset_type * pointset , int index );
void geo_pointset_iset_z( geo_pointset_type * pointset , int index , double value);
void geo_pointset_memcpy( const geo_pointset_type * src, geo_pointset_type * target , bool copy_zdata);
void geo_pointset_shift_z( geo_pointset_type * pointset , double value );
void geo_pointset_assign_z( geo_pointset_type * pointset , double value );
void geo_pointset_scale_z( geo_pointset_type * pointset , double value );
void geo_pointset_imul( geo_pointset_type * pointset , const geo_pointset_type * other );
void geo_pointset_iadd( geo_pointset_type * pointset , const geo_pointset_type * other );
void geo_pointset_isub( geo_pointset_type * self , const geo_pointset_type * other );
void geo_pointset_isqrt( geo_pointset_type * pointset );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,19 +1,52 @@
/*
Copyright (C) 2018 Statoil ASA, Norway.
This file 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.
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_pointset.h' 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 <ert/geometry/geo_pointset.h>
#ifndef ERT_GEO_POINTSET_H
#define ERT_GEO_POINTSET_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct geo_pointset_struct geo_pointset_type;
geo_pointset_type * geo_pointset_alloc( bool external_z );
void geo_pointset_free( geo_pointset_type * pointset );
void geo_pointset_add_xyz( geo_pointset_type * pointset , double x , double y, double z);
int geo_pointset_get_size( const geo_pointset_type * pointset );
void geo_pointset_iget_xy( const geo_pointset_type * pointset , int index , double * x , double * y);
const double * geo_pointset_get_zcoord( const geo_pointset_type * pointset );
bool geo_pointset_equal( const geo_pointset_type * pointset1 , const geo_pointset_type * pointset2);
double geo_pointset_iget_z( const geo_pointset_type * pointset , int index );
void geo_pointset_iset_z( geo_pointset_type * pointset , int index , double value);
void geo_pointset_memcpy( const geo_pointset_type * src, geo_pointset_type * target , bool copy_zdata);
void geo_pointset_shift_z( geo_pointset_type * pointset , double value );
void geo_pointset_assign_z( geo_pointset_type * pointset , double value );
void geo_pointset_scale_z( geo_pointset_type * pointset , double value );
void geo_pointset_imul( geo_pointset_type * pointset , const geo_pointset_type * other );
void geo_pointset_iadd( geo_pointset_type * pointset , const geo_pointset_type * other );
void geo_pointset_isub( geo_pointset_type * self , const geo_pointset_type * other );
void geo_pointset_isqrt( geo_pointset_type * pointset );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,57 +1,9 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_polygon.h' 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.
Warning: The libecl code has changed to be compiled as a C++ project. This
header file is retained for a period for compatibility, but you are encouraged
to switch to include the new hpp header directly in your code.
*/
#ifndef ERT_GEO_POLYGON_H
#define ERT_GEO_POLYGON_H
#include <ert/geometry/geo_polygon.hpp>
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <ert/util/type_macros.h>
typedef struct geo_polygon_struct geo_polygon_type;
geo_polygon_type * geo_polygon_alloc( const char * name );
void geo_polygon_free( geo_polygon_type * polygon );
void geo_polygon_free__( void * arg );
void geo_polygon_add_point( geo_polygon_type * polygon , double x , double y );
void geo_polygon_add_point_front( geo_polygon_type * polygon , double x , double y);
geo_polygon_type * geo_polygon_fload_alloc_irap( const char * filename );
bool geo_polygon_contains_point( const geo_polygon_type * polygon , double x , double y);
bool geo_polygon_contains_point__( const geo_polygon_type * polygon , double x , double y, bool force_edge_inside);
void geo_polygon_reset(geo_polygon_type * polygon );
void geo_polygon_fprintf(const geo_polygon_type * polygon , FILE * stream);
void geo_polygon_shift(geo_polygon_type * polygon , double x0 , double y0);
void geo_polygon_close( geo_polygon_type * polygoon);
int geo_polygon_get_size(const geo_polygon_type * polygon );
void geo_polygon_iget_xy(const geo_polygon_type * polygon , int index , double *x , double *y);
bool geo_polygon_segment_intersects(const geo_polygon_type * polygon , double x1 , double y1 , double x2 , double y2);
const char * geo_polygon_get_name( const geo_polygon_type * polygon );
void geo_polygon_set_name( geo_polygon_type * polygon , const char * name);
double geo_polygon_get_length( geo_polygon_type * polygon );
bool geo_polygon_equal( const geo_polygon_type * polygon1 , const geo_polygon_type * polygon2 );
UTIL_IS_INSTANCE_HEADER( geo_polygon );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,19 +1,57 @@
/*
Copyright (C) 2018 Statoil ASA, Norway.
This file 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.
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_polygon.h' 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 <ert/geometry/geo_polygon.h>
#ifndef ERT_GEO_POLYGON_H
#define ERT_GEO_POLYGON_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <ert/util/type_macros.hpp>
typedef struct geo_polygon_struct geo_polygon_type;
geo_polygon_type * geo_polygon_alloc( const char * name );
void geo_polygon_free( geo_polygon_type * polygon );
void geo_polygon_free__( void * arg );
void geo_polygon_add_point( geo_polygon_type * polygon , double x , double y );
void geo_polygon_add_point_front( geo_polygon_type * polygon , double x , double y);
geo_polygon_type * geo_polygon_fload_alloc_irap( const char * filename );
bool geo_polygon_contains_point( const geo_polygon_type * polygon , double x , double y);
bool geo_polygon_contains_point__( const geo_polygon_type * polygon , double x , double y, bool force_edge_inside);
void geo_polygon_reset(geo_polygon_type * polygon );
void geo_polygon_fprintf(const geo_polygon_type * polygon , FILE * stream);
void geo_polygon_shift(geo_polygon_type * polygon , double x0 , double y0);
void geo_polygon_close( geo_polygon_type * polygoon);
int geo_polygon_get_size(const geo_polygon_type * polygon );
void geo_polygon_iget_xy(const geo_polygon_type * polygon , int index , double *x , double *y);
bool geo_polygon_segment_intersects(const geo_polygon_type * polygon , double x1 , double y1 , double x2 , double y2);
const char * geo_polygon_get_name( const geo_polygon_type * polygon );
void geo_polygon_set_name( geo_polygon_type * polygon , const char * name);
double geo_polygon_get_length( geo_polygon_type * polygon );
bool geo_polygon_equal( const geo_polygon_type * polygon1 , const geo_polygon_type * polygon2 );
UTIL_IS_INSTANCE_HEADER( geo_polygon );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,50 +1,9 @@
/*
Copyright (C) 2014 Statoil ASA, Norway.
The file 'geo_polygon_collection.h' 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.
Warning: The libecl code has changed to be compiled as a C++ project. This
header file is retained for a period for compatibility, but you are encouraged
to switch to include the new hpp header directly in your code.
*/
#ifndef ERT_GEO_POLYGON_COLLECTION_H
#define ERT_GEO_POLYGON_COLLECTION_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <ert/util/type_macros.h>
#include <ert/geometry/geo_polygon.h>
#include <ert/geometry/geo_polygon_collection.hpp>
typedef struct geo_polygon_collection_struct geo_polygon_collection_type;
geo_polygon_collection_type * geo_polygon_collection_alloc( );
void geo_polygon_collection_free( geo_polygon_collection_type * polygons );
int geo_polygon_collection_size( const geo_polygon_collection_type * polygons );
geo_polygon_type * geo_polygon_collection_create_polygon( geo_polygon_collection_type * polygons , const char * name );
bool geo_polygon_collection_has_polygon( const geo_polygon_collection_type * polygons , const char * name);
bool geo_polygon_collection_add_polygon( geo_polygon_collection_type * polygons , geo_polygon_type * polygon , bool polygon_owner );
geo_polygon_type * geo_polygon_collection_iget_polygon(const geo_polygon_collection_type * polygons , int index);
geo_polygon_type * geo_polygon_collection_get_polygon(const geo_polygon_collection_type * polygons , const char * polygon_name);
UTIL_IS_INSTANCE_HEADER( geo_polygon_collection );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,19 +1,50 @@
/*
Copyright (C) 2018 Statoil ASA, Norway.
This file 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.
Copyright (C) 2014 Statoil ASA, Norway.
The file 'geo_polygon_collection.h' 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 <ert/geometry/geo_polygon_collection.h>
#ifndef ERT_GEO_POLYGON_COLLECTION_H
#define ERT_GEO_POLYGON_COLLECTION_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <ert/util/type_macros.hpp>
#include <ert/geometry/geo_polygon.hpp>
typedef struct geo_polygon_collection_struct geo_polygon_collection_type;
geo_polygon_collection_type * geo_polygon_collection_alloc( );
void geo_polygon_collection_free( geo_polygon_collection_type * polygons );
int geo_polygon_collection_size( const geo_polygon_collection_type * polygons );
geo_polygon_type * geo_polygon_collection_create_polygon( geo_polygon_collection_type * polygons , const char * name );
bool geo_polygon_collection_has_polygon( const geo_polygon_collection_type * polygons , const char * name);
bool geo_polygon_collection_add_polygon( geo_polygon_collection_type * polygons , geo_polygon_type * polygon , bool polygon_owner );
geo_polygon_type * geo_polygon_collection_iget_polygon(const geo_polygon_collection_type * polygons , int index);
geo_polygon_type * geo_polygon_collection_get_polygon(const geo_polygon_collection_type * polygons , const char * polygon_name);
UTIL_IS_INSTANCE_HEADER( geo_polygon_collection );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,60 +1,9 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_region.h' 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.
Warning: The libecl code has changed to be compiled as a C++ project. This
header file is retained for a period for compatibility, but you are encouraged
to switch to include the new hpp header directly in your code.
*/
#include <stdlib.h>
#include <stdbool.h>
#include <ert/util/util.h>
#include <ert/util/int_vector.h>
#include <ert/geometry/geo_pointset.h>
#include <ert/geometry/geo_polygon.h>
#ifndef ERT_GEO_REGION_H
#define ERT_GEO_REGION_H
#include <ert/geometry/geo_region.hpp>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct geo_region_struct geo_region_type;
geo_region_type * geo_region_alloc( const geo_pointset_type * pointset , bool preselect);
void geo_region_free( geo_region_type * region );
void geo_region_free__( void * arg );
void geo_region_reset( geo_region_type * region );
const int_vector_type * geo_region_get_index_list( geo_region_type * region );
void geo_region_select_inside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_select_outside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_deselect_inside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_deselect_outside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_select_above_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
void geo_region_select_below_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
void geo_region_deselect_above_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
void geo_region_deselect_below_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,19 +1,60 @@
/*
Copyright (C) 2018 Statoil ASA, Norway.
This file 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.
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_region.h' 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 <ert/geometry/geo_region.h>
#include <stdlib.h>
#include <stdbool.h>
#include <ert/util/util.h>
#include <ert/util/int_vector.hpp>
#include <ert/geometry/geo_pointset.hpp>
#include <ert/geometry/geo_polygon.hpp>
#ifndef ERT_GEO_REGION_H
#define ERT_GEO_REGION_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct geo_region_struct geo_region_type;
geo_region_type * geo_region_alloc( const geo_pointset_type * pointset , bool preselect);
void geo_region_free( geo_region_type * region );
void geo_region_free__( void * arg );
void geo_region_reset( geo_region_type * region );
const int_vector_type * geo_region_get_index_list( geo_region_type * region );
void geo_region_select_inside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_select_outside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_deselect_inside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_deselect_outside_polygon( geo_region_type * region , const geo_polygon_type * polygon);
void geo_region_select_above_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
void geo_region_select_below_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
void geo_region_deselect_above_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
void geo_region_deselect_below_line( geo_region_type * region, const double xcoords[2] , const double ycoords[2]);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,62 +1,9 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_surface.h' 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.
Warning: The libecl code has changed to be compiled as a C++ project. This
header file is retained for a period for compatibility, but you are encouraged
to switch to include the new hpp header directly in your code.
*/
#ifndef ERT_GEO_SURFACE_H
#define ERT_GEO_SURFACE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ert/geometry/geo_surface.hpp>
#include <ert/geometry/geo_pointset.h>
typedef struct geo_surface_struct geo_surface_type;
bool geo_surface_equal_header( const geo_surface_type * surface1 , const geo_surface_type * surface2 );
bool geo_surface_equal( const geo_surface_type * surface1 , const geo_surface_type * surface2);
void geo_surface_free( geo_surface_type * geo_surface );
void geo_surface_free__( void * arg);
geo_pointset_type * geo_surface_get_pointset( const geo_surface_type * surface );
geo_surface_type * geo_surface_fload_alloc_irap( const char * filename , bool loadz);
geo_surface_type * geo_surface_alloc_new( int nx, int ny, double xinc, double yinc, double xstart, double ystart, double angle );
bool geo_surface_fload_irap_zcoord( const geo_surface_type * surface, const char * filename, double *zlist);
double geo_surface_iget_zvalue(const geo_surface_type * surface, int index);
int geo_surface_get_size( const geo_surface_type * surface );
void geo_surface_fprintf_irap( const geo_surface_type * surface, const char * filename );
void geo_surface_fprintf_irap_external_zcoord( const geo_surface_type * surface, const char * filename , const double * zcoord);
int geo_surface_get_nx( const geo_surface_type * surface );
int geo_surface_get_ny( const geo_surface_type * surface );
void geo_surface_iget_xy( const geo_surface_type* surface, int index, double* x, double* y);
void geo_surface_shift( const geo_surface_type * src , double value);
void geo_surface_scale( const geo_surface_type * src , double value);
void geo_surface_isub( geo_surface_type * self , const geo_surface_type * other);
void geo_surface_iset_zvalue(geo_surface_type * surface, int index , double value);
void geo_surface_assign_value( const geo_surface_type * src , double value);
geo_surface_type * geo_surface_alloc_copy( const geo_surface_type * src , bool copy_zdata);
void geo_surface_iadd( geo_surface_type * self , const geo_surface_type * other);
void geo_surface_imul( geo_surface_type * self , const geo_surface_type * other);
void geo_surface_isqrt( geo_surface_type * surface );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,19 +1,62 @@
/*
Copyright (C) 2018 Statoil ASA, Norway.
This file 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.
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_surface.h' 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 <ert/geometry/geo_surface.h>
#ifndef ERT_GEO_SURFACE_H
#define ERT_GEO_SURFACE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ert/geometry/geo_pointset.hpp>
typedef struct geo_surface_struct geo_surface_type;
bool geo_surface_equal_header( const geo_surface_type * surface1 , const geo_surface_type * surface2 );
bool geo_surface_equal( const geo_surface_type * surface1 , const geo_surface_type * surface2);
void geo_surface_free( geo_surface_type * geo_surface );
void geo_surface_free__( void * arg);
geo_pointset_type * geo_surface_get_pointset( const geo_surface_type * surface );
geo_surface_type * geo_surface_fload_alloc_irap( const char * filename , bool loadz);
geo_surface_type * geo_surface_alloc_new( int nx, int ny, double xinc, double yinc, double xstart, double ystart, double angle );
bool geo_surface_fload_irap_zcoord( const geo_surface_type * surface, const char * filename, double *zlist);
double geo_surface_iget_zvalue(const geo_surface_type * surface, int index);
int geo_surface_get_size( const geo_surface_type * surface );
void geo_surface_fprintf_irap( const geo_surface_type * surface, const char * filename );
void geo_surface_fprintf_irap_external_zcoord( const geo_surface_type * surface, const char * filename , const double * zcoord);
int geo_surface_get_nx( const geo_surface_type * surface );
int geo_surface_get_ny( const geo_surface_type * surface );
void geo_surface_iget_xy( const geo_surface_type* surface, int index, double* x, double* y);
void geo_surface_shift( const geo_surface_type * src , double value);
void geo_surface_scale( const geo_surface_type * src , double value);
void geo_surface_isub( geo_surface_type * self , const geo_surface_type * other);
void geo_surface_iset_zvalue(geo_surface_type * surface, int index , double value);
void geo_surface_assign_value( const geo_surface_type * src , double value);
geo_surface_type * geo_surface_alloc_copy( const geo_surface_type * src , bool copy_zdata);
void geo_surface_iadd( geo_surface_type * self , const geo_surface_type * other);
void geo_surface_imul( geo_surface_type * self , const geo_surface_type * other);
void geo_surface_isqrt( geo_surface_type * surface );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,46 +1,9 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_util.h' 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.
Warning: The libecl code has changed to be compiled as a C++ project. This
header file is retained for a period for compatibility, but you are encouraged
to switch to include the new hpp header directly in your code.
*/
#ifndef ERT_GEO_UTIL_H
#define ERT_GEO_UTIL_H
#include <ert/geometry/geo_util.hpp>
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
typedef enum {
GEO_UTIL_LINES_CROSSING = 0,
GEO_UTIL_LINES_PARALLELL = 1,
GEO_UTIL_LINES_OVERLAPPING = 2,
GEO_UTIL_LINES_DEGENERATE = 3,
GEO_UTIL_NOT_CROSSING = 4
} geo_util_xlines_status_enum;
bool geo_util_inside_polygon__(const double * xlist , const double * ylist , int num_points , double x0 , double y0 , bool force_edge_inside);
bool geo_util_inside_polygon(const double * xlist , const double * ylist , int num_points , double x0 , double y0);
geo_util_xlines_status_enum geo_util_xlines( const double ** points , double * x0, double * y0 );
geo_util_xlines_status_enum geo_util_xsegments( const double ** points , double * x0, double * y0 );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,19 +1,46 @@
/*
Copyright (C) 2018 Statoil ASA, Norway.
This file 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.
Copyright (C) 2011 Statoil ASA, Norway.
The file 'geo_util.h' 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 <ert/geometry/geo_util.h>
#ifndef ERT_GEO_UTIL_H
#define ERT_GEO_UTIL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
typedef enum {
GEO_UTIL_LINES_CROSSING = 0,
GEO_UTIL_LINES_PARALLELL = 1,
GEO_UTIL_LINES_OVERLAPPING = 2,
GEO_UTIL_LINES_DEGENERATE = 3,
GEO_UTIL_NOT_CROSSING = 4
} geo_util_xlines_status_enum;
bool geo_util_inside_polygon__(const double * xlist , const double * ylist , int num_points , double x0 , double y0 , bool force_edge_inside);
bool geo_util_inside_polygon(const double * xlist , const double * ylist , int num_points , double x0 , double y0);
geo_util_xlines_status_enum geo_util_xlines( const double ** points , double * x0, double * y0 );
geo_util_xlines_status_enum geo_util_xsegments( const double ** points , double * x0, double * y0 );
#ifdef __cplusplus
}
#endif
#endif