Skip to content

Commit

Permalink
Merging latest updated in fdaPDE/fdaPDE
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleCavazzutti committed Nov 1, 2023
2 parents 0b7005d + f76ef97 commit 899b747
Show file tree
Hide file tree
Showing 94 changed files with 6,999 additions and 28 deletions.
9 changes: 8 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
^LICENSE
^LICENSE.md
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
^tests$
[.]so$
[.]o$
^fdaPDE.Rcheck$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
65 changes: 65 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [master]
pull_request:
branches: [master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
# use 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: '4.1'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
RGL_USE_NULL: true
DISPLAY: 99.0

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: installing rgl support on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
shell: bash

- name: install rgl support on macOS
if: runner.os == 'macOS'
run: |
brew install xquartz
shell: bash

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
*.o
*.so
*.dll
*.html
fdaPDE.Rproj
fdaPDE.Rcheck/
tests/data/SR-PDE
tests/data/DE-PDE
tests/data/tSR-PDE
21 changes: 12 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Package: fdaPDE
Version: 1.1-15
Date: 2023-07-28
Title: Functional Data Analysis and Partial Differential Equations (PDE); Statistical Analysis of Functional and Spatial Data, Based on Regression with PDE Regularization
Version: 1.1-17
Date: 2023-11-01
Title: Physics-Informed Spatial and Functional Data Analysis
Authors@R: c(person("Eleonora", "Arnone", role = c("aut", "cre"),
email = "[email protected]"),
person("Aldo", "Clemente", role = "aut",
email = " [email protected]"),
person("Laura M.", "Sangalli", role = c("aut"),
email = "[email protected]"),
person("Eardi", "Lila", role = c("aut"),
Expand All @@ -15,7 +17,6 @@ Authors@R: c(person("Eleonora", "Arnone", role = c("aut", "cre"),
person("Giovanni", "Ardenghi", role = "ctb"),
person("Blerta", "Begu", role = "ctb"),
person("Michele", "Cavazzutti", role = "ctb"),
person("Aldo", "Clemente", role = "ctb"),
person("Alessandra", "Colli", role = "ctb"),
person("Alberto", "Colombo", role = "ctb"),
person("Luca", "Colombo", role = "ctb"),
Expand All @@ -33,7 +34,9 @@ Authors@R: c(person("Eleonora", "Arnone", role = c("aut", "cre"),
person("Andrea", "Poiatti", role = "ctb"),
person("Gian Matteo", "Rinaldi", role = "ctb"),
person("Stefano", "Spaziani", role = "ctb"),
person("Andrea", "Vicini", role = "ctb")
person("Andrea", "Vicini", role = "ctb"),
person("David C.", "Sterratt", role=c("cph"),
comment = "Author of included Triangle source files")
)
Maintainer: Eleonora Arnone <[email protected]>
Depends:
Expand All @@ -44,11 +47,11 @@ LinkingTo:
RcppEigen, Rcpp
Suggests:
MASS,
testthat
Description: An implementation of regression models with partial differential regularizations, making use of the Finite Element Method. The models efficiently handle data distributed over irregularly shaped domains and can comply with various conditions at the boundaries of the domain. A priori information about the spatial structure of the phenomenon under study can be incorporated in the model via the differential regularization. See Sangalli, L. M. (2021). Spatial Regression With Partial Differential Equation Regularisation. International Statistical Review, 89(3), 505-531. for an overview. The release 1.1-15 requires R (>= 4.2.0) to be installed on windows machines.
License: CC BY-NC-SA 4.0
Copyright: See the individual source files for copyrights information
testthat (>= 3.0.0)
Description: An implementation of regression models with partial differential regularizations, making use of the Finite Element Method. The models efficiently handle data distributed over irregularly shaped domains and can comply with various conditions at the boundaries of the domain. A priori information about the spatial structure of the phenomenon under study can be incorporated in the model via the differential regularization. See Sangalli, L. M. (2021) <doi:10.1111/insr.12444> "Spatial Regression With Partial Differential Equation Regularisation" for an overview. The release 1.1-9 requires R (>= 4.2.0) to be installed on windows machines.
License: GPL-3
NeedsCompilation: yes
SystemRequirements: GNU make
RoxygenNote: 7.2.3
Encoding: UTF-8
Config/testthat/edition: 3
File renamed without changes.
5 changes: 1 addition & 4 deletions LICENSE.note
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
This file summarizes ownerships and copyrights. Where possible further copyright and license information on the external code used for this project, can be found in individual files.

- Triangle is "freely available, copyrighted by the author and may not be sold or included in commercial products without a license." (http://www.cs.cmu.edu/~quake/triangle.html). The Triangle source files are src/triangle.c and src/triangle.h .
- Triangle is "freely available, copyrighted by the author and may not be sold or included in commercial products without a license." (http://www.cs.cmu.edu/~quake/triangle.html). The Triangle source files are src/C_Libraries/triangle.c and src/C_Libraries/triangle.h .

- All other files are released under license CC BY-NC-SA 4.0

The entire package is released under a Creative Common Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0), respecting all the individual licenses of the files. See http://creativecommons.org/licenses/by-nc-sa/4.0/ for details about this license.
8 changes: 4 additions & 4 deletions R/InferenceDataObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ inferenceDataObject<-setClass("inferenceDataObject", slots = list(test = "intege
#'n_cov = NULL,
#'locations = NULL,
#'locations_indices = NULL,
#'locations_by_nodes = F,
#'locations_by_nodes = FALSE,
#'coeff = NULL,
#'beta0 = NULL,
#'f0 = NULL,
#'f_var = F,
#'f_var = FALSE,
#'level = 0.95,
#'n_flip = 1000)
#' @export
Expand All @@ -138,11 +138,11 @@ inferenceDataObjectBuilder<-function(test = NULL,
n_cov = NULL,
locations = NULL,
locations_indices = NULL,
locations_by_nodes = F,
locations_by_nodes = FALSE,
coeff = NULL,
beta0 = NULL,
f0 = NULL,
f_var = F,
f_var = FALSE,
level = 0.95,
n_flip = 1000)
{
Expand Down
8 changes: 4 additions & 4 deletions R/mesh.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ create.mesh.2D <- function(nodes, nodesattributes = NA, segments = NA, holes = N
flags = paste(flags,"o2",sep = '')
}
if(order < 1 || order >2){
print('Order must be 1 or 2')
stop('Order must be 1 or 2')
}

if(nrow(triangles) > 0){
Expand Down Expand Up @@ -491,7 +491,7 @@ create.mesh.2.5D<- function(nodes, triangles = NULL, order = 1, nodesattributes
edges=outCPP[[1]], edgesmarkers=outCPP[[2]], neighbors=outCPP[[4]], holes=holes, order=order)
}
else if(order==2 && ncol(triangles) == 3){
print("You set order=2 but passed a matrix of triangles with just 3 columns. The midpoints for each edge will be computed.")
message("You set order=2 but passed a matrix of triangles with just 3 columns. The midpoints for each edge will be computed.")

outCPP <- .Call("CPP_SurfaceMeshOrder2", triangles, nodes, PACKAGE = "fdaPDE")

Expand Down Expand Up @@ -693,7 +693,7 @@ create.mesh.3D<- function(nodes, tetrahedrons, order = 1, nodesattributes = NULL
holes=holes, order=order)
}
else if(order==2 && ncol(tetrahedrons) == 4){
print("You set order=2 but passed a matrix of tetrahedrons with just 4 columns. The midpoints for each edge will be computed.")
message("You set order=2 but passed a matrix of tetrahedrons with just 4 columns. The midpoints for each edge will be computed.")

outCPP <- .Call("CPP_VolumeMeshOrder2", tetrahedrons, nodes, PACKAGE = "fdaPDE")

Expand Down Expand Up @@ -900,7 +900,7 @@ create.mesh.1.5D <- function(nodes, edges = NULL, order = 1, nodesattributes = N

}
else if( order==2 && ncol(edges)==2){
print("You set order=2 but passed a matrix of edges with just 2 columns. The midpoints for each edge will be computed.")
message("You set order=2 but passed a matrix of edges with just 2 columns. The midpoints for each edge will be computed.")
outCPP <- .Call("CPP_EdgeMeshOrder2", edges, nodes, PACKAGE = "fdaPDE")
edges = cbind( edges , outCPP[[6]])
nodes=rbind(nodes, outCPP[[5]])
Expand Down
10 changes: 8 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#' @usage \method{plot}{FEM}(x, colormap = "heat.colors", num_refinements = NULL, ...)
#' @export
#' @seealso \code{\link{FEM}}, \code{\link{image.FEM}}
#' @return No return value
#' @examples
#' library(fdaPDE)
#' ## Upload the horseshoe2D data
Expand Down Expand Up @@ -84,6 +85,7 @@ if(is(x$FEMbasis$mesh, "mesh.2D")){
#' add = FALSE, main = NULL, col = "red", ...)
#' @export
#' @seealso \code{\link{FEM.time}}, \code{\link{image.FEM.time}}
#' @return No return value
#' @examples
#' library(fdaPDE)
#' ## Upload the horseshoe2D data
Expand Down Expand Up @@ -297,6 +299,7 @@ plot.FEM.time = function(x, time_locations = NULL, locations = NULL,

#' @usage \method{plot}{mesh.2D}(x, ...)
#' @export
#' @return No return value
#' @examples
#' library(fdaPDE)
#'
Expand Down Expand Up @@ -329,6 +332,7 @@ plot.mesh.2D<-function(x, ...)
#' @name plot.mesh.2.5D

#' @usage \method{plot}{mesh.2.5D}(x, ...)
#' @return No return value
#' @examples
#' library(fdaPDE)
#'
Expand Down Expand Up @@ -368,8 +372,8 @@ plot.mesh.2.5D<-function(x,...){
#' @description Plot a \code{mesh.3D} object, generated by \code{create.mesh.3D}.
#' @export
#' @name plot.mesh.3D

#' @usage \method{plot}{mesh.3D}(x, ...)
#' @return No return value
#' @examples
#' library(fdaPDE)
#'
Expand Down Expand Up @@ -414,8 +418,8 @@ plot.mesh.3D<-function(x,...){
#' @param ... Arguments representing graphical options to be passed to \link[graphics]{par}.
#' @description Plot a mesh.1.5D object, generated by \code{create.mesh.1.5D} or \code{refine.mesh.1.5D}.
#' @name plot.mesh.1.5D

#' @usage \method{plot}{mesh.1.5D}(x, ...)
#' @return No return value
#' @export
plot.mesh.1.5D<-function(x, ...)
{
Expand Down Expand Up @@ -657,6 +661,7 @@ R_plot_graph = function(FEM, ...){
#' @method image FEM
#' @seealso \code{\link{FEM}} \code{\link{plot.FEM}}
#' @export
#' @return No return value
#' @examples
#' library(fdaPDE)
#' ## Upload the horseshoe2D data
Expand Down Expand Up @@ -704,6 +709,7 @@ R_plot_graph = function(FEM, ...){
#' @usage \method{image}{FEM.time}(x,t,lambdaS=1,lambdaT=1,num_refinements=NULL,...)
#' @method image FEM.time
#' @seealso \code{\link{FEM.time}} \code{\link{image.FEM.time}}
#' @return No return value
#' @export
#' @examples
#' library(fdaPDE)
Expand Down
3 changes: 3 additions & 0 deletions man/image.FEM.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/image.FEM.time.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/inferenceDataObjectBuilder.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/plot.FEM.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/plot.FEM.time.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/plot.mesh.1.5D.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/plot.mesh.2.5D.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/plot.mesh.2D.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/plot.mesh.3D.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 899b747

Please sign in to comment.