Skip to content

Commit

Permalink
compile but link fail with all edgeconformal included
Browse files Browse the repository at this point in the history
  • Loading branch information
hnil authored and bska committed Dec 20, 2024
1 parent 84f9b0a commit fdd7333
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ list (APPEND MAIN_SOURCE_FILES
opm/grid/cpgpreprocess/facetopology.c
opm/grid/cpgpreprocess/geometry.c
opm/grid/cpgpreprocess/preprocess.c
opm/grid/cpgpreprocess/make_edge_conformal.cpp
opm/grid/cpgpreprocess/uniquepoints.c
opm/grid/UnstructuredGrid.c
opm/grid/grid_equal.cpp
Expand Down Expand Up @@ -250,6 +251,7 @@ list (APPEND PUBLIC_HEADER_FILES
opm/grid/cpgpreprocess/facetopology.h
opm/grid/cpgpreprocess/geometry.h
opm/grid/cpgpreprocess/preprocess.h
opm/grid/cpgpreprocess/make_edge_conformal.hpp
opm/grid/cpgpreprocess/uniquepoints.h
opm/grid/transmissibility/trans_tpfa.h
opm/grid/transmissibility/TransTpfa.hpp
Expand Down
6 changes: 4 additions & 2 deletions opm/grid/cornerpoint_grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <opm/grid/cornerpoint_grid.h>
#include <opm/grid/cpgpreprocess/geometry.h>
#include <opm/grid/cpgpreprocess/preprocess.h>
#include <opm/grid/cpgpreprocess/make_edge_conformal.hpp>
#include <opm/grid/UnstructuredGrid.h>


Expand Down Expand Up @@ -175,8 +176,9 @@ create_grid_cornerpoint(const struct grdecl *in, double tol, bool edge_conformal

ok = process_grdecl(in, tol, NULL, &pg, false, edge_conformal);
if(edge_conformal){
//add_cells(&pg);
//make edge conformal
// if add cells is done one could skip som of the code later
add_cells(&pg);
make_edge_conformal(&pg);
}

if (!ok)
Expand Down
3 changes: 2 additions & 1 deletion opm/grid/cpgpreprocess/make_edge_conformal.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "config.h"
#include "preprocess.h"
#include "make_edge_conformal.hpp"
#include <vector>
Expand Down Expand Up @@ -405,7 +406,7 @@ void fix_edges_at_top(const struct processed_grid& grid,
}
}//end cell

extern "C" void make_edge_conformal(struct processed_grid* grid){
void make_edge_conformal(struct processed_grid* grid){
std::cout << "Fixing edge grid to be edge conformal" << std::endl;
std::vector<int> nodes;
std::vector<int> nodePos;
Expand Down
5 changes: 2 additions & 3 deletions opm/grid/cpgpreprocess/make_edge_conformal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define OPENRS_MAKE_EDGE_CONFORMAL_HEADER

#include "preprocess.h"
extern "C" {
void make_edge_conformal(struct processed_grid* grdecl);
}
void make_edge_conformal(struct processed_grid* grdecl);

#endif
2 changes: 1 addition & 1 deletion opm/grid/cpgpreprocess/preprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ reverse_face_nodes(struct processed_grid *out)
}

/* ---------------------------------------------------------------------- */
static void
void
add_cells(struct processed_grid *grid)
/* ---------------------------------------------------------------------- */
{
Expand Down
2 changes: 1 addition & 1 deletion opm/grid/cpgpreprocess/preprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ extern "C" {
* call to function process_grdecl().
*/
void free_processed_grid(struct processed_grid *g, bool edge_conformal);

void add_cells(struct processed_grid *grid);
#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit fdd7333

Please sign in to comment.