Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cran/ReacTran
06 February 2020, 06:27:10 UTC
  • Code
  • Branches (31)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/1.1
    • refs/tags/1.2
    • refs/tags/1.3
    • refs/tags/1.3.1
    • refs/tags/1.3.2
    • refs/tags/1.4.1
    • refs/tags/1.4.2
    • refs/tags/1.4.3.1
    • refs/tags/R-2.10.0
    • refs/tags/R-2.10.1
    • refs/tags/R-2.11.0
    • refs/tags/R-2.11.1
    • refs/tags/R-2.12.0
    • refs/tags/R-2.12.1
    • refs/tags/R-2.12.2
    • refs/tags/R-2.13.0
    • refs/tags/R-2.13.1
    • refs/tags/R-2.13.2
    • refs/tags/R-2.14.0
    • refs/tags/R-2.14.1
    • refs/tags/R-2.14.2
    • refs/tags/R-2.15.0
    • refs/tags/R-2.15.1
    • refs/tags/R-2.15.2
    • refs/tags/R-2.15.3
    • refs/tags/R-2.9.2
    • refs/tags/R-3.0.0
    • refs/tags/R-3.0.1
    • refs/tags/R-3.0.2
    • refs/tags/R-3.0.3
    No releases to show
  • a4433a4
  • /
  • R
  • /
  • setup.grid.2D.R
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:7b30e1df214b3947d9fd33d805e3ee3ac50042d4
origin badgedirectory badge Iframe embedding
swh:1:dir:2eca10361e3e926cd8b6b743f141f7a1d200fdd8
origin badgerevision badge
swh:1:rev:e1145574dc02ebe9e0d96419755e4702aef85172
origin badgesnapshot badge
swh:1:snp:bbc0b94b1c0463480b615c86f1ae2df3fcc700c0
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: e1145574dc02ebe9e0d96419755e4702aef85172 authored by Karline Soetaert on 16 September 2010, 00:00:00 UTC
version 1.3
Tip revision: e114557
setup.grid.2D.R

##==============================================================================
# Creation of a two-dimensional finite difference grid
##==============================================================================

setup.grid.2D <- function(x.grid=NULL, y.grid=NULL) {

## check input
  gn <- names(x.grid)
  if (! "x.up"   %in% gn)
    stop("error in setup.2Dgrid: x.grid should be a list that contains x.up")
  if (! "x.down" %in% gn)
    stop("error in setup.2Dgrid: x.grid  should be a list that contains x.down")
  if (! "x.mid"  %in% gn)
    stop("error in setup.2Dgrid: x.grid  should be a list that contains x.mid")
  if (! "x.int"  %in% gn)
    stop("error in setup.2Dgrid: x.grid  should be a list that contains x.int")
  if (! "dx"     %in% gn)
    stop("error in setup.2Dgrid: x.grid  should be a list that contains dx")
  if (! "dx.aux" %in% gn)
    stop("error in setup.2Dgrid: x.grid  should be a list that contains dx.aux")
  if (! "N"      %in% gn)
    stop("error in setup.2Dgrid: x.grid  should be a list that contains N")

  gn <- names(y.grid)
  if (! "x.up"   %in% gn)
    stop("error in setup.2Dgrid: y.grid should be a list that contains x.up")
  if (! "x.down" %in% gn)
    stop("error in setup.2Dgrid: y.grid  should be a list that contains x.down")
  if (! "x.mid"  %in% gn)
    stop("error in setup.2Dgrid: y.grid  should be a list that contains x.mid")
  if (! "x.int"  %in% gn)
    stop("error in setup.2Dgrid: y.grid  should be a list that contains x.int")
  if (! "dx"     %in% gn)
    stop("error in setup.2Dgrid: y.grid  should be a list that contains dx")
  if (! "dx.aux" %in% gn)
    stop("error in setup.2Dgrid: y.grid  should be a list that contains dx.aux")
  if (! "N"      %in% gn)
    stop("error in setup.2Dgrid: y.grid  should be a list that contains N")

## Packaging of results
  Nx <- length(x.grid$x.mid)
  Ny <- length(y.grid$x.mid)
  
  Res <- list(x.up = x.grid$x.up,
				    x.down = x.grid$x.down,
				    x.mid = x.grid$x.mid,                               # position of centre of the grid cells, vector of length N
            x.int  = x.grid$x.int,                              # position grid cell interfaces , vector of length N+1
            dx = matrix(nrow=Nx, ncol=Ny, x.grid$dx),           # thickness of grid cells , vector length N
            dx.aux = matrix(nrow=Nx+1, ncol=Ny, x.grid$dx.aux), # auxiliary vector with distances between centre of adjacent cells, first and last: half of cell size, vector of length N+1
            x.N = x.grid$N,         # number of vertical grid layers
            y.up = y.grid$x.up,
				    y.down = y.grid$x.down,
				    y.mid = y.grid$x.mid,   # position of centre of the grid cells, vector of length N
            y.int  = y.grid$x.int,  # position grid cell interfaces , vector of length N+1
            dy = matrix(nrow=Nx, ncol=Ny, data=y.grid$dx, byrow=TRUE),        # thickness of grid cells , vector length N
            dy.aux = matrix(nrow=Nx, ncol=Ny+1, y.grid$dx.aux, byrow=TRUE), # auxiliary vector with distances between centre of adjacent cells, first and last: half of cell size, vector of length N+1
            y.N = y.grid$N)         # number of horizontal grid layers

  class(Res) <- "grid.2D"
  return(Res)
}

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top