Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • R Rsic2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous invitons à y créer vos nouveaux projets.

  • SIC2SIC2
  • Rsic2
  • Merge requests
  • !6
An error occurred while fetching the assigned milestone of the selected merge_request.

Resolve "Read result simulation in sections from a binary result files"

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Dorchies David requested to merge 9-read-result-simulation-in-sections-from-a-binary-result-files into main 3 years ago
  • Overview 0
  • Commits 11
  • Pipelines 6
  • Changes 33

Closes #9 (closed)

Edited 3 years ago by Dorchies David
Compare
  • version 7
    78c8d2d1
    3 years ago

  • version 6
    97751ae2
    3 years ago

  • version 5
    3a60152c
    3 years ago

  • version 4
    6756cb63
    3 years ago

  • version 3
    e6aa7d7e
    3 years ago

  • version 2
    b3a2b593
    3 years ago

  • version 1
    db2c5bad
    3 years ago

  • main (base)

and
  • latest version
    e91aab2f
    11 commits, 3 years ago

  • version 7
    78c8d2d1
    11 commits, 3 years ago

  • version 6
    97751ae2
    11 commits, 3 years ago

  • version 5
    3a60152c
    11 commits, 3 years ago

  • version 4
    6756cb63
    8 commits, 3 years ago

  • version 3
    e6aa7d7e
    7 commits, 3 years ago

  • version 2
    b3a2b593
    6 commits, 3 years ago

  • version 1
    db2c5bad
    4 commits, 3 years ago

33 files
+ 1180
− 43

    Preferences

    File browser
    Compare changes
R/cfg_tmp_project.R 0 → 100644
+ 21
− 0
  • View file @ e91aab2f

  • Edit in single-file editor

  • Open in Web IDE

 
#' Set a configuration with a temporary project directory
 
#'
 
#' @param xml_path [character], the path of the XML SIC project file
 
#' @param cfg [config], the configuration to modify
 
#'
 
#' @return The updated configuration with the temporary project directory
 
#' @export
 
#'
 
#' @examples
 
#' \dontrun{
 
#' cfg <- cfg_tmp_project()
 
#' cfg$project$xml_path
 
#' }
 
#'
 
cfg_tmp_project <- function(xml_path = system.file("sic_project_test1.xml", package = "rsic2"), cfg = loadConfig(xml_path = xml_path)) {
 
cfg$project$path <- tempfile("sic_project", fileext = ".xml")
 
file.copy(xml_path,
 
cfg$project$path,
 
overwrite = TRUE)
 
return(cfg)
 
}
R/convert_sic_params.R
+ 4
− 2
  • View file @ e91aab2f

  • Edit in single-file editor

  • Open in Web IDE


@@ -11,8 +11,10 @@
@@ -11,8 +11,10 @@
#' @export
#' @export
#'
#'
#' @examples
#' @examples
#' convert_sic_params(list(SCE = 1, VAR = 1))
#' \dontrun{
#'
#' cfg <- cfg_tmp_project()
 
#' convert_sic_params(list(SCE = 1, VAR = 1), cfg = cfg)
 
