/
106_balancing.Rmd
64 lines (52 loc) · 1.44 KB
/
106_balancing.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: "Balancing"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
rmarkdown::html_vignette:
toc: true
toc_depth: 3
fig_width: 7
fig_height: 3
fig_caption: true
includes:
in_header: "../../inst/_x3d_header.html"
vignette: >
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{Balancing}
%\VignetteEncoding{UTF-8}
---
```{r demo, message=FALSE, echo=FALSE, warning=FALSE}
library(knitr)
suppressPackageStartupMessages(require(terms))
options(cli.num_colors = 1)
theme_set(theme_grey())
opts_chunk$set(echo = FALSE, warning =FALSE,
message=FALSE, comment='',
tidy=FALSE, cache = FALSE)
do.call(read_chunk, list(path = "_run.R"))
```
This example illustrates the effect of balancing as described by Stout et al. We compare the far-field spectra for a dimer of large silver spheres with a small gap, with and without the `DisableStoutBalancing` keyword.
This simulation uses the following `input` files
```{r tpl}
```
(with and without the keyword).
```{r show_cluster, echo=FALSE, results='asis', message=FALSE}
suppressPackageStartupMessages(require(terms))
cat(' <style>
.x3d_scene {
float:right;
margin:0em;
}
</style>')
ge <- get_geometry('input1')
cl <- cluster_geometry(ge)
terms::x3d_scene(cl, viewpoint=c(0,0,300), width = "200px", height = "150px")
```
```{r read, cache=FALSE}
```
```{r oa}
```
-----
```{r cleanup}
```
_Last run: `r format(Sys.time(), '%d %B, %Y')`_