From 52e13dab6c00bc7a679da6025ff9e9da505b5f92 Mon Sep 17 00:00:00 2001 From: Halvor M Nilsen Date: Tue, 17 Dec 2024 10:10:10 +0100 Subject: [PATCH] fixed compilation --- opm/grid/cpgpreprocess/make_edge_conformal.cpp | 11 +++++++++-- opm/grid/cpgpreprocess/make_edge_conformal.hpp | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/opm/grid/cpgpreprocess/make_edge_conformal.cpp b/opm/grid/cpgpreprocess/make_edge_conformal.cpp index d4f7cd8c4..40628e4b6 100644 --- a/opm/grid/cpgpreprocess/make_edge_conformal.cpp +++ b/opm/grid/cpgpreprocess/make_edge_conformal.cpp @@ -58,7 +58,7 @@ std::vector sorted_outer_boundary(const struct processed_grid& grid, int dir, int cell){ std::vector> edges; -for(int locind = 0; locind < dir_faces[dir].size(); locind++){ +for(size_t locind = 0; locind < dir_faces[dir].size(); locind++){ int hface = dir_hfaces[dir][locind]; int face = grid.cell_faces[hface]; std::vector> face_edges; @@ -169,7 +169,7 @@ for(int locind = 0; locind < dir_faces[dir].size(); locind++){ std::vector new_tb(const struct processed_grid& grid, const std::vector& bfnodes_in, const std::vector& sedge, std::array& bedge, - int fsign, + int /*fsign*/, int fsigntb){ std::vector newedge; std::vector bfnodes = bfnodes_in; @@ -406,6 +406,10 @@ void fix_edges_at_top(const struct processed_grid& grid, } }//end cell +#ifdef __cplusplus +extern "C" { +#endif + void make_edge_conformal(struct processed_grid* grid){ std::cout << "Fixing edge grid to be edge conformal" << std::endl; std::vector nodes; @@ -420,3 +424,6 @@ void make_edge_conformal(struct processed_grid* grid){ grid->face_nodes[i] = nodes[i]; } } +#ifdef __cplusplus +} +#endif diff --git a/opm/grid/cpgpreprocess/make_edge_conformal.hpp b/opm/grid/cpgpreprocess/make_edge_conformal.hpp index 0acf124f2..e100fd2d9 100644 --- a/opm/grid/cpgpreprocess/make_edge_conformal.hpp +++ b/opm/grid/cpgpreprocess/make_edge_conformal.hpp @@ -2,6 +2,13 @@ #define OPENRS_MAKE_EDGE_CONFORMAL_HEADER #include "preprocess.h" +#ifdef __cplusplus +extern "C" { +#endif + void make_edge_conformal(struct processed_grid* grdecl); +#ifdef __cplusplus +} +#endif #endif