ICFERST  25-11
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
manual.F90 File Reference
cv_advection::calc_stress_ten
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:5349
iphreeqc::getselectedoutputfilename
subroutine getselectedoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:576
multiphase_eos::calculate_porousmedia_absorptionterms
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:956
multi_tools::printmatrix
subroutine printmatrix(Matrix)
:Subroutine to print Arrays by (columns,rows) Matrix = 2D Array
Definition: multi_tools.F90:669
shape_functions_prototype::cv_fem_shape_funs
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
shape_functions_prototype::fv_1d_quad
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
iphreeqc::getlogfilename
subroutine getlogfilename(id, fname)
Definition: IPhreeqc_interface.F90:360
multiphase_eos::normalise_relperm_tables
subroutine normalise_relperm_tables(nphase)
Definition: multi_eos.F90:1471
multi_data_types::multi_absorption
Comprises all the absorption terms that migth be required.
Definition: multi_data_types.F90:400
spact::get_sparsity_patterns
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
quad6_gp
type(quad_data) function quad6_gp(i1, i2, i3, i4, i5, i6)
Definition: multi_shape_fct_ND.F90:4036
phreeqcrm::rm_getkineticreactionsname
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
cv_advection::wic_t_bc_dirichlet
integer, parameter wic_t_bc_dirichlet
Definition: cv-adv-dif.F90:73
copy_outof_state::adaptive_nonlinear
subroutine, public adaptive_nonlinear(Mdims, packed_state, reference_field, its, itime, 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:2097
calculate_porousmedia_adv_terms
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:1024
shape_functions_linear_quadratic::retrieve_ngi_old
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
shape_functions_ndim::crossproduct
subroutine crossproduct(n, cp, a, b)
Definition: multi_shape_fct_ND.F90:6303
shape_functions_ndim::xprod2
subroutine xprod2(A, B, C)
Perform the cross product of two vectors.
Definition: multi_shape_fct_ND.F90:6594
get_int_vel_porous_vel
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:3077
petsc_log_push
subroutine petsc_log_push(no, stage, ierr)
: This routine starts the current stage registered for PETSc profiling IMPORTANT:
Definition: multi_tools.F90:1158
shape_functions_ndim::xprod1
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
shape_functions_linear_quadratic::detnlxr_invjac
: Computes the derivatives of the shape functions and the inverse of the Jacobian
Definition: multi_shape_fct_ND.F90:48
cv_advection::calc_stress_ten_reduce
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:5397
iphreeqc::adderror
integer function adderror(id, error_msg)
Definition: IPhreeqc_interface.F90:43
multi_data_types::deallocate_multi_field
subroutine deallocate_multi_field(mfield, and_destroy)
Deallocation of a multi field type.
Definition: multi_data_types.F90:627
phreeqcrm::rm_getsicount
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
multiphase_eos::calculate_component_rho
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:357
phreeqcrm::rm_setpressure
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
shape_functions_ndim::volume_quad_map
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
flip_p_and_v_bcs
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:3060
solvers_module::petsc_stokes_solver
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:1200
matrix_operations::smlinngot
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
multiphase_eos::copy_metal_field
subroutine copy_metal_field(state, packed_state, Mdims, ndgln)
: subroutine to copy a Metal Field into a copied field BEFORE the exchange steps happen (dissolution ...
Definition: multi_eos.F90:4029
multiphase_1d_engine::linearise_field
subroutine linearise_field(field_in, field_out)
: <FOR INERTIA ONLY> This sub will linearise a p2 field
Definition: multi_dyncore_dg.F90:8090
multi_tools::extract_strings_from_csv_file
subroutine extract_strings_from_csv_file(csv_table_strings, path_to_table, Nentries)
:This subroutine reads a csv file and returns them in an array
Definition: multi_tools.F90:640
phreeqcrm::rm_findcomponents
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
phreeqcrm::rm_getsiname
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
matrix_operations::mass_matrix_inversion
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:798
compositional_terms::sigmoid_function
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
shape_functions_ndim::shatri_hex
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
matrix_operations::allocate_global_multiphase_petsc_csr
subroutine allocate_global_multiphase_petsc_csr(global_petsc, sparsity, tracer, nphase)
Definition: multi_matrix_operations.F90:1605
cv_advection::wic_t_bc_robin
integer, parameter wic_t_bc_robin
Definition: cv-adv-dif.F90:73
minmaxelewic
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:6624
multi_tools::calc_face_ele
subroutine calc_face_ele(FACE_ELE, TOTELE, STOTEL, NFACE, FINELE, COLELE, CV_NLOC, CV_SNLOC, CV_NONODS, CV_NDGLN, CV_SNDGLN, CV_SLOCLIST, X_NLOC, X_NDGLN)
: Calculate FACE_ELE - the list of elements surrounding an element and referenced with a face -ve val...
Definition: multi_tools.F90:309
phreeqcrm::rm_setcurrentselectedoutputusernumber
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
multiphase_eos::get_relperm
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:1353
phreeqcrm::rm_getspeciescount
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
multi_phreeqc::get_packed_species_name
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
phreeqcrm::rm_getspeciesz
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
sparsity_1d::def_spar_ct_dg
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
copy_outof_state::get_primary_scalars_new
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:81
cv_advection::pack_loc_all1
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:3848
multiphase_1d_engine::generate_and_solve_laplacian_system
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:9518
shape_functions_ndim::get_cvn_compact_overlapping
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
phreeqcrm::rm_getmpitasks
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
cv_advection::unpack_loc_all
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:3979
iphreeqc::getselectedoutputrowcount
integer function getselectedoutputrowcount(id)
Definition: IPhreeqc_interface.F90:660
multi_data_types::deallocate_multi_absorption
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
copy_outof_state::getfemname
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:3389
multiphase_eos::total_mass_metal
subroutine total_mass_metal(state, packed_state, Mdims, ndgln, CV_funs, metal_total_mass)
: subroutine to calculate the metal total mass (in kg).
Definition: multi_eos.F90:3860
multi_phreeqc::deallocate_phreeqc
subroutine deallocate_phreeqc(id)
Definition: multi_phreeqc.F90:278
multiphase_1d_engine::tracer_assemble_solve
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, VOLFRA_PORE_TOTAL, 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:755
shape_functions_prototype::gaussiloc
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
shape_functions_ndim::plegen
real function plegen(LX, K)
Definition: multi_shape_fct_ND.F90:9230
phreeqcrm::rm_getkineticreactionscount
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
shape_functions_ndim::get_tang_binorm
subroutine get_tang_binorm(NX, NY, NZ, T1X, T1Y, T1Z, T2X, T2Y, T2Z, NNODRO)
Definition: multi_shape_fct_ND.F90:4100
shape_functions_ndim::calc_cvn_tritetquadhex
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
cv_advection::generate_laplacian_system
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:7357
shape_functions_ndim::make_bilinear_hexahedra
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
cv_advection::cv_assemb
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, VOLFRA_PORE_TOTAL, 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, MEAN_PORE_CV_TOTAL, 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
phreeqcrm::rm_logmessage
integer function rm_logmessage(id, str)
Print a message to the log file.
Definition: RM_interface.F90:3973
multi_phreeqc::run_phreeqc
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
multiphase_eos::calculate_capillary_pressure
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:1541
create_bin_msh_file
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:1087
phreeqcrm::rm_abort
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
multiphase_eos::metal_precipitation
subroutine metal_precipitation(state, packed_state, Mdims, ndgln, dt)
: subroutine to precipitate metals using a precipitation rate. Precipitate the amount introduced in d...
Definition: multi_eos.F90:3599
cv_advection::wic_u_bc_diri_adv_and_robin
integer, parameter wic_u_bc_diri_adv_and_robin
Definition: cv-adv-dif.F90:73
phreeqcrm::rm_setunitsexchange
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
linearise_components
subroutine linearise_components()
Definition: Multiphase_TimeLoop.F90:1278
multi_tools::is_active_tracer_field
logical function is_active_tracer_field(input_name, ignore_concentration)
: Returns true if the input name is an Active Tracer type, Tracer, Species, Concentration or any othe...
Definition: multi_tools.F90:1192
get_cappressure
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:1626
phreeqcrm::rm_seterroron
integer function rm_seterroron(id, tf)
Set the property that controls whether error messages are generated and displayed....
Definition: RM_interface.F90:4688
xgb_interface
Interface to call XGBoost library C API from fortran.
Definition: xgb_interface.F90:6
multiphase_1d_engine::impose_strong_bcs_wells
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:9588
multi_tools
This module contains the generic subroutines required by ICFERST, for example quicksort.
Definition: multi_tools.F90:20
shape_functions_ndim::quad_nd_shape
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
iphreeqc::getcurrentselectedoutputusernumber
integer function getcurrentselectedoutputusernumber(id)
Definition: IPhreeqc_interface.F90:159
multi_tools::is_tracer_field
logical function is_tracer_field(input_name)
: Returns true if the input name is a Tracer type:PassiveTracer, Tracer, Species, Concentration or an...
Definition: multi_tools.F90:1181
stokes_anderson_acceleration
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:2887
multiphase_1d_engine::volumefraction_assemble_solve_newton
subroutine, public volumefraction_assemble_solve_newton(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, prev_sat, 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 residual of the transport of saturation onlyequation for the saturation and Jac...
Definition: multi_dyncore_dg.F90:1548
multi_data_types::multi_ndgln
This type contains all the local to global conversors for the different fields we have.
Definition: multi_data_types.F90:284
multiphase_eos::correction_mass_metal
subroutine correction_mass_metal(state, packed_state, Mdims, ndgln, total_mass_before, total_mass_after)
: subroutine to apply a correction factor to the metal concentrations in order to conserve mass if ne...
Definition: multi_eos.F90:3986
get_int_vel_orig_new
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:2944
shape_functions_linear_quadratic::new_high_order_vol_quadratic_ele_quadrature
logical new_high_order_vol_quadratic_ele_quadrature
Definition: multi_shape_fct_ND.F90:38
multiphase_eos::diffjwl
real function diffjwl(A, B, w, R1, R2, E0, roe, ro)
Diff of JWL equation functions.
Definition: multi_eos.F90:2915
shape_functions_ndim::shape_one_ele2
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
multiphase_eos::cap_bulk_rho
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:291
multiphase_eos::compute_normalised_saturation
real function compute_normalised_saturation(S_phase, Simm_phase, Simm_all, nphase, iphase)
: Computes normalised saturation for Land trapping with tabulated relperm
Definition: multi_eos.F90:1507
cv_advection::pack_loc_all2
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:3877
multiphase_1d_engine::comb_vel_matrix_diag_dist
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:7868
phreeqcrm::rm_screenmessage
integer function rm_screenmessage(id, str)
Print message to the screen.
Definition: RM_interface.F90:4329
petsc_log_init
subroutine petsc_log_init(stage_name, no, stage, ierr)
: This routine registers the stage for PETSC logging IMPORTANT:
Definition: multi_tools.F90:1143
phreeqcrm::rm_getselectedoutputcount
integer function rm_getselectedoutputcount(id)
Returns the number of selected-output definitions. RM_SetCurrentSelectedOutputUserNumber determines w...
Definition: RM_interface.F90:2208
get_simulation_type
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:1109
phreeqcrm::rm_getfileprefix
integer function rm_getfileprefix(id, prefix)
Returns the reaction-module file prefix to the character argument (prefix).
Definition: RM_interface.F90:1270
multi_tools::table_interpolation_linear
real function table_interpolation_linear(X_points, Y_points, input_X)
Definition: multi_tools.F90:519
phreeqcrm::rm_setprintchemistryon
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
iphreeqc::getselectedoutputcolumncount
integer function getselectedoutputcolumncount(id)
Definition: IPhreeqc_interface.F90:544
cv_advection::wic_d_bc_dirichlet
integer, parameter wic_d_bc_dirichlet
Definition: cv-adv-dif.F90:73
multiphase_1d_engine::comb_vel_matrix_diag_dist_lump
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:7952
shape_functions_ndim::compute_xndgln_tritetquadhex
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
copy_outof_state::getoutputconverter
subroutine, public getoutputconverter(fieldname, factor, shft)
Returns the factor to convert from internal (SI) to the output system For temperature it returns the ...
Definition: Extract_From_State.F90:4029
multiphase_eos::get_devcappressure
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:1654
shape_functions_ndim::compute_surfaceshapefunctions_triangle_tetrahedron
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
multi_data_types::multi_discretization_opts
This type includes the necessary information to choose from the different discretization options avai...
Definition: multi_data_types.F90:114
phreeqcrm::rm_getspecieslog10gammas
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
shape_functions_linear_quadratic::re3d27
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
matrix_operations::assemble_global_multiphase_csr
subroutine assemble_global_multiphase_csr(global_csr, block_csr, dense_block_matrix, block_to_global, global_dense_block)
Definition: multi_matrix_operations.F90:1565
shape_functions_ndim::specfu
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
multi_data_types::multi_dimensions
Data type storing all the dimensionrs describing the mesh, fields, nodes, etc.
Definition: multi_data_types.F90:76
phreeqcrm::rm_getselectedoutputcolumncount
integer function rm_getselectedoutputcolumncount(id)
Returns the number of columns in the current selected-output definition. RM_SetCurrentSelectedOutputU...
Definition: RM_interface.F90:2162
setoutputstringon
integer function setoutputstringon(id, output_string_on)
Definition: IPhreeqc_interface.F90:1206
copy_outof_state::calculate_internal_volume
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:3411
cv_advection::shock_front_in_ele
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:7311
multi_tools::multi_compute_python_field
subroutine multi_compute_python_field(states, iphase, option_path_python, scalar_result, sfield, vfield, tfield)
: This subroutine uses python run string to run the python_scalar_diagnostic to read a field the only...
Definition: multi_tools.F90:1005
matptsstore
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:6828
phreeqcrm::rm_initialphreeqc2module
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
phreeqcrm::rm_getconcentrations
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
cv_advection::diffus_cal_coeff
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:4954
multi_data_types::deallocate_porous_adv_coefs
subroutine deallocate_porous_adv_coefs(upwnd)
Deallocates the memory for the advection coefficients for porous media.
Definition: multi_data_types.F90:1607
multi_data_types::mult_multi_field_by_array
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
phreeqcrm::rm_getexchangespeciesname
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
shape_functions_ndim::make_qtri
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
phreeqcrm::rm_createmapping
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
matrix_operations::mass_matrix_matvec
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:880
multiphase_1d_engine
This module contain all the necessary subroutines to deal with FE-wise equations and fields....
Definition: multi_dyncore_dg.F90:21
multi_machine_learning::test_xgboost
subroutine test_xgboost()
Teste the XGBoost coupling.
Definition: multi_machine_learning.F90:155
multi_interpolation::memorycleanupinterpolation1
subroutine memorycleanupinterpolation1()
Definition: multi_interpolation.F90:305
iphreeqc::tt_string
integer(kind=4), parameter tt_string
Definition: IPhreeqc_interface.F90:10
multi_data_types::allocate_multi_field
Allocated a multi field type based on field name.
Definition: multi_data_types.F90:41
dump_multiphase
subroutine dump_multiphase(prefix, icp)
Definition: cv-adv-dif.F90:2620
cv_fem_shape_funs_old
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
multi_data_types::destroy_multi_matrices
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
shape_functions_ndim::tr2d
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
phreeqcrm::rm_decodeerror
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
phreeqcrm::rm_getsurfacespeciescount
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
iphreeqc::runfile
integer function runfile(id, filename)
Definition: IPhreeqc_interface.F90:861
cv_advection::unpack_loc
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:3769
phreeqcrm::rm_create
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
compositional_terms::proj_u2mat
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
sparsity_nd::cv_neighboor_sparsity
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
matrix_operations::ct_mult_with_c3
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:1427
spact
Sparsity for the Matrices?
Definition: multi_sparsity.F90:1099
iphreeqc::getdumpfileon
logical function getdumpfileon(id)
Definition: IPhreeqc_interface.F90:193
copy_outof_state::compute_node_global_numbers
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:183
cv_advection::triloccords2d
subroutine triloccords2d(Xp, Yp, N1, N2, N3, X1, Y1, X2, Y2, X3, Y3)
Definition: cv-adv-dif.F90:7268
multi_tools::vtolfun
pure real function, dimension(size(val)) vtolfun(val)
:This function is a tolerance function for a vector which is used as a denominator....
Definition: multi_tools.F90:123
cv_advection::wic_p_bc_dirichlet
integer, parameter wic_p_bc_dirichlet
Definition: cv-adv-dif.F90:73
phreeqcrm::rm_gettime
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
copy_outof_state::write_state_units
subroutine, public write_state_units(dump_no, Mdims, state)
Definition: Extract_From_State.F90:4136
phreeqcrm::rm_getiphreeqcid
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
setlogstringon
integer function setlogstringon(id, log_string_on)
Definition: IPhreeqc_interface.F90:1148
shape_functions_ndim::test_quad_tet
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
oneeletens_all
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:7549
phreeqcrm::rm_outputmessage
integer function rm_outputmessage(id, str)
Print a message to the output file.
Definition: RM_interface.F90:4150
multi_data_types::multi_field
Type created to store absorption terms in a compacted way associated subroutines where created to be ...
Definition: multi_data_types.F90:384
phreeqcrm::rm_getspeciesconcentrations
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
shape_functions_ndim::cheby1
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
shape_functions_linear_quadratic::re2dn9
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
shape_functions_ndim::eliminating_repetitive_nodes
subroutine eliminating_repetitive_nodes(totele, x_nloc, x_nonods, over_all, x_ndgln, x, y)
Definition: multi_shape_fct_ND.F90:6943
phreeqcrm::rm_getgascomppressures
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
shape_functions_ndim::adding_extra_parametric_nodes
subroutine adding_extra_parametric_nodes(totele, x_nloc, mx_x_nonods, x_ndgln, x, y)
Definition: multi_shape_fct_ND.F90:7079
conv_quad_to_lin_tri_tet
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:7102
multiphase_eos::get_rockfluidprop
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:2585
iphreeqc::ipq_outofmemory
integer(kind=4), parameter ipq_outofmemory
Definition: IPhreeqc_interface.F90:14
copy_outof_state::get_discretisation_options
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:470
shape_functions_prototype::fvquad
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
iphreeqc::getoutputstringline
subroutine getoutputstringline(id, n, line)
Definition: IPhreeqc_interface.F90:510
multi_data_types::porous_adv_coefs
Required values to compute the fluxes for porous media. Effectively the sigma terms from the papers C...
Definition: multi_data_types.F90:352
shape_functions_ndim::gtroot
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
sparsity_nd::conv_ct2c
subroutine conv_ct2c(cv_nonods, nct, findct, colct, u_nonods, mx_nc, findc, colc)
Definition: multi_sparsity.F90:729
solvers_module::set_saturation_to_sum_one
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:672
phreeqcrm::rm_getsurfacetype
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
iphreeqc::outputerrorstring
subroutine outputerrorstring(id)
Definition: IPhreeqc_interface.F90:813
multi_data_types::scale_multi_field
subroutine scale_multi_field(mfield, a, inode)
This subroutine rescales a multifield mfield = a * mfield.
Definition: multi_data_types.F90:1050
cv_advection::scvdetnx
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:7591
multi_tools::is_passivetracer_field
logical function is_passivetracer_field(input_name)
: Returns true if the input name is a PassievTracer type.
Definition: multi_tools.F90:1206
sparsity_nd::pousinmc2
subroutine pousinmc2(totele, nloc1, nonods2, nloc2, nimem, ndglno1, ndglno2, lencolm, findrm, colm, centrm)
Definition: multi_sparsity.F90:590
matrix_operations::pha_block_mat_vec_many_reusing
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:1165
shape_functions_ndim::dgsdetnxloc2
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
phreeqcrm::rm_getstartcell
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
IPHREEQC module from the PHREEQC project, needed to interact with PHREEQCRM.
Definition: IPhreeqc_interface.F90:3
multiphase_1d_engine::assemb_sat_jac_and_res
subroutine assemb_sat_jac_and_res(state, packed_state, final_phase, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, sat_field, sat_bak, 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 calls CV_ASSEMB twice to generate a numerical jacobian for the solution of...
Definition: multi_dyncore_dg.F90:1920
multiphase_1d_engine::viscocity_tensor_les_calc
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:7288
shape_functions_ndim::cherot
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
phreeqcrm::rm_setunitssolution
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
phreeqcrm::rm_mpiworker
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
read_fluid_and_rock_properties_from_csv
subroutine read_fluid_and_rock_properties_from_csv()
Definition: Multiphase_Prototype_Wrapper.F90:532
shape_functions_ndim::factorial
recursive integer function factorial(n)
Calculate n!
Definition: multi_shape_fct_ND.F90:9459
has_anisotropic_diffusion
logical function has_anisotropic_diffusion(tracer)
Definition: cv-adv-dif.F90:2654
compositional_terms::calc_kcomp2
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
autocomplete_input_file
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:678
shape_functions_linear_quadratic::lagran
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
multi_data_types::deallocate_multi_dev_shape_funs
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
multi_data_types::multi_gi_dimensions
Necessary information for perform gauss integration.
Definition: multi_data_types.F90:130
iphreeqc::destroyiphreeqc
integer function destroyiphreeqc(id)
Definition: IPhreeqc_interface.F90:109
multiphase_1d_engine::diffus_cal_coeff_stress_or_tensor
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:8977
shape_functions_ndim::triareaf
real function triareaf(x1, y1, x2, y2, x3, y3)
Definition: multi_shape_fct_ND.F90:6282
iphreeqc::getlogstringline
subroutine getlogstringline(id, n, line)
Definition: IPhreeqc_interface.F90:410
shape_functions_ndim::adding_parametric_nodes_hex
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
cv_advection::dg_derivs_all2
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:4711
phreeqcrm::rm_getequilibriumphasesname
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
cv_advection::pack_loc
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:3746
set_neiloc_tet
subroutine set_neiloc_tet(neighbour_list, vertices)
Definition: multi_shape_fct_ND.F90:4077
multi_tools::assign_val
subroutine assign_val(outval, inval)
:Copies the data from inval to outval safely. If the sizes are different outval is populated using th...
Definition: multi_tools.F90:477
phreeqcrm::rm_openfiles
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
copy_outof_state::inf_norm_scalar_normalised
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:2801
shape_functions_ndim::cheby2
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
get_neigbouring_lists
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:3448
iphreeqc::tt_error
integer(kind=4), parameter tt_error
Definition: IPhreeqc_interface.F90:8
phreeqcrm::rm_geterrorstringlength
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
iphreeqc::getselectedoutputstringon
logical function getselectedoutputstringon(id)
Definition: IPhreeqc_interface.F90:644
iphreeqc::getoutputfileon
logical function getoutputfileon(id)
Definition: IPhreeqc_interface.F90:478
phreeqcrm::rm_settemperature
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
introduce_c_cv_boundary_conditions
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:6213
shape_functions_ndim::volume_tethex
real function volume_tethex(hexs, x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4)
Definition: multi_shape_fct_ND.F90:9950
solvers_module::scale_petsc_matrix
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:1142
sparsity_nd::form_dgm_pha_sparsity
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
phreeqcrm::rm_getselectedoutputheading
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
phreeqcrm::rm_setporosity
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
multi_tools::table_interpolation
real function table_interpolation(X_points, Y_points, input_X)
X_points, Y_points to form a linear (size == 2) or quadratic (size == 3) interpolation.
Definition: multi_tools.F90:492
multiphase_1d_engine::dg_visc_lin
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:7164
multiphase_1d_engine::compositional_assemble_solve
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:2110
multi_data_types
This module contains all the ICFERST structures and associated subroutines (allocate/deallocate) Use ...
Definition: multi_data_types.F90:20
iphreeqc::accumulateline
integer function accumulateline(id, line)
Definition: IPhreeqc_interface.F90:25
solvers_module::duplicate_petsc_matrix
subroutine, public duplicate_petsc_matrix(MAT_A, MAT_B)
Definition: multi_solvers.F90:1172
philnodele
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:7047
phreeqcrm::rm_getspeciesd25
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
iphreeqc::geterrorstringline
subroutine geterrorstringline(id, n, line)
Definition: IPhreeqc_interface.F90:326
multi_data_types::multi_sparsity
This type comprises the necessary variables to represent matrices using a CSR structure.
Definition: multi_data_types.F90:245
phreeqcrm::rm_warningmessage
integer function rm_warningmessage(id, warn_str)
Print a warning message to the screen and the log file.
Definition: RM_interface.F90:6321
phreeqcrm::rm_setrebalancebycell
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
phreeqcrm::rm_closefiles
integer function rm_closefiles(id)
Close the output and log files.
Definition: RM_interface.F90:129
shape_functions_ndim::dgsdetnxloc2_all
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
shape_functions_ndim::shape_l_q_quad
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
multi_pipes
This module contains all the subroutines to assemble and solve for pipes.
Definition: multi_pipes.F90:19
copy_outof_state::get_var_from_packed_state
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:2974
setdumpfileon
integer function setdumpfileon(id, dump_on)
Definition: IPhreeqc_interface.F90:992
matrix_operations::pha_block_mat_vec_many2
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:1058
solvers_module::boundedsolutioncorrections
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:78
iphreeqc::getselectedoutputcount
integer function getselectedoutputcount(id)
Definition: IPhreeqc_interface.F90:560
cv_advection::onvdlim_ano_many
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:3684
matrix_operations::ulong_2_uvw
subroutine ulong_2_uvw(U, V, W, UP, U_NONODS, NDIM, NPHASE)
Definition: multi_matrix_operations.F90:1502
shape_functions_prototype::fvqquad
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
multiphase_1d_engine::force_bal_cty_assem_solve
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, VOLFRA_PORE_TOTAL, 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:2379
multiphase_time_loop::multifluids_solvetimeloop
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:125
sparsity_nd::exten_sparse_multi_phase_old
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
matrix_operations::ct_mult2
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:1250
solve_and_update_velocity
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:3162
spact::ct_dg_sparsity
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
shape_functions_prototype::detnlxr_plus_u2
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
setdumpfilename
integer function setdumpfilename(id, fname)
Definition: IPhreeqc_interface.F90:974
multi_machine_learning::xgboost_free_model
subroutine xgboost_free_model()
Free the loaded XGBoost model from memory.
Definition: multi_machine_learning.F90:140
phreeqcrm::rm_getselectedoutputrowcount
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
copy_outof_state::printcsrmatrix
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:3274
multiphase_eos::metal_dissolution
subroutine metal_dissolution(state, packed_state, Mdims, ndgln)
: subroutine to dissolve metals using a partition coefficient. Dissolve/precipitate instantaneously t...
Definition: multi_eos.F90:3343
quad_gp
type(quad_data) function quad_gp(i1, i2, i3)
Definition: multi_shape_fct_ND.F90:3985
sparsity_nd::getfinele
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
calc_anisotrop_lim_vals
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:6379
matrix_operations::pha_block_mat_vec2
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:1009
copy_outof_state::converttooutunits
subroutine, public converttooutunits(state, Mdims, convertBack)
: Convert fields to out units. Also has a backwards options as we need to undo this after dumping the...
Definition: Extract_From_State.F90:4078
iphreeqc::addwarning
integer function addwarning(id, warn_msg)
Definition: IPhreeqc_interface.F90:61
phreeqcrm::rm_getgascomponentsname
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
multiphase_eos::flooding_hmin
real, parameter flooding_hmin
Definition: multi_eos.F90:47
get_massmatrix
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:3865
shape_functions_prototype::scvfen_2_sbcvfen
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
multiphase_1d_engine::getoverrelaxation_parameter
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:8253
multiphase_time_loop
Time-loop module of IC-FERST. This module contains the time-loop and the non-linear loop....
Definition: Multiphase_TimeLoop.F90:30
iphreeqc::loaddatabase
integer function loaddatabase(id, filename)
Definition: IPhreeqc_interface.F90:761
copy_outof_state::as_packed_vector
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:2039
multi_tools::nan_check
subroutine nan_check(a, k)
:Checks if a number is a Nan
Definition: multi_tools.F90:138
shape_functions_ndim
This module contains subroutines to generate the shape functions for multi dimensions.
Definition: multi_shape_fct_ND.F90:2361
multiphase_eos::tables_loaded
logical, save tables_loaded
Definition: multi_eos.F90:49
setselectedoutputstringon
integer function setselectedoutputstringon(id, selected_output_string_on)
Definition: IPhreeqc_interface.F90:1264
mult_inv_mass_vel_vector
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:3089
cross4
real function, dimension(3) cross4(v1, v2)
Definition: multi_shape_fct_ND.F90:4061
multi_data_types::add_multi_field_to_array
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
jacpre
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:7812
multiphase_eos::calculate_viscosity
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:2167
phreeqcrm::rm_setselectedoutputon
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
multi_tools::read_csv_table
subroutine read_csv_table(data_array, path_to_table, extra_data)
:Template of csv table OPTIONAL section (header) real1,real2,real3,..., size(extra_data) rows,...
Definition: multi_tools.F90:561
copy_outof_state::impose_connected_bcs
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:3843
shape_functions_ndim::base_order_tet
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
multi_data_types::pipe_coords
Type containing everything required to indentify and store which nodes contain a well/pipe.
Definition: multi_data_types.F90:464
phreeqcrm::rm_getsolidsolutioncomponentsname
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
phreeqcrm::rm_setpartitionuzsolids
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
matrix_operations::matdmatinv
subroutine matdmatinv(DMAT, DMATINV, NLOC)
calculate DMATINV
Definition: multi_matrix_operations.F90:56
multiphase_eos::calculate_u_source_cv
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:1708
multiphase_eos::update_velocity_absorption_coriolis
subroutine update_velocity_absorption_coriolis(states, ndim, nphase, velocity_absorption)
:Computes velocity absorption associated to coriolis forces from diamond information
Definition: multi_eos.F90:2487
color_get_cmc_pha_fast
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
shape_functions_ndim::remaping_fields_qtriangles
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
shape_functions_ndim::printoutfunmat
subroutine printoutfunmat(n, m, a)
Definition: multi_shape_fct_ND.F90:6316
setoutputfileon
integer function setoutputfileon(id, output_on)
Definition: IPhreeqc_interface.F90:1186
shape_functions_linear_quadratic::new_quadratic_ele_quadrature
logical new_quadratic_ele_quadrature
Definition: multi_shape_fct_ND.F90:39
multiphase_eos
This module contains subroutines related to the equations of state and other properties such as relat...
Definition: multi_eos.F90:19
iphreeqc::getselectedoutputvalue
integer function getselectedoutputvalue(id, row, col, vtype, dvalue, svalue, slength)
Definition: IPhreeqc_interface.F90:676
cv_advection::dg_derivs_all1
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:4457
copy_outof_state::as_vector
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:2008
phreeqcrm::rm_getcomponent
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
solvers_module::convert_c_and_ct_mat_to_petsc_format
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:1295
for_tens_derivs_ndots
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:9196
multi_data_types::get_multi_field_inverse
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
shape_functions_ndim::base_order_tri
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
matrix_operations::c_mult_many
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:1313
cv_advection::dgsimplnorm
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:5527
multi_interpolation::memorycleanupinterpolation2
subroutine memorycleanupinterpolation2()
Definition: multi_interpolation.F90:311
phreeqcrm::rm_runcells
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
relperm_tabulated_land
subroutine relperm_tabulated_land(S_phase, CV_Immobile_fract, nphase, iphase, Kr)
: Tabulated relperm with Land trapping using normalised saturation
Definition: multi_eos.F90:1415
cv_advection::dgsimplnorm_all
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:5497
multi_pipes::retrieve_pipes_coords
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:2290
shape_functions_linear_quadratic::detnlxr
: Calculates the derivatives of the shape functions
Definition: multi_shape_fct_ND.F90:42
multiphase_1d_engine::intenerge_assem_solve
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, VOLFRA_PORE_TOTAL, 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
generate_pivit_matrix_stokes
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:3118
setlogfileon
integer function setlogfileon(id, log_on)
Definition: IPhreeqc_interface.F90:1128
phreeqcrm::rm_loaddatabase
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
multi_machine_learning::xgboost_predict
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
multi_interpolation::state_new
type(state_type) state_new
Definition: multi_interpolation.F90:63
multi_data_types::allocate_multi_pipe_package
subroutine allocate_multi_pipe_package(pipes, Mdims, Mspars)
Allocates the necessary memory for multi_pipe_package.
Definition: multi_data_types.F90:1622
multi_data_types::add_array_to_multi_field
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
cv_advection::calc_anisotrop_lim
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:6293
multiphase_eos::relperm_table_data
real, dimension(:,:,:), allocatable, save relperm_table_data
Definition: multi_eos.F90:50
setdumpstringon
integer function setdumpstringon(id, dump_string_on)
Definition: IPhreeqc_interface.F90:1012
update_saturation_flipping
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:2884
multiphase_1d_engine::use_posinmat_c_store
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:8038
matrix_operations::allocate_momentum_matrix
type(petsc_csr_matrix) function allocate_momentum_matrix(sparsity, velocity)
Definition: multi_matrix_operations.F90:1624
iphreeqc::getversionstring
subroutine getversionstring(version)
Definition: IPhreeqc_interface.F90:709
cv_advection::pack_loc_all
Packs field together to be later on used for high order computations.
Definition: cv-adv-dif.F90:65
multiphase_eos::pc_table_data
real, dimension(:,:,:), allocatable, save pc_table_data
Definition: multi_eos.F90:50
spact::check_sparsity
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
setselectedoutputfilename
integer function setselectedoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:1226
shape_functions_ndim::binomial_coefficient
real function binomial_coefficient(K, L)
Calculate binomial coefficients.
Definition: multi_shape_fct_ND.F90:9245
shape_functions_ndim::james_quadrature_quad_tet
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
populate_multi_state
subroutine populate_multi_state(state)
Definition: Multiphase_Prototype_Wrapper.F90:296
iphreeqc::runaccumulated
integer function runaccumulated(id)
Definition: IPhreeqc_interface.F90:845
seterrorstringon
integer function seterrorstringon(id, error_string_on)
Definition: IPhreeqc_interface.F90:1090
cv_advection::isotropic_limiter_all
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:5584
phreeqcrm::rm_getsaturation
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
phreeqcrm::rm_getendcell
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
multiphase_eos::flash_gas_dissolution
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:3242
sparsity_nd
Subroutines associated with the CSR storage used in ICFERST.
Definition: multi_sparsity.F90:231
shape_functions_ndim::triquaold
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
phreeqcrm::rm_runfile
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
multi_pipes::wells_saturation_assemb
subroutine, public wells_saturation_assemb(state, packed_state, final_phase, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, saturation, sat_prev, velocity, density, DEN_ALL, DENOLD_ALL, DT, SUF_SIG_DIAGTEN_BC, CV_P, SOURCT_ALL, VOLFRA_PORE, eles_with_pipe, pipes_aux, assemble_collapsed_to_one_phase, getResidual)
Definition: multi_pipes.F90:68
solvers_module::get_anderson_acceleration_new_guess
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:984
phreeqcrm::rm_setrebalancefraction
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
multi_data_types::deallocate_projection_matrices
subroutine deallocate_projection_matrices(shape_fun)
This subroutine deallocates projection matrices CV2FE & FE2CV stored in shape_fun.
Definition: multi_data_types.F90:1272
copy_outof_state::get_convergence_functional
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:2820
shape_functions_ndim::tet_vol
real function tet_vol(a, b, c, d)
Definition: multi_shape_fct_ND.F90:6254
shape_functions_ndim::get_nwicel
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
multi_interpolation::m2minterpolation
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
cv_advection::wic_u_bc_robin
integer, parameter wic_u_bc_robin
Definition: cv-adv-dif.F90:73
phreeqcrm::rm_getsurfacespeciesname
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
iphreeqc::getselectedoutputstringline
subroutine getselectedoutputstringline(id, n, line)
Definition: IPhreeqc_interface.F90:626
compositional_terms::calculate_componentdiffusionterm
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
copy_outof_state::update_outfluxes
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:3738
get_int_t_den_new
subroutine get_int_t_den_new(LIMF)
Computes the flux between CVs.
Definition: cv-adv-dif.F90:2683
iphreeqc::getcomponentcount
integer function getcomponentcount(id)
Definition: IPhreeqc_interface.F90:125
multiphase_eos::density_polynomial
subroutine density_polynomial(eos_coefs, pressure, temperature, Density_Field)
: Define de density as a polynomial
Definition: multi_eos.F90:875
seterrorfilename
integer function seterrorfilename(id, fname)
Definition: IPhreeqc_interface.F90:1032
shape_functions_linear_quadratic::retrieve_ngi
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
phreeqcrm::rm_getdensity
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
shape_functions_ndim::tcheb
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
multi_data_types::initialize_multi_outfluxes
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
multiphase_1d_engine::dg_oscilat_detect
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:8853
phreeqcrm::rm_setconcentrations
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
iphreeqc::getselectedoutputfileon
logical function getselectedoutputfileon(id)
Definition: IPhreeqc_interface.F90:594
shape_functions_ndim::eliminating_repetitive_nodes_all
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
shape_functions_ndim::lroots
subroutine lroots(QUAPOS, NDGI)
This sub works out the Gauss-Lobatto-Legendre roots.
Definition: multi_shape_fct_ND.F90:9253
relperm_tabulated
subroutine relperm_tabulated(Kr)
: Tabulated relperm. This subroutine computes the relperm based on tabulated data that the user provi...
Definition: multi_eos.F90:1406
insertion_sort
subroutine insertion_sort(vec, n)
Definition: multi_tools.F90:277
get_nodes_edges
subroutine get_nodes_edges(Nnodes, Nedges)
Definition: multi_tools.F90:835
multi_data_types::allocate_multi_outfluxes
subroutine allocate_multi_outfluxes(Mdims, outfluxes)
Initialises memory for outfluxes.
Definition: multi_data_types.F90:1695
cv_advection::wic_t_bc_diri_adv_and_robin
integer, parameter wic_t_bc_diri_adv_and_robin
Definition: cv-adv-dif.F90:73
copy_outof_state::dump_outflux
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:3612
iphreeqc::runstring
integer function runstring(id, input)
Definition: IPhreeqc_interface.F90:879
multi_data_types::linearise_multi_field
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
phreeqcrm
Fortran Documentation for the geochemical reaction module PhreeqcRM.
Definition: RM_interface.F90:10
multi_data_types::destroy_multi_outfluxes
subroutine destroy_multi_outfluxes(outfluxes)
Deallocates the multi_outfluxes field.
Definition: multi_data_types.F90:1746
set_quad
subroutine set_quad(l, area, normal, quad)
Definition: multi_shape_fct_ND.F90:3963
phreeqcrm::rm_gettimestep
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
iphreeqc::ipq_badvartype
integer(kind=4), parameter ipq_badvartype
Definition: IPhreeqc_interface.F90:15
multi_data_types::allocate_multi_ndgln
subroutine allocate_multi_ndgln(ndgln, Mdims)
This subroutine allocates the global to local conversors.
Definition: multi_data_types.F90:1403
iphreeqc::setbasicfortrancallback
integer function setbasicfortrancallback(id, fcn)
Definition: IPhreeqc_interface.F90:923
shape_functions_linear_quadratic::quad_basis_funs_1d
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
multi_surface_tension::calculate_surface_tension_new
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
multiphase_eos::jwl
real function jwl(A, B, w, R1, R2, E0, p, roe, ro)
JWL equation functions.
Definition: multi_eos.F90:2904
iphreeqc::geterrorstringon
logical function geterrorstringon(id)
Definition: IPhreeqc_interface.F90:344
shape_functions_ndim::jacobf
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
include_wells_and_compressibility_into_rhs
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:3323
multiphase_eos::original_immobile_per_phase
real, dimension(:), allocatable, save original_immobile_per_phase
Definition: multi_eos.F90:53
multi_data_types::allocate_porous_adv_coefs
subroutine allocate_porous_adv_coefs(Mdims, upwnd)
Allocates the memory for the advection coefficients for porous media.
Definition: multi_data_types.F90:1596
multi_data_types::allocate_multi_sparsities
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
phreeqcrm::rm_initialphreeqccell2module
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
copy_outof_state::prepare_absorptions
subroutine, public prepare_absorptions(state, Mdims, multi_absorp)
: Prepares the memory to compute absorption fields
Definition: Extract_From_State.F90:1963
loc_1st_deriv_xyz_dg_curv
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
phreeqcrm::rm_getspeciesname
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
matrix_operations::c_mult2_multi_pres
subroutine c_mult2_multi_pres(Mdims, Mspars, Mmat, deltap, CDP_tensor)
: Performs the multiplication CDP_tensor = MmatC * deltap
Definition: multi_matrix_operations.F90:1371
sparsity_nd::poscmc
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
phreeqcrm::rm_getexchangespeciescount
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
matrix_operations::ct_mult
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:1217
copy_outof_state::get_ele_type_new
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:371
iphreeqc::getdumpstringlinecount
integer function getdumpstringlinecount(id)
Definition: IPhreeqc_interface.F90:209
shape_functions_ndim::quad_nd_shape_n
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
multiphase_eos::initialise_porous_media
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:2994
cv_advection::triloccords
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:7196
phreeqcrm::rm_usesolutiondensityvolume
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
project_velocity_to_affine_space
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:3233
shape_functions_ndim::normgi
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
petsc_log_pop
subroutine petsc_log_pop(ierr)
: This routine ends the current stage registered for PETSc profiling IMPORTANT:
Definition: multi_tools.F90:1170
shape_functions_ndim::xprod
Performs the cross product of two vectors.
Definition: multi_shape_fct_ND.F90:2367
cv_advection::calc_sele
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:5938
multi_pipes::mod_1d_force_bal_c
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:1752
phreeqcrm::rm_getgascompphi
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
phreeqcrm::rm_setgascompmoles
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
phreeqcrm::rm_speciesconcentrations2module
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
cv_advection::find_other_side_fast
subroutine find_other_side_fast(CV_OTHER_LOC, CV_NLOC, INTEGRAT_AT_GI, X_NLOC, X_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 CVFEM_ON_FACE(CV_KLOC,...
Definition: cv-adv-dif.F90:4041
shape_functions_ndim::jacobl
subroutine jacobl(N, ALPHA, BETA, XJAC)
COMPUTES THE GAUSS-LOBATTO COLLOCATION POINTS FOR JACOBI POLYNOMIALS.
Definition: multi_shape_fct_ND.F90:9815
calculate_suf_sig_diagten_bc
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:1124
multiphase_1d_engine::introduce_grad_rhs_field_term
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:8174
iphreeqc::getdumpfilename
subroutine getdumpfilename(id, fname)
Definition: IPhreeqc_interface.F90:175
compositional_terms::exprep
real function exprep(M)
Definition: multi_compositional.F90:494
phreeqcrm::rm_setunitsssassemblage
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
iphreeqc::ipq_invalidrow
integer(kind=4), parameter ipq_invalidrow
Definition: IPhreeqc_interface.F90:17
iphreeqc::getcomponent
subroutine getcomponent(id, n, comp)
Definition: IPhreeqc_interface.F90:141
multiphase_eos::get_material_absorption
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:1325
copy_outof_state::have_option_for_any_phase
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:3476
getstoreelewei
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:6566
iphreeqc::getlogstringlinecount
integer function getlogstringlinecount(id)
Definition: IPhreeqc_interface.F90:394
sum_gp
type(quad_data) function sum_gp(q1, q2, q3)
Definition: multi_shape_fct_ND.F90:3975
calc_cvpres_from_fepres
subroutine calc_cvpres_from_fepres()
Definition: multi_dyncore_dg.F90:3379
shape_functions_ndim::make_qtets
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
surro_cv_minmax
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:5664
phreeqcrm::rm_getexchangename
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
get_all_in_mass_matrix
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:7018
matrix_operations::ct_mult_many
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:1274
phreeqcrm::rm_getselectedoutput
integer function rm_getselectedoutput(id, so)
Populates an array with values from the current selected-output definition. RM_SetCurrentSelectedOutp...
Definition: RM_interface.F90:2100
multi_tools::tolfun
pure real function tolfun(value)
:This function is a tolerance function for a value which is used as a denominator....
Definition: multi_tools.F90:71
phreeqcrm::rm_setspeciessaveon
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
shape_functions_prototype::detnlxr_plus_u1
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
multi_tools::rotationmatrix
subroutine rotationmatrix(a, R)
: Roates a matrix A using the toration matrix R????
Definition: multi_tools.F90:701
matrix_operations::matinvold
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
copy_outof_state::finalise_multistate
subroutine, public finalise_multistate(packed_state, multiphase_state, multicomponent_state)
: Destrys packed_state and the passed down states
Definition: Extract_From_State.F90:2064
matrix_operations
This module contain subroutines to deal with the ICFERST matrices format. This includes MATVECS and M...
Definition: multi_matrix_operations.F90:22
sparsity_1d::resize
subroutine resize(A, n, copy)
Definition: multi_sparsity.F90:29
sparsity_nd::exten_sparse_multi_phase
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
phreeqcrm::rm_runstring
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
multi_machine_learning
Module to load and call a XGBoost model.
Definition: multi_machine_learning.F90:23
multi_phreeqc
All the subroutines required to handle the connection with PHREEQCRM.
Definition: multi_phreeqc.F90:19
shape_functions_prototype::fvhex
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
solvers_module::fpi_backtracking
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:328
multi_data_types::multi_sparsities
This data type contains all the sparsities necessary in the multiphase prototype code.
Definition: multi_data_types.F90:262
multi_tools::ptolfun
real function ptolfun(value)
:This function is a tolerance function for strictly positive values used as a denominator....
Definition: multi_tools.F90:55
phreeqcrm::rm_setunitsgasphase
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
multi_surface_tension::surface_tension_wrapper_new
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
multi_tools::petsc_logging
subroutine petsc_logging(func, stage, ierr, default, push_no, stage_name)
Subroutines that can initialise, register and start/end a petsc performance profiling routin....
Definition: multi_tools.F90:1082
shape_functions_prototype::volnei
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
multi_tools::read_nastran_file
subroutine read_nastran_file(filepath, node, edges)
:This subroutine reads a nastran file that contains the information defining the 1D path of a well th...
Definition: multi_tools.F90:769
multi_data_types::multi_shape_funs
Data structure to store all the shape functions to facilitate its movement throughtout the code.
Definition: multi_data_types.F90:176
iphreeqc::ipq_badinstance
integer(kind=4), parameter ipq_badinstance
Definition: IPhreeqc_interface.F90:19
multi_tools::r2norm
real function r2norm(VEC, NVEC)
Definition: multi_tools.F90:42
cv_advection::wic_u_bc_dirichlet_inout
integer, parameter wic_u_bc_dirichlet_inout
Definition: cv-adv-dif.F90:73
multi_data_types::multi_transport_scalar
Contains all the information for generic scalar fields to solve for.
Definition: multi_data_types.F90:413
iphreeqc::createiphreeqc
integer function createiphreeqc()
Definition: IPhreeqc_interface.F90:95
multiphase_eos::update_velocity_source
subroutine update_velocity_source(states, Mdims, u_source)
:Computes velocity source from diamond information
Definition: multi_eos.F90:2514
phreeqcrm::rm_settimeconversion
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
matrix_operations::pha_block_mat_vec
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:936
sparsity_1d::def_spar
subroutine def_spar(SEMI_BAND_WID, NONODS, MX_NCOLC, NCOLC, CENTC, FINDC, COLC)
define sparsity...
Definition: multi_sparsity.F90:51
matrix_operations::pha_block_mat_vec_many
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:1122
phreeqcrm::rm_settimestep
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
multi_tools::read_csv_table_standard
subroutine read_csv_table_standard(data_array, path_to_table, extra_data)
Definition: multi_tools.F90:590
multi_tools::nvdfunnew_many_sqrt
real function, dimension(size(uc)) nvdfunnew_many_sqrt(UF, UC, XI_LIMIT)
: The function computes NVDFUNNEW, the normalised value of the advected variable on the face of the c...
Definition: multi_tools.F90:205
jacdia
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:7705
finptsstore
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:6673
iphreeqc::geterrorfileon
logical function geterrorfileon(id)
Definition: IPhreeqc_interface.F90:278
solvers_module::initialise_saturation_sums_one
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:820
matrix_operations::color_get_cmc_pha
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
viscocity_tensor_les_calc_u
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:7430
phreeqcrm::rm_getnthselectedoutputusernumber
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
multi_sp
This module contains all the necessary subroutines to deal with self Potential in ICFERST.
Definition: multi_self_potential.F90:19
shape_functions_ndim::shape
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
multiphase_eos::jwldensity
real function, dimension(jwln) jwldensity(eos_coefs, pressure, ro0, JWLn)
Density of JWL equation functions.
Definition: multi_eos.F90:2926
iphreeqc::tt_empty
integer(kind=4), parameter tt_empty
Definition: IPhreeqc_interface.F90:7
shape_functions_linear_quadratic::re3dn8
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
apply_eno_2_t
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:2183
iphreeqc::ipq_invalidcol
integer(kind=4), parameter ipq_invalidcol
Definition: IPhreeqc_interface.F90:18
multi_data_types::get_multi_field
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
iphreeqc::clearaccumulatedlines
integer function clearaccumulatedlines(id)
Definition: IPhreeqc_interface.F90:79
shape_functions_ndim::tr2or3dqu
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
phreeqcrm::rm_initialphreeqc2concentrations
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
cv_advection::put_in_ct_rhs
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:6037
iphreeqc::getselectedoutputstringlinecount
integer function getselectedoutputstringlinecount(id)
Definition: IPhreeqc_interface.F90:610
porous_assemb_force_cty
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:3663
shape_functions_ndim::make_linear_tetrahedron
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
phreeqcrm::rm_getgridcellcount
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
cv_advection::pack_or_unpack_loc
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:3802
setoutputfilename
integer function setoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:1168
multi_tools::tolfun_many
pure real function, dimension(size(val)) tolfun_many(val)
:This function is a tolerance function for a scalar which is used as a denominator....
Definition: multi_tools.F90:90
shape_functions_ndim::shatriold
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
phreeqcrm::rm_setrepresentativevolume
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
multiphase_eos::compute_viscosity_eos
subroutine compute_viscosity_eos(state, Mdims)
In this subroutine we compute the viscosity EOS. Options for different EOS.
Definition: multi_eos.F90:2293
iphreeqc::getoutputstringlinecount
integer function getoutputstringlinecount(id)
Definition: IPhreeqc_interface.F90:494
multi_surface_tension
This module contains the subroutines to include surface tension. Currently only used for INERTIA.
Definition: multi_surface_tension.F90:20
matrix_operations::posinmat
subroutine posinmat(posmat, globi, globj, findrm, colm)
: Find position in matrix POSMAT which has column GLOBJ
Definition: multi_matrix_operations.F90:1523
multi_data_types::allocate_multi_dev_shape_funs
Allocates the required memory to store the derivatives of the shape functions.
Definition: multi_data_types.F90:34
shape_functions_prototype
SHAPE FUNCTIONS SUBRTS.
Definition: multi_shape_fct.F90:25
shape_functions_linear_quadratic::rgptwe
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
triangle_area
real function triangle_area(v1, v2)
Definition: multi_shape_fct_ND.F90:4070
phreeqcrm::rm_setsaturation
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
phreeqcrm::rm_setdensity
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
multi_data_types::deallocate_multi_pipe_package
subroutine deallocate_multi_pipe_package(pipes)
Deallocates the necessary memory for multi_pipe_package.
Definition: multi_data_types.F90:1644
solvers_module::scale_petsc_matrix_by_vector
subroutine, public scale_petsc_matrix_by_vector(Mat_petsc, vfield)
In this subroutine the matrix is multiplied by vfield A is-written.
Definition: multi_solvers.F90:1099
multi_data_types::multi_dev_shape_funs
Data structure to store the derivatives of the shape functions and conversors from reference element ...
Definition: multi_data_types.F90:215
iphreeqc::getdumpstringon
logical function getdumpstringon(id)
Definition: IPhreeqc_interface.F90:244
multi_pipes::assemble_pipe_transport_and_cty
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, getNewtonType, getResidual, Mmat, Mspars, upwnd, GOT_T2, DT, pipes_aux, DIAG_SCALE_PRES_COUP, DIAG_SCALE_PRES, mean_pore_cv, MEAN_PORE_CV_TOTAL, 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:1167
shape_functions_ndim::spectr
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
solvers_module
All the subroutines associated to solving non-linear systems, Schur complement, etc.
Definition: multi_solvers.F90:19
iphreeqc::getoutputstringon
logical function getoutputstringon(id)
Definition: IPhreeqc_interface.F90:528
shape_functions_prototype::detnlxr_plus_u
Subroutine to compute the derivatives of the inputed shape functions.
Definition: multi_shape_fct.F90:39
multiphase_eos::update_velocity_absorption
subroutine update_velocity_absorption(states, ndim, nphase, velocity_absorption)
:<INERTIA ONLY>Computes velocity absorption from diamond information
Definition: multi_eos.F90:2430
phreeqcrm::rm_dumpmodule
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
multi_data_types::multi_outfluxes
Contains variables to analyse the flux across the BCs that the user is interested.
Definition: multi_data_types.F90:446
shape_functions_ndim::shatri
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
phreeqcrm::rm_setconcentrations1d
integer function rm_setconcentrations1d(id, c)
Definition: RM_interface.F90:4466
multi_data_types::deallocate_multi_ndgln
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
multi_data_types::deallocate_multi_shape_funs
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
shape_functions_ndim::area_quad_map
real function area_quad_map(cv_iloc, xgi, ygi, lx, ly)
Definition: multi_shape_fct_ND.F90:6231
solvers_module::non_porous_ensure_sum_to_one
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:776
phreeqcrm::rm_mpiworkerbreak
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
get_diff_coef_divdx
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:7554
cv_advection::wic_p_bc_free
integer, parameter wic_p_bc_free
Definition: cv-adv-dif.F90:73
i_pack_loc
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:3930
shape_functions_prototype::fvqhex
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
phreeqcrm::rm_settime
integer function rm_settime(id, time)
Set current simulation time for the reaction module.
Definition: RM_interface.F90:5674
set_viscosity
subroutine set_viscosity(nphase, Mdims, state, visc_phases)
: For porous media, just sets the viscosity as a scalar
Definition: multi_eos.F90:1223
shape_functions_prototype::u_volnei
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
cv_advection::wic_u_bc_dirichlet
integer, parameter wic_u_bc_dirichlet
Definition: cv-adv-dif.F90:73
phreeqcrm::rm_getspecieslog10molalities
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
phreeqcrm::rm_setdumpfilename
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
multiphase_1d_engine::force_min_max_principle
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:656
phreeqcrm::rm_getsolutionvolume
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
phreeqcrm::rm_getgfw
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
phreeqcrm::rm_setfileprefix
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
jacpos
subroutine jacpos(SINALF, COSALF, P, Q, A, N)
Definition: multi_dyncore_dg.F90:7835
copy_outof_state
This module enables the multiphase prototype code to interact with state by copying everything requir...
Definition: Extract_From_State.F90:23
phreeqcrm::rm_setunitssurface
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
iphreeqc::ipq_ok
integer(kind=4), parameter ipq_ok
Definition: IPhreeqc_interface.F90:13
solve_and_update_pressure
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:3198
iphreeqc::geterroron
logical function geterroron(id)
Definition: IPhreeqc_interface.F90:294
multi_tools::least_squares_solver
subroutine least_squares_solver(A, b, rank)
Subroutine that solves the least squares problem |Ax-b|2 using LAPACK and blas Subroutine tested and ...
Definition: multi_tools.F90:868
iphreeqc::getdumpstringline
subroutine getdumpstringline(id, n, line)
Definition: IPhreeqc_interface.F90:225
shape_functions_linear_quadratic
Shape function subroutines for multi-dimensions for Quadrilaterals, Triangles, Hexaedra and Tetrahedr...
Definition: multi_shape_fct_ND.F90:29
multiphase_eos::tables_normalised
logical, save tables_normalised
Definition: multi_eos.F90:52
multi_tools::quicksort
recursive subroutine quicksort(vec, n)
:Sort a list in increasing order Vec is the vector to sort and n is an starting point,...
Definition: multi_tools.F90:227
set_simulation_start_times
subroutine set_simulation_start_times()
Definition: Multiphase_Prototype_Wrapper.F90:282
matrix_operations::c_mult2
subroutine c_mult2(CDP, DP, CV_NONODS, U_NONODS, NDIM, NPHASE, C, NCOLC, FINDC, COLC)
: CDP=C*DP
Definition: multi_matrix_operations.F90:1345
multi_phreeqc::init_phreeqc
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
multiphase_eos::calculate_solute_dispersity
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:2054
shape_functions_linear_quadratic::lagrot
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
phreeqcrm::rm_getthreadcount
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
shape_functions_ndim::quad_1d_shape
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
iphreeqc::getwarningstringlinecount
integer function getwarningstringlinecount(id)
Definition: IPhreeqc_interface.F90:726
multiphase_eos::assign_equation_of_state
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:891
multiphase_1d_engine::p0_dg_oscilat_detect
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:8915
multiphase_eos::calculate_diffusivity
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:1764
cv_advection::proj_cv_to_fem
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:4258
multi_data_types::deallocate_multi_sparsities
subroutine deallocate_multi_sparsities(Mspars)
This subroutine deallocates all the memory inside Mspars.
Definition: multi_data_types.F90:1328
phreeqcrm::rm_setgasphasevolume
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
phreeqcrm::rm_getsolidsolutioncomponentscount
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
cv_advection::linear_high_diffus_cal_coeff_stress_or_tensor
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:5107
linear_eos_formula
subroutine linear_eos_formula(rho_internal)
Definition: multi_eos.F90:753
cv_advection::dg_derivs_all
calculates derivatives of vector fields
Definition: cv-adv-dif.F90:59
multiphase_1d_engine::high_order_pressure_solve
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:8473
multi_data_types::allocate_multi_shape_funs
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
shape_functions_ndim::new_pt_qua_vol_cv_tri_tet_shape
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
iphreeqc::outputaccumulatedlines
subroutine outputaccumulatedlines(id)
Definition: IPhreeqc_interface.F90:797
shape_functions_ndim::shape_tri_tet
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
phreeqcrm::rm_setprintchemistrymask
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
shape_functions_ndim::triareaf_sign
real function triareaf_sign(x1, y1, x2, y2, x3, y3)
Definition: multi_shape_fct_ND.F90:6292
multi_interpolation::state_old
type(state_type) state_old
Definition: multi_interpolation.F90:63
iphreeqc::getoutputfilename
subroutine getoutputfilename(id, fname)
Definition: IPhreeqc_interface.F90:460
phreeqcrm::rm_setunitsppassemblage
integer function rm_setunitsppassemblage(id, option)
Set input units for pure phase assemblages (equilibrium phases). In PHREEQC input,...
Definition: RM_interface.F90:5972
setlogfilename
integer function setlogfilename(id, fname)
Definition: IPhreeqc_interface.F90:1110
mass_conservation_check_and_outfluxes
subroutine mass_conservation_check_and_outfluxes(calculate_mass_delta, outfluxes, DEN_ALL, flag)
Definition: cv-adv-dif.F90:3552
copy_outof_state::is_constant
logical function, public is_constant(tfield)
: Checks whether a field is constant or not
Definition: Extract_From_State.F90:3345
compositional_terms::cal_comp_sum2one_sou
subroutine cal_comp_sum2one_sou(packed_state, Mdims)
make sure the composition sums to 1.0
Definition: multi_compositional.F90:512
iphreeqc::getnthselectedoutputusernumber
integer function getnthselectedoutputusernumber(id, n)
Definition: IPhreeqc_interface.F90:444
seterrorfileon
integer function seterrorfileon(id, error_file_on)
Definition: IPhreeqc_interface.F90:1050
phreeqcrm::rm_destroy
integer function rm_destroy(id)
Destroys a reaction module.
Definition: RM_interface.F90:405
multi_pipes::initialize_pipes_package_and_gamma
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:2990
multiphase_eos::relperm_table_norm_data
real, dimension(:,:,:), allocatable, save relperm_table_norm_data
Definition: multi_eos.F90:51
relperm_stone
subroutine relperm_stone(Kr)
:This subroutine calculates the relative permeability for three phases First phase has to be water,...
Definition: multi_eos.F90:1439
phreeqcrm::rm_getspeciessaveon
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
cv_advection::find_other_side
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:4133
multi_data_types::print_multi_field
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
ensure_components_sum_to_one
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:2305
phreeqcrm::rm_setscreenon
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
solvers_module::petsc_matvec
subroutine, public petsc_matvec(Mat_petsc, vfield, sol)
Performs y=Ax using fluidity vectors (not very efficient)
Definition: multi_solvers.F90:1116
shape_functions_prototype::det_suf_ele_shape
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
matrix_operations::ct_mult_with_c
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:1391
multiphase_eos::calculate_all_rhos
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:65
multi_tools::nvdfunnew_many
pure real function, dimension(size(uc)) nvdfunnew_many(UF, UC, XI_LIMIT)
: The function computes NVDFUNNEW, the normalised value of the advected variable on the face of the c...
Definition: multi_tools.F90:170
multi_sp::assemble_and_solve_sp
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
iphreeqc::tt_double
integer(kind=4), parameter tt_double
Definition: IPhreeqc_interface.F90:9
multiphase_eos::retrieve_reference_density
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:3105
multiphase_eos::calculate_rho_drhodp
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:405
matrix_operations::matinv
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
setbasicfortrancallbackf
shape_functions_ndim::legend
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
shape_functions_ndim::vol_cv_tri_tet_shape
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
setcurrentselectedoutputusernumber
integer function setcurrentselectedoutputusernumber(id, n)
Definition: IPhreeqc_interface.F90:958
cv_advection::pack_loc_all3
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:3906
multiphase_1d_engine::volumefraction_assemble_solve
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, VOLFRA_PORE_TOTAL, 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:1091
phreeqcrm::rm_getgascomponentscount
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
quad4_gp
type(quad_data) function quad4_gp(i1, i2, i3, i4)
Definition: multi_shape_fct_ND.F90:4010
p0_limiter
subroutine p0_limiter()
: Computes a limited velocity when using a P0DG velocity discretisation
Definition: multi_dyncore_dg.F90:7063
iphreeqc::outputwarningstring
subroutine outputwarningstring(id)
Definition: IPhreeqc_interface.F90:829
iphreeqc::getwarningstringline
subroutine getwarningstringline(id, n, line)
Definition: IPhreeqc_interface.F90:743
update_components
subroutine update_components()
WARNING: Still work in progress.
Definition: multi_dyncore_dg.F90:1486
matrix_operations::ct_mult_with_c_many
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:1463
multiphase_1d_engine::use_posinmat_c_store_suf_dg
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:8064
multi_data_types::multi_pipe_package
Contains all the information required to model pipes. Many of these fields are unnecessary or even un...
Definition: multi_data_types.F90:428
compositional_terms
This module contains all that is required to perform compositional modelling. NOTE THAT THIS FUNCTION...
Definition: multi_compositional.F90:21
multiphase_eos::calculate_absorption2
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:1262
cv_advection::cv_count_faces
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:4010
multi_tools::tetvolume
real function tetvolume(x0, y0, z0, x1, y1, z1, x2, y2, z2, x3, y3, z3)
Definition: multi_tools.F90:103
face_theta_many
subroutine face_theta_many(FTHETA, INTERFACE_TRACK, T_NODJ_IPHA, T_NODI_IPHA, TOLD_NODJ_IPHA, TOLD_NODI_IPHA)
Definition: cv-adv-dif.F90:3407
shape_functions_ndim::legrot
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
cv_advection
This module contains all the tools to assemble and solve the equations and fields associated with the...
Definition: cv-adv-dif.F90:20
copy_outof_state::get_darcyvelocity
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:3494
phreeqcrm::rm_geterrorstring
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
shape_functions_ndim::determin_sloclist
subroutine determin_sloclist(CV_SLOCLIST, CV_NLOC, CV_SNLOC, NFACE, ndim, cv_ele_type)
determine CV_SLOCLIST
Definition: multi_shape_fct_ND.F90:9492
phreeqcrm::rm_setmpiworkercallback
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
compute_div_u
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:3263
iphreeqc::getlogstringon
logical function getlogstringon(id)
Definition: IPhreeqc_interface.F90:428
iphreeqc::ipq_invalidarg
integer(kind=4), parameter ipq_invalidarg
Definition: IPhreeqc_interface.F90:16
multi_interpolation
This module contains the conservative mesh to mesh interpollation for DG fields, as described in Adam...
Definition: multi_interpolation.F90:21
multi_data_types::multi_matrices
This type contains all the necessary information to solve =systems, matrices, RHS,...
Definition: multi_data_types.F90:321
phreeqcrm::rm_getgascompmoles
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
phreeqcrm::rm_setunitskinetics
integer function rm_setunitskinetics(id, option)
Set input units for kinetic reactants.
Definition: RM_interface.F90:5919
phreeqcrm::rm_getcomponentcount
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
phreeqcrm::rm_initialphreeqc2speciesconcentrations
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
iphreeqc::loaddatabasestring
integer function loaddatabasestring(id, input)
Definition: IPhreeqc_interface.F90:779
cv_advection::is_field_constant
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:3716
phreeqcrm::rm_concentrations2utility
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
sparsity_1d
Subroutines associated with the CSR storage used for 1D.
Definition: multi_sparsity.F90:20
shape_functions_ndim::shatrinew
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
color_get_cmc_pha_slow
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:272
multi_tools::nan_check_arr
subroutine nan_check_arr(a, k)
:Checks if an array is a Nan
Definition: multi_tools.F90:149
multi_tools::get_ndglno
integer function, dimension(:), pointer get_ndglno(mesh)
Definition: multi_tools.F90:218
multi_data_types::mult_multi_field_by_array_on_array
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
phreeqcrm::rm_getchemistrycellcount
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
shape_functions_ndim::suf_cv_tri_tet_shape
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
multiphase_eos::saturation_temperature
real function saturation_temperature(pressure)
: ????
Definition: multi_eos.F90:2558
phreeqcrm::rm_getmpimyself
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
compositional_terms::calc_comp_dif_ten
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
shape_functions_prototype::shape_cv_n
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
cv_advection::cal_lim_vol_adjust
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:5438
spact::checksparsity
subroutine checksparsity(option_mid, unit, ncol2, nonods, ncol, find, mid, col)
Definition: multi_sparsity.F90:1517
multi_machine_learning::xgboost_load_model
subroutine xgboost_load_model()
Load the XGBoost model as -> xgb_model (private module variable)
Definition: multi_machine_learning.F90:45
phreeqcrm::rm_getbackwardmapping
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
iphreeqc::getlogfileon
logical function getlogfileon(id)
Definition: IPhreeqc_interface.F90:378
copy_outof_state::getoldname
character(len=field_name_len) function, public getoldname(tfield)
: For a given field, retrieve the associated old field name
Definition: Extract_From_State.F90:3376
phreeqcrm::rm_errormessage
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
copy_outof_state::get_ele_type
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:220
loc_1st_deriv_xyz_dg_deriv
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
phreeqcrm::rm_getequilibriumphasescount
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
calc_limit_matrix_max_min
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:5820
tri_tet_loccords
subroutine tri_tet_loccords(Xpt, LOCCORDS, X_CORNERS_ALL, NDIM, CV_NLOC)
Definition: cv-adv-dif.F90:2591
multiphase_eos::calculate_porous_rho_drhop
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:801
phreeqcrm::rm_getgasphasevolume
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
multiphase_prototype_wrapper
subroutine multiphase_prototype_wrapper()
Definition: Multiphase_Prototype_Wrapper.F90:21
calc_anisotrop_lim_vals2
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:6500
shape_functions_ndim::shape_triangle_cubic
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
seterroron
integer function seterroron(id, error_on)
Definition: IPhreeqc_interface.F90:1070
multiphase_eos::bound_metal_concentrations
subroutine bound_metal_concentrations(state, packed_state, Mdims, ndgln)
: subroutine to bound the metal concentrations after an adapt, in order to avoid unphysical values.
Definition: multi_eos.F90:3937
phreeqcrm::rm_seterrorhandlermode
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
cv_advection::saturation_assemb
subroutine saturation_assemb(petsc_ACV, state, packed_state, final_phase, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, saturation, sat_prev, velocity, density, DEN_ALL, DENOLD_ALL, DT, SUF_SIG_DIAGTEN_BC, CV_P, SOURCT_ALL, VOLFRA_PORE, VAD_parameter, Phase_with_Pc, eles_with_pipe, pipes_aux, assemble_collapsed_to_one_phase, getResidual)
Definition: cv-adv-dif.F90:7755
compositional_terms::calculate_componentabsorptionterm
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
iphreeqc::geterrorfilename
subroutine geterrorfilename(id, fname)
Definition: IPhreeqc_interface.F90:260
copy_outof_state::enterforcebalanceequation
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:3792
shape_functions_ndim::computing_small_qtriangles
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
shape_functions_ndim::dummy_tri_tet
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
shape_functions_prototype::shapesv_fem_plus
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
phreeqcrm::rm_getsurfacename
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
copy_outof_state::pack_multistate
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:591
setselectedoutputfileon
integer function setselectedoutputfileon(id, sel_on)
Definition: IPhreeqc_interface.F90:1244
solvers_module::auto_backtracking
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:891
relperm_corey_epsilon
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:1393
effective_cp_density
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:481
phreeqcrm::rm_gettimeconversion
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
iphreeqc::geterrorstringlinecount
integer function geterrorstringlinecount(id)
Definition: IPhreeqc_interface.F90:310
spact::defining_maxlengths_for_sparsity_matrices
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
shape_functions_linear_quadratic::re2dn4
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
partition
integer function partition(v)
Definition: multi_tools.F90:244
phreeqcrm::rm_setcomponenth2o
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
phreeqcrm::rm_getsolidsolutionname
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