commit 3c9b5ea4224ff5521df3effc4abff05111e95e2b
parent 83e043a0709ffeeaa8fe00d98339149ed98317a0
Author: Ivan Gankevich <igankevich@ya.ru>
Date: Thu, 17 Aug 2017 13:33:37 +0300
Prepare for the publication.
Diffstat:
4 files changed, 42 insertions(+), 21 deletions(-)
diff --git a/R/common.R b/R/common.R
@@ -24,6 +24,7 @@ arma.wavy_plot <- function (data, t, ...) {
ncz <- ncol(z)
# Create a function interpolating colors in the range of specified colors
jet.colors <- colorRampPalette( c("blue", "green") )
+# jet.colors <- colorRampPalette(c("blue", "cyan", "white"))
# Generate the desired number of colors from this palette
nbcol <- 100
color <- jet.colors(nbcol)
@@ -107,7 +108,7 @@ arma.plot_partitions <- function() {
}
arma.plot_ramp_up_interval <- function(label="Ramp-up interval") {
- zeta <- read.csv(file.path("build", "standing_wave", "zeta.csv"))
+ zeta <- read.csv(file.path("build", "arma-benchmarks", "verification", "standing_wave", "zeta.csv"))
t <- round(mean(zeta$t))
res <- arma.wavy_plot(zeta, t, scale=FALSE)
library("grDevices")
@@ -119,11 +120,11 @@ arma.plot_ramp_up_interval <- function(label="Ramp-up interval") {
c(0, my, my, 0, 0),
c(0, 0, 0, 0, 0),
pmat=res
- ), col="red", lwd=3)
- text(trans3d(0, my/2, max(zeta$z)*1.5, pmat=res), label, col="red", font=2)
- from <- trans3d(0, my/2, max(zeta$z)*1.4, pmat=res)
+ ), col="#c00000", lwd=4)
+ text(trans3d(0, my/2, max(zeta$z)*3.0, pmat=res), label, col="black", font=2)
+ from <- trans3d(0, my/2, max(zeta$z)*2.5, pmat=res)
to <- trans3d(0, my/2, max(zeta$z)*0.05, pmat=res)
- arrows(from$x, from$y, to$x, to$y, lwd=2, angle=10, length=0.1, col="red")
+ arrows(from$x, from$y, to$x, to$y, lwd=2, angle=10, length=0.1, col="black")
}
arma.plot_factory_vs_openmp <- function(...) {
diff --git a/R/velocity-potentials.R b/R/velocity-potentials.R
@@ -51,8 +51,8 @@ arma.plot_velocity_potential_field <- function (dir, ...) {
add=TRUE
)
- top_area_x <- c(left_top_x*0.99, zeta_slice$x, right_top_x*1.01)
- top_area_z <- c(left_top_z*1.10, zeta_slice$z, right_top_z*1.10)
+ top_area_x <- c(left_top_x*0.90, left_top_x*0.90, zeta_slice$x, right_top_x*1.05)
+ top_area_z <- c(left_top_z*1.20, zeta_slice$z[[1]], zeta_slice$z, right_top_z*1.20)
polygon(top_area_x, top_area_z, lwd=4, border=NA, col='white')
lines(zeta_slice$x, zeta_slice$z, lwd=4)
box()
diff --git a/R/waves.R b/R/waves.R
@@ -57,7 +57,7 @@ arma.qqplot <- function (param, nsamples=100, ttl, ...) {
ylim=c(param$min, param$max),
...
)
- title(ttl, line=-2)
+ title(ttl, line=-1)
qqline(param$data, distribution=param$qfunc)
}
diff --git a/arma.org b/arma.org
@@ -656,7 +656,7 @@ fig.\nbsp{}[[propagating-wave-distributions]],\nbsp{}[[standing-wave-distributio
source(file.path("R", "common.R"))
par(pty="s", mfrow=c(2, 2), mai = c(1, 0.2, 0.2, 0.2))
arma.qqplot_grid(
- file.path("build", "propagating_wave"),
+ file.path("build", "arma-benchmarks", "verification", "propagating_wave"),
c("elevation", "heights_y", "lengths_y", "periods"),
c("elevation", "height Y", "length Y", "period"),
xlab="x",
@@ -675,7 +675,7 @@ arma.qqplot_grid(
source(file.path("R", "common.R"))
par(pty="s", mfrow=c(2, 2), mai = c(1, 0.2, 0.2, 0.2))
arma.qqplot_grid(
- file.path("build", "standing_wave"),
+ file.path("build", "arma-benchmarks", "verification", "standing_wave"),
c("elevation", "heights_y", "lengths_y", "periods"),
c("elevation", "height Y", "length Y", "period"),
xlab="x",
@@ -692,12 +692,12 @@ arma.qqplot_grid(
#+header: :width 4.5 :height 7
#+begin_src R :file build/acf-slices.pdf
source(file.path("R", "common.R"))
-propagating_acf <- read.csv(file.path("build", "propagating_wave", "acf.csv"))
-standing_acf <- read.csv(file.path("build", "standing_wave", "acf.csv"))
+propagating_acf <- read.csv(file.path("build", "arma-benchmarks", "verification", "propagating_wave", "acf.csv"))
+standing_acf <- read.csv(file.path("build", "arma-benchmarks", "verification", "standing_wave", "acf.csv"))
par(mfrow=c(5, 2), mar=c(0,0,0,0), mai=c(0.1, 0.1, 0.1, 0.1))
for (i in seq(0, 4)) {
- arma.wavy_plot(standing_acf, i, zlim=c(-5,5))
- arma.wavy_plot(propagating_acf, i, zlim=c(-5,5))
+ arma.wavy_plot(standing_acf, i, zlim=c(-1,1))
+ arma.wavy_plot(propagating_acf, i, zlim=c(-1,1))
}
#+end_src
@@ -787,8 +787,8 @@ problem of hydrodynamics for incompressible inviscid fluid. System of equations
for it in general case is written as\nbsp{}cite:kochin1966theoretical
\begin{align}
& \nabla^2\phi = 0,\nonumber\\
- & \phi_t+\frac{1}{2} |\vec{\upsilon}|^2 + g\zeta=-\frac{p}{\rho}, & \text{на }z=\zeta(x,y,t),\label{eq-problem}\\
- & D\zeta = \nabla \phi \cdot \vec{n}, & \text{на }z=\zeta(x,y,t),\nonumber
+ & \phi_t+\frac{1}{2} |\vec{\upsilon}|^2 + g\zeta=-\frac{p}{\rho}, & \text{at }z=\zeta(x,y,t),\label{eq-problem}\\
+ & D\zeta = \nabla \phi \cdot \vec{n}, & \text{at }z=\zeta(x,y,t),\nonumber
\end{align}
where \(\phi\)\nbsp{}--- velocity potential, \(\zeta\)\nbsp{}--- elevation
(\(z\) coordinate) of wavy surface, \(p\)\nbsp{}--- wave pressure,
@@ -818,7 +818,7 @@ Two-dimensional Laplace equation with Robin boundary condition is written as
\begin{align}
\label{eq-problem-2d}
& \phi_{xx}+\phi_{zz}=0,\\
- & \zeta_t + \zeta_x\phi_x = \frac{\zeta_x}{\sqrt{1 + \zeta_x^2}} \phi_x - \phi_z, & \text{на }z=\zeta(x,t).\nonumber
+ & \zeta_t + \zeta_x\phi_x = \frac{\zeta_x}{\sqrt{1 + \zeta_x^2}} \phi_x - \phi_z, & \text{at }z=\zeta(x,t).\nonumber
\end{align}
Use Fourier method to solve this problem. Applying Fourier transform to both
sides of the equation yields
@@ -967,7 +967,7 @@ to their lengths, which allows us to simplify initial system of
equations\nbsp{}eqref:eq-problem-2d to
\begin{align*}
& \phi_{xx}+\phi_{zz}=0,\\
- & \zeta_t = -\phi_z & \text{на }z=\zeta(x,t),
+ & \zeta_t = -\phi_z & \text{at }z=\zeta(x,t),
\end{align*}
solution to which is written as
\begin{equation*}
@@ -1036,7 +1036,7 @@ Three-dimensional version of\nbsp{}eqref:eq-problem is written as
=
\frac{\zeta_x}{\SqrtZeta{1 + \zeta_x^2 + \zeta_y^2}} \phi_x
+\frac{\zeta_y}{\SqrtZeta{1 + \zeta_x^2 + \zeta_y^2}} \phi_y
- - \phi_z, & \text{на }z=\zeta(x,y,t).\nonumber
+ - \phi_z, & \text{at }z=\zeta(x,y,t).\nonumber
\end{align}
Again, use Fourier method to solve it. Applying Fourier transform to both sides
of Laplace equation yields
@@ -1141,12 +1141,13 @@ par(pty="s")
nlevels <- 41
levels <- pretty(c(-200,200), nlevels)
palette <- colorRampPalette(c("blue", "lightyellow", "red"))
+#palette <- colorRampPalette(c("black", "white"))
col <- palette(nlevels-1)
# linear solver
par(fig=c(0,0.95,0,0.5),new=TRUE)
arma.plot_velocity_potential_field(
- file.path("build", "plain_wave_linear_solver"),
+ file.path("build", "arma-benchmarks", "verification", "plain_wave_linear_solver"),
levels=levels,
col=col
)
@@ -1154,7 +1155,7 @@ arma.plot_velocity_potential_field(
# high-amplitude solver
par(fig=c(0,0.95,0.5,1),new=TRUE)
arma.plot_velocity_potential_field(
- file.path("build", "plain_wave_high_amplitude_solver"),
+ file.path("build", "arma-benchmarks", "verification", "plain_wave_high_amplitude_solver"),
levels=levels,
col=col
)
@@ -1459,3 +1460,22 @@ implementation a base of virtual testbed for marine objects dynamics studies.
bibliographystyle:styles/spphys.bst
bibliography:refs.bib
+
+* Config :noexport:
+#+begin_src sh :exports none :results verbatim
+set -e
+dir=build/arma-benchmarks
+mkdir -p $dir
+if ! test -d "$dir/.git"
+then
+ git clone https://github.com/igankevich/arma-benchmarks $dir
+fi
+cd $dir
+git checkout master
+git pull
+git checkout 730ef79a9f49df9c0c22d0a0f06e4d0b69b5bd99
+#+end_src
+
+#+RESULTS:
+: Ваша ветка обновлена в соответствии с «origin/master».
+: Already up-to-date.