#' }
convert_sic_params <- function(params, cfg = loadConfig()) {
convert_sic_params <- function(params, cfg = loadConfig()) {
if (!"INTERF" %in% names(params)) {
if (!"INTERF" %in% names(params)) {
params <- c(list(INTERF = cfg$sic$fortran$prms$INTERF), params)
params <- c(list(INTERF = cfg$sic$fortran$prms$INTERF), params)
R/create_section_txt.R
+ 2
− 1
  • View file @ e91aab2f

  • Edit in single-file editor

  • Open in Web IDE


@@ -8,9 +8,10 @@
@@ -8,9 +8,10 @@
#'
#'
#' @return [character], section description in SIC text import format.
#' @return [character], section description in SIC text import format.
#' @export
#' @export
 
#' @import utils
#' @examples
#' @examples
#' # Trapezoidal section
#' # Trapezoidal section
#' export_section_txt("Trapeze", 0, "T", list(B = 2, S = 1.5, ZF = 100, ZB = 102))
#' create_section_txt("Trapeze", 0, "T", list(B = 2, S = 1.5, ZF = 100, ZB = 102))
create_section_txt <- function(section_name, abscissa, section_type, profile, distance_majeur = FALSE) {
create_section_txt <- function(section_name, abscissa, section_type, profile, distance_majeur = FALSE) {
if (section_type == "T") {
if (section_type == "T") {
R/create_uniform_reach_txt.R
+ 1
− 1
  • View file @ e91aab2f

  • Edit in single-file editor

  • Open in Web IDE


@@ -3,7 +3,7 @@
@@ -3,7 +3,7 @@
#' @param abscissas [numeric] vector of section abscissas
#' @param abscissas [numeric] vector of section abscissas
#' @param upstream_bed_elevation [numeric], upstream bed elevation (m)
#' @param upstream_bed_elevation [numeric], upstream bed elevation (m)
#' @param slope [numeric], bed slope of the reach (m/m)
#' @param slope [numeric], bed slope of the reach (m/m)
#' @param names [character] vector of section names
#' @param section_names [character] vector of section names
#' @inheritParams create_section_txt
#' @inheritParams create_section_txt
#'
#'
#' @return A [list] from which each item is a section exported by [create_section_txt].
#' @return A [list] from which each item is a section exported by [create_section_txt].
R/dem_to_reach.R
+ 5
− 2
  • View file @ e91aab2f

  • Edit in single-file editor

  • Open in Web IDE


@@ -10,9 +10,10 @@
@@ -10,9 +10,10 @@
#' @param start 1-length [numeric], starting value for the chainage (i.e. section abscissa) along the reach
#' @param start 1-length [numeric], starting value for the chainage (i.e. section abscissa) along the reach
#' @param major_bed [logical], `TRUE` for major bed, `FALSE` for minor-medium bed
#' @param major_bed [logical], `TRUE` for major bed, `FALSE` for minor-medium bed
#'
#'
#' @return
#' @return A *ReachTxt* object which is a [list] of *SectionTxt* objects (see [create_section_txt]).
#' @rdname dem_to_reach
#' @rdname dem_to_reach
#' @export
#' @export
 
#' @importFrom stats dist
#'
#'
#' @examples
#' @examples
#' ## Inputs preparation
#' ## Inputs preparation
@@ -60,7 +61,9 @@ dem_to_reach_txt <- function(dem, node_coords, space_step, section_width, nb_poi
@@ -60,7 +61,9 @@ dem_to_reach_txt <- function(dem, node_coords, space_step, section_width, nb_poi
return(reach_txt)
return(reach_txt)
}
}
 
#' @rdname dem_to_reach
#' @rdname dem_to_reach
 
#' @param section_centers See return value of [get_section_centers]
#' @export
#' @export
dem_to_reach <- function(dem, node_coords, section_centers, section_width, nb_points = 50) {
dem_to_reach <- function(dem, node_coords, section_centers, section_width, nb_points = 50) {
lapply(seq_len(nrow(section_centers)), function(i) {
lapply(seq_len(nrow(section_centers)), function(i) {
@@ -75,7 +78,7 @@ dem_to_reach <- function(dem, node_coords, section_centers, section_width, nb_po
@@ -75,7 +78,7 @@ dem_to_reach <- function(dem, node_coords, section_centers, section_width, nb_po
#' @inheritParams dem_to_reach
#' @inheritParams dem_to_reach
#' @param section_center 2-lenght [numeric], coordinates of the section center
#' @param section_center 2-lenght [numeric], coordinates of the section center
#'
#'
#' @return
#' @return A [matrix] with the coordinates of the x-z points in the cross-profile section referential
#' @export
#' @export
#'
#'
#' @inherit dem_to_reach return examples
#' @inherit dem_to_reach return examples
Assignee
Dorchies David's avatar
Dorchies David
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 Participants
Reference:
Source branch: 9-read-result-simulation-in-sections-from-a-binary-result-files

Menu

Explore Projects Groups Topics Snippets