ICFERST
22-06
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
|
This module contains all the ICFERST structures and associated subroutines (allocate/deallocate) Use it also to identify what a variable means since here they are described. More...
Data Types | |
interface | allocate_multi_dev_shape_funs |
Allocates the required memory to store the derivatives of the shape functions. More... | |
interface | allocate_multi_field |
Allocated a multi field type based on field name. More... | |
type | multi_absorption |
Comprises all the absorption terms that migth be required. More... | |
type | multi_dev_shape_funs |
Data structure to store the derivatives of the shape functions and conversors from reference element to local. More... | |
type | multi_dimensions |
Data type storing all the dimensionrs describing the mesh, fields, nodes, etc. More... | |
type | multi_discretization_opts |
This type includes the necessary information to choose from the different discretization options available They are a mistery even for the most advanced wizards of the realm... hopefully they can be removed in the future These parameters represent the degree of discretisation used, they are in general hardcoded based on the precision requested by the user so as said, to be removed in the future hopefully. More... | |
type | multi_field |
Type created to store absorption terms in a compacted way associated subroutines where created to be used with these fields. More... | |
type | multi_gi_dimensions |
Necessary information for perform gauss integration. More... | |
type | multi_matrices |
This type contains all the necessary information to solve =systems, matrices, RHS, limiters, colouring and also flags to decide which sort of matrices are generated. More... | |
type | multi_ndgln |
This type contains all the local to global conversors for the different fields we have. More... | |
type | multi_outfluxes |
Contains variables to analyse the flux across the BCs that the user is interested. More... | |
type | multi_pipe_package |
Contains all the information required to model pipes. Many of these fields are unnecessary or even undesired... More... | |
type | multi_shape_funs |
Data structure to store all the shape functions to facilitate its movement throughtout the code. More... | |
type | multi_sparsities |
This data type contains all the sparsities necessary in the multiphase prototype code. More... | |
type | multi_sparsity |
This type comprises the necessary variables to represent matrices using a CSR structure. More... | |
type | multi_transport_scalar |
Contains all the information for generic scalar fields to solve for. More... | |
type | pipe_coords |
Type containing everything required to indentify and store which nodes contain a well/pipe. More... | |
type | porous_adv_coefs |
Required values to compute the fluxes for porous media. Effectively the sigma terms from the papers Currently they are oversized since apart from the permeability they are not tensors, this should be changed! More... | |
Functions/Subroutines | |
subroutine | deallocate_multi_field (mfield, and_destroy) |
Deallocation of a multi field type. More... | |
subroutine | deallocate_multi_absorption (multi_absorp, and_destroy) |
Deallocation of all of the multi field types within multi_absorp. More... | |
subroutine | get_multi_field (mfield, inode_in, output) |
Given a multi field returns an array with its values at inode_in. More... | |
subroutine | get_multi_field_inverse (mfield, inode_in, output) |
Given a multi field returns the inverse as an array with its values at inode_in. More... | |
subroutine | print_multi_field (mfield, inode_in, dimension) |
Given a multi field returns prints its values at inode_in. More... | |
subroutine | add_array_to_multi_field (mfield, b, xpos, ypos, inode) |
This subroutine performs the addition of an array and a multifield and returns the multifield mfield = mfield + b xpos and ypos are the starting positions for a full matrix they have to be one. More... | |
subroutine | add_multi_field_to_array (mfield, b, xpos, ypos, inode, a_in) |
This subroutine performs the addition of an array and a multifield and returns the array b = b + a * mfield xpos and ypos are the starting positions for a full matrix they have to be one. More... | |
subroutine | mult_multi_field_by_array (mfield, b, inode) |
This subroutine performs the multiplication of an array and a multifield and returns the multifield mfield = mfield * b. More... | |
subroutine | mult_multi_field_by_array_on_array (mfield, b, inode) |
This subroutine performs the multiplication of an array and a multifield and returns the array b = mfield * b. More... | |
subroutine | scale_multi_field (mfield, a, inode) |
This subroutine rescales a multifield mfield = a * mfield. More... | |
subroutine | linearise_multi_field (mfield, Mdims, ndgln) |
This subroutine linearises a multifield. i.e. takes it from P2 to P1. More... | |
subroutine | allocate_multi_shape_funs (shape_fun, Mdims, GIdims) |
This subroutine allocates and initialises to zero all the arrays in a multi_shape_funs data type It uses the Dimensions of the model and the gauss integration to be used to allocate the necessary shape functions. More... | |
subroutine | deallocate_multi_shape_funs (shape_fun) |
This subroutine deallocates and nullifies all the fields inside multi_shape_funs. More... | |
subroutine | deallocate_projection_matrices (shape_fun) |
This subroutine deallocates projection matrices CV2FE & FE2CV stored in shape_fun. More... | |
subroutine | allocate_multi_sparsities (Mspars, Mdims, mx_ncolacv, mx_ncoldgm_pha, mx_nct, mx_nc, mx_ncolm, mx_ncolph) |
This subroutine allocates part of the memory inside Mspars, i.e. sparsities of the different matrices IMPORTANT: Despite this subroutine can be called by itself it is highly recommended to be called ONLY through multi_sparsity/Get_Sparsity_Patterns. More... | |
subroutine | deallocate_multi_sparsities (Mspars) |
This subroutine deallocates all the memory inside Mspars. More... | |
subroutine | allocate_multi_ndgln (ndgln, Mdims) |
This subroutine allocates the global to local conversors. More... | |
subroutine | deallocate_multi_ndgln (ndgln) |
Deallocates Global to local fields NOTE that Only deallocates suf_cv, suf_p and suf_u since the others are pointers to state. More... | |
subroutine | destroy_multi_matrices (Mmat) |
Deallocates and nullifies the memory generated for the matrices, it is to be used after adapting the mesh. More... | |
subroutine | deallocate_multi_dev_shape_funs (DevFuns) |
Deallocates the required memory to store the derivatives of the shape functions. More... | |
subroutine | allocate_porous_adv_coefs (Mdims, upwnd) |
Allocates the memory for the advection coefficients for porous media. More... | |
subroutine | deallocate_porous_adv_coefs (upwnd) |
Deallocates the memory for the advection coefficients for porous media. More... | |
subroutine | allocate_multi_pipe_package (pipes, Mdims, Mspars) |
Allocates the necessary memory for multi_pipe_package. More... | |
subroutine | deallocate_multi_pipe_package (pipes) |
Deallocates the necessary memory for multi_pipe_package. More... | |
subroutine | initialize_multi_outfluxes (outfluxes) |
Read in the surface IDs of the boundaries (if any) that you wish to integrate over into the (integer vector) variable outfluxesoutlet_id and stores them into the multi_outfluxes field. More... | |
subroutine | allocate_multi_outfluxes (Mdims, outfluxes) |
Initialises memory for outfluxes. More... | |
subroutine | destroy_multi_outfluxes (outfluxes) |
Deallocates the multi_outfluxes field. More... | |
This module contains all the ICFERST structures and associated subroutines (allocate/deallocate) Use it also to identify what a variable means since here they are described.
subroutine multi_data_types::add_array_to_multi_field | ( | type( multi_field ), intent(inout) | mfield, |
real, dimension(:,:), intent(in) | b, | ||
integer, intent(in) | xpos, | ||
integer, intent(in) | ypos, | ||
integer, intent(in) | inode | ||
) |
This subroutine performs the addition of an array and a multifield and returns the multifield mfield = mfield + b xpos and ypos are the starting positions for a full matrix they have to be one.
mfield | multifield to be multiplied |
b | the array to add |
xpos | starting positions |
ypos | starting positions |
inode | position to be retrieved |
same | input mfield with added b |
subroutine multi_data_types::add_multi_field_to_array | ( | type( multi_field ), intent(in) | mfield, |
real, dimension(:,:), intent(inout) | b, | ||
integer, intent(in) | xpos, | ||
integer, intent(in) | ypos, | ||
integer, intent(in) | inode, | ||
real, intent(in), optional | a_in | ||
) |
This subroutine performs the addition of an array and a multifield and returns the array b = b + a * mfield xpos and ypos are the starting positions for a full matrix they have to be one.
mfield | multifield to be multiplied |
b | the array to add |
xpos | starting positions |
ypos | starting positions |
inode | position to be retrieved |
a_in | multiplier of mfield |
same | input array with added mfield |
subroutine multi_data_types::allocate_multi_ndgln | ( | type(multi_ndgln), intent(inout) | ndgln, |
type(multi_dimensions), intent(in) | Mdims | ||
) |
This subroutine allocates the global to local conversors.
ndgln | Global to local field |
Mdims | dimensions of the model |
subroutine multi_data_types::allocate_multi_outfluxes | ( | type (multi_dimensions), intent(in) | Mdims, |
type (multi_outfluxes), intent(inout) | outfluxes | ||
) |
Initialises memory for outfluxes.
Mdims | dimensions of the model |
outfluxes | the multi_outfluxes field |
subroutine multi_data_types::allocate_multi_pipe_package | ( | type (multi_pipe_package), intent(inout) | pipes, |
type (multi_dimensions), intent(in) | Mdims, | ||
type (multi_sparsities), intent(in) | Mspars | ||
) |
Allocates the necessary memory for multi_pipe_package.
pipes | output the multi_pipe_package field with memory allocated |
Mdims | dimensions of the model |
Mspars | multi_sparsities of the model |
subroutine multi_data_types::allocate_multi_shape_funs | ( | type(multi_shape_funs), intent(inout) | shape_fun, |
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_gi_dimensions), intent(in) | GIdims | ||
) |
This subroutine allocates and initialises to zero all the arrays in a multi_shape_funs data type It uses the Dimensions of the model and the gauss integration to be used to allocate the necessary shape functions.
shape_fun | Shape functions for a given type of mesh, pressure or velocity |
Mdims | Dimensions of the model |
GIdims | GI dimensions to be used, consistent with the mesh used for shape_fun |
subroutine multi_data_types::allocate_multi_sparsities | ( | type (multi_sparsities), intent(inout) | Mspars, |
type(multi_dimensions), intent(in) | Mdims, | ||
integer | mx_ncolacv, | ||
integer | mx_ncoldgm_pha, | ||
integer | mx_nct, | ||
integer | mx_nc, | ||
integer | mx_ncolm, | ||
integer | mx_ncolph | ||
) |
This subroutine allocates part of the memory inside Mspars, i.e. sparsities of the different matrices IMPORTANT: Despite this subroutine can be called by itself it is highly recommended to be called ONLY through multi_sparsity/Get_Sparsity_Patterns.
subroutine multi_data_types::allocate_porous_adv_coefs | ( | type (multi_dimensions), intent(in) | Mdims, |
type (porous_adv_coefs), intent(inout) | upwnd | ||
) |
Allocates the memory for the advection coefficients for porous media.
Mdims- | dimensions of the model |
upwnd | multi_dimensions field |
subroutine multi_data_types::deallocate_multi_absorption | ( | type( multi_absorption ), intent(inout) | multi_absorp, |
logical, intent(in), optional | and_destroy | ||
) |
Deallocation of all of the multi field types within multi_absorp.
multi_absorp | all multifields within multi_absorp are deallocated |
and_destroy | if not and_destroy then only the pointer is nullified, otherwise the field is deallocated |
subroutine multi_data_types::deallocate_multi_dev_shape_funs | ( | type (multi_dev_shape_funs), intent(inout) | DevFuns | ) |
Deallocates the required memory to store the derivatives of the shape functions.
DevFuns | output field with the memory deallocated and pointers nullified |
subroutine multi_data_types::deallocate_multi_field | ( | type( multi_field ), intent(inout) | mfield, |
logical, intent(in), optional | and_destroy | ||
) |
Deallocation of a multi field type.
mfield | multifield to be deallocated |
and_destroy | if not and_destroy then only the pointer is nullified, otherwise the field is deallocated |
subroutine multi_data_types::deallocate_multi_ndgln | ( | type(multi_ndgln), intent(inout) | ndgln | ) |
Deallocates Global to local fields NOTE that Only deallocates suf_cv, suf_p and suf_u since the others are pointers to state.
ndgln | Global to local field |
subroutine multi_data_types::deallocate_multi_pipe_package | ( | type (multi_pipe_package), intent(inout) | pipes | ) |
Deallocates the necessary memory for multi_pipe_package.
pipes | output the multi_pipe_package field with memory deallocated |
subroutine multi_data_types::deallocate_multi_shape_funs | ( | type(multi_shape_funs), intent(inout) | shape_fun | ) |
This subroutine deallocates and nullifies all the fields inside multi_shape_funs.
shape_fun | Shape functions for a given type of mesh, pressure or velocity |
subroutine multi_data_types::deallocate_multi_sparsities | ( | type (multi_sparsities), intent(inout) | Mspars | ) |
This subroutine deallocates all the memory inside Mspars.
Mspars | Multi_sparsities field |
subroutine multi_data_types::deallocate_porous_adv_coefs | ( | type (porous_adv_coefs), intent(inout) | upwnd | ) |
Deallocates the memory for the advection coefficients for porous media.
upwnd | multi_dimensions field |
subroutine multi_data_types::deallocate_projection_matrices | ( | type(multi_shape_funs), intent(inout) | shape_fun | ) |
This subroutine deallocates projection matrices CV2FE & FE2CV stored in shape_fun.
shape_fun | Shape functions for a given type of mesh, pressure or velocity |
subroutine multi_data_types::destroy_multi_matrices | ( | type (multi_matrices), intent(inout) | Mmat | ) |
Deallocates and nullifies the memory generated for the matrices, it is to be used after adapting the mesh.
Mmat | multi_matrices containing the memory used to solve for the different fields |
subroutine multi_data_types::destroy_multi_outfluxes | ( | type (multi_outfluxes), intent(inout) | outfluxes | ) |
Deallocates the multi_outfluxes field.
outfluxes | the multi_outfluxes field |
subroutine multi_data_types::get_multi_field | ( | type( multi_field ), intent(in) | mfield, |
integer, intent(in) | inode_in, | ||
real, dimension(:,:), intent(inout) | output | ||
) |
Given a multi field returns an array with its values at inode_in.
mfield | multifield to be copied into an array |
inode_in | position to be retrieved |
output | array of size (ndim*nphase, ndim*nphase) containing the mfield at inode_in |
subroutine multi_data_types::get_multi_field_inverse | ( | type( multi_field ), intent(in) | mfield, |
integer, intent(in) | inode_in, | ||
real, dimension(:,:), intent(inout) | output | ||
) |
Given a multi field returns the inverse as an array with its values at inode_in.
mfield | multifield to be copied into an array |
inode_in | position to be retrieved |
output | array of size (ndim*nphase, ndim*nphase) containing the inverse of mfield at inode_in |
subroutine multi_data_types::initialize_multi_outfluxes | ( | type (multi_outfluxes), intent(inout) | outfluxes | ) |
Read in the surface IDs of the boundaries (if any) that you wish to integrate over into the (integer vector) variable outfluxesoutlet_id and stores them into the multi_outfluxes field.
outfluxes | the multi_outfluxes field |
subroutine multi_data_types::linearise_multi_field | ( | type( multi_field ), intent(inout) | mfield, |
type( multi_dimensions ), intent(in) | Mdims, | ||
integer, dimension( : ), intent(in), pointer | ndgln | ||
) |
This subroutine linearises a multifield. i.e. takes it from P2 to P1.
mfield | multifield to be rescaled |
Mdims | dimensions of the model |
ndgln | global to local numbering |
same | input mfield linearised |
subroutine multi_data_types::mult_multi_field_by_array | ( | type( multi_field ), intent(inout) | mfield, |
real, dimension(:,:), intent(in) | b, | ||
integer, intent(in) | inode | ||
) |
This subroutine performs the multiplication of an array and a multifield and returns the multifield mfield = mfield * b.
mfield | multifield to be multiplied |
b | the array to multiply |
inode | position to be retrieved |
same | input mfield times b |
subroutine multi_data_types::mult_multi_field_by_array_on_array | ( | type( multi_field ), intent(in) | mfield, |
real, dimension(:,:), intent(inout) | b, | ||
integer, intent(in) | inode | ||
) |
This subroutine performs the multiplication of an array and a multifield and returns the array b = mfield * b.
mfield | multifield to be multiplied |
b | the array to multiply |
inode | position to be retrieved |
same | input mfield times b |
subroutine multi_data_types::print_multi_field | ( | type( multi_field ), intent(in) | mfield, |
integer, intent(in) | inode_in, | ||
integer | dimension | ||
) |
Given a multi field returns prints its values at inode_in.
mfield | multifield to be copied into an array |
inode_in | position to be retrieved |
dimension | must have size(ndim*nphase, ndim*nphase) |
subroutine multi_data_types::scale_multi_field | ( | type( multi_field ), intent(inout) | mfield, |
real, intent(in) | a, | ||
integer, intent(in) | inode | ||
) |
This subroutine rescales a multifield mfield = a * mfield.
mfield | multifield to be rescaled |
a | the scaling real |
inode | position to be retrieved |
same | input mfield times a |