# Interior computational domain

The interior computational domain, as the name implies, contains everything inside the exterior computational domain. This includes the geometry to be modeled as well as the surrounding material(s). Assuming that the geometry has already been generated (see the Geometric modeling section), the only remaining tasks are to scale and shift the geometry and set the surrounding (background) material. These concepts are illustrated in the images to the lower right.

FDTD++ computational domain. Note that the parameters shown in red can be set in the parameters file using the simulation keyword domain, and those in blue can be set using the keyword geom.
$xy$-projection of the FDTD++ computational domain. Note that the parameters shown in red can be set in the parameters file using the simulation keyword domain, and those in blue can be set using the keyword geom.
$xy$-projection of the FDTD++ computational domain. Note that the parameters shown in red can be set in the parameters file using the simulation keyword domain, and those in blue can be set using the keyword geom.

## Geometry

#### Scaling the geometry

Geometries modeled with computer-aided design (CAD) software (see Computer-aided design import) are often modeled with axis lengths of 1, without units. Thus, when inserting into FDTD++, the geometry may need to be scaled by the appropriate length scale. This can be accomplished using the simulation parameter geom scale.

As an example, suppose that we have modeled a nanostructure with CAD software, assuming 1 = 1 nm. Then, in the parameters file, we would add the following:

geom scale 1.0e-9

Note that only uniform scaling along $x$, $y$, and $z$ is currently allowed.

#### Shifting the geometry

Geometries modeled with CAD software are also often modeled around the origin (0, 0, 0), for convenience. Thus, when imported into FDTD++, it is necessary to shift it to the desired location in the computational domain. The parameter geom shift is used for this purpose, as illustrated in the images to the right.

As an example, suppose that one wants to shift a geometry from (0, 0, 0) to (100 nm, 100 nm, 100 nm). To accomplish this, the following could be added to the parameters file:

geom shift 100.0e-9

Shifts along each direction could also be explicitly performed using:

geom shift 100.0e-9 x
geom shift 100.0e-9 y
geom shift 100.0e-9 z

The latter example demonstrates how one could define a non-uniform shift along $x$, $y$, and $z$.

## Background material

The background material is all of the material surrounding the geometry. By default, this is set to vacuum. However, this can be changed using the simulation parameters domain epsr and domain mur, as shown in the images to the right.

As an example, suppose that we wanted to change the background material to glass. In this case, we would add the following to the parameters file:

domain epsr 2.25
domain mur 1.0

where the specification of domain mur has been added for clarity.

Note that currently only perfect dielectric materials are allowed as the background.