Renamed free_grid() -> destroy_grid().
This commit is contained in:
parent
702aaec8ab
commit
36097f1656
@ -109,7 +109,7 @@ namespace Opm
|
|||||||
/// Destructor.
|
/// Destructor.
|
||||||
GridManager::~GridManager()
|
GridManager::~GridManager()
|
||||||
{
|
{
|
||||||
free_grid(ug_);
|
destroy_grid(ug_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <opm/core/grid.h>
|
#include <opm/core/grid.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
void free_grid(struct UnstructuredGrid *g)
|
void destroy_grid(struct UnstructuredGrid *g)
|
||||||
{
|
{
|
||||||
if (g!=NULL)
|
if (g!=NULL)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ struct UnstructuredGrid {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void free_grid(struct UnstructuredGrid *g);
|
void destroy_grid(struct UnstructuredGrid *g);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -218,7 +218,7 @@ allocate_cart_grid_3d(int nx, int ny, int nz)
|
|||||||
(G->cell_centroids == NULL ) ||
|
(G->cell_centroids == NULL ) ||
|
||||||
(G->cell_volumes == NULL ) )
|
(G->cell_volumes == NULL ) )
|
||||||
{
|
{
|
||||||
free_grid(G);
|
destroy_grid(G);
|
||||||
G = NULL;
|
G = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -553,7 +553,7 @@ allocate_cart_grid_2d(int nx, int ny)
|
|||||||
(G->cell_centroids == NULL ) ||
|
(G->cell_centroids == NULL ) ||
|
||||||
(G->cell_volumes == NULL ) )
|
(G->cell_volumes == NULL ) )
|
||||||
{
|
{
|
||||||
free_grid(G);
|
destroy_grid(G);
|
||||||
G = NULL;
|
G = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ preprocess (const struct grdecl *in, double tol)
|
|||||||
*
|
*
|
||||||
* In particular, convey resource ownership from 'pg' to 'g'.
|
* In particular, convey resource ownership from 'pg' to 'g'.
|
||||||
* Consequently, memory resources obtained in process_grdecl()
|
* Consequently, memory resources obtained in process_grdecl()
|
||||||
* will be released in free_grid().
|
* will be released in destroy_grid().
|
||||||
*/
|
*/
|
||||||
g->dimensions = 3;
|
g->dimensions = 3;
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ preprocess (const struct grdecl *in, double tol)
|
|||||||
pg.face_neighbors = NULL;
|
pg.face_neighbors = NULL;
|
||||||
|
|
||||||
/* Initialise subsequently allocated fields to a defined state lest
|
/* Initialise subsequently allocated fields to a defined state lest
|
||||||
* we free() random pointers in free_grid() if either of the
|
* we free() random pointers in destroy_grid() if either of the
|
||||||
* fill_cell_topology() or allocate_geometry() functions fail. */
|
* fill_cell_topology() or allocate_geometry() functions fail. */
|
||||||
g->face_centroids = NULL;
|
g->face_centroids = NULL;
|
||||||
g->face_normals = NULL;
|
g->face_normals = NULL;
|
||||||
@ -222,7 +222,7 @@ preprocess (const struct grdecl *in, double tol)
|
|||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
free_grid(g);
|
destroy_grid(g);
|
||||||
g = NULL;
|
g = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -35,6 +35,6 @@ int main(void)
|
|||||||
}
|
}
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
free_grid(g);
|
destroy_grid(g);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ int main()
|
|||||||
|
|
||||||
g = read_grid(std::string("example"));
|
g = read_grid(std::string("example"));
|
||||||
|
|
||||||
free_grid(g);
|
destroy_grid(g);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user