Renamed free_grid() -> destroy_grid().

This commit is contained in:
Atgeirr Flø Rasmussen 2012-04-11 11:40:51 +02:00
parent 702aaec8ab
commit 36097f1656
7 changed files with 10 additions and 10 deletions

View File

@ -109,7 +109,7 @@ namespace Opm
/// Destructor.
GridManager::~GridManager()
{
free_grid(ug_);
destroy_grid(ug_);
}

View File

@ -20,7 +20,7 @@
#include <opm/core/grid.h>
#include <stdlib.h>
void free_grid(struct UnstructuredGrid *g)
void destroy_grid(struct UnstructuredGrid *g)
{
if (g!=NULL)
{

View File

@ -57,7 +57,7 @@ struct UnstructuredGrid {
};
void free_grid(struct UnstructuredGrid *g);
void destroy_grid(struct UnstructuredGrid *g);
#ifdef __cplusplus

View File

@ -218,7 +218,7 @@ allocate_cart_grid_3d(int nx, int ny, int nz)
(G->cell_centroids == NULL ) ||
(G->cell_volumes == NULL ) )
{
free_grid(G);
destroy_grid(G);
G = NULL;
}
}
@ -553,7 +553,7 @@ allocate_cart_grid_2d(int nx, int ny)
(G->cell_centroids == NULL ) ||
(G->cell_volumes == NULL ) )
{
free_grid(G);
destroy_grid(G);
G = NULL;
}
}

View File

@ -181,7 +181,7 @@ preprocess (const struct grdecl *in, double tol)
*
* In particular, convey resource ownership from 'pg' to 'g'.
* Consequently, memory resources obtained in process_grdecl()
* will be released in free_grid().
* will be released in destroy_grid().
*/
g->dimensions = 3;
@ -204,7 +204,7 @@ preprocess (const struct grdecl *in, double tol)
pg.face_neighbors = NULL;
/* 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. */
g->face_centroids = NULL;
g->face_normals = NULL;
@ -222,7 +222,7 @@ preprocess (const struct grdecl *in, double tol)
if (!ok)
{
free_grid(g);
destroy_grid(g);
g = NULL;
}
else

View File

@ -35,6 +35,6 @@ int main(void)
}
fprintf(stderr, "\n");
}
free_grid(g);
destroy_grid(g);
return 0;
}

View File

@ -61,7 +61,7 @@ int main()
g = read_grid(std::string("example"));
free_grid(g);
destroy_grid(g);
return 0;
}