|
ICFERST
22-06
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
|
#include "fdebug.h"
#include "petsc_legacy.h"
|
module | cv_advection |
| This module contains all the tools to assemble and solve the equations and fields associated with the CV mesh, i.e. transport equation, continuity equation, DCVFE gradient matrix and the Laplacian system for the zeta-potential.
|
|
|
subroutine | cv_advection::cv_assemb (state, packed_state, final_phase, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, tracer, velocity, density, multi_absorp, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, DEN_ALL, DENOLD_ALL, CV_DISOPT, CV_DG_VEL_INT_OPT, DT, CV_THETA, CV_BETA, SUF_SIG_DIAGTEN_BC, DERIV, CV_P, SOURCT_ALL, ABSORBT_ALL, VOLFRA_PORE, GETCV_DISC, GETCT, IGOT_T2, IGOT_THETA_FLUX, GET_THETA_FLUX, USE_THETA_FLUX, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, THETA_GDIFF, MEAN_PORE_CV, MASS_MN_PRES, THERMAL, got_free_surf, MASS_SUF, MASS_ELE_TRANSP, TDIFFUSION, saturation, VAD_parameter, Phase_with_Pc, Courant_number, Permeability_tensor_field, calculate_mass_delta, eles_with_pipe, pipes_aux, porous_heat_coef, porous_heat_coef_old, outfluxes, solving_compositional, nonlinear_iteration, assemble_collapsed_to_one_phase) |
| This subroutines generates the transport equation for a cv field. It also can generate the Continuity equation if GETCT = .true. and also generate the gradient matrix of the momentum equation for the DCVFE method if the option is activated. More...
|
|
subroutine | apply_eno_2_t (LIMF, T_ALL, TOLD_ALL, FEMT_ALL, FEMTOLD_ALL, INCOME, INCOMEOLD, IGOT_T_PACK, CV_NODI, CV_NODJ, X_NODI, X_NODJ, CV_ILOC, CV_JLOC, ELE, CV_NONODS, NDIM, NPHASE, CV_NLOC, TOTELE, X_NDGLN, CV_NDGLN, X_ALL, FACE_ELE, NFACE, BETWEEN_ELEMENTS, SCVFEN, SCVFENx, GI, INV_JAC, UGI, on_domain_boundary) |
|
subroutine | tri_tet_loccords (Xpt, LOCCORDS, X_CORNERS_ALL, NDIM, CV_NLOC) |
|
subroutine | dump_multiphase (prefix, icp) |
|
logical function | has_anisotropic_diffusion (tracer) |
|
subroutine | get_int_t_den_new (LIMF) |
| Computes the flux between CVs. More...
|
|
subroutine | get_int_vel_orig_new (NDOTQNEW, NDOTQ, INCOME, LOC_T_I, LOC_T_J, LOC_DEN_I, LOC_DEN_J, LOC_NU, LOC2_NU, NUGI_ALL, UGI_COEF_ELE_ALL, UGI_COEF_ELE2_ALL, not_OLD_VEL) |
| Computes the flux between CVs. More...
|
|
subroutine | get_int_vel_porous_vel (NDOTQNEW, NDOTQ, INCOME, LOC_T_I, LOC_T_J, LOC_FEMT, LOC_NU, LOC2_NU, SLOC_NU, UGI_COEF_ELE_ALL, UGI_COEF_ELE2_ALL, I_adv_coef, I_adv_coef_grad, J_adv_coef, J_adv_coef_grad, I_inv_adv_coef, J_inv_adv_coef, UDGI_ALL, MASS_CV_I, MASS_CV_J, TUPWIND_IN, TUPWIND_OUT, not_OLD_VEL) |
| Computes the flux between CVs for porous media. NDOTQNEW contains the fluxes for a given gauss integration point. More...
|
|
subroutine | face_theta_many (FTHETA, INTERFACE_TRACK, T_NODJ_IPHA, T_NODI_IPHA, TOLD_NODJ_IPHA, TOLD_NODI_IPHA) |
|
subroutine | get_neigbouring_lists (JCOUNT_KLOC, ICOUNT_KLOC, JCOUNT_KLOC2, ICOUNT_KLOC2, C_JCOUNT_KLOC, C_ICOUNT_KLOC, C_JCOUNT_KLOC2, C_ICOUNT_KLOC2) |
|
subroutine | mass_conservation_check_and_outfluxes (calculate_mass_delta, outfluxes, DEN_ALL, flag) |
|
pure subroutine | cv_advection::onvdlim_ano_many (NFIELD, TDLIM, TDCEN, INCOME, ETDNEW_PELE, ETDNEW_PELEOT, XI_LIMIT, TUPWIN, TUPWI2, DENOIN, CTILIN, DENOOU, CTILOU, FTILIN, FTILOU) |
| This sub calculates the limited face values TDADJ(1...SNGI) from the central difference face values TDCEN(1...SNGI) using a NVD shceme. INCOME(1...SNGI)=1 for incomming to element ELE else =0. LIBETA is the flux limiting parameter. TDMAX(PELE)=maximum of the surrounding 6 element values of element PELE. TDMIN(PELE)=minimum of the surrounding 6 element values of element PELE. PELEOT=element at other side of current face. ELEOT2=element at other side of the element ELEOTH. ELESID=element next to oposing current face. DENOIN, CTILIN, DENOOU, CTILOU, FTILIN, FTILOU => memory The elements are arranged in this order: ELEOT2,ELE, PELEOT, ELESID. More...
|
|
subroutine | cv_advection::is_field_constant (IGOT_T_CONST, IGOT_T_CONST_VALUE, T_ALL, CV_NONODS) |
| Checks whether a field is constant or not. Although I think this check is terrible, no alternatives have provided the same functionality so far. More...
|
|
subroutine | cv_advection::pack_loc (LOC_F, T_ALL, NPHASE, IPT, IGOT_T_PACK) |
| Copies memory into the same large array to then perform a projection from CV to FE. More...
|
|
subroutine | cv_advection::unpack_loc (LOC_F, T_ALL, NPHASE, IPT, IGOT_T_PACK, IGOT_T_CONST, IGOT_T_CONST_VALUE) |
| If PACK then UNpack loc_f into T_ALL as long at IGOT_T==1 and STORE and not already in storage. More...
|
|
subroutine | cv_advection::pack_or_unpack_loc (LOC_F, T_ALL, NPHASE, NFIELD, IPT, PACK, STORE, IGOT_T) |
| If PACK then pack T_ALL into LOC_F as long at IGOT_T==1 and STORE and not already in storage. More...
|
|
subroutine | cv_advection::pack_loc_all1 (LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, use_volume_frac_T2, nfield) |
| This subroutine is for fields that have already size final_phase - 1 Checks if the fields are constant or not, stored in IGOT_T_PACK, based on that introduces the field into LOC_F to later on apply the limiters on all the fields at once. More...
|
|
subroutine | cv_advection::pack_loc_all2 (LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, use_volume_frac_T2, start_phase, final_phase, nodi) |
| This subrotuine is for fields that are bigger than final_phase - start_phase Checks if the fields are constant or not, stored in IGOT_T_PACK, based on that introduces the field into LOC_F to later on apply the limiters on all the fields at once. More...
|
|
subroutine | cv_advection::pack_loc_all3 (LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, use_volume_frac_T2, start_phase, final_phase, nodi) |
| This subrotuine is for fields that are bigger than final_phase - start_phase Checks if the fields are constant or not, stored in IGOT_T_PACK, based on that introduces the field into LOC_F to later on apply the limiters on all the fields at once. This one is for integer fields. More...
|
|
subroutine | i_pack_loc (LOC_F, T_ALL, NPHASE, IPT, IGOT_T_PACK) |
| If PACK then pack T_ALL into LOC_F as long at IGOT_T==1 and STORE and not already in storage. More...
|
|
subroutine | cv_advection::i_pack_loc (LOC_F, T_ALL, NPHASE, IPT, IGOT_T_PACK) |
| If PACK then pack T_ALL into LOC_F as long at IGOT_T==1 and STORE and not already in storage. More...
|
|
subroutine | cv_advection::unpack_loc_all (LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, IGOT_T_CONST, IGOT_T_CONST_VALUE, use_volume_frac_T2, nfield) |
| If PACK then UNpack loc_f into T_ALL as long at IGOT_T==1 and STORE and not already in storage. Checks if the fields are constant or not, stored in IGOT_T_PACK, based on that introduces the LOC_F into the field or use a constant value. This is after the limiters have been applied. More...
|
|
integer function | cv_advection::cv_count_faces (Mdims, CV_ELE_TYPE, CV_GIdims) |
| This subroutine counts then number of faces in the control volume space. More...
|
|
subroutine | cv_advection::find_other_side (CV_OTHER_LOC, CV_NLOC, U_OTHER_LOC, U_NLOC, MAT_OTHER_LOC, INTEGRAT_AT_GI, X_NLOC, XU_NLOC, X_NDGLN, XU_NDGLN, CV_SNLOC, CVFEM_ON_FACE, X_SHARE, ELE, ELE2, FINELE, COLELE, DISTCONTINUOUS_METHOD) |
| We are on the boundary or next to another element. Determine CV_OTHER_LOC, U_OTHER_LOC. CVFEM_ON_FACE(CV_KLOC,GI)=.TRUE. if CV_KLOC is on the face that GI is centred on. Look for these nodes on the other elements. ELE2=0 also when we are between elements but are trying to integrate across the middle of a CV. More...
|
|
subroutine | cv_advection::proj_cv_to_fem (packed_state, fempsi, psi, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, igetct, X, mass_ele, mass_mn_pres, tracer, psi_ave, psi_int, activate_limiters) |
| Calls to generate the transport equation for the saturation. Embeded an FPI with backtracking method is uncluded Subroutine description: (1) determine FEMT (finite element wise) etc from T (control volume wise) (2) (optional) calculate psi_int (area) and psi_ave (barycentre) over each CV. More...
|
|
subroutine | cv_advection::dg_derivs_all1 (FEMT, FEMTOLD, DTX_ELE, DTOLDX_ELE, NDIM, NPHASE, NCOMP, TOTELE, CV_NDGLN, XCV_NDGLN, X_NLOC, X_NDGLN, CV_NGI, CV_NLOC, CVWEIGHT, N, NLX, NLY, NLZ, X_N, X_NLX, X_NLY, X_NLZ, X_NONODS, X, Y, Z, NFACE, FACE_ELE, CV_SLOCLIST, X_SLOCLIST, CV_SNLOC, X_SNLOC, WIC_T_BC, SUF_T_BC, SBCVNGI, SBCVFEN, SBWEIGH, X_SBCVFEN, X_SBCVFENSLX, X_SBCVFENSLY, get_gradU, state, P0Mesh) |
| calculates derivatives of vector fields More...
|
|
subroutine | cv_advection::dg_derivs_all2 (FEMT, FEMTOLD, DTX_ELE, DTOLDX_ELE, NDIM, NPHASE, TOTELE, CV_NDGLN, XCV_NDGLN, X_NLOC, X_NDGLN, CV_NGI, CV_NLOC, CVWEIGHT, N, NLX, NLY, NLZ, X_N, X_NLX, X_NLY, X_NLZ, X_NONODS, X, Y, Z, NFACE, FACE_ELE, CV_SLOCLIST, X_SLOCLIST, CV_SNLOC, X_SNLOC, WIC_T_BC, SUF_T_BC, SBCVNGI, SBCVFEN, SBWEIGH, X_SBCVFEN, X_SBCVFENSLX, X_SBCVFENSLY, P0Mesh) |
| Computes the derivatives of vector fields. More...
|
|
subroutine | cv_advection::diffus_cal_coeff (DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX, CV_NLOC, MAT_NLOC, NPHASE, MAT_NDGLN, SMATFEN, SCVFEN, GI, NDIM, TDIFFUSION, HDC, T_CV_NODJ, T_CV_NODI, TOLD_CV_NODJ, TOLD_CV_NODI, ELE, ELE2, CVNORMX_ALL, LOC_DTX_ELE_ALL, LOC_DTOLDX_ELE_ALL, LOC2_DTX_ELE_ALL, LOC2_DTOLDX_ELE_ALL, LOC_WIC_T_BC, CV_OTHER_LOC, MAT_OTHER_LOC, CV_SNLOC, CV_SLOC2LOC, on_domain_boundary, between_elements, has_anisotropic_diffusivity) |
| This sub calculates the effective diffusion coefficientd DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX based on a non-linear method and a non-oscillating scheme. It requires the derivatives of the field obtained using DG_DERIVS_ALL DG_DERIVS_ALL. More...
|
|
subroutine | cv_advection::linear_high_diffus_cal_coeff_stress_or_tensor (STRESS_IJ_ELE_EXT, S_INV_NNX_MAT12, STRESS_FORM, STRESS_FORM_STAB, ZERO_OR_TWO_THIRDS, U_SNLOC, U_NLOC, CV_SNLOC, NPHASE, SBUFEN_REVERSED, SBCVFEN_REVERSED, SDETWEI, SBCVNGI, NDIM, SLOC_UDIFFUSION, SLOC_UDIFFUSION_VOL, SLOC2_UDIFFUSION, SLOC2_UDIFFUSION_VOL, DIFF_GI_ADDED, ON_BOUNDARY, SNORMXN_ALL) |
| This sub calculates the effective diffusion coefficientd STRESS_IJ_ELE_EXT it only works for between element contributions. based on a high order scheme. The matrix S_INV_NNX_MAT12 is used to calculate the rows of the matrix with STRESS_IJ_ELE_EXT. This implements the stress and tensor form of diffusion and calculates a jump conidition. which is in DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX The coefficient are in N_DOT_DKDU, N_DOT_DKDUOLD. look at the manual DG treatment of viscocity. More...
|
|
subroutine | cv_advection::calc_stress_ten (STRESS_IJ, ZERO_OR_TWO_THIRDS, NDIM, UFENX_ILOC, UFENX_JLOC, TEN_XX, TEN_VOL) |
| determine stress form of viscocity... More...
|
|
subroutine | cv_advection::calc_stress_ten_reduce (STRESS_IJ, ZERO_OR_TWO_THIRDS, NDIM, FEN_TEN_XX, FEN_TEN_VOL, UFENX_JLOC) |
| determine stress form of viscocity... More...
|
|
subroutine | cv_advection::cal_lim_vol_adjust (TMIN_STORE, TMIN, T, TMIN_NOD, RESET_STORE, MASS_CV, CV_NODI_IPHA, CV_NODJ_IPHA, IPHASE, CV_NONODS, INCOME) |
| Adjust TMIN to take into account different sized CV's. if RESET_STORE then reset TMIN to orginal values. More...
|
|
subroutine | cv_advection::dgsimplnorm_all (NLOC, SNLOC, NDIM, XL_ALL, XSL_ALL, NORMX_ALL) |
| Form approximate surface normal (NORMX_ALL(1),NORMX_ALL(2),NORMX_ALL(3)) More...
|
|
subroutine | cv_advection::dgsimplnorm (ELE, SILOC2ILOC, NLOC, SNLOC, XONDGL, X, Y, Z, NORMX, NORMY, NORMZ) |
| Form approximate surface normal (NORMX,NORMY,NORMZ) More...
|
|
subroutine | cv_advection::isotropic_limiter_all (T_ALL, TOLD_ALL, T2_ALL, T2OLD_ALL, DEN_ALL, DENOLD_ALL, IGOT_T2, NPHASE, CV_NONODS, nsmall_colm, SMALL_CENTRM, SMALL_FINDRM, SMALL_COLM, STOTEL, CV_SNLOC, CV_SNDGLN, SUF_T_BC_ALL, SUF_T2_BC_ALL, SUF_D_BC_ALL, WIC_T_BC_ALL, WIC_T2_BC_ALL, WIC_D_BC_ALL, MASS_CV, TOLDUPWIND_MAT_ALL, DENOLDUPWIND_MAT_ALL, T2OLDUPWIND_MAT_ALL, TUPWIND_MAT_ALL, DENUPWIND_MAT_ALL, T2UPWIND_MAT_ALL) |
| Computes the limited values at the interface, not as generic as the anisotropic one and never used actually... More...
|
|
subroutine | surro_cv_minmax (TMAX_ALL, TMIN_ALL, TOLDMAX_ALL, TOLDMIN_ALL, DENMAX_ALL, DENMIN_ALL, DENOLDMAX_ALL, DENOLDMIN_ALL, T2MAX_ALL, T2MIN_ALL, T2OLDMAX_ALL, T2OLDMIN_ALL, T_ALL, TOLD_ALL, T2_ALL, T2OLD_ALL, DEN_ALL, DENOLD_ALL, IGOT_T2, NPHASE, CV_NONODS, FINACV, COLACV, STOTEL, CV_SNLOC, CV_SNDGLN, SUF_T_BC_ALL, SUF_T2_BC_ALL, SUF_D_BC_ALL, WIC_T_BC_ALL, WIC_T2_BC_ALL, WIC_D_BC_ALL, TMIN_NOD_ALL, TMAX_NOD_ALL, TOLDMIN_NOD_ALL, TOLDMAX_NOD_ALL, T2MIN_NOD_ALL, T2MAX_NOD_ALL, T2OLDMIN_NOD_ALL, T2OLDMAX_NOD_ALL, DENMIN_NOD_ALL, DENMAX_NOD_ALL, DENOLDMIN_NOD_ALL, DENOLDMAX_NOD_ALL) |
| For each node, find the largest and smallest value of T and DENSITY for both the current and previous timestep, out of the node value and all its surrounding nodes including Dirichlet b.c's. More...
|
|
subroutine | calc_limit_matrix_max_min (TMAX_ALL, TMIN_ALL, DENMAX_ALL, DENMIN_ALL, T2MAX_ALL, T2MIN_ALL, T_ALL, T2_ALL, DEN_ALL, IGOT_T2, NPHASE, CV_NONODS, TMIN_NOD_ALL, TMAX_NOD_ALL, T2MIN_NOD_ALL, T2MAX_NOD_ALL, DENMIN_NOD_ALL, DENMAX_NOD_ALL, NSMALL_COLM, SMALL_FINDRM, SMALL_COLM, TUPWIND_MAT_ALL, DENUPWIND_MAT_ALL, T2UPWIND_MAT_ALL, MASS_CV) |
| Populate limiting matrix based on max and min values For each node, find the largest and smallest value of T and DENSITY for both the current and previous timestep, out of the node value and all its surrounding nodes including Dirichlet b.c's. More...
|
|
subroutine | cv_advection::calc_sele (ELE, ELE3, SELE, CV_SILOC, CV_ILOC, U_SLOC2LOC, CV_SLOC2LOC, FACE_ELE, gi, CV_funs, Mdims, CV_GIdims, CV_NDGLN, U_NDGLN, CV_SNDGLN, U_SNDGLN) |
| Calculate surface element, surface control volume: SELE, CV_SILOC, U_SLOC2LOC, CV_SLOC2LOC for a face on the boundary of the domain. More...
|
|
subroutine | cv_advection::put_in_ct_rhs (GET_C_IN_CV_ADVDIF_AND_CALC_C_CV, ct_rhs_phase_cv_nodi, ct_rhs_phase_cv_nodj, final_phase, Mdims, CV_funs, ndgln, Mmat, GI, between_elements, on_domain_boundary, ELE, ELE2, SELE, HDC, MASS_ELE, JCOUNT_KLOC, JCOUNT_KLOC2, ICOUNT_KLOC, ICOUNT_KLOC2, C_JCOUNT_KLOC, C_JCOUNT_KLOC2, C_ICOUNT_KLOC, C_ICOUNT_KLOC2, U_OTHER_LOC, U_SLOC2LOC, CV_SLOC2LOC, SCVDETWEI, CVNORMX_ALL, DEN_ALL, CV_NODI, CV_NODJ, WIC_U_BC_ALL, WIC_P_BC_ALL, SUF_P_BC_ALL, UGI_COEF_ELE_ALL, UGI_COEF_ELE2_ALL, NDOTQ, NDOTQOLD, LIMT, LIMDT, LIMDTOLD, LIMT_HAT, NDOTQ_HAT, FTHETA_T2, ONE_M_FTHETA_T2OLD, FTHETA_T2_J, ONE_M_FTHETA_T2OLD_J, integrate_other_side_and_not_boundary, loc_u, THETA_VEL, UDGI_IMP_ALL, RCON, RCON_J, NDOTQ_IMP, X_ALL, SUF_D_BC_ALL, gravty) |
| This subroutine caculates the discretised cty eqn acting on the velocities i.e. MmatCT, MmatCT_RHS It also computes the gradient matrix using the DCVFE method. More...
|
|
subroutine | introduce_c_cv_boundary_conditions (Bound_ele_correct) |
| This subroutine populates Bound_ele_correct and Bound_ele2_correct to properly apply the BCs when creating the MmatC_CV matrix. More...
|
|
subroutine | cv_advection::calc_anisotrop_lim (Mmat, T_ALL, TOLD_ALL, DEN_ALL, DENOLD_ALL, T2_ALL, T2OLD_ALL, FEMT_ALL, FEMTOLD_ALL, FEMDEN_ALL, FEMDENOLD_ALL, FEMT2_ALL, FEMT2OLD_ALL, USE_FEMT, TUPWIND_MAT_ALL, TOLDUPWIND_MAT_ALL, DENUPWIND_MAT_ALL, DENOLDUPWIND_MAT_ALL, T2UPWIND_MAT_ALL, T2OLDUPWIND_MAT_ALL, IGOT_T2, NPHASE, CV_NONODS, CV_NLOC, TOTELE, CV_NDGLN, SMALL_FINDRM, SMALL_CENTRM, SMALL_COLM, NSMALL_COLM, X_NDGLN, X_NONODS, NDIM, X_ALL, XC_CV_ALL, use_reflect) |
| For the anisotropic limiting scheme we find the upwind values by interpolation using the subroutine FINPTS or IFINPTS; the upwind value for each node pair is stored in the matrices TUPWIND AND. More...
|
|
subroutine | calc_anisotrop_lim_vals (Mmat, T_ALL, FEMT_ALL, USE_FEMT, TUPWIND_ALL, NFIELD, NONODS, CV_NLOC, TOTELE, CV_NDGLN, SMALL_FINDRM, SMALL_COLM, NSMALL_COLM, X_NDGLN, X_NONODS, NDIM, X_ALL, XC_CV_ALL, use_reflect) |
|
subroutine | calc_anisotrop_lim_vals2 (Mmat, T_ALL, FEMT_ALL, USE_FEMT, TUPWIND_ALL, NFIELD, NONODS, NLOC, NGI, TOTELE, NDGLNO, FINDRM, COLM, NCOLM, X_NDGLN, X_NONODS, NDIM, X_ALL, XC_CV_ALL, N, NLX_ALL, WEIGHT, use_reflect) |
|
subroutine | getstoreelewei (PSI_ALL, NFIELD, NONODS, NLOC, TOTELE, NDGLNO, MATPSI_ALL, FINDRM, COLM, NCOLM, BOUND, ELEMATPSI, ELEMATWEI) |
| use the stored interpolation coeffs to caclulate MATPSI. This sub finds the matrix values MATPSI for a given point on the stencil More...
|
|
subroutine | minmaxelewic (PSI_ALL, NONODS, NLOC, TOTELE, NDGLNO, FINDRM, COLM, NCOLM, MINPSI, MAXPSI) |
| This sub calculates the max and min values of PSI in local vacinity of an element. More...
|
|
subroutine | finptsstore (PSI_ALL, FEMPSI_ALL, USE_FEMPSI, NFIELD, NONODS, NLOC, NGI, TOTELE, NDGLNO, MATPSI_ALL, FINDRM, COLM, NCOLM, NDIM, X_NDGLN, X_NONODS, X_ALL, XC_CV_ALL, N, NLX_ALL, WEIGHT, FINDELE, COLELE, NCOLEL, ELEMATPSI, ELEMATWEI, IGETSTOR, BOUND, REFLECT) |
| This sub finds the matrix values MATPSI for a given point on the stencil IF IGETSTOR=1 then get ELEMATPSI,ELEMATWEI. More...
|
|
subroutine | matptsstore (MATPSI_ALL, COUNT, NFIELD, NOD, XNOD, PSI_ALL, FEMPSI_ALL, USE_FEMPSI, NONODS, X_NONODS, NLOC, TOTELE, X_NDGLN, NDGLNO, X1_ALL, X2_ALL, NORMX1_ALL, X_ALL, FINDELE, COLELE, NCOLEL, MINPSI, MAXPSI, ELEWIC, LOCCORDSK, BOUND, REFLECT, NDIM) |
| This sub calculates the value of PSI that would be at the other side of the stencil if we had a linear variation and within a single element. IF BOUND then make locally bounded. More...
|
|
subroutine | philnodele (NONODS, FINDELE, COLELE, NCOLEL, MXNCOLEL, TOTELE, NLOC, NDGLNO, NLIST, INLIST) |
| This sub calculates the node to element list FINDELE,COLELE. More...
|
|
subroutine | conv_quad_to_lin_tri_tet (ndgln_p2top1, nloc_lin, cv_nloc, sub_lin_totele) |
| convert quadratic element into a series of linear elements... More...
|
|
subroutine | cv_advection::triloccords (Xp, Yp, Zp, N1, N2, N3, N4, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4) |
|
subroutine | cv_advection::triloccords2d (Xp, Yp, N1, N2, N3, X1, Y1, X2, Y2, X3, Y3) |
|
logical function | cv_advection::shock_front_in_ele (ele, Mdims, sat, ndgln, Imble_frac) |
| Detects whether the element has a shockfront or not. More...
|
|
subroutine | cv_advection::generate_laplacian_system (Mdims, packed_state, ndgln, Mmat, Mspars, CV_funs, CV_GIdims, Sigma_field, Solution, K_fields, F_fields, intface_val_type) |
| : In this method we assemble and solve the Laplacian system using at least P1 elements The equation solved is the following: Div sigma Grad X = - SUM (Div K Grad F) with Neuman BCs = 0 where K and F are passed down as a vector. Therefore for n entries the SUM will be performed over n fields Example: F = (3, nphase, cv_nonods) would include three terms in the RHS and the same for K If harmonic average then we perform the harmonic average of sigma and K IMPORTANT: This subroutine requires the PHsparsity to be generated Note that this method solves considering FE fields. If using CV you may incur in an small error. More...
|
|
real function | get_diff_coef_divdx (intface_type, HDC, W_i, W_j, Value_i, Value_j, sigma_i, sigma_j) |
| : Computes the effective value of K or sigma. at the interface between CVs Based on the intface_type integer: 0 = no interpolation; 1 Harmonic mean; !20 for SelfPotential solver, harmonic mean considering charge; negative normal mean More...
|
|
subroutine | cv_advection::scvdetnx (Mdims, ndgln, X_ALL, CV_funs, CV_GIdims, on_domain_boundary, between_elements, ELE, GI, SCVDETWEI, CVNORMX_ALL, XC_ALL, X_NOD, X_NODJ) |
|
|
integer, parameter | cv_advection::wic_t_bc_dirichlet = 1 |
|
integer, parameter | cv_advection::wic_t_bc_robin = 2 |
|
integer, parameter | cv_advection::wic_t_bc_diri_adv_and_robin = 3 |
|
integer, parameter | cv_advection::wic_d_bc_dirichlet = 1 |
|
integer, parameter | cv_advection::wic_u_bc_dirichlet = 1 |
|
integer, parameter | cv_advection::wic_u_bc_robin = 2 |
|
integer, parameter | cv_advection::wic_u_bc_diri_adv_and_robin = 3 |
|
integer, parameter | cv_advection::wic_u_bc_dirichlet_inout = 2 |
|
integer, parameter | cv_advection::wic_p_bc_dirichlet = 1 |
|
integer, parameter | cv_advection::wic_p_bc_free = 2 |
|
◆ apply_eno_2_t()
subroutine cv_assemb::apply_eno_2_t |
( |
real, dimension(:), intent(inout) |
LIMF, |
|
|
real, dimension(:,:), intent(in) |
T_ALL, |
|
|
real, dimension(:,:), intent(in) |
TOLD_ALL, |
|
|
real, dimension(:,:), intent(in) |
FEMT_ALL, |
|
|
real, dimension(:,:), intent(in) |
FEMTOLD_ALL, |
|
|
real, dimension(:), intent(in) |
INCOME, |
|
|
real, dimension(:), intent(in) |
INCOMEOLD, |
|
|
logical, dimension(:,:), intent(in) |
IGOT_T_PACK, |
|
|
integer, intent(in) |
CV_NODI, |
|
|
integer, intent(in) |
CV_NODJ, |
|
|
integer, intent(in) |
X_NODI, |
|
|
integer, intent(in) |
X_NODJ, |
|
|
integer, intent(in) |
CV_ILOC, |
|
|
integer, intent(in) |
CV_JLOC, |
|
|
integer, intent(in) |
ELE, |
|
|
integer, intent(in) |
CV_NONODS, |
|
|
integer, intent(in) |
NDIM, |
|
|
integer, intent(in) |
NPHASE, |
|
|
integer, intent(in) |
CV_NLOC, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, dimension(:), intent(in) |
X_NDGLN, |
|
|
integer, dimension(:), intent(in) |
CV_NDGLN, |
|
|
real, dimension(:,:), intent(in) |
X_ALL, |
|
|
integer, dimension(:,:), intent(in) |
FACE_ELE, |
|
|
integer, intent(in) |
NFACE, |
|
|
logical, intent(in) |
BETWEEN_ELEMENTS, |
|
|
real, dimension(:,:), intent(in) |
SCVFEN, |
|
|
real, dimension(:,:,:), intent(in) |
SCVFENx, |
|
|
integer, intent(in) |
GI, |
|
|
real, dimension(:,:,:), intent(in) |
INV_JAC, |
|
|
real, dimension(:,:), intent(in) |
UGI, |
|
|
logical, intent(in) |
on_domain_boundary |
|
) |
| |
◆ calc_anisotrop_lim_vals()
subroutine calc_anisotrop_lim::calc_anisotrop_lim_vals |
( |
type (multi_matrices), intent(inout) |
Mmat, |
|
|
real, dimension( :, : ), intent(in) |
T_ALL, |
|
|
real, dimension( :, : ), intent(in) |
FEMT_ALL, |
|
|
logical, intent(in) |
USE_FEMT, |
|
|
real, dimension( :, : ), intent(inout) |
TUPWIND_ALL, |
|
|
integer, intent(in) |
NFIELD, |
|
|
integer, intent(in) |
NONODS, |
|
|
integer, intent(in) |
CV_NLOC, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, dimension( : ), intent(in) |
CV_NDGLN, |
|
|
integer, dimension( : ), intent(in) |
SMALL_FINDRM, |
|
|
integer, dimension( : ), intent(in) |
SMALL_COLM, |
|
|
integer, intent(in) |
NSMALL_COLM, |
|
|
integer, dimension( : ), intent(in) |
X_NDGLN, |
|
|
integer, intent(in) |
X_NONODS, |
|
|
integer, intent(in) |
NDIM, |
|
|
real, dimension( :, : ), intent(in) |
X_ALL, |
|
|
real, dimension( ndim, nonods ), intent(in) |
XC_CV_ALL, |
|
|
logical, intent(in) |
use_reflect |
|
) |
| |
◆ calc_anisotrop_lim_vals2()
subroutine calc_anisotrop_lim::calc_anisotrop_lim_vals2 |
( |
type (multi_matrices), intent(inout) |
Mmat, |
|
|
real, dimension( :,: ), intent(in) |
T_ALL, |
|
|
real, dimension( :,: ), intent(in) |
FEMT_ALL, |
|
|
logical, intent(in) |
USE_FEMT, |
|
|
real, dimension( :,: ), intent(inout) |
TUPWIND_ALL, |
|
|
integer, intent(in) |
NFIELD, |
|
|
integer, intent(in) |
NONODS, |
|
|
integer, intent(in) |
NLOC, |
|
|
integer, intent(in) |
NGI, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, dimension( : ), intent(in) |
NDGLNO, |
|
|
integer, dimension( : ), intent(in) |
FINDRM, |
|
|
integer, dimension( : ), intent(in) |
COLM, |
|
|
integer, intent(in) |
NCOLM, |
|
|
integer, dimension( : ), intent(in) |
X_NDGLN, |
|
|
integer, intent(in) |
X_NONODS, |
|
|
integer, intent(in) |
NDIM, |
|
|
real, dimension(:,:), intent(in) |
X_ALL, |
|
|
real, dimension( :, : ), intent(in) |
XC_CV_ALL, |
|
|
real, dimension(:,:), intent(in) |
N, |
|
|
real, dimension(:,:,:), intent(in) |
NLX_ALL, |
|
|
real, dimension(:), intent(in) |
WEIGHT, |
|
|
logical, intent(in) |
use_reflect |
|
) |
| |
◆ calc_limit_matrix_max_min()
subroutine isotropic_limiter_all::calc_limit_matrix_max_min |
( |
real, dimension( :, : ), intent(inout) |
TMAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
TMIN_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
DENMAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
DENMIN_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
T2MAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
T2MIN_ALL, |
|
|
real, dimension( :, : ), intent(in) |
T_ALL, |
|
|
real, dimension( :, :), intent(in) |
T2_ALL, |
|
|
real, dimension( :, : ), intent(in) |
DEN_ALL, |
|
|
integer, intent(in) |
IGOT_T2, |
|
|
integer, intent(in) |
NPHASE, |
|
|
integer, intent(in) |
CV_NONODS, |
|
|
integer, dimension( :, : ), intent(inout) |
TMIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
TMAX_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
T2MIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
T2MAX_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
DENMIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
DENMAX_NOD_ALL, |
|
|
integer, intent(in) |
NSMALL_COLM, |
|
|
integer, dimension( : ), intent(in) |
SMALL_FINDRM, |
|
|
integer, dimension( : ), intent(in) |
SMALL_COLM, |
|
|
real, dimension( :, : ), intent(inout) |
TUPWIND_MAT_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
DENUPWIND_MAT_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
T2UPWIND_MAT_ALL, |
|
|
real, dimension( : ), intent(in) |
MASS_CV |
|
) |
| |
Populate limiting matrix based on max and min values For each node, find the largest and smallest value of T and DENSITY for both the current and previous timestep, out of the node value and all its surrounding nodes including Dirichlet b.c's.
◆ conv_quad_to_lin_tri_tet()
subroutine calc_anisotrop_lim::conv_quad_to_lin_tri_tet |
( |
integer, dimension(sub_lin_totele*nloc_lin), intent(inout) |
ndgln_p2top1, |
|
|
integer, intent(in) |
nloc_lin, |
|
|
integer, intent(in) |
cv_nloc, |
|
|
integer, intent(in) |
sub_lin_totele |
|
) |
| |
convert quadratic element into a series of linear elements...
◆ dump_multiphase()
subroutine cv_assemb::dump_multiphase |
( |
character(len=*), intent(in) |
prefix, |
|
|
integer, optional |
icp |
|
) |
| |
◆ face_theta_many()
subroutine cv_assemb::face_theta_many |
( |
real, dimension(final_phase) |
FTHETA, |
|
|
logical, intent(in) |
INTERFACE_TRACK, |
|
|
real, dimension( final_phase ), intent(in) |
T_NODJ_IPHA, |
|
|
real, dimension( final_phase ), intent(in) |
T_NODI_IPHA, |
|
|
real, dimension( final_phase ), intent(in) |
TOLD_NODJ_IPHA, |
|
|
real, dimension( final_phase ), intent(in) |
TOLD_NODI_IPHA |
|
) |
| |
◆ finptsstore()
subroutine calc_anisotrop_lim::finptsstore |
( |
real, dimension(:,:), intent(in) |
PSI_ALL, |
|
|
real, dimension(:,:), intent(in) |
FEMPSI_ALL, |
|
|
logical, intent(in) |
USE_FEMPSI, |
|
|
integer, intent(in) |
NFIELD, |
|
|
integer, intent(in) |
NONODS, |
|
|
integer, intent(in) |
NLOC, |
|
|
integer, intent(in) |
NGI, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, dimension(:), intent(in) |
NDGLNO, |
|
|
real, dimension(:,:), intent(inout) |
MATPSI_ALL, |
|
|
integer, dimension(:), intent(in) |
FINDRM, |
|
|
integer, dimension(:), intent(in) |
COLM, |
|
|
integer, intent(in) |
NCOLM, |
|
|
integer, intent(in) |
NDIM, |
|
|
integer, dimension(:), intent(in) |
X_NDGLN, |
|
|
integer, intent(in) |
X_NONODS, |
|
|
real, dimension(:,:), intent(in) |
X_ALL, |
|
|
real, dimension( :, : ), intent(in) |
XC_CV_ALL, |
|
|
real, dimension(:,:), intent(in) |
N, |
|
|
real, dimension(:, :,:), intent(in) |
NLX_ALL, |
|
|
real, dimension(:), intent(in) |
WEIGHT, |
|
|
integer, dimension(:), intent(in) |
FINDELE, |
|
|
integer, dimension(:), intent(in) |
COLELE, |
|
|
integer, intent(in) |
NCOLEL, |
|
|
integer, dimension(:), intent(inout) |
ELEMATPSI, |
|
|
real, dimension(:), intent(inout) |
ELEMATWEI, |
|
|
integer, intent(in) |
IGETSTOR, |
|
|
logical |
BOUND, |
|
|
logical |
REFLECT |
|
) |
| |
This sub finds the matrix values MATPSI for a given point on the stencil IF IGETSTOR=1 then get ELEMATPSI,ELEMATWEI.
◆ get_diff_coef_divdx()
real function generate_laplacian_system::get_diff_coef_divdx |
( |
integer, intent(in) |
intface_type, |
|
|
real, intent(in) |
HDC, |
|
|
real, intent(in) |
W_i, |
|
|
real, intent(in) |
W_j, |
|
|
real, intent(in) |
Value_i, |
|
|
real, intent(in) |
Value_j, |
|
|
real, intent(in), optional |
sigma_i, |
|
|
real, intent(in), optional |
sigma_j |
|
) |
| |
: Computes the effective value of K or sigma. at the interface between CVs Based on the intface_type integer: 0 = no interpolation; 1 Harmonic mean; !20 for SelfPotential solver, harmonic mean considering charge; negative normal mean
◆ get_int_t_den_new()
subroutine cv_assemb::get_int_t_den_new |
( |
real, dimension ( nfield), intent(inout) |
LIMF | ) |
|
Computes the flux between CVs.
- Author
- Chris Pain, Pablo Salinas
◆ get_int_vel_orig_new()
subroutine cv_assemb::get_int_vel_orig_new |
( |
real, dimension( : ), intent(inout) |
NDOTQNEW, |
|
|
real, dimension( : ), intent(inout) |
NDOTQ, |
|
|
real, dimension( : ), intent(inout) |
INCOME, |
|
|
real, dimension( : ), intent(in) |
LOC_T_I, |
|
|
real, dimension( : ), intent(in) |
LOC_T_J, |
|
|
real, dimension( : ), intent(in) |
LOC_DEN_I, |
|
|
real, dimension( : ), intent(in) |
LOC_DEN_J, |
|
|
real, dimension( :, :, : ), intent(in) |
LOC_NU, |
|
|
real, dimension( :, :, : ), intent(in) |
LOC2_NU, |
|
|
real, dimension( :, : ), intent(inout) |
NUGI_ALL, |
|
|
real, dimension( :, :, : ), intent(inout) |
UGI_COEF_ELE_ALL, |
|
|
real, dimension( :, :, : ), intent(inout) |
UGI_COEF_ELE2_ALL, |
|
|
logical, intent(in) |
not_OLD_VEL |
|
) |
| |
Computes the flux between CVs.
- Author
- Chris Pain, Pablo Salinas, Lluis Via-Estrem, Asiri Obeysekara
◆ get_int_vel_porous_vel()
subroutine cv_assemb::get_int_vel_porous_vel |
( |
real, dimension( : ), intent(inout) |
NDOTQNEW, |
|
|
real, dimension( : ), intent(inout) |
NDOTQ, |
|
|
real, dimension( : ), intent(inout) |
INCOME, |
|
|
real, dimension( : ), intent(in) |
LOC_T_I, |
|
|
real, dimension( : ), intent(in) |
LOC_T_J, |
|
|
real, dimension( :, : ), intent(in) |
LOC_FEMT, |
|
|
real, dimension( :, :, : ), intent(in) |
LOC_NU, |
|
|
real, dimension( :, :, : ), intent(in) |
LOC2_NU, |
|
|
real, dimension( :, :, : ), intent(in) |
SLOC_NU, |
|
|
real, dimension( :, :, : ), intent(inout) |
UGI_COEF_ELE_ALL, |
|
|
real, dimension( :, :, : ), intent(inout) |
UGI_COEF_ELE2_ALL, |
|
|
real, dimension( : ), intent(in) |
I_adv_coef, |
|
|
real, dimension( : ), intent(in) |
I_adv_coef_grad, |
|
|
real, dimension( : ), intent(in) |
J_adv_coef, |
|
|
real, dimension( : ), intent(in) |
J_adv_coef_grad, |
|
|
real, dimension( : ), intent(in) |
I_inv_adv_coef, |
|
|
real, dimension( : ), intent(in) |
J_inv_adv_coef, |
|
|
real, dimension( :, : ), intent(inout) |
UDGI_ALL, |
|
|
real, intent(in) |
MASS_CV_I, |
|
|
real, intent(in) |
MASS_CV_J, |
|
|
real, dimension( : ), intent(in) |
TUPWIND_IN, |
|
|
real, dimension( : ), intent(in) |
TUPWIND_OUT, |
|
|
logical, intent(in) |
not_OLD_VEL |
|
) |
| |
Computes the flux between CVs for porous media. NDOTQNEW contains the fluxes for a given gauss integration point.
- Author
- Chris Pain, Pablo Salinas
◆ get_neigbouring_lists()
subroutine cv_assemb::get_neigbouring_lists |
( |
integer, dimension(:), intent(inout) |
JCOUNT_KLOC, |
|
|
integer, dimension(:), intent(inout) |
ICOUNT_KLOC, |
|
|
integer, dimension(:), intent(inout) |
JCOUNT_KLOC2, |
|
|
integer, dimension(:), intent(inout) |
ICOUNT_KLOC2, |
|
|
integer, dimension(:), intent(inout) |
C_JCOUNT_KLOC, |
|
|
integer, dimension(:), intent(inout) |
C_ICOUNT_KLOC, |
|
|
integer, dimension(:), intent(inout) |
C_JCOUNT_KLOC2, |
|
|
integer, dimension(:), intent(inout) |
C_ICOUNT_KLOC2 |
|
) |
| |
◆ getstoreelewei()
subroutine calc_anisotrop_lim::getstoreelewei |
( |
real, dimension(:,:), intent(in) |
PSI_ALL, |
|
|
integer, intent(in) |
NFIELD, |
|
|
integer, intent(in) |
NONODS, |
|
|
integer, intent(in) |
NLOC, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, dimension(totele*nloc), intent(in) |
NDGLNO, |
|
|
real, dimension(:,:), intent(inout) |
MATPSI_ALL, |
|
|
integer, dimension(:), intent(in) |
FINDRM, |
|
|
integer, dimension(:), intent(in) |
COLM, |
|
|
integer, intent(in) |
NCOLM, |
|
|
logical |
BOUND, |
|
|
integer, dimension(:), intent(in) |
ELEMATPSI, |
|
|
real, dimension(ncolm*nloc), intent(in) |
ELEMATWEI |
|
) |
| |
use the stored interpolation coeffs to caclulate MATPSI. This sub finds the matrix values MATPSI for a given point on the stencil
◆ has_anisotropic_diffusion()
logical function cv_assemb::has_anisotropic_diffusion |
( |
type(tensor_field), intent(in) |
tracer | ) |
|
◆ i_pack_loc()
subroutine pack_loc_all3::i_pack_loc |
( |
integer, dimension(:), intent(inout) |
LOC_F, |
|
|
integer, dimension(nphase), intent(in) |
T_ALL, |
|
|
integer, intent(in) |
NPHASE, |
|
|
integer, intent(inout) |
IPT, |
|
|
logical, dimension(nphase), intent(in) |
IGOT_T_PACK |
|
) |
| |
If PACK then pack T_ALL into LOC_F as long at IGOT_T==1 and STORE and not already in storage.
◆ introduce_c_cv_boundary_conditions()
subroutine put_in_ct_rhs::introduce_c_cv_boundary_conditions |
( |
real, dimension(:,:,:), intent(out) |
Bound_ele_correct | ) |
|
This subroutine populates Bound_ele_correct and Bound_ele2_correct to properly apply the BCs when creating the MmatC_CV matrix.
◆ mass_conservation_check_and_outfluxes()
subroutine cv_assemb::mass_conservation_check_and_outfluxes |
( |
real, dimension(:,:), intent(inout) |
calculate_mass_delta, |
|
|
type (multi_outfluxes), intent(inout) |
outfluxes, |
|
|
real, dimension( :, : ), intent(in) |
DEN_ALL, |
|
|
integer, intent(in) |
flag |
|
) |
| |
◆ matptsstore()
subroutine calc_anisotrop_lim::matptsstore |
( |
real, dimension(:,:), intent(inout) |
MATPSI_ALL, |
|
|
integer, intent(in) |
COUNT, |
|
|
integer, intent(in) |
NFIELD, |
|
|
integer, intent(in) |
NOD, |
|
|
integer, intent(in) |
XNOD, |
|
|
real, dimension(:,:), intent(in) |
PSI_ALL, |
|
|
real, dimension(:,:), intent(in) |
FEMPSI_ALL, |
|
|
logical, intent(in) |
USE_FEMPSI, |
|
|
integer, intent(in) |
NONODS, |
|
|
integer, intent(in) |
X_NONODS, |
|
|
integer, intent(in) |
NLOC, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, dimension(nloc*totele), intent(in) |
X_NDGLN, |
|
|
integer, dimension(nloc*totele), intent(in) |
NDGLNO, |
|
|
real, dimension(:) |
X1_ALL, |
|
|
real, dimension(:) |
X2_ALL, |
|
|
real, dimension(:) |
NORMX1_ALL, |
|
|
real, dimension(:,:), intent(in) |
X_ALL, |
|
|
integer, dimension(x_nonods+1), intent(in) |
FINDELE, |
|
|
integer, dimension(ncolel), intent(in) |
COLELE, |
|
|
integer, intent(in) |
NCOLEL, |
|
|
real, dimension(:, :), intent(in) |
MINPSI, |
|
|
real, dimension(:, :), intent(in) |
MAXPSI, |
|
|
integer, intent(inout) |
ELEWIC, |
|
|
real, dimension(nloc), intent(inout) |
LOCCORDSK, |
|
|
logical, intent(in) |
BOUND, |
|
|
logical, intent(in) |
REFLECT, |
|
|
integer, intent(in) |
NDIM |
|
) |
| |
This sub calculates the value of PSI that would be at the other side of the stencil if we had a linear variation and within a single element. IF BOUND then make locally bounded.
◆ minmaxelewic()
subroutine calc_anisotrop_lim::minmaxelewic |
( |
real, dimension(:,:), intent(in) |
PSI_ALL, |
|
|
integer, intent(in) |
NONODS, |
|
|
integer, intent(in) |
NLOC, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, dimension(totele*nloc), intent(in) |
NDGLNO, |
|
|
integer, dimension(nonods+1), intent(in) |
FINDRM, |
|
|
integer, dimension(ncolm), intent(in) |
COLM, |
|
|
integer, intent(in) |
NCOLM, |
|
|
real, dimension(:,:), intent(inout) |
MINPSI, |
|
|
real, dimension(:,:), intent(inout) |
MAXPSI |
|
) |
| |
This sub calculates the max and min values of PSI in local vacinity of an element.
◆ philnodele()
subroutine calc_anisotrop_lim::philnodele |
( |
integer, intent(in) |
NONODS, |
|
|
integer, dimension( : ), intent(inout) |
FINDELE, |
|
|
integer, dimension( : ), intent(inout) |
COLELE, |
|
|
integer, intent(inout) |
NCOLEL, |
|
|
integer, intent(in) |
MXNCOLEL, |
|
|
integer, intent(in) |
TOTELE, |
|
|
integer, intent(in) |
NLOC, |
|
|
integer, dimension( : ), intent(in) |
NDGLNO, |
|
|
integer, dimension( : ), intent(inout) |
NLIST, |
|
|
integer, dimension( : ), intent(inout) |
INLIST |
|
) |
| |
This sub calculates the node to element list FINDELE,COLELE.
Note NLIST and INLIST are only used locally but are passed down from parent routine where they are dynamically allocated.
INPUTS:
NDGLNO - List of global node numbers
OUTPUTS:
COLELE - This is a list of the element numbers that each node belongs to. So it lists all elements for node 1, then all elements for node 2, and so on... FINDELE - is the pointer to the place in COLELE that gives the first element associated with a given global node
Called from subroutines IFINPTS and FINPTS, which are subroutines of CONSTRUCT_ADVECTION_DIFFUSION_CV
◆ surro_cv_minmax()
subroutine isotropic_limiter_all::surro_cv_minmax |
( |
real, dimension( :, : ), intent(inout) |
TMAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
TMIN_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
TOLDMAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
TOLDMIN_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
DENMAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
DENMIN_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
DENOLDMAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
DENOLDMIN_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
T2MAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
T2MIN_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
T2OLDMAX_ALL, |
|
|
real, dimension( :, : ), intent(inout) |
T2OLDMIN_ALL, |
|
|
real, dimension( :, : ), intent(in) |
T_ALL, |
|
|
real, dimension( :, : ), intent(in) |
TOLD_ALL, |
|
|
real, dimension( :, : ), intent(in) |
T2_ALL, |
|
|
real, dimension( :, : ), intent(in) |
T2OLD_ALL, |
|
|
real, dimension( :, : ), intent(in) |
DEN_ALL, |
|
|
real, dimension( :, : ), intent(in) |
DENOLD_ALL, |
|
|
integer, intent(in) |
IGOT_T2, |
|
|
integer, intent(in) |
NPHASE, |
|
|
integer, intent(in) |
CV_NONODS, |
|
|
integer, dimension( : ), intent(in) |
FINACV, |
|
|
integer, dimension( : ), intent(in), target |
COLACV, |
|
|
integer, intent(in) |
STOTEL, |
|
|
integer, intent(in) |
CV_SNLOC, |
|
|
integer, dimension( : ), intent(in) |
CV_SNDGLN, |
|
|
real, dimension( :, :, : ), intent(in) |
SUF_T_BC_ALL, |
|
|
real, dimension( :, :, : ), intent(in), pointer |
SUF_T2_BC_ALL, |
|
|
real, dimension( :, :, : ), intent(in) |
SUF_D_BC_ALL, |
|
|
integer, dimension( : , : , : ), intent(in) |
WIC_T_BC_ALL, |
|
|
integer, dimension( : , : , : ), intent(in) |
WIC_T2_BC_ALL, |
|
|
integer, dimension( : , : , : ), intent(in) |
WIC_D_BC_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
TMIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
TMAX_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
TOLDMIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
TOLDMAX_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
T2MIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
T2MAX_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
T2OLDMIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
T2OLDMAX_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
DENMIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
DENMAX_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
DENOLDMIN_NOD_ALL, |
|
|
integer, dimension( :, : ), intent(inout) |
DENOLDMAX_NOD_ALL |
|
) |
| |
For each node, find the largest and smallest value of T and DENSITY for both the current and previous timestep, out of the node value and all its surrounding nodes including Dirichlet b.c's.
◆ tri_tet_loccords()
subroutine cv_assemb::tri_tet_loccords |
( |
real, dimension(ndim), intent(in) |
Xpt, |
|
|
real, dimension(ndim+1), intent(inout) |
LOCCORDS, |
|
|
real, dimension(ndim,cv_nloc), intent(in) |
X_CORNERS_ALL, |
|
|
integer, intent(in) |
NDIM, |
|
|
integer, intent(in) |
CV_NLOC |
|
) |
| |
subroutine calc_stress_ten(STRESS_IJ, ZERO_OR_TWO_THIRDS, NDIM, UFENX_ILOC, UFENX_JLOC, TEN_XX, TEN_VOL)
determine stress form of viscocity...
Definition: cv-adv-dif.F90:5198
subroutine getselectedoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:576
subroutine calculate_porousmedia_absorptionterms(nphase, state, packed_state, PorousMedia_absorp, Mdims, CV_funs, CV_GIdims, Mspars, ndgln, upwnd, suf_sig_diagten_bc)
: Here we compute the absorption for porous media This is the sigma term defined in the papers and co...
Definition: multi_eos.F90:854
subroutine cv_fem_shape_funs(shape_fun, Mdims, GIdims, cv_ele_type, QUAD_OVER_WHOLE_ELE)
This subrt defines the sub-control volume and FEM shape functions. Shape functions associated with vo...
Definition: multi_shape_fct.F90:102
subroutine fv_1d_quad(SCVNGI, CV_NLOC, SCVFEN, SCVFENSLX, SCVFENSLY, SCVFEWEIGH, SCVFENLX, SCVFENLY, SCVFENLZ)
this subroutine generates the FE basis functions, weights and the derivatives of the shape functions ...
Definition: multi_shape_fct.F90:757
subroutine getlogfilename(id, fname)
Definition: IPhreeqc_interface.F90:360
Comprises all the absorption terms that migth be required.
Definition: multi_data_types.F90:400
subroutine get_sparsity_patterns(state, Mdims, Mspars, ndgln, Mdisopt, mx_ncolacv, mx_ncoldgm_pha, mx_nct, mx_nc, mx_ncolcmc, mx_ncolm, mx_ncolph, mx_nface_p1)
Allocate and obtain the sparsity patterns of the two types of matricies for (momentum + cty) and for ...
Definition: multi_sparsity.F90:1158
type(quad_data) function quad6_gp(i1, i2, i3, i4, i5, i6)
Definition: multi_shape_fct_ND.F90:4036
integer function rm_getkineticreactionsname(id, num, name)
Retrieves an item from the kinetic reactions list. The list includes all kinetic reactions included i...
Definition: RM_interface.F90:1848
integer, parameter wic_t_bc_dirichlet
Definition: cv-adv-dif.F90:73
subroutine calculate_porousmedia_adv_terms(nphase, state, packed_state, PorousMedia_absorp, Mdims, ndgln, upwnd, viscosities)
: Computes the absorption and its derivatives against the saturation
Definition: multi_eos.F90:919
subroutine retrieve_ngi_old(ndim, cv_ele_type, cv_nloc, u_nloc, cv_ngi, cv_ngi_short, scvngi, sbcvngi, nface, QUAD_OVER_WHOLE_ELE)
Obtains the gauss integration numbers given the input parameters use retrieve_ngi instead of this one...
Definition: multi_shape_fct_ND.F90:832
subroutine crossproduct(n, cp, a, b)
Definition: multi_shape_fct_ND.F90:6303
subroutine xprod2(A, B, C)
Perform the cross product of two vectors.
Definition: multi_shape_fct_ND.F90:6594
subroutine get_int_vel_porous_vel(NDOTQNEW, NDOTQ, INCOME, LOC_T_I, LOC_T_J, LOC_FEMT, LOC_NU, LOC2_NU, SLOC_NU, UGI_COEF_ELE_ALL, UGI_COEF_ELE2_ALL, I_adv_coef, I_adv_coef_grad, J_adv_coef, J_adv_coef_grad, I_inv_adv_coef, J_inv_adv_coef, UDGI_ALL, MASS_CV_I, MASS_CV_J, TUPWIND_IN, TUPWIND_OUT, not_OLD_VEL)
Computes the flux between CVs for porous media. NDOTQNEW contains the fluxes for a given gauss integr...
Definition: cv-adv-dif.F90:3011
subroutine xprod1(AX, AY, AZ, BX, BY, BZ, CX, CY, CZ)
Perform the cross product of two vectors.
Definition: multi_shape_fct_ND.F90:6581
: Computes the derivatives of the shape functions and the inverse of the Jacobian
Definition: multi_shape_fct_ND.F90:48
subroutine calc_stress_ten_reduce(STRESS_IJ, ZERO_OR_TWO_THIRDS, NDIM, FEN_TEN_XX, FEN_TEN_VOL, UFENX_JLOC)
determine stress form of viscocity...
Definition: cv-adv-dif.F90:5246
integer function adderror(id, error_msg)
Definition: IPhreeqc_interface.F90:43
subroutine deallocate_multi_field(mfield, and_destroy)
Deallocation of a multi field type.
Definition: multi_data_types.F90:627
integer function rm_getsicount(id)
Returns the number of phases in the initial-phreeqc module for which saturation indices can be calcul...
Definition: RM_interface.F90:2353
subroutine calculate_component_rho(state, packed_state, Mdims)
: Computes the density for the components and the derivatives of the density This is were the action ...
Definition: multi_eos.F90:346
integer function rm_setpressure(id, p)
Set the pressure for each reaction cell. Pressure effects are considered only in three of the databas...
Definition: RM_interface.F90:5126
real function volume_quad_map(cv_iloc, xgi, ygi, zgi, lx, ly, lz)
Compute the cv_iloc^{th} shape function value at point (xgi, ygi, zgi)
Definition: multi_shape_fct_ND.F90:6197
subroutine flip_p_and_v_bcs(Mdims, WIC_P_BC_ALL, pressure_BCs, WIC_FLIP_P_VEL_BCS)
Flip P and V BCs for wells. Implemented for ATES applications or other applications when needing to s...
Definition: multi_dyncore_dg.F90:2329
subroutine, public petsc_stokes_solver(packed_state, Mdims, Mmat, ndgln, Mspars, final_phase, pmat, P_all, deltaP, rhs_p, solver_option_path, Dmat)
In this subroutine the Schur complement is generated and solved using PETSc to update the pressure fi...
Definition: multi_solvers.F90:1164
subroutine smlinngot(A, X, B, NMX, IPIV, GOTDEC)
Calculate the inverse using the LU decomposition L can be provided, speeding up the method to O(n)
Definition: multi_matrix_operations.F90:158
subroutine linearise_field(field_in, field_out)
: <FOR INERTIA ONLY> This sub will linearise a p2 field
Definition: multi_dyncore_dg.F90:7357
integer function rm_findcomponents(id)
Returns the number of items in the list of all elements in the InitialPhreeqc instance....
Definition: RM_interface.F90:570
integer function rm_getsiname(id, num, name)
Retrieves an item from the list of all phases for which saturation indices can be calculated....
Definition: RM_interface.F90:2397
subroutine mass_matrix_inversion(PIVIT_MAT, Mdims, eles_with_pipe)
: Inversion of the mass matrix. If compacted this is much more efficient
Definition: multi_matrix_operations.F90:796
real function sigmoid_function(Y, Y0, Width, LowMag, UpMag)
Width: width of the sigmoid function. The sigmoid function, varies between ( LowMag,...
Definition: multi_compositional.F90:474
subroutine shatri_hex(l1, l2, l3, l4, weight, d3, nloc, ngi, n, nlx, nly, nlz, tri_tet)
Get the shape functions on lines (in 2D) and quadrilateral surfaces in 3D.
Definition: multi_shape_fct_ND.F90:5638
subroutine allocate_global_multiphase_petsc_csr(global_petsc, sparsity, tracer, nphase)
Definition: multi_matrix_operations.F90:1603
integer, parameter wic_t_bc_robin
Definition: cv-adv-dif.F90:73
subroutine minmaxelewic(PSI_ALL, NONODS, NLOC, TOTELE, NDGLNO, FINDRM, COLM, NCOLM, MINPSI, MAXPSI)
This sub calculates the max and min values of PSI in local vacinity of an element.
Definition: cv-adv-dif.F90:6468
integer function rm_setcurrentselectedoutputusernumber(id, n_user)
Select the current selected output by user number. The user may define multiple SELECTED_OUTPUT data ...
Definition: RM_interface.F90:4519
subroutine get_relperm(nphase, iphase, sat, CV_Immobile_fract, Corey_exponent, Endpoint_relperm, Kr)
:Calculates the relative permeability for 1, 2 (Brooks-corey) or 3 (stone's model) phases
Definition: multi_eos.F90:1246
integer function rm_getspeciescount(id)
The number of aqueous species used in the reaction module. This method is intended for use with multi...
Definition: RM_interface.F90:2722
character(len=option_path_len) function get_packed_species_name(PHREEQC_name, old_field)
: Finds the field name in diamond given a name in PHREEQC. Fields have the convention of being named ...
Definition: multi_phreeqc.F90:292
integer function rm_getspeciesz(id, z)
Transfers the charge of each aqueous species to the array argument (z). This method is intended for u...
Definition: RM_interface.F90:3102
subroutine def_spar_ct_dg(CV_NONODS, MX_NCT, NCT, FINDCT, COLCT, TOTELE, CV_NLOC, U_NLOC, U_NDGLN, CV_NDGLN)
define sparsity...
Definition: multi_sparsity.F90:96
subroutine, public get_primary_scalars_new(state, Mdims)
This subroutine extracts all primary variables associated with the mesh from state,...
Definition: Extract_From_State.F90:80
subroutine pack_loc_all1(LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, use_volume_frac_T2, nfield)
This subroutine is for fields that have already size final_phase - 1 Checks if the fields are constan...
Definition: cv-adv-dif.F90:3784
subroutine, public generate_and_solve_laplacian_system(Mdims, state, packed_state, ndgln, Mmat, Mspars, CV_funs, CV_GIdims, Sigma_field, field_name, K_fields, F_fields, intface_val_type, solver_path)
: In this method we assemble and solve the Laplacian system using at least P1 elements The equation s...
Definition: multi_dyncore_dg.F90:8785
subroutine get_cvn_compact_overlapping(cv_ele_type, ndim, cv_ngi, cv_nloc, cvn, cvweigh)
: Calculates the CVN and CVWEIGH shape functions This subroutine is specially created to be used with...
Definition: multi_shape_fct_ND.F90:9982
integer function rm_getmpitasks(id)
Returns the number of MPI processes (tasks) assigned to the reaction module. For the OPENMP version,...
Definition: RM_interface.F90:1931
subroutine unpack_loc_all(LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, IGOT_T_CONST, IGOT_T_CONST_VALUE, use_volume_frac_T2, nfield)
If PACK then UNpack loc_f into T_ALL as long at IGOT_T==1 and STORE and not already in storage....
Definition: cv-adv-dif.F90:3915
integer function getselectedoutputrowcount(id)
Definition: IPhreeqc_interface.F90:660
subroutine deallocate_multi_absorption(multi_absorp, and_destroy)
Deallocation of all of the multi field types within multi_absorp.
Definition: multi_data_types.F90:648
character(len=field_name_len) function, public getfemname(tfield)
: For a given field, retrieve the associated finite element field name
Definition: Extract_From_State.F90:3152
subroutine deallocate_phreeqc(id)
Definition: multi_phreeqc.F90:278
subroutine gaussiloc(FINDGPTS, COLGPTS, NCOLGPTS, NEILOC, NLOC, SVNGI)
This subroutine calculates FINDGPTS,COLGPTS,NCOLGPTS which contains given a local node ILOC the Gauss...
Definition: multi_shape_fct.F90:4274
real function plegen(LX, K)
Definition: multi_shape_fct_ND.F90:9230
integer function rm_getkineticreactionscount(id)
Returns the number of kinetic reactions in the initial-phreeqc module. RM_FindComponents must be call...
Definition: RM_interface.F90:1806
subroutine get_tang_binorm(NX, NY, NZ, T1X, T1Y, T1Z, T2X, T2Y, T2Z, NNODRO)
Definition: multi_shape_fct_ND.F90:4100
subroutine calc_cvn_tritetquadhex(cv_ele_type, totele, cv_nloc, cv_ngi, x_nonods, quad_cv_nloc, x_ndgln, fem_nod, cvn)
Compute CVN (CV basis function) for triangles, tetrahedra, quadrilaterals and hexahedra.
Definition: multi_shape_fct_ND.F90:6086
subroutine generate_laplacian_system(Mdims, packed_state, ndgln, Mmat, Mspars, CV_funs, CV_GIdims, Sigma_field, Solution, K_fields, F_fields, intface_val_type)
: In this method we assemble and solve the Laplacian system using at least P1 elements The equation s...
Definition: cv-adv-dif.F90:7201
subroutine make_bilinear_hexahedra(totele, number_of_hexs, quad_cv_nloc, x_nonods, x, y, z, x_ndgln)
Definition: multi_shape_fct_ND.F90:7678
integer function rm_logmessage(id, str)
Print a message to the log file.
Definition: RM_interface.F90:3973
subroutine run_phreeqc(Mdims, packed_state, id, concetration_phreeqc)
Call PHREEQCRM and compute the reactions of the fields defined associated with the input ID.
Definition: multi_phreeqc.F90:212
subroutine calculate_capillary_pressure(packed_state, NDGLN, totele, cv_nloc, CV_funs)
: In this subroutine the capilalry pressure is computed based on the saturation and the formula used
Definition: multi_eos.F90:1322
subroutine create_bin_msh_file(state)
: We can use fluidity to read an ASCII mesh and generate a binary mesh with ICFERST
Definition: Multiphase_Prototype_Wrapper.F90:1769
integer function rm_abort(id, irm_result, err_str)
Abort the program. irm_result will be interpreted as an IRM_RESULT value and decoded; err_str will be...
Definition: RM_interface.F90:92
integer, parameter wic_u_bc_diri_adv_and_robin
Definition: cv-adv-dif.F90:73
integer function rm_setunitsexchange(id, option)
Sets input units for exchangers. In PHREEQC input, exchangers are defined by moles of exchange sites ...
Definition: RM_interface.F90:5798
subroutine linearise_components()
Definition: Multiphase_TimeLoop.F90:1180
pure real function get_cappressure(sat, Pe, a, CV_Immobile_Fraction, Imbibition_term, iphase)
:This functions returns the capillary pressure for a certain input saturation
Definition: multi_eos.F90:1391
integer function rm_seterroron(id, tf)
Set the property that controls whether error messages are generated and displayed....
Definition: RM_interface.F90:4688
Interface to call XGBoost library C API from fortran.
Definition: xgb_interface.F90:6
subroutine impose_strong_bcs_wells(state, pipes_aux, Mdims, Mmat, ndgln, CMC_petsc, pressure, rhs_p)
: In this subroutine, we modify the CMC matrix and the RHS for the pressure to strongly impose the pr...
Definition: multi_dyncore_dg.F90:8855
subroutine quad_nd_shape(ndim, cv_ele_type, cv_ngi, cv_nloc, u_nloc, cvn, cvweigh, n, nlx, nly, nlz, un, unlx, unly, unlz)
: For quadratic elements: Shape functions associated with volume integration using both CV (CVN) and ...
Definition: multi_shape_fct_ND.F90:2521
integer function getcurrentselectedoutputusernumber(id)
Definition: IPhreeqc_interface.F90:159
subroutine stokes_anderson_acceleration(packed_state, Mdims, Mmat, Mspars, INV_B, rhs_p, ndgln, MASS_ELE, diagonal_A, velocity, P_all, deltap, cmc_petsc, stokes_max_its)
Generic subroutine that perform the Anderson acceleration solver. This is storing a set of results fo...
Definition: multi_dyncore_dg.F90:2157
This type contains all the local to global conversors for the different fields we have.
Definition: multi_data_types.F90:284
subroutine get_int_vel_orig_new(NDOTQNEW, NDOTQ, INCOME, LOC_T_I, LOC_T_J, LOC_DEN_I, LOC_DEN_J, LOC_NU, LOC2_NU, NUGI_ALL, UGI_COEF_ELE_ALL, UGI_COEF_ELE2_ALL, not_OLD_VEL)
Computes the flux between CVs.
Definition: cv-adv-dif.F90:2878
logical new_high_order_vol_quadratic_ele_quadrature
Definition: multi_shape_fct_ND.F90:38
real function diffjwl(A, B, w, R1, R2, E0, roe, ro)
Diff of JWL equation functions.
Definition: multi_eos.F90:2330
subroutine shape_one_ele2(ndim, cv_ele_type, cv_ngi, cv_nloc, u_nloc, cvweight, cvfen, cvfenlx, cvfenly, cvfenlz, ufen, ufenlx, ufenly, ufenlz, sbcvngi, sbcvfen, sbcvfenslx, sbcvfensly, sbcvfeweigh, sbufen, sbufenslx, sbufensly, nface, cv_sloclist, u_sloclist, cv_snloc, u_snloc)
: This subrt defines the sub-control volume and FEM shape functions. Shape functions associated with ...
Definition: multi_shape_fct_ND.F90:7946
subroutine cap_bulk_rho(state, ncomp, nphase, cv_nonods, Density_Component, Density, Density_Cp, compute_rhoCP)
: Computes the bulk density for components and the derivatives of the density
Definition: multi_eos.F90:280
subroutine pack_loc_all2(LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, use_volume_frac_T2, start_phase, final_phase, nodi)
This subrotuine is for fields that are bigger than final_phase - start_phase Checks if the fields are...
Definition: cv-adv-dif.F90:3813
subroutine comb_vel_matrix_diag_dist(DIAG_BIGM_CON, BIGM_CON, DGM_PETSC, FINELE, COLELE, NDIM, NPHASE, U_NLOC, TOTELE, velocity, pressure, Mmat)
: <FOR INERTIA ONLY>This subroutine combines the distributed and block diagonal for an element into t...
Definition: multi_dyncore_dg.F90:7135
integer function rm_screenmessage(id, str)
Print message to the screen.
Definition: RM_interface.F90:4329
integer function rm_getselectedoutputcount(id)
Returns the number of selected-output definitions. RM_SetCurrentSelectedOutputUserNumber determines w...
Definition: RM_interface.F90:2208
subroutine get_simulation_type()
:This subroutine selects the type of simulator to perform and activates the flags from global_paramet...
Definition: Multiphase_Prototype_Wrapper.F90:1791
integer function rm_getfileprefix(id, prefix)
Returns the reaction-module file prefix to the character argument (prefix).
Definition: RM_interface.F90:1270
subroutine tri_tet_loccords(Xpt, LOCCORDS, X_CORNERS_ALL, NDIM, CV_NLOC)
Definition: cv-adv-dif.F90:2525
integer function rm_setprintchemistryon(id, workers, initial_phreeqc, utility)
Setting to enable or disable printing detailed output from reaction calculations to the output file f...
Definition: RM_interface.F90:5246
integer function getselectedoutputcolumncount(id)
Definition: IPhreeqc_interface.F90:544
integer, parameter wic_d_bc_dirichlet
Definition: cv-adv-dif.F90:73
subroutine comb_vel_matrix_diag_dist_lump(DIAG_BIGM_CON, BIGM_CON, DGM_PETSC, FINELE, COLELE, NDIM, NPHASE, U_NLOC, TOTELE, velocity, pressure)
: <FOR INERTIA ONLY>This subroutine combines the distributed and block diagonal for an element into t...
Definition: multi_dyncore_dg.F90:7219
subroutine compute_xndgln_tritetquadhex(cv_ele_type, max_totele, max_x_nonods, quad_cv_nloc, totele, x_nonods, x_ndgln, lx, ly, lz, x, y, z, fem_nod, x_ideal, y_ideal, z_ideal, x_ndgln_ideal)
Get the x_ndgln for the nodes of triangles or tetrahedra.
Definition: multi_shape_fct_ND.F90:3050
real function get_devcappressure(sat, Pe, a, CV_Immobile_Fraction, iphase, nphase)
:This functions returns the derivative of the capillary pressure with respect to the saturation
Definition: multi_eos.F90:1419
subroutine compute_surfaceshapefunctions_triangle_tetrahedron(cv_nloc_cells, cv_ele_type_cells, cv_ele_type, ndim, totele, cv_nloc, scvngi, x_nonods, quad_cv_nloc, x_ndgln, x, y, z, lx, ly, lz, fem_nod, sn, snlx, snly, snlz, sufnlx, sufnly, scvweigh, cv_neiloc_cells, cvfem_neiloc)
: this subroutine calculates shape functions sn, snlx, snly, snlz, sufnlx, sufnly,...
Definition: multi_shape_fct_ND.F90:4164
This type includes the necessary information to choose from the different discretization options avai...
Definition: multi_data_types.F90:114
integer function rm_getspecieslog10gammas(id, species_log10gammas)
Transfer log10 aqueous-species activity coefficients to the array argument (species_log10gammas) This...
Definition: RM_interface.F90:2850
subroutine re3d27(lowqua, ngi, ngi_l, nloc, mloc, m, weight, n, nlx, nly, nlz, l1, l2, l3)
Quadratic variation (3D) for velocity – 27 node brick element. Linear variation (3D) for pressure – 8...
Definition: multi_shape_fct_ND.F90:600
subroutine assemble_global_multiphase_csr(global_csr, block_csr, dense_block_matrix, block_to_global, global_dense_block)
Definition: multi_matrix_operations.F90:1563
real function specfu(DIFF, LXGP, INOD, NDNOD, IPOLY, NODPOS)
INOD contains the node at which the polynomial is associated with LXGP is the position at which the p...
Definition: multi_shape_fct_ND.F90:9162
subroutine cv_assemb(state, packed_state, final_phase, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, tracer, velocity, density, multi_absorp, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, DEN_ALL, DENOLD_ALL, CV_DISOPT, CV_DG_VEL_INT_OPT, DT, CV_THETA, CV_BETA, SUF_SIG_DIAGTEN_BC, DERIV, CV_P, SOURCT_ALL, ABSORBT_ALL, VOLFRA_PORE, GETCV_DISC, GETCT, IGOT_T2, IGOT_THETA_FLUX, GET_THETA_FLUX, USE_THETA_FLUX, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, THETA_GDIFF, MEAN_PORE_CV, MASS_MN_PRES, THERMAL, got_free_surf, MASS_SUF, MASS_ELE_TRANSP, TDIFFUSION, saturation, VAD_parameter, Phase_with_Pc, Courant_number, Permeability_tensor_field, calculate_mass_delta, eles_with_pipe, pipes_aux, porous_heat_coef, porous_heat_coef_old, outfluxes, solving_compositional, nonlinear_iteration, assemble_collapsed_to_one_phase)
This subroutines generates the transport equation for a cv field. It also can generate the Continuity...
Definition: cv-adv-dif.F90:166
Data type storing all the dimensionrs describing the mesh, fields, nodes, etc.
Definition: multi_data_types.F90:76
integer function rm_getselectedoutputcolumncount(id)
Returns the number of columns in the current selected-output definition. RM_SetCurrentSelectedOutputU...
Definition: RM_interface.F90:2162
integer function setoutputstringon(id, output_string_on)
Definition: IPhreeqc_interface.F90:1206
subroutine, public calculate_internal_volume(packed_state, Mdims, mass_ele, calculate_mass, cv_ndgln, DEN_ALL, eles_with_pipe)
: Subroutine to calculate the integrated mass inside the domain
Definition: Extract_From_State.F90:3174
logical function shock_front_in_ele(ele, Mdims, sat, ndgln, Imble_frac)
Detects whether the element has a shockfront or not.
Definition: cv-adv-dif.F90:7155
subroutine matptsstore(MATPSI_ALL, COUNT, NFIELD, NOD, XNOD, PSI_ALL, FEMPSI_ALL, USE_FEMPSI, NONODS, X_NONODS, NLOC, TOTELE, X_NDGLN, NDGLNO, X1_ALL, X2_ALL, NORMX1_ALL, X_ALL, FINDELE, COLELE, NCOLEL, MINPSI, MAXPSI, ELEWIC, LOCCORDSK, BOUND, REFLECT, NDIM)
This sub calculates the value of PSI that would be at the other side of the stencil if we had a linea...
Definition: cv-adv-dif.F90:6672
integer function rm_initialphreeqc2module(id, ic1, ic2, f1)
Transfer solutions and reactants from the InitialPhreeqc instance to the reaction-module workers,...
Definition: RM_interface.F90:3685
integer function rm_getconcentrations(id, c)
Transfer solution concentrations from each reaction cell to the concentration array given in the argu...
Definition: RM_interface.F90:796
subroutine diffus_cal_coeff(DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX, CV_NLOC, MAT_NLOC, NPHASE, MAT_NDGLN, SMATFEN, SCVFEN, GI, NDIM, TDIFFUSION, HDC, T_CV_NODJ, T_CV_NODI, TOLD_CV_NODJ, TOLD_CV_NODI, ELE, ELE2, CVNORMX_ALL, LOC_DTX_ELE_ALL, LOC_DTOLDX_ELE_ALL, LOC2_DTX_ELE_ALL, LOC2_DTOLDX_ELE_ALL, LOC_WIC_T_BC, CV_OTHER_LOC, MAT_OTHER_LOC, CV_SNLOC, CV_SLOC2LOC, on_domain_boundary, between_elements, has_anisotropic_diffusivity)
This sub calculates the effective diffusion coefficientd DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX based on...
Definition: cv-adv-dif.F90:4803
subroutine deallocate_porous_adv_coefs(upwnd)
Deallocates the memory for the advection coefficients for porous media.
Definition: multi_data_types.F90:1607
subroutine mult_multi_field_by_array(mfield, b, inode)
This subroutine performs the multiplication of an array and a multifield and returns the multifield m...
Definition: multi_data_types.F90:938
integer function rm_getexchangespeciesname(id, num, name)
Retrieves an item from the exchange species list. The list of exchange species (such as "NaX") is der...
Definition: RM_interface.F90:1231
subroutine make_qtri(totele, x_nloc, max_x_nonods, x_nonods, x_ndgln, lx, ly, x, y, fem_nod)
Definition: multi_shape_fct_ND.F90:6609
integer function rm_createmapping(id, grid2chem)
Provides a mapping from grid cells in the user's model to reaction cells in PhreeqcRM....
Definition: RM_interface.F90:307
subroutine mass_matrix_matvec(U, BLOCK_MAT, CDP, NDIM, NPHASE, TOTELE, U_NLOC, U_NDGLN)
: U = Mass_matrix * Vector (tipically vector is Grad * P + RHS and this is used to obtain the velocit...
Definition: multi_matrix_operations.F90:878
This module contain all the necessary subroutines to deal with FE-wise equations and fields....
Definition: multi_dyncore_dg.F90:21
subroutine test_xgboost()
Teste the XGBoost coupling.
Definition: multi_machine_learning.F90:155
subroutine memorycleanupinterpolation1()
Definition: multi_interpolation.F90:305
integer(kind=4), parameter tt_string
Definition: IPhreeqc_interface.F90:10
Allocated a multi field type based on field name.
Definition: multi_data_types.F90:41
subroutine cv_fem_shape_funs_old(ndim, cv_ele_type, cv_ngi, cv_ngi_short, cv_nloc, u_nloc, cvn, cvn_short, cvweight, cvfen, cvfenlx, cvfenly, cvfenlz, cvweight_short, cvfen_short, cvfenlx_short, cvfenly_short, cvfenlz_short, ufen, ufenlx, ufenly, ufenlz, scvngi, cv_neiloc, cv_on_face, cvfem_on_face, scvfen, scvfenslx, scvfensly, scvfeweigh, scvfenlx, scvfenly, scvfenlz, sufen, sufenslx, sufensly, sufenlx, sufenly, sufenlz, u_on_face, ufem_on_face, nface, sbcvngi, sbcvn, sbcvfen, sbcvfenslx, sbcvfensly, sbcvfeweigh, sbcvfenlx, sbcvfenly, sbcvfenlz, sbufen, sbufenslx, sbufensly, sbufenlx, sbufenly, sbufenlz, cv_sloclist, u_sloclist, cv_snloc, u_snloc, findgpts, colgpts, ncolgpts, sele_overlap_scale, QUAD_OVER_WHOLE_ELE)
Definition: multi_shape_fct.F90:227
subroutine destroy_multi_matrices(Mmat)
Deallocates and nullifies the memory generated for the matrices, it is to be used after adapting the ...
Definition: multi_data_types.F90:1427
subroutine tr2d(LOWQUA, NGI, NLOC, MLOC, M, WEIGHT, N, NLX, NLY, SNGI, SNLOC, SWEIGH, SN, SNLX)
This subroutine defines the shape functions M and N and their derivatives at the Gauss points For 3-D...
Definition: multi_shape_fct_ND.F90:8255
integer function rm_decodeerror(id, e)
If e is negative, this method prints an error message corresponding to IRM_RESULT e....
Definition: RM_interface.F90:371
integer function rm_getsurfacespeciescount(id)
Returns the number of surface species (such as "Hfo_wOH") in the initial-phreeqc module....
Definition: RM_interface.F90:3257
integer function runfile(id, filename)
Definition: IPhreeqc_interface.F90:861
subroutine unpack_loc(LOC_F, T_ALL, NPHASE, IPT, IGOT_T_PACK, IGOT_T_CONST, IGOT_T_CONST_VALUE)
If PACK then UNpack loc_f into T_ALL as long at IGOT_T==1 and STORE and not already in storage.
Definition: cv-adv-dif.F90:3705
integer function rm_create(nxyz, nthreads)
Creates a reaction module. If the code is compiled with the preprocessor directive USE_OPENMP,...
Definition: RM_interface.F90:259
subroutine proj_u2mat(COMP_DIFFUSION_OPT, Mdims, CV_GIdims, CV_funs, COMP_DIFFUSION, NCOMP_DIFF_COEF, COMP_DIFF_COEF, X_ALL, NU, NV, NW, MAT_NDGLN, U_NDGLN, X_NDGLN, MAT_U)
Determine MAT_U from NU,NV,NW which are variables mapped to material mesh.
Definition: multi_compositional.F90:259
subroutine cv_neighboor_sparsity(Mdims, cv_ele_type, cv_ndgln, x_ndgln, ncolele, finele, colele, ncolm, mxnacv_loc, findm, colm, ncolacv_loc, finacv_loc, colacv_loc, midacv_loc)
Definition: multi_sparsity.F90:1000
subroutine ct_mult_with_c3(DP, U_ALL, U_NONODS, NDIM, NPHASE, C, NCOLC, FINDC, COLC)
: DP = (C)^T U_ALL
Definition: multi_matrix_operations.F90:1425
Sparsity for the Matrices?
Definition: multi_sparsity.F90:1099
logical function getdumpfileon(id)
Definition: IPhreeqc_interface.F90:193
subroutine, public compute_node_global_numbers(state, ndgln)
This subroutine calculates the global node numbers requested to operates in ICFERST.
Definition: Extract_From_State.F90:182
subroutine triloccords2d(Xp, Yp, N1, N2, N3, X1, Y1, X2, Y2, X3, Y3)
Definition: cv-adv-dif.F90:7112
integer, parameter wic_p_bc_dirichlet
Definition: cv-adv-dif.F90:73
double precision function rm_gettime(id)
Returns the current simulation time in seconds. The reaction module does not change the time value,...
Definition: RM_interface.F90:3423
integer function rm_getiphreeqcid(id, i)
Returns an IPhreeqc id for the ith IPhreeqc instance in the reaction module. For the threaded version...
Definition: RM_interface.F90:1765
integer function setlogstringon(id, log_string_on)
Definition: IPhreeqc_interface.F90:1148
subroutine test_quad_tet(cv_nloc, cv_ngi, cvn, n, nlx, nly, nlz, cvweight, x, y, z, x_nonods, x_ndgln2, totele)
test the volumes of idealised triangle
Definition: multi_shape_fct_ND.F90:2973
subroutine oneeletens_all(LOC_X_ALL, LES_DISOPT, ONE_OVER_H2, TENSXX_ALL, X_NLOC, NDIM, MEAN_UDER_U, NPHASE)
REPRESENTS THE SIZE AND SHAPE OF THE SURROUNDING ELEMENTS. LES_DISOPT=LES option.
Definition: multi_dyncore_dg.F90:6816
integer function rm_outputmessage(id, str)
Print a message to the output file.
Definition: RM_interface.F90:4150
Type created to store absorption terms in a compacted way associated subroutines where created to be ...
Definition: multi_data_types.F90:384
integer function rm_getspeciesconcentrations(id, species_conc)
Transfer concentrations of aqueous species to the array argument (species_conc) This method is intend...
Definition: RM_interface.F90:2653
real function cheby1(DIFF, LX, INOD, NDNOD, NODPOS)
If DIFF then returns the spectral function DIFFERENTIATED W.R.T X associated. This function returns t...
Definition: multi_shape_fct_ND.F90:9280
subroutine re2dn9(lowqua, ngi, ngi_l, nloc, mloc, m, weight, n, nlx, nly, l1, l2)
Quadratic variation (2D) for velocity – 9 node brick element. Linear variation (2D) for pressure – 4 ...
Definition: multi_shape_fct_ND.F90:410
subroutine eliminating_repetitive_nodes(totele, x_nloc, x_nonods, over_all, x_ndgln, x, y)
Definition: multi_shape_fct_ND.F90:6943
integer function rm_getgascomppressures(id, gas_p)
Transfer pressures of gas components from each reaction cell to the array given in the argument list ...
Definition: RM_interface.F90:1474
subroutine adding_extra_parametric_nodes(totele, x_nloc, mx_x_nonods, x_ndgln, x, y)
Definition: multi_shape_fct_ND.F90:7079
subroutine conv_quad_to_lin_tri_tet(ndgln_p2top1, nloc_lin, cv_nloc, sub_lin_totele)
convert quadratic element into a series of linear elements...
Definition: cv-adv-dif.F90:6946
subroutine get_rockfluidprop(state, packed_state, Mdims, ndgln, current_time, update_only)
:Gets the relperm max, the relperm exponent and the immobile fractions and stores them into packed st...
Definition: multi_eos.F90:2114
integer(kind=4), parameter ipq_outofmemory
Definition: IPhreeqc_interface.F90:14
subroutine, public get_discretisation_options(state, Mdims, Mdisopt)
: This subroutine extract all discretisation options from the schema DISOPT Options: =0 1st order in ...
Definition: Extract_From_State.F90:469
subroutine fvquad(NGI, NLOC, SVNGI, M, SVN, SVNLX, SVWEIGH)
this routine generates the shape functions associated with the FV's i.e. their surfaces and volume sh...
Definition: multi_shape_fct.F90:840
subroutine getoutputstringline(id, n, line)
Definition: IPhreeqc_interface.F90:510
Required values to compute the fluxes for porous media. Effectively the sigma terms from the papers C...
Definition: multi_data_types.F90:352
subroutine gtroot(IPOLY, IQADRA, WEIT, NODPOS, QUAPOS, NDGI, NDNOD)
This sub returns the weights WEIT the quadrature points QUAPOS and the node points NODPOS....
Definition: multi_shape_fct_ND.F90:9130
subroutine conv_ct2c(cv_nonods, nct, findct, colct, u_nonods, mx_nc, findc, colc)
Definition: multi_sparsity.F90:729
subroutine, public set_saturation_to_sum_one(mdims, packed_state, state, do_not_update_halos)
:This subroutines eliminates the oscillations in the saturation that are bigger than a certain tolera...
Definition: multi_solvers.F90:677
integer function rm_getsurfacetype(id, num, name)
Retrieves the surface site type (such as "Hfo_w") that corresponds with the surface species name....
Definition: RM_interface.F90:3347
subroutine outputerrorstring(id)
Definition: IPhreeqc_interface.F90:813
subroutine scale_multi_field(mfield, a, inode)
This subroutine rescales a multifield mfield = a * mfield.
Definition: multi_data_types.F90:1050
subroutine scvdetnx(Mdims, ndgln, X_ALL, CV_funs, CV_GIdims, on_domain_boundary, between_elements, ELE, GI, SCVDETWEI, CVNORMX_ALL, XC_ALL, X_NOD, X_NODJ)
Definition: cv-adv-dif.F90:7435
subroutine pousinmc2(totele, nloc1, nonods2, nloc2, nimem, ndglno1, ndglno2, lencolm, findrm, colm, centrm)
Definition: multi_sparsity.F90:590
subroutine pha_block_mat_vec_many_reusing(BLOCK_MAT, CDP, NDIM, NPHASE, NBLOCK, TOTELE, U_NLOC, U_NDGLN)
: U = BLOCK_MAT * CDP The difference with PHA_BLOCK_MAT_VEC_MANY is that the input CDP is overwritten...
Definition: multi_matrix_operations.F90:1163
subroutine dgsdetnxloc2(SNLOC, SNGI, XSL, YSL, ZSL, SN, SNLX, SNLY, SWEIGH, SDETWE, SAREA, D1, D3, DCYL, NORMXN, NORMYN, NORMZN, NORMX, NORMY, NORMZ)
Definition: multi_shape_fct_ND.F90:6339
integer function rm_getstartcell(id, sc)
Returns an array with the starting cell numbers from the range of cell numbers assigned to each worke...
Definition: RM_interface.F90:3156
IPHREEQC module from the PHREEQC project, needed to interact with PHREEQCRM.
Definition: IPhreeqc_interface.F90:3
subroutine viscocity_tensor_les_calc(LES_UDIFFUSION, LES_UDIFFUSION_VOL, DUX_ELE_ALL, NDIM, NPHASE, U_NLOC, X_NLOC, TOTELE, X_NONODS, X_ALL, X_NDGLN, MAT_NONODS, MAT_NLOC, MAT_NDGLN, LES_DISOPT, LES_CS, UDEN, CV_NONODS, CV_NDGLN, U_NDGLN, U_NONODS, U_ALL, DERIV)
: <FOR INERTIA ONLY> This subroutine calculates a tensor of viscocity LES_UDIFFUSION,...
Definition: multi_dyncore_dg.F90:6555
subroutine cherot(WEIT, QUAPOS, NDGI, GETNDP)
This computes the weight and points for Chebyshev-Gauss-Lobatto quadrature. See page 67 of:Spectral M...
Definition: multi_shape_fct_ND.F90:9183
integer function rm_setunitssolution(id, option)
Solution concentration units used by the transport model. Options are 1, mg/L; 2 mol/L; or 3,...
Definition: RM_interface.F90:6044
integer function rm_mpiworker(id)
MPI only. Workers (processes with RM_GetMpiMyself > 0) must call RM_MpiWorker to be able to respond t...
Definition: RM_interface.F90:4024
subroutine read_fluid_and_rock_properties_from_csv()
Definition: Multiphase_Prototype_Wrapper.F90:1214
recursive integer function factorial(n)
Calculate n!
Definition: multi_shape_fct_ND.F90:9459
logical function has_anisotropic_diffusion(tracer)
Definition: cv-adv-dif.F90:2588
subroutine calc_kcomp2(cv_nonods, nphase, icomp, KComp_Sigmoid, Satura, K_Comp, max_k, min_k, K_Comp2)
Method to flash components.
Definition: multi_compositional.F90:420
subroutine autocomplete_input_file(nphase, npres, ncomp)
: In this subroutine. We populate the input file elements that are not user-selected in IC_FERST....
Definition: Multiphase_Prototype_Wrapper.F90:1360
real function lagran(diff, lx, inod, ndnod, nodpos)
This return the Lagrange poly assocaited with node INOD at point LX If DIFF then send back the value ...
Definition: multi_shape_fct_ND.F90:2093
subroutine deallocate_multi_dev_shape_funs(DevFuns)
Deallocates the required memory to store the derivatives of the shape functions.
Definition: multi_data_types.F90:1576
Necessary information for perform gauss integration.
Definition: multi_data_types.F90:130
integer function destroyiphreeqc(id)
Definition: IPhreeqc_interface.F90:109
subroutine diffus_cal_coeff_stress_or_tensor(Mdims, DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX, STRESS_FORM, STRESS_FORM_STAB, ZERO_OR_TWO_THIRDS, SBUFEN_REVERSED, SBCVFEN_REVERSED, SBCVNGI, SLOC_UDIFFUSION, SLOC_UDIFFUSION_VOL, SLOC2_UDIFFUSION, SLOC2_UDIFFUSION_VOL, DIFF_GI_ADDED, HDC, U_CV_NODJ_IPHA_ALL, U_CV_NODI_IPHA_ALL, UOLD_CV_NODJ_IPHA_ALL, UOLD_CV_NODI_IPHA_ALL, ELE, ELE2, SNORMXN_ALL, SLOC_DUX_ELE_ALL, SLOC2_DUX_ELE_ALL, SLOC_DUOLDX_ELE_ALL, SLOC2_DUOLDX_ELE_ALL, SELE, WIC_U_BC, WIC_U_BC_DIRICHLET, SIMPLE_DIFF_CALC, DIFF_MIN_FRAC, DIFF_MAX_FRAC)
: <INERTIA ONLY> This sub calculates the effective diffusion coefficientd DIFF_COEF_DIVDX,...
Definition: multi_dyncore_dg.F90:8244
real function triareaf(x1, y1, x2, y2, x3, y3)
Definition: multi_shape_fct_ND.F90:6282
subroutine getlogstringline(id, n, line)
Definition: IPhreeqc_interface.F90:410
subroutine adding_parametric_nodes_hex(ele, ele_hex, totele, number_of_hexs, quad_cv_nloc, x_nonods, x, y, z, x_ndgln)
Definition: multi_shape_fct_ND.F90:7704
subroutine dg_derivs_all2(FEMT, FEMTOLD, DTX_ELE, DTOLDX_ELE, NDIM, NPHASE, TOTELE, CV_NDGLN, XCV_NDGLN, X_NLOC, X_NDGLN, CV_NGI, CV_NLOC, CVWEIGHT, N, NLX, NLY, NLZ, X_N, X_NLX, X_NLY, X_NLZ, X_NONODS, X, Y, Z, NFACE, FACE_ELE, CV_SLOCLIST, X_SLOCLIST, CV_SNLOC, X_SNLOC, WIC_T_BC, SUF_T_BC, SBCVNGI, SBCVFEN, SBWEIGH, X_SBCVFEN, X_SBCVFENSLX, X_SBCVFENSLY, P0Mesh)
Computes the derivatives of vector fields.
Definition: cv-adv-dif.F90:4560
integer function rm_getequilibriumphasesname(id, num, name)
Retrieves an item from the equilibrium phase list. The list includes all phases included in any EQUIL...
Definition: RM_interface.F90:1020
subroutine pack_loc(LOC_F, T_ALL, NPHASE, IPT, IGOT_T_PACK)
Copies memory into the same large array to then perform a projection from CV to FE.
Definition: cv-adv-dif.F90:3682
subroutine set_neiloc_tet(neighbour_list, vertices)
Definition: multi_shape_fct_ND.F90:4077
integer function rm_openfiles(id)
Opens the output and log files. Files are named prefix.chem.txt and prefix.log.txt based on the prefi...
Definition: RM_interface.F90:4101
real function, public inf_norm_scalar_normalised(tracer, reference_tracer, dumping, totally_min_max)
Calculate the inf norm of the normalised field, so the field goes from 0 to 1 It requires as inputs t...
Definition: Extract_From_State.F90:2564
real function cheby2(DIFF, LX, INOD, NDNOD, NODPOS)
If DIFF then returns the spectral function DIFFERENTIATED W.R.T X associated. This function returns t...
Definition: multi_shape_fct_ND.F90:9327
subroutine get_neigbouring_lists(JCOUNT_KLOC, ICOUNT_KLOC, JCOUNT_KLOC2, ICOUNT_KLOC2, C_JCOUNT_KLOC, C_ICOUNT_KLOC, C_JCOUNT_KLOC2, C_ICOUNT_KLOC2)
Definition: cv-adv-dif.F90:3382
integer(kind=4), parameter tt_error
Definition: IPhreeqc_interface.F90:8
subroutine, public tracer_assemble_solve(Tracer_name, state, packed_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, tracer, velocity, density, multi_absorp, DT, SUF_SIG_DIAGTEN_BC, VOLFRA_PORE, IGOT_T2, igot_theta_flux, GET_THETA_FLUX, USE_THETA_FLUX, THETA_GDIFF, eles_with_pipe, pipes_aux, mass_ele_transp, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, icomp, saturation, Permeability_tensor_field, nonlinear_iteration)
Calls to generate and solve the transport equation for n passive tracers defined in diamond as Passiv...
Definition: multi_dyncore_dg.F90:621
integer function rm_geterrorstringlength(id)
Returns the length of the string that contains error messages related to the last call to a PhreeqcRM...
Definition: RM_interface.F90:1106
logical function getselectedoutputstringon(id)
Definition: IPhreeqc_interface.F90:644
logical function getoutputfileon(id)
Definition: IPhreeqc_interface.F90:478
integer function rm_settemperature(id, t)
Set the temperature for each reaction cell. If RM_SetTemperature is not called, worker solutions will...
Definition: RM_interface.F90:5626
subroutine introduce_c_cv_boundary_conditions(Bound_ele_correct)
This subroutine populates Bound_ele_correct and Bound_ele2_correct to properly apply the BCs when cre...
Definition: cv-adv-dif.F90:6062
real function volume_tethex(hexs, x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4)
Definition: multi_shape_fct_ND.F90:9950
subroutine, public scale_petsc_matrix(Mat_petsc)
In this subroutine the matrix is re-scaled based on the formula D^-0.5 * A * D^-0....
Definition: multi_solvers.F90:1106
subroutine form_dgm_pha_sparsity(totele, nphase, u_nloc, u_pha_nonods, ndim, mx_ncoldgm_pha, ncoldgm_pha, coldgm_pha, findgm_pha, middgm_pha, finele, colele, ncolele)
Form the sparsity of the phase coupled DG discretised matrix from the element-wise multi-phase sparsi...
Definition: multi_sparsity.F90:479
integer function rm_getselectedoutputheading(id, icol, heading)
Returns a selected output heading. The number of headings is determined by RM_GetSelectedOutputColumn...
Definition: RM_interface.F90:2257
integer function rm_setporosity(id, por)
Set the porosity for each reaction cell. The volume of water in a reaction cell is the product of the...
Definition: RM_interface.F90:5075
subroutine dg_visc_lin(S_INV_NNX_MAT12, NNX_MAT, NNX_MAT2, NN_MAT, NN_MAT2, U_SNLOC, U_NLOC, SBUFEN_REVERSED, SDETWE, SBCVNGI, SNORMXN_ALL, NDIM, U_SLOC2LOC, U_OTHER_LOC, U_NLOC_EXT, ON_BOUNDARY)
:<FOR INERTIA ONLY> This sub calculates S_INV_NNX_MAT12 which contains NDIM matricies that are used t...
Definition: multi_dyncore_dg.F90:6431
subroutine compositional_assemble_solve(state, packed_state, multicomponent_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, multi_absorp, DT, SUF_SIG_DIAGTEN_BC, GET_THETA_FLUX, USE_THETA_FLUX, THETA_GDIFF, eles_with_pipe, pipes_aux, mass_ele, sum_theta_flux, sum_one_m_theta_flux, sum_theta_flux_j, sum_one_m_theta_flux_j)
:In this subroutine the components are solved for all the phases. Systems for each component are asse...
Definition: multi_dyncore_dg.F90:1397
This module contains all the ICFERST structures and associated subroutines (allocate/deallocate) Use ...
Definition: multi_data_types.F90:20
integer function accumulateline(id, line)
Definition: IPhreeqc_interface.F90:25
subroutine, public duplicate_petsc_matrix(MAT_A, MAT_B)
Definition: multi_solvers.F90:1136
subroutine philnodele(NONODS, FINDELE, COLELE, NCOLEL, MXNCOLEL, TOTELE, NLOC, NDGLNO, NLIST, INLIST)
This sub calculates the node to element list FINDELE,COLELE.
Definition: cv-adv-dif.F90:6891
integer function rm_getspeciesd25(id, diffc)
Transfers diffusion coefficients at 25C to the array argument (diffc). This method is intended for us...
Definition: RM_interface.F90:2776
subroutine geterrorstringline(id, n, line)
Definition: IPhreeqc_interface.F90:326
This type comprises the necessary variables to represent matrices using a CSR structure.
Definition: multi_data_types.F90:245
integer function rm_warningmessage(id, warn_str)
Print a warning message to the screen and the log file.
Definition: RM_interface.F90:6321
integer function rm_setrebalancebycell(id, method)
Set the load-balancing algorithm. PhreeqcRM attempts to rebalance the load of each thread or process ...
Definition: RM_interface.F90:5290
integer function rm_closefiles(id)
Close the output and log files.
Definition: RM_interface.F90:129
subroutine dgsdetnxloc2_all(SNLOC, SNGI, NDIM, XSL_ALL, SN, SNLX, SNLY, SWEIGH, SDETWE, SAREA, NORMXN_ALL, NORMX_ALL)
Definition: multi_shape_fct_ND.F90:6446
subroutine shape_l_q_quad(lowqua, ngi, nloc, mloc, sngi, snloc, smloc, m, mlx, mly, mlz, weight, n, nlx, nly, nlz, sweigh, sn, snlx, snly, sm, smlx, smly, nwicel, d3)
This subrt computes shape functions. For now, let's just define for one element type....
Definition: multi_shape_fct_ND.F90:6129
This module contains all the subroutines to assemble and solve for pipes.
Definition: multi_pipes.F90:19
subroutine, public get_var_from_packed_state(packed_state, FEDensity, OldFEDensity, IteratedFEDensity, Density, OldDensity, IteratedDensity, PhaseVolumeFraction, OldPhaseVolumeFraction, IteratedPhaseVolumeFraction, Velocity, OldVelocity, IteratedVelocity, FEPhaseVolumeFraction, OldFEPhaseVolumeFraction, IteratedFEPhaseVolumeFraction, NonlinearVelocity, OldNonlinearVelocity, IteratedNonlinearVelocity, ComponentDensity, OldComponentDensity, IteratedComponentDensity, ComponentMassFraction, OldComponentMassFraction, Temperature, OldTemperature, IteratedTemperature, FETemperature, OldFETemperature, IteratedFETemperature, IteratedComponentMassFraction, FEComponentDensity, OldFEComponentDensity, IteratedFEComponentDensity, FEComponentMassFraction, OldFEComponentMassFraction, IteratedFEComponentMassFraction, Pressure, FEPressure, OldFEPressure, CVPressure, OldCVPressure, CV_Immobile_Fraction, Coordinate, VelocityCoordinate, PressureCoordinate, MaterialCoordinate, CapPressure, Immobile_fraction, EndPointRelperm, RelpermExponent, Cap_entry_pressure, Cap_exponent, Imbibition_term, Concentration, OldConcentration, IteratedConcentration, FEConcentration, OldFEConcentration, IteratedFEConcentration, Enthalpy, OldEnthalpy, IteratedEnthalpy, FEEnthalpy, OldFEEnthalpy, IteratedFEEnthalpy)
@DEPRECATED: Gets memory from packed state This subroutine returns a pointer to the desired values of...
Definition: Extract_From_State.F90:2737
integer function setdumpfileon(id, dump_on)
Definition: IPhreeqc_interface.F90:992
subroutine pha_block_mat_vec_many2(U, BLOCK_MAT, CDP, U_NONODS, NDIM, NPHASE, NBLOCK, TOTELE, U_NLOC, U_NDGLN)
: U = BLOCK_MAT * CDP
Definition: multi_matrix_operations.F90:1056
subroutine, public boundedsolutioncorrections(state, packed_state, Mdims, CV_funs, small_findrm, small_colm, Field_name, for_sat, min_max_limits)
The sparcity of the local CV connectivity is in: small_findrm, small_colm. ngl_its=max no of global i...
Definition: multi_solvers.F90:83
integer function getselectedoutputcount(id)
Definition: IPhreeqc_interface.F90:560
pure subroutine onvdlim_ano_many(NFIELD, TDLIM, TDCEN, INCOME, ETDNEW_PELE, ETDNEW_PELEOT, XI_LIMIT, TUPWIN, TUPWI2, DENOIN, CTILIN, DENOOU, CTILOU, FTILIN, FTILOU)
This sub calculates the limited face values TDADJ(1...SNGI) from the central difference face values T...
Definition: cv-adv-dif.F90:3620
subroutine ulong_2_uvw(U, V, W, UP, U_NONODS, NDIM, NPHASE)
Definition: multi_matrix_operations.F90:1500
subroutine fvqquad(NGI, NLOC, SVNGI, M, SVN, SVNLX, SVWEIGH)
this routine generates the shape functions associated with the FV's i.e. their surfaces and volume sh...
Definition: multi_shape_fct.F90:1451
subroutine, public multifluids_solvetimeloop(state, dt, nonlinear_iterations, dump_no)
This is the main subroutine from which everything is called. It performs the time-loop and therefore ...
Definition: Multiphase_TimeLoop.F90:126
subroutine exten_sparse_multi_phase_old(nonods, mxnele, finm, colm, nphase, npha_nonods, ncolm_pha, finm_pha, colm_pha, midm_pha)
Extend the sparsity to a multiphase sparsity.
Definition: multi_sparsity.F90:376
subroutine ct_mult2(CV_RHS, U, CV_NONODS, U_NONODS, NDIM, NPHASE, CT, NCOLCT, FINDCT, COLCT)
:CV_RHS=CT*U
Definition: multi_matrix_operations.F90:1248
subroutine solve_and_update_velocity(Mmat, Velocity, CDP_tensor, U_RHS, diagonal_A)
Update velocity by solving the momentum equation for a given pressure, the RHS is formed here If resc...
Definition: multi_dyncore_dg.F90:2431
subroutine ct_dg_sparsity(mx_nface_p1, totele, cv_nloc, u_nloc, cv_nonods, cv_ndgln, u_ndgln, ncolele, finele, colele, mx_nct, nct, findct, colct)
Definition: multi_sparsity.F90:1352
subroutine detnlxr_plus_u2(ELE, X, Y, Z, XONDGL, TOTELE, NONODS, X_NLOC, CV_NLOC, NGI, N, NLX, NLY, NLZ, WEIGHT, DETWEI, RA, VOLUME, D1, D3, DCYL, NX_ALL, U_NLOC, UNLX, UNLY, UNLZ, UNX_ALL)
Subroutine to compute the derivatives of the inputed shape functions.
Definition: multi_shape_fct.F90:4340
integer function setdumpfilename(id, fname)
Definition: IPhreeqc_interface.F90:974
subroutine xgboost_free_model()
Free the loaded XGBoost model from memory.
Definition: multi_machine_learning.F90:140
integer function rm_getselectedoutputrowcount(id)
Returns the number of rows in the current selected-output definition. However, the method is included...
Definition: RM_interface.F90:2314
subroutine, public printcsrmatrix(Matrix, find, col, dim_same_row)
: Subroutine to print CSR matrix by (row, column) Dimensions and phases are printed in different rows...
Definition: Extract_From_State.F90:3037
type(quad_data) function quad_gp(i1, i2, i3)
Definition: multi_shape_fct_ND.F90:3985
subroutine getfinele(totele, nloc, snloc, nonods, ndglno, mx_nface_p1, mxnele, ncolele, finele, colele, midele)
This sub caluculates COLELE the element connectivitiy list in order of faces.
Definition: multi_sparsity.F90:245
subroutine calc_anisotrop_lim_vals(Mmat, T_ALL, FEMT_ALL, USE_FEMT, TUPWIND_ALL, NFIELD, NONODS, CV_NLOC, TOTELE, CV_NDGLN, SMALL_FINDRM, SMALL_COLM, NSMALL_COLM, X_NDGLN, X_NONODS, NDIM, X_ALL, XC_CV_ALL, use_reflect)
Definition: cv-adv-dif.F90:6223
subroutine pha_block_mat_vec2(U, BLOCK_MAT, CDP, NDIM, NPHASE, TOTELE, U_NLOC, U_NDGLN)
:U = BLOCK_MAT * CDP
Definition: multi_matrix_operations.F90:1007
integer function addwarning(id, warn_msg)
Definition: IPhreeqc_interface.F90:61
integer function rm_getgascomponentsname(id, num, name)
Retrieves an item from the gas components list. The list includes all gas components included in any ...
Definition: RM_interface.F90:1356
real, parameter flooding_hmin
Definition: multi_eos.F90:45
subroutine get_massmatrix(ELE, Mdims, DevFuns, Mmat, X_ALL, UFEN_REVERSED)
Here no homogenisation can be performed. NOTE: FOR THE TIME BEING ONLY ROW_SUM IS ACTIVATED HERE,...
Definition: multi_dyncore_dg.F90:3132
subroutine scvfen_2_sbcvfen(cv_nloc, cv_snloc, scvngi, sbcvngi, cv_nloc_cells, cv_snloc_cells, cvfem_on_face, sbcvfen, sbcvfenslx, sbcvfensly, sbcvfenlx, sbcvfenly, sbcvfenlz, sbcvfeweigh, scvfen, scvfenslx, scvfensly, scvfenlx, scvfenly, scvfenlz, scvfeweigh)
Compute SBCVFEN from SCVFEN.
Definition: multi_shape_fct.F90:463
subroutine, public force_bal_cty_assem_solve(state, packed_state, Mdims, CV_GIdims, FE_GIdims, CV_funs, FE_funs, Mspars, ndgln, Mdisopt, Mmat, multi_absorp, upwnd, eles_with_pipe, pipes_aux, velocity, pressure, DT, SUF_SIG_DIAGTEN_BC, V_SOURCE, VOLFRA_PORE, IGOT_THETA_FLUX, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, calculate_mass_delta, outfluxes, pres_its_taken, nonlinear_its, Courant_number)
Calls to generate the Gradient Matrix, the divergence matrix, the momentum matrix and the mass matrix...
Definition: multi_dyncore_dg.F90:1651
subroutine getoverrelaxation_parameter(state, packed_state, Mdims, ndgln, Overrelaxation, Phase_with_Pc, totally_min_max, for_transport)
Overrelaxation has to be alocate before calling this subroutine its size is cv_nonods For more inform...
Definition: multi_dyncore_dg.F90:7520
Time-loop module of IC-FERST. This module contains the time-loop and the non-linear loop....
Definition: Multiphase_TimeLoop.F90:30
integer function loaddatabase(id, filename)
Definition: IPhreeqc_interface.F90:761
type(vector_field) function, public as_packed_vector(tfield)
: This function points a tensor field as a vector field type This is necessary when solving for tenso...
Definition: Extract_From_State.F90:1895
This module contains subroutines to generate the shape functions for multi dimensions.
Definition: multi_shape_fct_ND.F90:2361
integer function setselectedoutputstringon(id, selected_output_string_on)
Definition: IPhreeqc_interface.F90:1264
subroutine mult_inv_mass_vel_vector(Mdims, ndgln, vel_vector, MASS_ELE)
Multiplies the inv of the lumped mass matrix times the vel_vector vel_vector = vel_vector / (mass_ele...
Definition: multi_dyncore_dg.F90:2358
real function, dimension(3) cross4(v1, v2)
Definition: multi_shape_fct_ND.F90:4061
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 * ...
Definition: multi_data_types.F90:866
subroutine jacpre(SINALF, COSALF, P, Q, A, N)
PRE-MULTIPLY matrix A by transpose of Rotation matrix is realised by passing -SINALF down into SINALF...
Definition: multi_dyncore_dg.F90:7079
subroutine calculate_viscosity(state, Mdims, ndgln, Momentum_Diffusion, Momentum_Diffusion2)
: Computes the viscosity effect as a momemtum diffusion, this is zero for porous media
Definition: multi_eos.F90:1828
integer function rm_setselectedoutputon(id, tf)
Setting determines whether selected-output results are available to be retrieved with RM_GetSelectedO...
Definition: RM_interface.F90:5531
subroutine, public impose_connected_bcs(outfluxes, packed_state, Mdims, acctime)
: Using the outfluxes values, it imposes as BC the averaged value of another BC(from within the domai...
Definition: Extract_From_State.F90:3603
subroutine base_order_tet(n, nloc, ngi)
order so that the 1st nodes are on the base of tet for a quadratic tet...
Definition: multi_shape_fct_ND.F90:6050
Type containing everything required to indentify and store which nodes contain a well/pipe.
Definition: multi_data_types.F90:464
integer function rm_getsolidsolutioncomponentsname(id, num, name)
Retrieves an item from the solid solution components list. The list includes all solid solution compo...
Definition: RM_interface.F90:2482
integer function rm_setpartitionuzsolids(id, tf)
Sets the property for partitioning solids between the saturated and unsaturated parts of a partially ...
Definition: RM_interface.F90:5034
subroutine matdmatinv(DMAT, DMATINV, NLOC)
calculate DMATINV
Definition: multi_matrix_operations.F90:56
subroutine calculate_u_source_cv(Mdims, state, packed_state, den, u_source_cv)
: This subroutine computed the gravity effect, i.e. rho * g
Definition: multi_eos.F90:1455
subroutine update_velocity_absorption_coriolis(states, ndim, nphase, velocity_absorption)
:Computes velocity absorption associated to coriolis forces from diamond information
Definition: multi_eos.F90:2016
subroutine color_get_cmc_pha_fast(Mdims, Mspars, ndgln, Mmat, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, CMC_petsc, CMC_PRECON, IGOT_CMC_PRECON, MASS_MN_PRES, MASS_PIPE, MASS_CVFEM2PIPE, MASS_CVFEM2PIPE_TRUE, got_free_surf, MASS_SUF, ndpset, FEM_continuity_equation)
: form pressure matrix CMC using a colouring approach, requires more memory
Definition: multi_matrix_operations.F90:523
subroutine remaping_fields_qtriangles(ele_big, x_nloc_big, totele_big, x_nonods_big, x_ndgln_big, x_big, y_big, x_nonods, x_nloc, totele, x_ndgln, ele_ref, x, y)
Definition: multi_shape_fct_ND.F90:6857
subroutine printoutfunmat(n, m, a)
Definition: multi_shape_fct_ND.F90:6316
integer function setoutputfileon(id, output_on)
Definition: IPhreeqc_interface.F90:1186
logical new_quadratic_ele_quadrature
Definition: multi_shape_fct_ND.F90:39
This module contains subroutines related to the equations of state and other properties such as relat...
Definition: multi_eos.F90:19
subroutine dump_multiphase(prefix, icp)
Definition: cv-adv-dif.F90:2554
integer function getselectedoutputvalue(id, row, col, vtype, dvalue, svalue, slength)
Definition: IPhreeqc_interface.F90:676
subroutine dg_derivs_all1(FEMT, FEMTOLD, DTX_ELE, DTOLDX_ELE, NDIM, NPHASE, NCOMP, TOTELE, CV_NDGLN, XCV_NDGLN, X_NLOC, X_NDGLN, CV_NGI, CV_NLOC, CVWEIGHT, N, NLX, NLY, NLZ, X_N, X_NLX, X_NLY, X_NLZ, X_NONODS, X, Y, Z, NFACE, FACE_ELE, CV_SLOCLIST, X_SLOCLIST, CV_SNLOC, X_SNLOC, WIC_T_BC, SUF_T_BC, SBCVNGI, SBCVFEN, SBWEIGH, X_SBCVFEN, X_SBCVFENSLX, X_SBCVFENSLY, get_gradU, state, P0Mesh)
calculates derivatives of vector fields
Definition: cv-adv-dif.F90:4306
type(vector_field) function, public as_vector(tfield, dim, slice)
: This function points a tensor field as a vector field type This is necessary when solving for tenso...
Definition: Extract_From_State.F90:1864
integer function rm_getcomponent(id, num, comp_name)
Retrieves an item from the reaction-module component list that was generated by calls to RM_FindCompo...
Definition: RM_interface.F90:697
subroutine convert_c_and_ct_mat_to_petsc_format(packed_state, Mdims, Mmat, ndgln, Mspars, NPHASE)
: This subroutine converts the C (gradient) and CT (Divergence) matrices into PETSc format Mainly dev...
Definition: multi_solvers.F90:1259
subroutine for_tens_derivs_ndots(DIFF_STAND_DIVDX_U, N_DOT_DKDU, N_DOT_DKDUOLD, DIFF_GI_ADDED, SLOC_DUX_ELE_ALL, SLOC_DUOLDX_ELE_ALL, SLOC_UDIFFUSION, SLOC_UDIFFUSION_VOL, NDIM_VEL, NDIM, NPHASE, U_SNLOC, CV_SNLOC, SBCVNGI, SBUFEN_REVERSED, SBCVFEN_REVERSED, SNORMXN_ALL, HDC, ZERO_OR_TWO_THIRDS, STRESS_FORM, STRESS_FORM_STAB)
This implements the stress and tensor form of diffusion and calculates a jump conidition....
Definition: multi_dyncore_dg.F90:8463
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.
Definition: multi_data_types.F90:727
subroutine ai_backtracking_parameters(Mdims, ndgln, packed_state, state, courant_number_in, backtrack_par_factor, overrelaxation, res, resold, outer_nonlinear_iteration, for_transport)
Subroutine that calculates the backtrack_par_factor based on Machine Learning. The inputs of the Mach...
Definition: multi_dyncore_dg.F90:8924
subroutine base_order_tri(n, nloc, ngi)
order so that the 1st nodes are on the base for a quadratic triangle...
Definition: multi_shape_fct_ND.F90:6001
subroutine c_mult_many(CDP, DP, CV_NONODS, U_NONODS, NDIM, NPHASE, NBLOCK, C, NCOLC, FINDC, COLC)
: CDP=C*DP
Definition: multi_matrix_operations.F90:1311
subroutine dgsimplnorm(ELE, SILOC2ILOC, NLOC, SNLOC, XONDGL, X, Y, Z, NORMX, NORMY, NORMZ)
Form approximate surface normal (NORMX,NORMY,NORMZ)
Definition: cv-adv-dif.F90:5376
subroutine memorycleanupinterpolation2()
Definition: multi_interpolation.F90:311
integer function rm_runcells(id)
Runs a reaction step for all of the cells in the reaction module. Normally, tranport concentrations a...
Definition: RM_interface.F90:4202
subroutine dgsimplnorm_all(NLOC, SNLOC, NDIM, XL_ALL, XSL_ALL, NORMX_ALL)
Form approximate surface normal (NORMX_ALL(1),NORMX_ALL(2),NORMX_ALL(3))
Definition: cv-adv-dif.F90:5346
subroutine, public retrieve_pipes_coords(state, packed_state, Mdims, ndgln, eles_with_pipe)
: In this subroutine the elements that contain pipes are identified The pipes can either be defined u...
Definition: multi_pipes.F90:2071
: Calculates the derivatives of the shape functions
Definition: multi_shape_fct_ND.F90:42
subroutine generate_pivit_matrix_stokes(Mdims, Mmat, MASS_ELE, diagonal_A)
Generates a lumped mass matrix for Stokes. It can either have also the diagonal of A or not.
Definition: multi_dyncore_dg.F90:2387
integer function setlogfileon(id, log_on)
Definition: IPhreeqc_interface.F90:1128
integer function rm_loaddatabase(id, db_name)
Load a database for all IPhreeqc instances–workers, InitialPhreeqc, and Utility. All definitions of t...
Definition: RM_interface.F90:3933
subroutine xgboost_predict(raw_input, out_result)
Predict using the loaded XGBoost model xgboost_load_model() needs to be run first.
Definition: multi_machine_learning.F90:93
type(state_type) state_new
Definition: multi_interpolation.F90:63
subroutine allocate_multi_pipe_package(pipes, Mdims, Mspars)
Allocates the necessary memory for multi_pipe_package.
Definition: multi_data_types.F90:1622
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 ...
Definition: multi_data_types.F90:802
subroutine calc_anisotrop_lim(Mmat, T_ALL, TOLD_ALL, DEN_ALL, DENOLD_ALL, T2_ALL, T2OLD_ALL, FEMT_ALL, FEMTOLD_ALL, FEMDEN_ALL, FEMDENOLD_ALL, FEMT2_ALL, FEMT2OLD_ALL, USE_FEMT, TUPWIND_MAT_ALL, TOLDUPWIND_MAT_ALL, DENUPWIND_MAT_ALL, DENOLDUPWIND_MAT_ALL, T2UPWIND_MAT_ALL, T2OLDUPWIND_MAT_ALL, IGOT_T2, NPHASE, CV_NONODS, CV_NLOC, TOTELE, CV_NDGLN, SMALL_FINDRM, SMALL_CENTRM, SMALL_COLM, NSMALL_COLM, X_NDGLN, X_NONODS, NDIM, X_ALL, XC_CV_ALL, use_reflect)
For the anisotropic limiting scheme we find the upwind values by interpolation using the subroutine F...
Definition: cv-adv-dif.F90:6137
integer function setdumpstringon(id, dump_string_on)
Definition: IPhreeqc_interface.F90:1012
subroutine update_saturation_flipping(sat_flip, sat, old_Sat)
: This internal subroutine checks the if we are flipping from drainage to imbibition,...
Definition: multi_eos.F90:2299
subroutine use_posinmat_c_store(COUNT, U_INOD, P_JNOD, U_NONODS, FINDC, COLC, NCOLC, IDO_STORE_AC_SPAR_PT, STORED_AC_SPAR_PT, POSINMAT_C_STORE, ELE, U_ILOC, P_JLOC, TOTELE, U_NLOC, P_NLOC)
Used to assemble the C matrix in the ICFERST format.
Definition: multi_dyncore_dg.F90:7305
type(petsc_csr_matrix) function allocate_momentum_matrix(sparsity, velocity)
Definition: multi_matrix_operations.F90:1622
subroutine getversionstring(version)
Definition: IPhreeqc_interface.F90:709
Packs field together to be later on used for high order computations.
Definition: cv-adv-dif.F90:65
subroutine check_sparsity(u_pha_nonods, cv_pha_nonods, u_nonods, cv_nonods, totele, mx_ncolacv, ncolacv, finacv, colacv, midacv, mxnele, ncolele, midele, finele, colele, mx_ncoldgm_pha, ncoldgm_pha, coldgm_pha, findgm_pha, middgm_pha, mx_nct, ncolct, findct, colct, mx_nc, ncolc, findc, colc, mx_ncolcmc, ncolcmc, findcmc, colcmc, midcmc, mx_ncolm, ncolm, findm, colm, midm)
Definition: multi_sparsity.F90:1440
integer function setselectedoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:1226
real function binomial_coefficient(K, L)
Calculate binomial coefficients.
Definition: multi_shape_fct_ND.F90:9245
subroutine james_quadrature_quad_tet(l1, l2, l3, l4, normx, normy, normz, sarea, X_LOC, Y_LOC, Z_LOC, CV_NEILOC, cv_nloc, scvngi)
: the surface quadrature pts in local coord are l1, l2, l3, l4, and the associated normals normx,...
Definition: multi_shape_fct_ND.F90:3715
subroutine populate_multi_state(state)
Definition: Multiphase_Prototype_Wrapper.F90:981
integer function runaccumulated(id)
Definition: IPhreeqc_interface.F90:845
integer function seterrorstringon(id, error_string_on)
Definition: IPhreeqc_interface.F90:1090
subroutine isotropic_limiter_all(T_ALL, TOLD_ALL, T2_ALL, T2OLD_ALL, DEN_ALL, DENOLD_ALL, IGOT_T2, NPHASE, CV_NONODS, nsmall_colm, SMALL_CENTRM, SMALL_FINDRM, SMALL_COLM, STOTEL, CV_SNLOC, CV_SNDGLN, SUF_T_BC_ALL, SUF_T2_BC_ALL, SUF_D_BC_ALL, WIC_T_BC_ALL, WIC_T2_BC_ALL, WIC_D_BC_ALL, MASS_CV, TOLDUPWIND_MAT_ALL, DENOLDUPWIND_MAT_ALL, T2OLDUPWIND_MAT_ALL, TUPWIND_MAT_ALL, DENUPWIND_MAT_ALL, T2UPWIND_MAT_ALL)
Computes the limited values at the interface, not as generic as the anisotropic one and never used ac...
Definition: cv-adv-dif.F90:5433
integer function rm_getsaturation(id, sat_calc)
Returns a vector of saturations (sat_calc) as calculated by the reaction module. Reactions will chang...
Definition: RM_interface.F90:2036
integer function rm_getendcell(id, ec)
Returns an array with the ending cell numbers from the range of cell numbers assigned to each worker.
Definition: RM_interface.F90:922
subroutine flash_gas_dissolution(state, packed_state, Mdims, ndgln)
: subroutine to dissolv phase2 into phase1. Currently only for system for phase 1 = water,...
Definition: multi_eos.F90:2618
Subroutines associated with the CSR storage used in ICFERST.
Definition: multi_sparsity.F90:231
subroutine triquaold(L1, L2, L3, L4, WEIGHT, D3, NGI)
: This sub calculates the local corrds L1, L2, L3, L4 and weights at the quadrature points....
Definition: multi_shape_fct_ND.F90:8587
integer function rm_runfile(id, workers, initial_phreeqc, utility, chem_name)
Run a PHREEQC input file. The first three arguments determine which IPhreeqc instances will run the f...
Definition: RM_interface.F90:4242
subroutine, public get_anderson_acceleration_new_guess(N, M, NewField, History_field, stored_residuals, max_its, prev_small_matrix, restart_now)
This subroutine provides a new guess based on previous updates and residuals. Use this subroutine to ...
Definition: multi_solvers.F90:989
integer function rm_setrebalancefraction(id, f)
Sets the fraction of cells that are transferred among threads or processes when rebalancing....
Definition: RM_interface.F90:5336
subroutine deallocate_projection_matrices(shape_fun)
This subroutine deallocates projection matrices CV2FE & FE2CV stored in shape_fun.
Definition: multi_data_types.F90:1272
real function, public get_convergence_functional(phasevolumefraction, reference_sat, dumping, its)
: We create a potential to optimize F = sum (f**2), so the solution is when this potential reaches a ...
Definition: Extract_From_State.F90:2583
real function tet_vol(a, b, c, d)
Definition: multi_shape_fct_ND.F90:6254
integer function get_nwicel(d3, nloc)
: Provides a number defining the type of element we are dealing with 4,5 Linear tetrahedra,...
Definition: multi_shape_fct_ND.F90:10057
subroutine m2minterpolation(state, packed_state, Mdims, CV_GIdims, CV_funs, small_finacv, small_colacv, flag)
Mehs to mesh interpollation method, in Diamond DG_Galerkin.
Definition: multi_interpolation.F90:69
integer, parameter wic_u_bc_robin
Definition: cv-adv-dif.F90:73
integer function rm_getsurfacespeciesname(id, num, name)
Retrieves an item from the surface species list. The list of surface species (for example,...
Definition: RM_interface.F90:3301
subroutine getselectedoutputstringline(id, n, line)
Definition: IPhreeqc_interface.F90:626
subroutine calculate_componentdiffusionterm(packed_state, Mdims, CV_GIdims, CV_funs, mat_ndgln, u_ndgln, x_ndgln, ncomp_diff_coef, comp_diffusion_opt, comp_diff_coef, comp_diffusion)
Calculate the diffusion coefficient COMP_DIFFUSION for current composition... based on page 136 in Re...
Definition: multi_compositional.F90:187
subroutine, public update_outfluxes(bcs_outfluxes, outfluxes, sele, cv_nodi, suf_area, Vol_flux, Mass_flux, tracer, outfluxes_fields, start_phase, end_phase)
: Updates the outfluxes information based on NDOTQNEW, shape functions and transported fields for a g...
Definition: Extract_From_State.F90:3497
subroutine get_int_t_den_new(LIMF)
Computes the flux between CVs.
Definition: cv-adv-dif.F90:2617
integer function getcomponentcount(id)
Definition: IPhreeqc_interface.F90:125
subroutine density_polynomial(eos_coefs, pressure, temperature, Density_Field)
: Define de density as a polynomial
Definition: multi_eos.F90:776
integer function seterrorfilename(id, fname)
Definition: IPhreeqc_interface.F90:1032
subroutine retrieve_ngi(GIdims, Mdims, cv_ele_type, QUAD_OVER_WHOLE_ELE, scalar_nloc, vector_nloc)
: Computes the number of Gauss integration points and all the necessary information
Definition: multi_shape_fct_ND.F90:1161
integer function rm_getdensity(id, density)
Transfer solution densities from the reaction cells to the array given in the argument list (density)...
Definition: RM_interface.F90:868
real function tcheb(N, XPT, DIFF, DIFF2)
If DIFF then return the n'th Chebyshef polynomial differentiated w.r.t x. If DIFF2 then form the 2'nd...
Definition: multi_shape_fct_ND.F90:9383
subroutine, public volumefraction_assemble_solve(state, packed_state, multicomponent_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, multi_absorp, upwnd, eles_with_pipe, pipes_aux, DT, SUF_SIG_DIAGTEN_BC, V_SOURCE, VOLFRA_PORE, igot_theta_flux, mass_ele_transp, nonlinear_iteration, time_step, SFPI_taken, SFPI_its, Courant_number, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J)
Calls to generate the transport equation for the saturation. Embeded an FPI with backtracking method ...
Definition: multi_dyncore_dg.F90:946
subroutine initialize_multi_outfluxes(outfluxes)
Read in the surface IDs of the boundaries (if any) that you wish to integrate over into the (integer ...
Definition: multi_data_types.F90:1670
real function dg_oscilat_detect(SNDOTQ_KEEP, SNDOTQ2_KEEP, N_DOT_DU, N_DOT_DU2, SINCOME, MASS_ELE, MASS_ELE2)
: <INERTIA ONLY>Determine if we have an oscillation in the normal direction... dg_oscilat_detect=1....
Definition: multi_dyncore_dg.F90:8120
integer function rm_setconcentrations(id, c)
Use the vector of concentrations (c) to set the moles of components in each reaction cell....
Definition: RM_interface.F90:4435
logical function getselectedoutputfileon(id)
Definition: IPhreeqc_interface.F90:594
subroutine eliminating_repetitive_nodes_all(totele, x_nloc, x_nonods, mx_x_nonods, x_ndgln, x, y, z)
Definition: multi_shape_fct_ND.F90:7006
subroutine lroots(QUAPOS, NDGI)
This sub works out the Gauss-Lobatto-Legendre roots.
Definition: multi_shape_fct_ND.F90:9253
subroutine allocate_multi_outfluxes(Mdims, outfluxes)
Initialises memory for outfluxes.
Definition: multi_data_types.F90:1695
integer, parameter wic_t_bc_diri_adv_and_robin
Definition: cv-adv-dif.F90:73
subroutine, public dump_outflux(current_time, itime, outfluxes)
: Subroutine that dumps the total flux at a given timestep across all specified boundaries to a file ...
Definition: Extract_From_State.F90:3375
integer function runstring(id, input)
Definition: IPhreeqc_interface.F90:879
subroutine linearise_multi_field(mfield, Mdims, ndgln)
This subroutine linearises a multifield. i.e. takes it from P2 to P1.
Definition: multi_data_types.F90:1065
Fortran Documentation for the geochemical reaction module PhreeqcRM.
Definition: RM_interface.F90:10
subroutine destroy_multi_outfluxes(outfluxes)
Deallocates the multi_outfluxes field.
Definition: multi_data_types.F90:1746
subroutine set_quad(l, area, normal, quad)
Definition: multi_shape_fct_ND.F90:3963
double precision function rm_gettimestep(id)
Returns the current simulation time step in seconds. This is the time over which kinetic reactions ar...
Definition: RM_interface.F90:3504
integer(kind=4), parameter ipq_badvartype
Definition: IPhreeqc_interface.F90:15
subroutine allocate_multi_ndgln(ndgln, Mdims)
This subroutine allocates the global to local conversors.
Definition: multi_data_types.F90:1403
integer function setbasicfortrancallback(id, fcn)
Definition: IPhreeqc_interface.F90:923
subroutine quad_basis_funs_1d(sngi, snloc, sweigh, sn, snlx)
determine the 1d shape functions sn and its local derivative slnx.
Definition: multi_shape_fct_ND.F90:2316
subroutine calculate_surface_tension_new(state, packed_state, Mdims, Mspars, ndgln, Mdisopt, PLIKE_GRAD_SOU_COEF, PLIKE_GRAD_SOU_GRAD, IPLIKE_GRAD_SOU)
Definition: multi_surface_tension.F90:44
real function jwl(A, B, w, R1, R2, E0, p, roe, ro)
JWL equation functions.
Definition: multi_eos.F90:2319
logical function geterrorstringon(id)
Definition: IPhreeqc_interface.F90:344
subroutine jacobf(N, POLY, PDER, POLYM1, PDERM1, POLYM2, PDERM2, X)
COMPUTES THE JACOBI POLYNOMIAL (POLY) AND ITS DERIVATIVE (PDER) OF DEGREE N AT X.
Definition: multi_shape_fct_ND.F90:9902
subroutine get_relative_permeability(Mdims, saturation, Imble_frac, end_point_relperm, exponent_relperm, relperm)
Definition: multi_dyncore_dg.F90:9437
subroutine include_wells_and_compressibility_into_rhs(Mdims, rhs_p, DIAG_SCALE_PRES, MASS_MN_PRES, MASS_SUF, pipes_aux, DIAG_SCALE_PRES_COUP)
Include in the pressure matrix the compressibility terms (based on taylor expansion series) to ensure...
Definition: multi_dyncore_dg.F90:2592
subroutine allocate_porous_adv_coefs(Mdims, upwnd)
Allocates the memory for the advection coefficients for porous media.
Definition: multi_data_types.F90:1596
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...
Definition: multi_data_types.F90:1285
integer function rm_initialphreeqccell2module(id, n_user, cell_numbers, n_cell)
A cell numbered n_user in the InitialPhreeqc instance is selected to populate a series of cells....
Definition: RM_interface.F90:3881
subroutine, public prepare_absorptions(state, Mdims, multi_absorp)
: Prepares the memory to compute absorption fields
Definition: Extract_From_State.F90:1819
subroutine loc_1st_deriv_xyz_dg_curv(CURV, DISTANCE_FUN, SOL_DERIV_X, SOL_DERIV_Y, SOL_DERIV_Z, NDIM, CV_NDGLN, X_NLOC, X_NDGLN, CV_NGI, CV_NLOC, CVFEN, CVFENX, CVFENY, CVFENZ, X, Y, Z, NFACE, FACE_ELE, CV_SLOCLIST, CV_SNLOC, SBCVNGI, SBCVFEN, SBCVFENSLX, SBCVFENSLY, SBCVFEWEIGH, ELE, DETWEI)
Definition: multi_surface_tension.F90:821
integer function rm_getspeciesname(id, i, name)
Transfers the name of the ith aqueous species to the character argument (name). This method is intend...
Definition: RM_interface.F90:2998
subroutine c_mult2_multi_pres(Mdims, Mspars, Mmat, deltap, CDP_tensor)
: Performs the multiplication CDP_tensor = MmatC * deltap
Definition: multi_matrix_operations.F90:1369
subroutine poscmc(totele, nonods, nimem, nct, findct, colct, ncmc, fincmc, colcmc, midcmc, noinod, presym)
This subroutine forms the matrix operating on the pressure vector. It is found from C1T ML C1 + C2T M...
Definition: multi_sparsity.F90:783
integer function rm_getexchangespeciescount(id)
Returns the number of exchange species in the initial-phreeqc module. RM_FindComponents must be calle...
Definition: RM_interface.F90:1188
subroutine ct_mult(CV_RHS, U, V, W, CV_NONODS, U_NONODS, NDIM, NPHASE, CT, NCOLCT, FINDCT, COLCT)
: CV_RHS=CT*U
Definition: multi_matrix_operations.F90:1215
subroutine, public get_ele_type_new(Mdims, Mdisopt)
: Obtains the element type Mdisoptu_ele_type = Mdisoptcv_ele_type = Mdisoptp_ele_type will flag the d...
Definition: Extract_From_State.F90:370
integer function getdumpstringlinecount(id)
Definition: IPhreeqc_interface.F90:209
subroutine quad_nd_shape_n(cv_ele_type, ndim, cv_ngi, cv_nloc, cvn, cvweigh, n, nlx, nly, nlz, cv_ngi_1d, cv_nloc_1d, cvn_1d, cvweigh_1d, n_1d, nlx_1d)
: For quadatic elements – shape functions associated with volume integration using both CV basis func...
Definition: multi_shape_fct_ND.F90:2608
subroutine initialise_porous_media(Mdims, ndgln, packed_state, state, exit_initialise_porous_media)
: Initialising porous media models Given a free water level (FWL) we simulate capillary gravity equil...
Definition: multi_eos.F90:2409
subroutine triloccords(Xp, Yp, Zp, N1, N2, N3, N4, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4)
Definition: cv-adv-dif.F90:7040
integer function rm_usesolutiondensityvolume(id, tf)
Determines the volume and density to use when converting from the reaction-module concentrations to t...
Definition: RM_interface.F90:6283
subroutine project_velocity_to_affine_space(Mdims, Mmat, Mspars, ndgln, velocity, deltap, cdp_tensor)
Project back the velocity from a non divergent-free space to a divergent free space.
Definition: multi_dyncore_dg.F90:2502
subroutine normgi(NORMXN, NORMYN, NORMZN, DXDLX, DYDLX, DZDLX, DXDLY, DYDLY, DZDLY, NORMX, NORMY, NORMZ)
Calculate the normal at the Gauss pts Perform x-product. N=T1 x T2.
Definition: multi_shape_fct_ND.F90:6554
Performs the cross product of two vectors.
Definition: multi_shape_fct_ND.F90:2367
subroutine calc_sele(ELE, ELE3, SELE, CV_SILOC, CV_ILOC, U_SLOC2LOC, CV_SLOC2LOC, FACE_ELE, gi, CV_funs, Mdims, CV_GIdims, CV_NDGLN, U_NDGLN, CV_SNDGLN, U_SNDGLN)
Calculate surface element, surface control volume: SELE, CV_SILOC, U_SLOC2LOC, CV_SLOC2LOC for a face...
Definition: cv-adv-dif.F90:5787
subroutine, public mod_1d_force_bal_c(STATE, packed_state, Mdims, Mspars, Mmat, ndgln, eles_with_pipe, GET_PIVIT_MAT, WIC_P_BC_ALL, SUF_P_BC_ALL, SIGMA, NU_ALL, U_SOURCE, U_SOURCE_CV, pipes_aux)
: This sub modifies MmatC for 1D pipe modelling. Works on the momentum equation
Definition: multi_pipes.F90:1546
integer function rm_getgascompphi(id, gas_phi)
Transfer fugacity coefficients (phi) of gas components from each reaction cell to the array given in ...
Definition: RM_interface.F90:1541
integer function rm_setgascompmoles(id, gas_moles)
Use the array of concentrations (gas_moles) to set the moles of gas components in each reaction cell.
Definition: RM_interface.F90:4776
integer function rm_speciesconcentrations2module(id, species_conc)
Set solution concentrations in the reaction cells based on the vector of aqueous species concentratio...
Definition: RM_interface.F90:6213
subroutine jacobl(N, ALPHA, BETA, XJAC)
COMPUTES THE GAUSS-LOBATTO COLLOCATION POINTS FOR JACOBI POLYNOMIALS.
Definition: multi_shape_fct_ND.F90:9815
subroutine calculate_suf_sig_diagten_bc(nphase, packed_state, suf_sig_diagten_bc, Mdims, CV_funs, CV_GIdims, Mspars, ndgln, PorousMedia_absorp, state, inv_perm, viscosities)
: Computes the absorption and its derivatives against the saturation on the boundary
Definition: multi_eos.F90:1019
subroutine introduce_grad_rhs_field_term(packed_state, Mdims, Mmat, RHS_field, FE_funs, Devfuns, X_ALL, LOC_U_RHS, ele, cv_ndgln, x_ndgln, ele2, iface, sdetwe, SNORMXN_ALL, U_SLOC2LOC, CV_SLOC2LOC, MAT_OTHER_LOC)
: This subroutine performs and introduces the gradient of a RHS field (Capillary pressure for example...
Definition: multi_dyncore_dg.F90:7441
subroutine getdumpfilename(id, fname)
Definition: IPhreeqc_interface.F90:175
real function exprep(M)
Definition: multi_compositional.F90:494
integer function rm_setunitsssassemblage(id, option)
Set input units for solid-solution assemblages. In PHREEQC, solid solutions are defined by moles of e...
Definition: RM_interface.F90:6097
integer(kind=4), parameter ipq_invalidrow
Definition: IPhreeqc_interface.F90:17
subroutine getcomponent(id, n, comp)
Definition: IPhreeqc_interface.F90:141
subroutine get_material_absorption(nphase, iphase, material_absorption, sat, visc, CV_Immobile_fract, Corey_exponent, Endpoint_relperm)
:Calculates the relative permeability for 1, 2 (Brooks-corey) or 3 (stone's model) phases
Definition: multi_eos.F90:1218
logical function, public have_option_for_any_phase(path, nphase)
: Subroutine to check whether an option is true for any phase in diamond, if any is true it returns t...
Definition: Extract_From_State.F90:3239
subroutine getstoreelewei(PSI_ALL, NFIELD, NONODS, NLOC, TOTELE, NDGLNO, MATPSI_ALL, FINDRM, COLM, NCOLM, BOUND, ELEMATPSI, ELEMATWEI)
use the stored interpolation coeffs to caclulate MATPSI. This sub finds the matrix values MATPSI for ...
Definition: cv-adv-dif.F90:6410
integer function getlogstringlinecount(id)
Definition: IPhreeqc_interface.F90:394
type(quad_data) function sum_gp(q1, q2, q3)
Definition: multi_shape_fct_ND.F90:3975
subroutine calc_cvpres_from_fepres()
Definition: multi_dyncore_dg.F90:2648
subroutine make_qtets(totele, quad_cv_nloc, x_nloc, max_x_nonods, x_nonods, x_ndgln_real, lx, ly, lz, x, y, z, fem_nod, xp2, yp2, zp2, x_ndgln_p2)
This subrt creates the local coordinates and node points for: (a) quadratic tetrahedra of unit volume...
Definition: multi_shape_fct_ND.F90:7209
subroutine surro_cv_minmax(TMAX_ALL, TMIN_ALL, TOLDMAX_ALL, TOLDMIN_ALL, DENMAX_ALL, DENMIN_ALL, DENOLDMAX_ALL, DENOLDMIN_ALL, T2MAX_ALL, T2MIN_ALL, T2OLDMAX_ALL, T2OLDMIN_ALL, T_ALL, TOLD_ALL, T2_ALL, T2OLD_ALL, DEN_ALL, DENOLD_ALL, IGOT_T2, NPHASE, CV_NONODS, FINACV, COLACV, STOTEL, CV_SNLOC, CV_SNDGLN, SUF_T_BC_ALL, SUF_T2_BC_ALL, SUF_D_BC_ALL, WIC_T_BC_ALL, WIC_T2_BC_ALL, WIC_D_BC_ALL, TMIN_NOD_ALL, TMAX_NOD_ALL, TOLDMIN_NOD_ALL, TOLDMAX_NOD_ALL, T2MIN_NOD_ALL, T2MAX_NOD_ALL, T2OLDMIN_NOD_ALL, T2OLDMAX_NOD_ALL, DENMIN_NOD_ALL, DENMAX_NOD_ALL, DENOLDMIN_NOD_ALL, DENOLDMAX_NOD_ALL)
For each node, find the largest and smallest value of T and DENSITY for both the current and previous...
Definition: cv-adv-dif.F90:5513
integer function rm_getexchangename(id, num, name)
Retrieves an item from the exchange name list. RM_FindComponents must be called before RM_GetExchange...
Definition: RM_interface.F90:1148
subroutine get_all_in_mass_matrix(Mdims, Mmat, DIAG_BIGM_CON, LUMP_PIVIT_ON_ALL, LUMP_DIAG_MOM)
WARNING****this is under testing****.
Definition: multi_dyncore_dg.F90:6285
subroutine ct_mult_many(CV_RHS, U, CV_NONODS, U_NONODS, NDIM, NPHASE, NBLOCK, CT, NCOLCT, FINDCT, COLCT)
: CV_RHS = CT * U
Definition: multi_matrix_operations.F90:1272
integer function rm_getselectedoutput(id, so)
Populates an array with values from the current selected-output definition. RM_SetCurrentSelectedOutp...
Definition: RM_interface.F90:2100
integer function rm_setspeciessaveon(id, save_on)
Sets the value of the species-save property. This method enables use of PhreeqcRM with multicomponent...
Definition: RM_interface.F90:5583
subroutine detnlxr_plus_u1(ELE, X_ALL, XONDGL, weight, cvshape, cvshapelx, ushapelx, DevFuns)
Subroutine to compute the derivatives of the inputed shape functions.
Definition: multi_shape_fct.F90:4313
subroutine matinvold(A, N, MAT, B)
: This sub finds the inverse of the matrix A and puts it back in A. MAT, MAT2, X and B are working ve...
Definition: multi_matrix_operations.F90:126
subroutine, public finalise_multistate(packed_state, multiphase_state, multicomponent_state)
: Destrys packed_state and the passed down states
Definition: Extract_From_State.F90:1920
This module contain subroutines to deal with the ICFERST matrices format. This includes MATVECS and M...
Definition: multi_matrix_operations.F90:22
subroutine resize(A, n, copy)
Definition: multi_sparsity.F90:29
subroutine exten_sparse_multi_phase(nonods, mxnele, finm, colm, nphase, npha_nonods, ncolm_pha, finm_pha, colm_pha, midm_pha)
Extend the sparsity to a multiphase sparsity.
Definition: multi_sparsity.F90:425
integer function rm_runstring(id, workers, initial_phreeqc, utility, input_string)
Run a PHREEQC input string. The first three arguments determine which IPhreeqc instances will run the...
Definition: RM_interface.F90:4288
Module to load and call a XGBoost model.
Definition: multi_machine_learning.F90:23
All the subroutines required to handle the connection with PHREEQCRM.
Definition: multi_phreeqc.F90:19
subroutine fvhex(NGI, NLOC, SVNGI, M, SVN, SVNLX, SVNLY, SVWEIGH)
this routine generates the shape functions associated with the FV's i.e. their surfaces and volume sh...
Definition: multi_shape_fct.F90:1024
subroutine, public fpi_backtracking(nphase, Mdims, ndgln, state, packed_state, sat_bak, backtrack_sat, backtrack_par_from_schema, Previous_convergence, satisfactory_convergence, new_backtrack_par, Max_sat_its, its, nonlinear_iteration, useful_sats, res, res_ratio, first_res)
:In this subroutine we applied some corrections and backtrack_par on the saturations obtained from th...
Definition: multi_solvers.F90:333
This data type contains all the sparsities necessary in the multiphase prototype code.
Definition: multi_data_types.F90:262
integer function rm_setunitsgasphase(id, option)
Set input units for gas phases. In PHREEQC input, gas phases are defined by moles of component gases ...
Definition: RM_interface.F90:5851
subroutine surface_tension_wrapper_new(state, packed_state, PLIKE_GRAD_SOU_COEF, PLIKE_GRAD_SOU_GRAD, SUF_TENSION_COEF, ANGLE, VOLUME_FRAC, Mdims, Mspars, ndgln, Mdisopt)
Calculate the surface tension force as a pressure force term: PLIKE_GRAD_SOU_COEF and PLIKE_GRAD_SOU_...
Definition: multi_surface_tension.F90:148
subroutine volnei(NEILOC, FEM_NEILOC, NLOC, SVNGI, CV_ELE_TYPE)
this subroutine calculates NEILOC which is the array containing information given a local node and an...
Definition: multi_shape_fct.F90:2911
Data structure to store all the shape functions to facilitate its movement throughtout the code.
Definition: multi_data_types.F90:176
integer(kind=4), parameter ipq_badinstance
Definition: IPhreeqc_interface.F90:19
integer, parameter wic_u_bc_dirichlet_inout
Definition: cv-adv-dif.F90:73
Contains all the information for generic scalar fields to solve for.
Definition: multi_data_types.F90:413
integer function createiphreeqc()
Definition: IPhreeqc_interface.F90:95
subroutine update_velocity_source(states, Mdims, u_source)
:Computes velocity source from diamond information
Definition: multi_eos.F90:2043
integer function rm_settimeconversion(id, conv_factor)
Set a factor to convert to user time units. Factor times seconds produces user time units.
Definition: RM_interface.F90:5709
subroutine pha_block_mat_vec(U, BLOCK_MAT, CDP, U_NONODS, NDIM, NPHASE, TOTELE, U_NLOC, U_NDGLN)
: performs U = BLOCK_MAT * CDP, where block_mat
Definition: multi_matrix_operations.F90:934
subroutine def_spar(SEMI_BAND_WID, NONODS, MX_NCOLC, NCOLC, CENTC, FINDC, COLC)
define sparsity...
Definition: multi_sparsity.F90:51
subroutine pha_block_mat_vec_many(U, BLOCK_MAT, CDP, NDIM, NPHASE, NBLOCK, TOTELE, U_NLOC, U_NDGLN)
: U = BLOCK_MAT * CDP
Definition: multi_matrix_operations.F90:1120
logical function shock_front_in_ele(ele, Mdims, sat, ndgln, Imble_frac)
Definition: multi_dyncore_dg.F90:9498
integer function rm_settimestep(id, time_step)
Set current time step for the reaction module. This is the length of time over which kinetic reaction...
Definition: RM_interface.F90:5745
subroutine, public intenerge_assem_solve(state, packed_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, tracer, velocity, density, multi_absorp, DT, SUF_SIG_DIAGTEN_BC, VOLFRA_PORE, IGOT_T2, igot_theta_flux, GET_THETA_FLUX, USE_THETA_FLUX, THETA_GDIFF, eles_with_pipe, pipes_aux, option_path, mass_ele_transp, thermal, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, icomp, saturation, Permeability_tensor_field, nonlinear_iteration)
Calls to generate the transport equation for the transport of energy/temperature and to solve the tra...
Definition: multi_dyncore_dg.F90:112
subroutine jacdia(AA, V, D, N, A)
find the eigen-vectors V and the eigen values A so that AA=V^T D V & D is diagonal....
Definition: multi_dyncore_dg.F90:6972
subroutine finptsstore(PSI_ALL, FEMPSI_ALL, USE_FEMPSI, NFIELD, NONODS, NLOC, NGI, TOTELE, NDGLNO, MATPSI_ALL, FINDRM, COLM, NCOLM, NDIM, X_NDGLN, X_NONODS, X_ALL, XC_CV_ALL, N, NLX_ALL, WEIGHT, FINDELE, COLELE, NCOLEL, ELEMATPSI, ELEMATWEI, IGETSTOR, BOUND, REFLECT)
This sub finds the matrix values MATPSI for a given point on the stencil IF IGETSTOR=1 then get ELEMA...
Definition: cv-adv-dif.F90:6517
logical function geterrorfileon(id)
Definition: IPhreeqc_interface.F90:278
subroutine, public initialise_saturation_sums_one(mdims, packed_state, find_scapegoat_phase)
:Ensure that the saturations at the beginning sum to one, if they do not all the error is compensated...
Definition: multi_solvers.F90:825
subroutine color_get_cmc_pha(Mdims, Mspars, ndgln, Mmat, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, CMC_petsc, CMC_PRECON, IGOT_CMC_PRECON, MASS_MN_PRES, pipes_aux, got_free_surf, MASS_SUF, FEM_continuity_equation)
:Initialize the momentum equation (CMC) and introduces the corresponding values in it....
Definition: multi_matrix_operations.F90:216
subroutine viscocity_tensor_les_calc_u(LES_U_UDIFFUSION, LES_U_UDIFFUSION_VOL, Q_SCHEME_ABS_CONT_VOL, DUX_ELE_ALL, NDIM, NPHASE, U_NLOC, X_NLOC, TOTELE, X_NONODS, X_ALL, X_NDGLN, LES_DISOPT, CS, U_NDGLN, U_NONODS, U_ALL)
Definition: multi_dyncore_dg.F90:6697
integer function rm_getnthselectedoutputusernumber(id, n)
Returns the user number for the nth selected-output definition. Definitions are sorted by user number...
Definition: RM_interface.F90:1987
This module contains all the necessary subroutines to deal with self Potential in ICFERST.
Definition: multi_self_potential.F90:19
subroutine shape(LOWQUA, NGI, NLOC, MLOC, SNGI, SNLOC, SMLOC, M, MLX, MLY, MLZ, WEIGHT, N, NLX, NLY, NLZ, SWEIGH, SN, SNLX, SNLY, SM, SMLX, SMLY, NWICEL, D3)
Definition: multi_shape_fct_ND.F90:8024
real function, dimension(jwln) jwldensity(eos_coefs, pressure, ro0, JWLn)
Density of JWL equation functions.
Definition: multi_eos.F90:2341
integer(kind=4), parameter tt_empty
Definition: IPhreeqc_interface.F90:7
subroutine re3dn8(lowqua, ngi, ngi_l, nloc, mloc, m, weight, n, nlx, nly, nlz, sngi, snloc, sweigh, sn, snlx, snly, l1, l2, l3)
This subrt. computes the shape functions M and N and their derivatives at the Gauss points for 3D....
Definition: multi_shape_fct_ND.F90:220
subroutine apply_eno_2_t(LIMF, T_ALL, TOLD_ALL, FEMT_ALL, FEMTOLD_ALL, INCOME, INCOMEOLD, IGOT_T_PACK, CV_NODI, CV_NODJ, X_NODI, X_NODJ, CV_ILOC, CV_JLOC, ELE, CV_NONODS, NDIM, NPHASE, CV_NLOC, TOTELE, X_NDGLN, CV_NDGLN, X_ALL, FACE_ELE, NFACE, BETWEEN_ELEMENTS, SCVFEN, SCVFENx, GI, INV_JAC, UGI, on_domain_boundary)
Definition: cv-adv-dif.F90:2117
integer(kind=4), parameter ipq_invalidcol
Definition: IPhreeqc_interface.F90:18
subroutine get_multi_field(mfield, inode_in, output)
Given a multi field returns an array with its values at inode_in.
Definition: multi_data_types.F90:668
integer function clearaccumulatedlines(id)
Definition: IPhreeqc_interface.F90:79
subroutine tr2or3dqu(NGI, NLOC, MLOC, M, MLX, MLY, MLZ, WEIGHT, N, NLX, NLY, NLZ, SNGI, SNLOC, SWEIGH, SN, SNLX, SNLY, SMLOC, SM, SMLX, SMLY, D3)
:This subroutine defines the shape functions M and N and their derivatives at the Gauss points for qu...
Definition: multi_shape_fct_ND.F90:8134
integer function rm_initialphreeqc2concentrations(id, bc_conc, n_boundary, bc1, bc2, f1)
Fills an array (bc_conc) with concentrations from solutions in the InitialPhreeqc instance....
Definition: RM_interface.F90:3563
subroutine put_in_ct_rhs(GET_C_IN_CV_ADVDIF_AND_CALC_C_CV, ct_rhs_phase_cv_nodi, ct_rhs_phase_cv_nodj, final_phase, Mdims, CV_funs, ndgln, Mmat, GI, between_elements, on_domain_boundary, ELE, ELE2, SELE, HDC, MASS_ELE, JCOUNT_KLOC, JCOUNT_KLOC2, ICOUNT_KLOC, ICOUNT_KLOC2, C_JCOUNT_KLOC, C_JCOUNT_KLOC2, C_ICOUNT_KLOC, C_ICOUNT_KLOC2, U_OTHER_LOC, U_SLOC2LOC, CV_SLOC2LOC, SCVDETWEI, CVNORMX_ALL, DEN_ALL, CV_NODI, CV_NODJ, WIC_U_BC_ALL, WIC_P_BC_ALL, SUF_P_BC_ALL, UGI_COEF_ELE_ALL, UGI_COEF_ELE2_ALL, NDOTQ, NDOTQOLD, LIMT, LIMDT, LIMDTOLD, LIMT_HAT, NDOTQ_HAT, FTHETA_T2, ONE_M_FTHETA_T2OLD, FTHETA_T2_J, ONE_M_FTHETA_T2OLD_J, integrate_other_side_and_not_boundary, loc_u, THETA_VEL, UDGI_IMP_ALL, RCON, RCON_J, NDOTQ_IMP, X_ALL, SUF_D_BC_ALL, gravty)
This subroutine caculates the discretised cty eqn acting on the velocities i.e. MmatCT,...
Definition: cv-adv-dif.F90:5886
integer function getselectedoutputstringlinecount(id)
Definition: IPhreeqc_interface.F90:610
subroutine, public assemble_pipe_transport_and_cty(state, packed_state, tracer, den_all, denold_all, final_phase, Mdims, ndgln, DERIV, CV_P, SOURCT_ALL, ABSORBT_ALL, WIC_T_BC_ALL, WIC_D_BC_ALL, WIC_U_BC_ALL, SUF_T_BC_ALL, SUF_D_BC_ALL, SUF_U_BC_ALL, getcv_disc, getct, Mmat, Mspars, upwnd, GOT_T2, DT, pipes_aux, DIAG_SCALE_PRES_COUP, DIAG_SCALE_PRES, mean_pore_cv, eles_with_pipe, thermal, CV_BETA, MASS_CV, INV_B, MASS_ELE, bcs_outfluxes, outfluxes, porous_heat_coef, assemble_collapsed_to_one_phase)
: This sub modifies either MmatCT or the Advection-diffusion equation for 1D pipe modelling NOTE fina...
Definition: multi_pipes.F90:1017
subroutine porous_assemb_force_cty(packed_state, pressure, Mdims, FE_GIdims, FE_funs, Mspars, ndgln, Mmat, X_ALL, U_SOURCE_CV_ALL)
and faster to compute than for Navier-Stokes. Therefore, here the RHS and the Mass matrix are compute...
Definition: multi_dyncore_dg.F90:2930
subroutine make_linear_tetrahedron(ele, quad_cv_nloc, x_nloc, x_nonods, number_of_hexs, xp2, yp2, zp2, x, y, z, x_ndgln_p2, x_ndgln)
Definition: multi_shape_fct_ND.F90:7479
integer function rm_getgridcellcount(id)
Returns the number of grid cells in the user's model, which is defined in the call to RM_Create....
Definition: RM_interface.F90:1720
subroutine pack_or_unpack_loc(LOC_F, T_ALL, NPHASE, NFIELD, IPT, PACK, STORE, IGOT_T)
If PACK then pack T_ALL into LOC_F as long at IGOT_T==1 and STORE and not already in storage.
Definition: cv-adv-dif.F90:3738
integer function setoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:1168
subroutine shatriold(L1, L2, L3, L4, WEIGHT, D3, NLOC, NGI, N, NLX, NLY, NLZ)
: Work out the shape functions and their derivatives...
Definition: multi_shape_fct_ND.F90:8364
integer function rm_setrepresentativevolume(id, rv)
Set the representative volume of each reaction cell. By default the representative volume of each rea...
Definition: RM_interface.F90:5389
integer function getoutputstringlinecount(id)
Definition: IPhreeqc_interface.F90:494
subroutine update_components()
WARNING: Still work in progress.
Definition: multi_dyncore_dg.F90:1339
This module contains the subroutines to include surface tension. Currently only used for INERTIA.
Definition: multi_surface_tension.F90:20
subroutine posinmat(posmat, globi, globj, findrm, colm)
: Find position in matrix POSMAT which has column GLOBJ
Definition: multi_matrix_operations.F90:1521
Allocates the required memory to store the derivatives of the shape functions.
Definition: multi_data_types.F90:34
SHAPE FUNCTIONS SUBRTS.
Definition: multi_shape_fct.F90:25
real function rgptwe(IG, ND, WEIGHT)
If WEIGHT is TRUE in function RGPTWE then return the Gauss-pt weight else return the Gauss-pt....
Definition: multi_shape_fct_ND.F90:2150
real function triangle_area(v1, v2)
Definition: multi_shape_fct_ND.F90:4070
integer function rm_setsaturation(id, sat)
Set the saturation of each reaction cell. Saturation is a fraction ranging from 0 to 1....
Definition: RM_interface.F90:5439
integer function rm_setdensity(id, density)
Set the density for each reaction cell. These density values are used when converting from transporte...
Definition: RM_interface.F90:4565
subroutine deallocate_multi_pipe_package(pipes)
Deallocates the necessary memory for multi_pipe_package.
Definition: multi_data_types.F90:1644
Data structure to store the derivatives of the shape functions and conversors from reference element ...
Definition: multi_data_types.F90:215
logical function getdumpstringon(id)
Definition: IPhreeqc_interface.F90:244
subroutine spectr(NGI, NLOC, MLOC, M, WEIGHT, N, NLX, NLY, NLZ, D3, D2, IPOLY, IQADRA)
This subroutine defines a spectal element. IPOLY defines the element type and IQADRA the quadrature....
Definition: multi_shape_fct_ND.F90:8894
All the subroutines associated to solving non-linear systems, Schur complement, etc.
Definition: multi_solvers.F90:19
logical function getoutputstringon(id)
Definition: IPhreeqc_interface.F90:528
Subroutine to compute the derivatives of the inputed shape functions.
Definition: multi_shape_fct.F90:39
subroutine update_velocity_absorption(states, ndim, nphase, velocity_absorption)
:<INERTIA ONLY>Computes velocity absorption from diamond information
Definition: multi_eos.F90:1959
subroutine, public adaptive_nonlinear(Mdims, packed_state, reference_field, its, Repeat_time_step, ExitNonLinearLoop, nonLinearAdaptTs, old_acctim, order, calculate_mass_delta, adapt_mesh_in_FPI, Accum_Courant, Courant_tol, Current_Courant, first_time_step)
: This subroutine either store variables before the nonlinear timeloop starts, or checks how the nonl...
Definition: Extract_From_State.F90:1953
integer function rm_dumpmodule(id, dump_on, append)
Writes the contents of all workers to file in _RAW formats, including SOLUTIONs and all reactants.
Definition: RM_interface.F90:441
Contains variables to analyse the flux across the BCs that the user is interested.
Definition: multi_data_types.F90:446
subroutine shatri(l1, l2, l3, l4, weight, d3, nloc, ngi, n, nlx, nly, nlz)
get the shape functions for a triangle/tetrahedron
Definition: multi_shape_fct_ND.F90:5725
integer function rm_setconcentrations1d(id, c)
Definition: RM_interface.F90:4466
subroutine deallocate_multi_ndgln(ndgln)
Deallocates Global to local fields NOTE that Only deallocates suf_cv, suf_p and suf_u since the other...
Definition: multi_data_types.F90:1416
subroutine deallocate_multi_shape_funs(shape_fun)
This subroutine deallocates and nullifies all the fields inside multi_shape_funs.
Definition: multi_data_types.F90:1188
real function area_quad_map(cv_iloc, xgi, ygi, lx, ly)
Definition: multi_shape_fct_ND.F90:6231
subroutine, public non_porous_ensure_sum_to_one(Mdims, packed_state, do_not_update_halos)
: This subroutines eliminates the oscillations in the saturation that are bigger than a certain toler...
Definition: multi_solvers.F90:781
integer function rm_mpiworkerbreak(id)
MPI only. This method is called by root to force workers (processes with RM_GetMpiMyself > 0) to retu...
Definition: RM_interface.F90:4062
real function get_diff_coef_divdx(intface_type, HDC, W_i, W_j, Value_i, Value_j, sigma_i, sigma_j)
: Computes the effective value of K or sigma. at the interface between CVs Based on the intface_type ...
Definition: cv-adv-dif.F90:7398
integer, parameter wic_p_bc_free
Definition: cv-adv-dif.F90:73
subroutine i_pack_loc(LOC_F, T_ALL, NPHASE, IPT, IGOT_T_PACK)
If PACK then pack T_ALL into LOC_F as long at IGOT_T==1 and STORE and not already in storage.
Definition: cv-adv-dif.F90:3866
subroutine fvqhex(NGI, NLOC, SVNGI, M, SVN, SVNLX, SVNLY, SVWEIGH)
this routine generates the shape functions associated with the FV's i.e. their surfaces and volume sh...
Definition: multi_shape_fct.F90:1715
integer function rm_settime(id, time)
Set current simulation time for the reaction module.
Definition: RM_interface.F90:5674
subroutine set_viscosity(nphase, Mdims, state, visc_phases)
: For porous media, just sets the viscosity as a scalar
Definition: multi_eos.F90:1118
subroutine u_volnei(cv_ele_type, cv_nloc, u_nloc, scvngi, cv_neiloc, u_on_face)
This subroutine calculates U_ON_FACE, a logical that works -! in a similar way of CV_ON_FACE....
Definition: multi_shape_fct.F90:4227
integer, parameter wic_u_bc_dirichlet
Definition: cv-adv-dif.F90:73
integer function rm_getspecieslog10molalities(id, species_log10molalities)
Transfer log10 aqueous-species log10 molalities to the array argument (species_log10molalities) To us...
Definition: RM_interface.F90:2924
integer function rm_setdumpfilename(id, dump_name)
Set the name of the dump file. It is the name used by RM_DumpModule.
Definition: RM_interface.F90:4615
subroutine force_min_max_principle(Mdims, entrance, tracer, nonlinear_iteration, totally_min_max)
: To help the stability of the system,if there are no sources/sinks it is known that the temperature ...
Definition: multi_dyncore_dg.F90:522
integer function rm_getsolutionvolume(id, vol)
Transfer solution volumes from the reaction cells to the array given in the argument list (vol)....
Definition: RM_interface.F90:2575
integer function rm_getgfw(id, gfw)
Returns the gram formula weights (g/mol) for the components in the reaction-module component list.
Definition: RM_interface.F90:1668
integer function rm_setfileprefix(id, prefix)
Set the prefix for the output (prefix.chem.txt) and log (prefix.log.txt) files. These files are opene...
Definition: RM_interface.F90:4724
subroutine jacpos(SINALF, COSALF, P, Q, A, N)
Definition: multi_dyncore_dg.F90:7102
This module enables the multiphase prototype code to interact with state by copying everything requir...
Definition: Extract_From_State.F90:23
integer function rm_setunitssurface(id, option)
Set input units for surfaces. In PHREEQC input, surfaces are defined by moles of surface sites (Mp)....
Definition: RM_interface.F90:6150
integer(kind=4), parameter ipq_ok
Definition: IPhreeqc_interface.F90:13
subroutine solve_and_update_pressure(Mdims, rhs_p, P_all, deltap, cmc_petsc, diagonal_CMC, update_pres)
Compute deltaP by solving the pressure equation using the CMC matrix.
Definition: multi_dyncore_dg.F90:2467
logical function geterroron(id)
Definition: IPhreeqc_interface.F90:294
subroutine getdumpstringline(id, n, line)
Definition: IPhreeqc_interface.F90:225
Shape function subroutines for multi-dimensions for Quadrilaterals, Triangles, Hexaedra and Tetrahedr...
Definition: multi_shape_fct_ND.F90:29
subroutine set_simulation_start_times()
Definition: Multiphase_Prototype_Wrapper.F90:967
subroutine c_mult2(CDP, DP, CV_NONODS, U_NONODS, NDIM, NPHASE, C, NCOLC, FINDC, COLC)
: CDP=C*DP
Definition: multi_matrix_operations.F90:1343
subroutine init_phreeqc(Mdims, packed_state, id, concetration_phreeqc, after_adapt)
This subroutine is used to initialise all the necessary parameters that PHREEQCRM requires....
Definition: multi_phreeqc.F90:55
subroutine calculate_solute_dispersity(state, packed_state, Mdims, ndgln, density, SoluteDispersion)
: Dispersion for porous media For thermal, the field density needs to be passed down,...
Definition: multi_eos.F90:1715
subroutine lagrot(weit, quadpos, ndgi, getndp)
This computes the weight and points for standard Gaussian quadrature. If (GETNDP == T) then get the p...
Definition: multi_shape_fct_ND.F90:1606
integer function rm_getthreadcount(id)
Returns the number of threads, which is equal to the number of workers used to run in parallel with O...
Definition: RM_interface.F90:3385
subroutine quad_1d_shape(cv_ngi, cv_nloc, u_nloc, cvn, cvweigh, n, nlx, un, unlx)
: For quadratic elements. Shape functions associated with volume integration using both CV basis func...
Definition: multi_shape_fct_ND.F90:2378
integer function getwarningstringlinecount(id)
Definition: IPhreeqc_interface.F90:726
subroutine assign_equation_of_state(eos_option_path_out)
: Read from diamond and decide which sort of density representation do we have
Definition: multi_eos.F90:792
real function p0_dg_oscilat_detect(SNDOTQ_KEEP, SNDOTQ2_KEEP, N_DOT_DU, N_DOT_DU2, SINCOME, MASS_ELE, MASS_ELE2)
: <INERTIA ONLY> Determine if we have an oscillation in the normal direction... dg_oscilat_detect=1....
Definition: multi_dyncore_dg.F90:8182
subroutine calculate_diffusivity(state, packed_state, Mdims, ndgln, ScalarAdvectionField_Diffusion, TracerName, divide_by_rho_CP)
: Here we compute component/solute/thermal diffusion coefficient
Definition: multi_eos.F90:1511
subroutine proj_cv_to_fem(packed_state, fempsi, psi, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, igetct, X, mass_ele, mass_mn_pres, tracer, psi_ave, psi_int, activate_limiters)
Calls to generate the transport equation for the saturation. Embeded an FPI with backtracking method ...
Definition: cv-adv-dif.F90:4107
subroutine deallocate_multi_sparsities(Mspars)
This subroutine deallocates all the memory inside Mspars.
Definition: multi_data_types.F90:1328
integer function rm_setgasphasevolume(id, gas_volume)
Transfer volumes of gas phases from the array given in the argument list (gas_volume) to each reactio...
Definition: RM_interface.F90:4844
integer function rm_getsolidsolutioncomponentscount(id)
Returns the number of solid solution components in the initial-phreeqc module. RM_FindComponents must...
Definition: RM_interface.F90:2439
subroutine linear_high_diffus_cal_coeff_stress_or_tensor(STRESS_IJ_ELE_EXT, S_INV_NNX_MAT12, STRESS_FORM, STRESS_FORM_STAB, ZERO_OR_TWO_THIRDS, U_SNLOC, U_NLOC, CV_SNLOC, NPHASE, SBUFEN_REVERSED, SBCVFEN_REVERSED, SDETWEI, SBCVNGI, NDIM, SLOC_UDIFFUSION, SLOC_UDIFFUSION_VOL, SLOC2_UDIFFUSION, SLOC2_UDIFFUSION_VOL, DIFF_GI_ADDED, ON_BOUNDARY, SNORMXN_ALL)
This sub calculates the effective diffusion coefficientd STRESS_IJ_ELE_EXT it only works for between ...
Definition: cv-adv-dif.F90:4956
subroutine linear_eos_formula(rho_internal)
Definition: multi_eos.F90:655
calculates derivatives of vector fields
Definition: cv-adv-dif.F90:59
subroutine high_order_pressure_solve(Mdims, ndgln, u_rhs, state, packed_state, nphase, u_absorbin)
: Instead of including the gravity in the RHS normally, here a system based on a Laplacian is created...
Definition: multi_dyncore_dg.F90:7740
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 u...
Definition: multi_data_types.F90:1105
subroutine new_pt_qua_vol_cv_tri_tet_shape(cv_ele_type, ndim, cv_ngi, cv_nloc, u_nloc, cvn, cvweigh, n, nlx, nly, nlz, un, unlx, unly, unlz)
: new 1 or 4 pt quadrature set on each CV of a quadratic tetrahedra ..... Compute shape functions N,...
Definition: multi_shape_fct_ND.F90:2822
subroutine outputaccumulatedlines(id)
Definition: IPhreeqc_interface.F90:797
subroutine shape_tri_tet(cv_ele_type_cells, cv_nloc_cells, cv_ele_type, ndim, totele, cv_nloc, cv_ngi, x_nonods, quad_cv_nloc, x_ndgln, x, y, z, lx, ly, lz, n, nlx, nly, nlz, cvweigh)
: Determine the volume shape functions n, nlx, nly, nlz and weights cvweigh for the cv_nloc_cells CV ...
Definition: multi_shape_fct_ND.F90:5134
integer function rm_setprintchemistrymask(id, cell_mask)
Enable or disable detailed output for each reaction cell. Printing for a cell will occur only when th...
Definition: RM_interface.F90:5184
real function triareaf_sign(x1, y1, x2, y2, x3, y3)
Definition: multi_shape_fct_ND.F90:6292
type(state_type) state_old
Definition: multi_interpolation.F90:63
subroutine getoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:460
integer function rm_setunitsppassemblage(id, option)
Set input units for pure phase assemblages (equilibrium phases). In PHREEQC input,...
Definition: RM_interface.F90:5972
integer function setlogfilename(id, fname)
Definition: IPhreeqc_interface.F90:1110
subroutine mass_conservation_check_and_outfluxes(calculate_mass_delta, outfluxes, DEN_ALL, flag)
Definition: cv-adv-dif.F90:3486
logical function, public is_constant(tfield)
: Checks whether a field is constant or not
Definition: Extract_From_State.F90:3108
subroutine cal_comp_sum2one_sou(packed_state, Mdims)
make sure the composition sums to 1.0
Definition: multi_compositional.F90:512
integer function getnthselectedoutputusernumber(id, n)
Definition: IPhreeqc_interface.F90:444
integer function seterrorfileon(id, error_file_on)
Definition: IPhreeqc_interface.F90:1050
integer function rm_destroy(id)
Destroys a reaction module.
Definition: RM_interface.F90:405
subroutine, public initialize_pipes_package_and_gamma(state, packed_state, pipes_aux, Mdims, Mspars, ndgln)
This subroutine reads information from diamond and populates the necessary fields For P0DGP1 gamma is...
Definition: multi_pipes.F90:2806
subroutine relperm_stone(Kr)
:This subroutine calculates the relative permeability for three phases First phase has to be water,...
Definition: multi_eos.F90:1283
integer function rm_getspeciessaveon(id)
Returns the value of the species-save property. By default, concentrations of aqueous species are not...
Definition: RM_interface.F90:3051
subroutine find_other_side(CV_OTHER_LOC, CV_NLOC, U_OTHER_LOC, U_NLOC, MAT_OTHER_LOC, INTEGRAT_AT_GI, X_NLOC, XU_NLOC, X_NDGLN, XU_NDGLN, CV_SNLOC, CVFEM_ON_FACE, X_SHARE, ELE, ELE2, FINELE, COLELE, DISTCONTINUOUS_METHOD)
We are on the boundary or next to another element. Determine CV_OTHER_LOC, U_OTHER_LOC....
Definition: cv-adv-dif.F90:3982
subroutine print_multi_field(mfield, inode_in, dimension)
Given a multi field returns prints its values at inode_in.
Definition: multi_data_types.F90:779
subroutine ensure_components_sum_to_one(packed_state)
WARNING: It is currently not working well...better to use Chris' method which uses a RHS.
Definition: multi_dyncore_dg.F90:1577
integer function rm_setscreenon(id, tf)
Set the property that controls whether messages are written to the screen. Messages include informati...
Definition: RM_interface.F90:5490
subroutine det_suf_ele_shape(SCVNGI, NFACE, CVFEM_ON_FACE, CV_NLOC, SCVFEN, SCVFENSLX, SCVFENSLY, SCVFEWEIGH, SCVFENLX, SCVFENLY, SCVFENLZ, U_NLOC, SUFEN, SUFENSLX, SUFENSLY, SUFENLX, SUFENLY, SUFENLZ, SBCVNGI, SBCVFEN, SBCVFENSLX, SBCVFENSLY, SBCVFEWEIGH, SBCVFENLX, SBCVFENLY, SBCVFENLZ, SBUFEN, SBUFENSLX, SBUFENSLY, SBUFENLX, SBUFENLY, SBUFENLZ, CV_SLOCLIST, U_SLOCLIST, CV_SNLOC, U_SNLOC, NDIM, CV_ELE_TYPE)
this subroutine generates the FE basis functions, weights and the derivatives of the shape functions ...
Definition: multi_shape_fct.F90:397
subroutine ct_mult_with_c(DP, U_LONG, U_NONODS, NDIM, NPHASE, C, NCOLC, FINDC, COLC)
: DP = (C)^T U_LONG
Definition: multi_matrix_operations.F90:1389
subroutine calculate_all_rhos(state, packed_state, Mdims, get_RhoCp)
: Computes the density for the phases and the derivatives of the density
Definition: multi_eos.F90:56
subroutine, public assemble_and_solve_sp(Mdims, state, packed_state, ndgln, Mmat, Mspars, CV_funs, CV_GIdims)
: This subroutine computes the saturated rock conductivity based on Tiab and Donaldson,...
Definition: multi_self_potential.F90:53
integer(kind=4), parameter tt_double
Definition: IPhreeqc_interface.F90:9
real function retrieve_reference_density(state, packed_state, iphase, icomp, nphase)
: For boussinesq porous media we need the reference density to ensure consistency when mixing with th...
Definition: multi_eos.F90:2520
subroutine calculate_rho_drhodp(state, packed_state, iphase, icomp, nphase, ncomp, eos_option_path, rho, drhodp)
: Computes the density and the derivative of the density
Definition: multi_eos.F90:394
subroutine matinv(A, N, NMAX)
: This sub finds the inverse of the matrix A and puts it back in A. MAT, MAT2, X and B are working ve...
Definition: multi_matrix_operations.F90:75
real function legend(DIFF, LX, INOD, NDNOD, NODPOS)
If DIFF then returns the spectral function DIFFERENTIATED W.R.T X associated. This function returns t...
Definition: multi_shape_fct_ND.F90:9480
subroutine vol_cv_tri_tet_shape(cv_ele_type, ndim, cv_ngi, cv_nloc, u_nloc, cvn, cvweigh, n, nlx, nly, nlz, un, unlx, unly, unlz)
: Compute shape functions N, UN etc for linear trianles. Shape functions associated with volume integ...
Definition: multi_shape_fct_ND.F90:2699
integer function setcurrentselectedoutputusernumber(id, n)
Definition: IPhreeqc_interface.F90:958
subroutine pack_loc_all3(LOC_F, field1, oldfield1, field2, oldfield2, field3, oldfield3, IGOT_T_PACK, use_volume_frac_T2, start_phase, final_phase, nodi)
This subrotuine is for fields that are bigger than final_phase - start_phase Checks if the fields are...
Definition: cv-adv-dif.F90:3842
integer function rm_getgascomponentscount(id)
Returns the number of gas phase components in the initial-phreeqc module. RM_FindComponents must be c...
Definition: RM_interface.F90:1314
type(quad_data) function quad4_gp(i1, i2, i3, i4)
Definition: multi_shape_fct_ND.F90:4010
subroutine p0_limiter()
: Computes a limited velocity when using a P0DG velocity discretisation
Definition: multi_dyncore_dg.F90:6330
subroutine outputwarningstring(id)
Definition: IPhreeqc_interface.F90:829
subroutine getwarningstringline(id, n, line)
Definition: IPhreeqc_interface.F90:743
subroutine ct_mult_with_c_many(DP, U_LONG, U_NONODS, NDIM, NPHASE, C, FINDC, COLC)
: DP = (C)^T U_LONG
Definition: multi_matrix_operations.F90:1461
subroutine use_posinmat_c_store_suf_dg(COUNT, U_INOD, P_JNOD, U_NONODS, FINDC, COLC, NCOLC, IDO_STORE_AC_SPAR_PT, STORED_AC_SPAR_PT, POSINMAT_C_STORE_SUF_DG, ELE, IFACE, U_SILOC, P_SJLOC, TOTELE, NFACE, U_SNLOC, P_SNLOC)
Used to assemble the C matrix in the ICFERST format (for DG?)
Definition: multi_dyncore_dg.F90:7331
Contains all the information required to model pipes. Many of these fields are unnecessary or even un...
Definition: multi_data_types.F90:428
This module contains all that is required to perform compositional modelling. NOTE THAT THIS FUNCTION...
Definition: multi_compositional.F90:21
subroutine calculate_absorption2(nphase, packed_state, PorousMedia_absorp, Mdims, ndgln, SATURA, viscosities, inv_PorousMedia_absorp)
: Subroutine where the absorption for the porous media is actually computed
Definition: multi_eos.F90:1157
integer function cv_count_faces(Mdims, CV_ELE_TYPE, CV_GIdims)
This subroutine counts then number of faces in the control volume space.
Definition: cv-adv-dif.F90:3946
subroutine face_theta_many(FTHETA, INTERFACE_TRACK, T_NODJ_IPHA, T_NODI_IPHA, TOLD_NODJ_IPHA, TOLD_NODI_IPHA)
Definition: cv-adv-dif.F90:3341
subroutine legrot(WEIT, QUAPOS, NDGI, GETNDP)
This computes the weight and points for Chebyshev-Gauss-Lobatto quadrature. See page 69 of:Spectral M...
Definition: multi_shape_fct_ND.F90:9212
This module contains all the tools to assemble and solve the equations and fields associated with the...
Definition: cv-adv-dif.F90:20
subroutine, public get_darcyvelocity(Mdims, ndgln, state, packed_state, upwnd)
: This subroutine calculates the actual Darcy velocity, but with P0DG precision only!
Definition: Extract_From_State.F90:3257
integer function rm_geterrorstring(id, errstr)
Returns a string containing error messages related to the last call to a PhreeqcRM method to the char...
Definition: RM_interface.F90:1064
subroutine determin_sloclist(CV_SLOCLIST, CV_NLOC, CV_SNLOC, NFACE, ndim, cv_ele_type)
determine CV_SLOCLIST
Definition: multi_shape_fct_ND.F90:9492
integer function rm_setmpiworkercallback(id, fcn)
MPI only. Defines a callback function that allows additional tasks to be done by the workers....
Definition: RM_interface.F90:4968
subroutine compute_div_u(Mdims, Mmat, Mspars, velocity, INV_B, rhs_p, force_transpose_C)
Calculates the divergence of the velocity by multipliying it by the Ct matrix.
Definition: multi_dyncore_dg.F90:2532
logical function getlogstringon(id)
Definition: IPhreeqc_interface.F90:428
integer(kind=4), parameter ipq_invalidarg
Definition: IPhreeqc_interface.F90:16
This module contains the conservative mesh to mesh interpollation for DG fields, as described in Adam...
Definition: multi_interpolation.F90:21
This type contains all the necessary information to solve =systems, matrices, RHS,...
Definition: multi_data_types.F90:321
integer function rm_getgascompmoles(id, gas_moles)
Transfer moles of gas components from each reaction cell to the array given in the argument list (gas...
Definition: RM_interface.F90:1408
integer function rm_setunitskinetics(id, option)
Set input units for kinetic reactants.
Definition: RM_interface.F90:5919
integer function rm_getcomponentcount(id)
Returns the number of components in the reaction-module component list. The component list is generat...
Definition: RM_interface.F90:734
real function shock_front_mobility_ratio(ele, Mdims, sat, ndgln, Imble_frac, total_mobility)
Definition: multi_dyncore_dg.F90:9459
integer function rm_initialphreeqc2speciesconcentrations(id, bc_conc, n_boundary, bc1, bc2, f1)
Fills an array (bc_conc) with aqueous species concentrations from solutions in the InitialPhreeqc ins...
Definition: RM_interface.F90:3787
integer function loaddatabasestring(id, input)
Definition: IPhreeqc_interface.F90:779
subroutine is_field_constant(IGOT_T_CONST, IGOT_T_CONST_VALUE, T_ALL, CV_NONODS)
Checks whether a field is constant or not. Although I think this check is terrible,...
Definition: cv-adv-dif.F90:3652
integer function rm_concentrations2utility(id, c, n, tc, p_atm)
N sets of component concentrations are converted to SOLUTIONs numbered 1-n in the Utility IPhreeqc....
Definition: RM_interface.F90:182
Subroutines associated with the CSR storage used for 1D.
Definition: multi_sparsity.F90:20
subroutine shatrinew(L1, L2, L3, L4, WEIGHT, NLOC, NGI, N, NLX_ALL)
: Work out the shape functions and their derivatives...
Definition: multi_shape_fct_ND.F90:8346
subroutine color_get_cmc_pha_slow(Mdims, Mspars, ndgln, Mmat, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, CMC_petsc, CMC_PRECON, IGOT_CMC_PRECON, MASS_MN_PRES, MASS_PIPE, MASS_CVFEM2PIPE, MASS_CVFEM2PIPE_TRUE, got_free_surf, MASS_SUF, ndpset, FEM_continuity_equation)
: form pressure matrix CMC using a colouring approach
Definition: multi_matrix_operations.F90:273
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 = mf...
Definition: multi_data_types.F90:989
integer function rm_getchemistrycellcount(id)
Returns the number of chemistry cells in the reaction module. The number of chemistry cells is define...
Definition: RM_interface.F90:657
subroutine suf_cv_tri_tet_shape(cv_ele_type, ndim, scvngi, cv_nloc, u_nloc, scvfeweigh, scvfen, scvfenlx, scvfenly, scvfenlz, scvfenslx, scvfensly, sufen, sufenlx, sufenly, sufenlz, sufenslx, sufensly, cv_neiloc, cvfem_neiloc, ufem_neiloc)
: Compute shape functions N, UN etc for linear triangles. Shape functions associated with volume inte...
Definition: multi_shape_fct_ND.F90:3461
real function saturation_temperature(pressure)
: ????
Definition: multi_eos.F90:2087
integer function rm_getmpimyself(id)
Returns the MPI task number. For the OPENMP version, the task number is always zero and the result of...
Definition: RM_interface.F90:1889
subroutine calc_comp_dif_ten(NDIM, UD, DIFF_molecular, DIFF_longitudinal, DIFF_transverse, DIFF_TEN)
Calculate the diffusion coefficient COMP_DIFFUSION for current composition... based on page 136 in Re...
Definition: multi_compositional.F90:367
subroutine shape_cv_n(ndim, cv_ele_type, cv_ngi, cv_nloc, u_nloc, cvn, cvweigh, n, nlx, nly, nlz, un, unlx, unly, unlz)
SHAPESV AND RELATED SUBRTS & FUNCTIONS Shape functions associated with volume integration using both ...
Definition: multi_shape_fct.F90:54
subroutine cal_lim_vol_adjust(TMIN_STORE, TMIN, T, TMIN_NOD, RESET_STORE, MASS_CV, CV_NODI_IPHA, CV_NODJ_IPHA, IPHASE, CV_NONODS, INCOME)
Adjust TMIN to take into account different sized CV's. if RESET_STORE then reset TMIN to orginal valu...
Definition: cv-adv-dif.F90:5287
subroutine checksparsity(option_mid, unit, ncol2, nonods, ncol, find, mid, col)
Definition: multi_sparsity.F90:1517
subroutine xgboost_load_model()
Load the XGBoost model as -> xgb_model (private module variable)
Definition: multi_machine_learning.F90:45
integer function rm_getbackwardmapping(id, n, list, size)
Fills an array with the cell numbers in the user's numbering sytstem that map to a cell in the Phreeq...
Definition: RM_interface.F90:617
logical function getlogfileon(id)
Definition: IPhreeqc_interface.F90:378
character(len=field_name_len) function, public getoldname(tfield)
: For a given field, retrieve the associated old field name
Definition: Extract_From_State.F90:3139
integer function rm_errormessage(id, errstr)
Send an error message to the screen, the output file, and the log file.
Definition: RM_interface.F90:483
subroutine, public get_ele_type(x_nloc, cv_ele_type, p_ele_type, u_ele_type, mat_ele_type, u_sele_type, cv_sele_type)
: Obtain the type of element u_ele_type = cv_ele_type = p_ele_type will flag the dimension and type o...
Definition: Extract_From_State.F90:219
subroutine loc_1st_deriv_xyz_dg_deriv(DISTANCE_FUN, SOL_DERIV_X, SOL_DERIV_Y, SOL_DERIV_Z, NDIM, CV_NDGLN, X_NLOC, X_NDGLN, CV_NGI, CV_NLOC, CVFEN, CVFENX, CVFENY, CVFENZ, X, Y, Z, NFACE, FACE_ELE, CV_SLOCLIST, CV_SNLOC, SBCVNGI, SBCVFEN, SBCVFENSLX, SBCVFENSLY, SBCVFEWEIGH, ELE, DETWEI, factor, angle)
Definition: multi_surface_tension.F90:1159
integer function rm_getequilibriumphasescount(id)
Returns the number of equilibrium phases in the initial-phreeqc module. RM_FindComponents must be cal...
Definition: RM_interface.F90:978
subroutine calc_limit_matrix_max_min(TMAX_ALL, TMIN_ALL, DENMAX_ALL, DENMIN_ALL, T2MAX_ALL, T2MIN_ALL, T_ALL, T2_ALL, DEN_ALL, IGOT_T2, NPHASE, CV_NONODS, TMIN_NOD_ALL, TMAX_NOD_ALL, T2MIN_NOD_ALL, T2MAX_NOD_ALL, DENMIN_NOD_ALL, DENMAX_NOD_ALL, NSMALL_COLM, SMALL_FINDRM, SMALL_COLM, TUPWIND_MAT_ALL, DENUPWIND_MAT_ALL, T2UPWIND_MAT_ALL, MASS_CV)
Populate limiting matrix based on max and min values For each node, find the largest and smallest val...
Definition: cv-adv-dif.F90:5669
subroutine calculate_porous_rho_drhop(state, packed_state, Mdims, cv_ndgln, drhodp_porous)
In this subroutine we calculate and update the density of the porous media based on the compressibili...
Definition: multi_eos.F90:703
integer function rm_getgasphasevolume(id, gas_volume)
Transfer volume of gas from each reaction cell to the vector given in the argument list (gas_volume).
Definition: RM_interface.F90:1606
subroutine multiphase_prototype_wrapper()
Definition: Multiphase_Prototype_Wrapper.F90:740
subroutine calc_anisotrop_lim_vals2(Mmat, T_ALL, FEMT_ALL, USE_FEMT, TUPWIND_ALL, NFIELD, NONODS, NLOC, NGI, TOTELE, NDGLNO, FINDRM, COLM, NCOLM, X_NDGLN, X_NONODS, NDIM, X_ALL, XC_CV_ALL, N, NLX_ALL, WEIGHT, use_reflect)
Definition: cv-adv-dif.F90:6344
subroutine shape_triangle_cubic(l1, l2, l3, l4, weight, d3, nloc, ngi, n, nlx, nly, nlz)
Generates the shape functions of a cubic triangle.
Definition: multi_shape_fct_ND.F90:5920
integer function seterroron(id, error_on)
Definition: IPhreeqc_interface.F90:1070
integer function rm_seterrorhandlermode(id, mode)
Set the action to be taken when the reaction module encounters an error. Options are 0,...
Definition: RM_interface.F90:4651
subroutine calculate_componentabsorptionterm(packed_state, icomp, cv_ndgln, Mdims, denold, volfra_pore, mass_ele, comp_absorb)
Calculate compositional model linkage between the phase expressed in COMP_ABSORB. Use values from the...
Definition: multi_compositional.F90:40
subroutine geterrorfilename(id, fname)
Definition: IPhreeqc_interface.F90:260
subroutine, public enterforcebalanceequation(EnterSolve, its, itime, acctim, t_adapt_threshold, after_adapt, after_adapt_itime, PVF_cfl)
:–A Subroutine that returns a Logical, either to Enter the Force Balance Eqs or Not = given a request...
Definition: Extract_From_State.F90:3551
subroutine computing_small_qtriangles(ele_big, x_nloc_big, totele_big, x_nonods_big, increment_ele_big, x_ndgln_big, x_big, y_big)
Definition: multi_shape_fct_ND.F90:6811
subroutine dummy_tri_tet(d1, d3, quad_cv_ngi, quad_cv_nloc, dummy_sngi, dummy_snloc, nwicel, cv_nloc, cv_sngi, totele, quad_u_loc_dummy, mloc, dummy_smloc, lowqua, npoly, npoly_ngi)
Compute some local variables for suf_shape_tri_tet.
Definition: multi_shape_fct_ND.F90:5032
subroutine shapesv_fem_plus(scvngi, cv_neiloc, cv_on_face, cvfem_on_face, ufem_on_face, cv_ele_type, cv_nloc, scvfen, scvfenslx, scvfensly, scvfeweigh, scvfenlx, scvfenly, scvfenlz, u_nloc, sufen, sufenslx, sufensly, sufenlx, sufenly, sufenlz, ndim)
This subroutine generates the FE basis functions, weights and the derivatives of the shape functions ...
Definition: multi_shape_fct.F90:577
integer function rm_getsurfacename(id, num, name)
Retrieves the surface name (such as "Hfo") that corresponds with the surface species name....
Definition: RM_interface.F90:3216
subroutine, public pack_multistate(npres, state, packed_state, multiphase_state, multicomponent_state, pmulti_state)
: This subroutine creates packed_state from state(:) and links the appropiate memory so it is acessib...
Definition: Extract_From_State.F90:590
integer function setselectedoutputfileon(id, sel_on)
Definition: IPhreeqc_interface.F90:1244
subroutine, public auto_backtracking(Mdims, backtrack_par_factor, courant_number_in, first_time_step, nonlinear_iteration, I_am_temperature)
: The maximum backtracking factor is calculated based on the Courant number and physical effects ocur...
Definition: multi_solvers.F90:896
subroutine relperm_corey_epsilon(Kr)
: Brooks corey model of relperm. This subroutine add a small quantity to the corey function to avoid ...
Definition: multi_eos.F90:1268
subroutine effective_cp_density(porous_heat_coef, porous_heat_coef_old)
: Checks convergence on the temperature field Calculation of the averaged heat capacity and density a...
Definition: multi_dyncore_dg.F90:480
double precision function rm_gettimeconversion(id)
Returns a multiplier to convert time from seconds to another unit, as specified by the user....
Definition: RM_interface.F90:3464
integer function geterrorstringlinecount(id)
Definition: IPhreeqc_interface.F90:310
subroutine defining_maxlengths_for_sparsity_matrices(ndim, nphase, totele, u_nloc, cv_nloc, ph_nloc, cv_nonods, mx_nface_p1, mxnele, mx_nct, mx_nc, mx_ncolcmc, mx_ncoldgm_pha, mx_ncolacv, mx_ncolm, mx_ncolph)
Definition: multi_sparsity.F90:1117
subroutine re2dn4(lowqua, ngi, ngi_l, nloc, mloc, m, weight, n, nlx, nly, sngi, snloc, sweigh, sn, snlx, l1, l2)
at the Gauss points. NB: We may need to define surface elements for p and (u,v,w)
Definition: multi_shape_fct_ND.F90:64
integer function rm_setcomponenth2o(id, tf)
Select whether to include H2O in the component list. The concentrations of H and O must be known accu...
Definition: RM_interface.F90:4375
integer function rm_getsolidsolutionname(id, num, name)
Retrieves an item from the solid solution names list. The list includes solid solution names included...
Definition: RM_interface.F90:2530