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
18 April 2025, 08:44:12 UTC
  • Code
  • Branches (32)
  • 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/1.4.3.2
    • 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
  • aeab7a2
  • /
  • man
  • /
  • setup.prop.2D.Rd
Raw File Download Save again
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 ...

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
swh:1:cnt:78770c460959f78cfc9c09d5fdab6fe25cf630e2
origin badgedirectory badge
swh:1:dir:4bf64d4c6acb9fe8324fe08be477ed4915914cf3
origin badgerevision badge
swh:1:rev:72984f188f682cc270e18126009c8e56b7aab80d
origin badgesnapshot badge
swh:1:snp:ba7fc766ddf70060bfc9bf13cb3e692cfae73f86

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
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 72984f188f682cc270e18126009c8e56b7aab80d authored by Karline Soetaert on 10 August 2011, 00:00:00 UTC
version 1.3.2
Tip revision: 72984f1
setup.prop.2D.Rd
\name{setup.prop.2D}
\alias{setup.prop.2D}
\alias{contour.prop.2D}
\title{
  Attaches a Property to a Two-Dimensional Grid
}

\description{
  Calculates the value of a given property at the middle of grid cells
  (\code{mid}) and at the interfaces of the grid cells (\code{int}).

  Two possibilities are available: either specifying a mathematical function
  (\code{func}) that describes the spatial dependency of the property, or
  asssuming a constant value (\code{value}). To allow for anisotropy, the
  spatial dependency can be different in the x and y direction.

  For example, in a sediment model, the routine can be used to specify the
  porosity, the mixing intensity or other parameters over the grid of the
  reactangular sediment domain.
}

\usage{
setup.prop.2D(func = NULL, value = NULL, grid, y.func = func, 
              y.value = value, ...)

\method{contour}{prop.2D}(x, grid, xyswap = FALSE, filled = FALSE, \dots)
}

\arguments{
  \item{func }{function that describes the spatial dependency in the 
    x-direction; defined as \code{func <- function (x,y, ...)}
  }
  \item{value }{constant value given to the property in the x-direction
  }
  \item{grid }{list specifying the 2D grid characteristics, see
    \code{\link{setup.grid.2D}} for details on the structure of this list
  }
  \item{y.func }{function that describes the spatial dependency in the
    y-direction. By default the same as in the x-direction.
    \code{y.func <- function (x, y, ...)}
  }
  \item{y.value }{constant value given to the property in the y-direction.
    By default the same as in the x-direction.
  }
  \item{x }{the object of class \code{prop.2D} that needs plotting
  }
  \item{filled }{if \code{TRUE}, uses \code{filled.contour}, else \code{contour}
  }
  \item{xyswap }{if \code{TRUE}, then x- and y-values are swapped and
    the y-axis is oriented from top to bottom. Useful for drawing
    vertical depth profiles
  }
  \item{... }{additional arguments that are passed on to \code{func} or
    to the method
  }
}

\value{
  A list of type \code{prop.2D} containing:
  \item{x.mid }{property value in the x-direction defined at the middle of the
    grid cells; Nx * Ny matrix (where Nx and Ny = number of cells in x, y
    direction)
  }
  \item{y.mid }{property value in the y-direction at the middle of the grid
    cells; Nx * Ny matrix
  }
  \item{x.int }{property value in the x-direction defined at the
    x-interfaces of the grid cells;
    (Nx+1)*Ny matrix
  }
  \item{y.int }{property value in the y-direction at the y-interfaces of the
    grid cells; Nx*(Ny+1) matrix
  }
}

\author{
  Filip Meysman <f.meysman@nioo.knaw.nl>,
  Karline Soetaert <k.soetaert@nioo.knaw.nl>
}

\note{
  For some properties, it does not make sense to use \code{y.func} different 
  to \code{func}. For instance, for volume fractions, AFDW.
  
  For other properties, it may be usefull to have \code{y.func} or 
  \code{y.value} different from \code{func} or \code{value}, for instance
  for velocities, surface areas, ...
}

\examples{
# Inverse quadratic function 
inv.quad <- function(x, y, a = NULL, b = NULL)
   return(1/((x-a)^2+(y-b)^2))


# Construction of the 2D grid 
x.grid <- setup.grid.1D (x.up = 0, L = 10, N = 10)
y.grid <- setup.grid.1D (x.up = 0, L = 10, N = 10)
grid2D <- setup.grid.2D (x.grid, y.grid)

# Attaching the inverse quadratic function to the 2D grid 
(twoD <- setup.prop.2D (func = inv.quad, grid = grid2D, a = 5, b = 5))

# show 
contour(log(twoD$x.int))

}

\details{
  \itemize{
    \item {When the property is isotropic, the \code{x.mid} and
      \code{y.mid} values are identical. This is for example the case for
      sediment porosity.}
    \item {When the property is anisotropic, the \code{x.mid} and
      \code{y.mid} values can differ. This can be for example the case for
      the velocity, where in general, the value will differ between the x and
      y direction.}
  }
}
\keyword{utilities}

back to top

Software Heritage — Copyright (C) 2015–2026, 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— Content policy— Contact— JavaScript license information— Web API