Skip to content
Snippets Groups Projects
Commit 99bb25be authored by phit0's avatar phit0 Committed by Johannes Boog
Browse files

[base] updated classes for rean_in_prj

[base] update classes for ogs v6.4.1

[base] added class arguments for new keywords
parent b87c375a
No related branches found
No related tags found
1 merge request!34Resolve "Class to read ogs output in *HDF5* format"
......@@ -318,7 +318,7 @@ new_prj_pr_property <- function(name,
exponents = exponents,
xpath = "media/medium/properties/property",
attr_names = character(),
flatten_on_exp = c("value")
flatten_on_exp = character()
),
class = "prj_pr_property"
)
......
......@@ -13,6 +13,7 @@
#' @param solid_density Optional:
#' @param dimension Optional:
#' @param coupling_scheme Optional:
#' @param darcy_gravity Optional:
#' @param reference_temperature Optional:
#' @param fracture_model Optional:
#' @param jacobian_assembler Optional:
......@@ -49,11 +50,24 @@
#' @param material_property Optional:
#' @param diffusion_coeff_component_b Optional:
#' @param diffusion_coeff_component_a Optional:
#' @param hydro_crack_scheme Optional:
#' @param at_num Optional:
#' @param initial_stress Optional:
#' @param split_method Optional:
#' @param reg_param Optional:
#' @param thermal_parameters Optional:
#' @param non_advective_form Optional:
#' @param fluid Optional:
#' @param porous_medium Optional:
#' @param decay_rate Optional:
#' @param fluid_reference_density Optional:
#' @param retardation_factor Optional:
#' @param solute_dispersivity_longitudinal Optional:
#' @param solute_dispersivity_transverse Optional:
#' @param molecular_diffusion_coefficient Optional:
#' @param density_solid Optional:
#' @param latent_heat_evaporation Optional:
#' @param pf_irrv Optional:
#' @param micro_porosity Optional:
#' @param explicit_hm_coupling_in_unsaturated_zone Optional:
#' @param simplified_elasticity Optional: character
......@@ -76,6 +90,7 @@ prj_process <- function(name,
solid_density = NULL,
dimension = NULL,
coupling_scheme = NULL,
darcy_gravity = NULL,
reference_temperature = NULL,
fracture_model = NULL,
jacobian_assembler = NULL,
......@@ -112,11 +127,24 @@ prj_process <- function(name,
material_property = NULL,
diffusion_coeff_component_b = NULL,
diffusion_coeff_component_a = NULL,
hydro_crack_scheme = NULL,
at_num = NULL,
initial_stress = NULL,
split_method = NULL,
reg_param = NULL,
thermal_parameters = NULL,
non_advective_form = NULL,
fluid = NULL,
porous_medium = NULL,
decay_rate = NULL,
fluid_reference_density = NULL,
retardation_factor = NULL,
solute_dispersivity_longitudinal = NULL,
solute_dispersivity_transverse = NULL,
molecular_diffusion_coefficient = NULL,
density_solid = NULL,
latent_heat_evaporation = NULL,
pf_irrv = NULL,
micro_porosity = NULL,
explicit_hm_coupling_in_unsaturated_zone = NULL,
simplified_elasticity = NULL,
......@@ -155,6 +183,10 @@ prj_process <- function(name,
coerce_string_to_numeric(characteristic_temperature)
characteristic_vapour_mass_fraction <-
coerce_string_to_numeric(characteristic_vapour_mass_fraction)
at_num <- coerce_string_to_numeric(at_num)
split_method <- coerce_string_to_numeric(split_method)
reg_param <- coerce_string_to_numeric(reg_param)
pf_irrv <- coerce_string_to_numeric(pf_irrv)
irreversible_threshold <- coerce_string_to_numeric(irreversible_threshold)
ellipsis_list <- list(...)
......@@ -176,6 +208,7 @@ prj_process <- function(name,
solid_density,
dimension,
coupling_scheme,
darcy_gravity,
reference_temperature,
fracture_model,
fracture_properties,
......@@ -213,11 +246,24 @@ prj_process <- function(name,
material_property,
diffusion_coeff_component_b,
diffusion_coeff_component_a,
hydro_crack_scheme,
at_num,
initial_stress,
split_method,
reg_param,
thermal_parameters,
non_advective_form,
fluid,
porous_medium,
decay_rate,
fluid_reference_density,
retardation_factor,
solute_dispersivity_longitudinal,
solute_dispersivity_transverse,
molecular_diffusion_coefficient,
density_solid,
latent_heat_evaporation,
pf_irrv,
micro_porosity,
explicit_hm_coupling_in_unsaturated_zone,
simplified_elasticity,
......@@ -242,6 +288,7 @@ new_prj_process <- function(name,
solid_density = NULL,
dimension = NULL,
coupling_scheme = NULL,
darcy_gravity = NULL,
reference_temperature = NULL,
fracture_model = NULL,
fracture_properties = NULL,
......@@ -279,11 +326,24 @@ new_prj_process <- function(name,
material_property = NULL,
diffusion_coeff_component_b = NULL,
diffusion_coeff_component_a = NULL,
hydro_crack_scheme = NULL,
at_num = NULL,
initial_stress = NULL,
split_method = NULL,
reg_param = NULL,
thermal_parameters = NULL,
non_advective_form = NULL,
fluid = NULL,
porous_medium = NULL,
decay_rate = NULL,
fluid_reference_density = NULL,
retardation_factor = NULL,
solute_dispersivity_longitudinal = NULL,
solute_dispersivity_transverse = NULL,
molecular_diffusion_coefficient = NULL,
density_solid = NULL,
latent_heat_evaporation = NULL,
pf_irrv = NULL,
micro_porosity = NULL,
explicit_hm_coupling_in_unsaturated_zone = NULL,
simplified_elasticity = NULL,
......@@ -313,6 +373,10 @@ new_prj_process <- function(name,
"prj_constitutive_relation")
}
if(!is.null(darcy_gravity)){
darcy_gravity <- coerce_names(darcy_gravity,
c("axis_id", "g"))
}
is_null_or_has_class(fracture_model, "prj_fracture_model")
......@@ -353,7 +417,12 @@ new_prj_process <- function(name,
"residual_thermal_conductivity"))
}
if(!is.null(porous_medium)){
is_wrapper_list(porous_medium,
"prj_porous_medium")
}
fluid <- validate_fluid(fluid)
are_null_or_strings(coupling_scheme,
solid_density,
......@@ -367,7 +436,14 @@ new_prj_process <- function(name,
temperature,
diffusion_coeff_component_b,
diffusion_coeff_component_a,
hydro_crack_scheme,
initial_stress,
decay_rate,
fluid_reference_density,
retardation_factor,
solute_dispersivity_longitudinal,
solute_dispersivity_transverse,
molecular_diffusion_coefficient,
density_solid,
latent_heat_evaporation,
porosity,
......@@ -397,6 +473,10 @@ new_prj_process <- function(name,
characteristic_pressure,
characteristic_temperature,
characteristic_vapour_mass_fraction,
at_num,
split_method,
reg_param,
pf_irrv,
irreversible_threshold)
if(!is.null(mass_lumping)){
......@@ -418,6 +498,7 @@ new_prj_process <- function(name,
solid_density = solid_density,
dimension = dimension,
coupling_scheme = coupling_scheme,
darcy_gravity = darcy_gravity,
reference_temperature = reference_temperature,
fracture_model = fracture_model,
fracture_properties = fracture_properties,
......@@ -459,11 +540,24 @@ new_prj_process <- function(name,
material_property = material_property,
diffusion_coeff_component_b = diffusion_coeff_component_b,
diffusion_coeff_component_a = diffusion_coeff_component_a,
hydro_crack_scheme = hydro_crack_scheme,
at_num = at_num,
initial_stress = initial_stress,
split_method = split_method,
reg_param = reg_param,
thermal_parameters = thermal_parameters,
non_advective_form = non_advective_form,
fluid = fluid,
porous_medium = porous_medium,
decay_rate = decay_rate,
fluid_reference_density = fluid_reference_density,
retardation_factor = retardation_factor,
solute_dispersivity_longitudinal = solute_dispersivity_longitudinal,
solute_dispersivity_transverse = solute_dispersivity_transverse,
molecular_diffusion_coefficient = molecular_diffusion_coefficient,
density_solid = density_solid,
latent_heat_evaporation = latent_heat_evaporation,
pf_irrv = pf_irrv,
micro_porosity = micro_porosity,
explicit_hm_coupling_in_unsaturated_zone =
explicit_hm_coupling_in_unsaturated_zone,
......@@ -992,6 +1086,7 @@ new_prj_phasefield_parameters <- function(residual_stiffness,
#See prj_material_property.R
#===== prj_porous_medium =====
#See prj_porous_medium.R
......@@ -1096,6 +1191,18 @@ validate_secondary_variables <- function(secondary_variables){
}
validate_fluid <- function(fluid){
if(!is.null(fluid)){
fluid <- coerce_names(fluid, c("density", "viscosity"))
fluid[[1]] <- coerce_names(fluid[[1]], c("type", "value"))
fluid[[2]] <- coerce_names(fluid[[2]], c("type", "value"))
}
return(invisible(fluid))
}
validate_process_nls <- function(nonlinear_solver, nullable = T){
......
......@@ -285,6 +285,11 @@ run_benchmark <- function(prj_path,
sim_path <- unlist(options("r2ogs6.default_sim_path"))
}
if(grepl("\\.xml$", prj_path)) {
# some *.prj files are indicated as *.xml in their Tests.cmake file
prj_path <- sub("\\.xml$", replacement = ".prj", x = prj_path)
}
assertthat::assert_that(assertthat::is.string(prj_path))
assertthat::assert_that(assertthat::is.string(ogs6_bin_path))
assertthat::assert_that(assertthat::is.string(sim_path))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment