compr_quant_general.h File Reference
#include <stddef.h>
Include dependency graph for compr_quant_general.h:

Go to the source code of this file.

Classes

struct  compr_quantities_gen
 

Functions

struct compr_quantities_gencompr_quantities_gen_allocate (size_t nc, size_t nf, int np)
 
void compr_quantities_gen_deallocate (struct compr_quantities_gen *cq)
 

Detailed Description

Module defining derived fluid quantities needed to discretise compressible and miscible pressure (flow) problems.

Function Documentation

struct compr_quantities_gen* compr_quantities_gen_allocate ( size_t  nc,
size_t  nf,
int  np 
)

Create management structure capable of storing derived fluid quantities pertaining to a reservoir model of a particular size.

The resources acquired using function compr_quantities_gen_allocate() must be released using the destructor function compr_quantities_gen_deallocate().

Parameters
[in]ncNumber of grid cells
[in]nfNumber of grid interfaces
[in]npNumber of fluid phases (and components)
Returns
Fully formed management structure. Returns NULL in case of allocation failure.
void compr_quantities_gen_deallocate ( struct compr_quantities_gen cq)

Release resources acquired in a previous call to constructor function compr_quantities_gen_allocate().

Note that compr_quantities_gen_deallocate(NULL) is supported and benign (i.e., this statement behaves as free(NULL)).

Parameters
[in,out]cqOn input - compressible quantity management structure obtained through a previous call to construction function compr_quantities_gen_allocate(). On output - invalid pointer.