Skip to content

Commit 78b6411

Browse files
oskooistevengj
andauthored
Prepare for 1.25 release (#2311)
* prepare for 1.25 release * add bug fix to NEWS.md and refresh documentation from docstrings * link fixes Co-authored-by: Steven G. Johnson <stevenj@alum.mit.edu>
1 parent a7cd7da commit 78b6411

File tree

3 files changed

+101
-35
lines changed

3 files changed

+101
-35
lines changed

NEWS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Meep Release Notes
22

3+
## Meep 1.25.0
4+
5+
11/17/2022
6+
7+
* Support for connectivity constraints in adjoint solver ([#2207]).
8+
9+
* Support for animation in topology optimization ([#2186]).
10+
11+
* Support for `load_minus_flux` in adjoint solver ([#2271]).
12+
13+
* Support colorbars in `plot2D` ([#2289]).
14+
15+
* Support for `plot3D` ([#2305]).
16+
17+
* Various improvements and bug fixes ([#2176], [#2179], [#2190], [#2194], [#2202], [#2203], [#2208], [#2251], [#2253], [#2264], [#2290]), and additional unit tests and documentation.
18+
319
## Meep 1.24.0
420

521
7/21/2022
@@ -1053,6 +1069,7 @@ Meep 1.0.1
10531069
[#1830]: https://github.com/NanoComp/meep/issues/1830
10541070
[#1839]: https://github.com/NanoComp/meep/issues/1839
10551071
[#1849]: https://github.com/NanoComp/meep/issues/1849
1072+
[#1855]: https://github.com/NanoComp/meep/issues/1855
10561073
[#1860]: https://github.com/NanoComp/meep/issues/1860
10571074
[#1871]: https://github.com/NanoComp/meep/issues/1871
10581075
[#1872]: https://github.com/NanoComp/meep/issues/1872
@@ -1061,8 +1078,38 @@ Meep 1.0.1
10611078
[#1895]: https://github.com/NanoComp/meep/issues/1895
10621079
[#1919]: https://github.com/NanoComp/meep/issues/1919
10631080
[#1955]: https://github.com/NanoComp/meep/issues/1955
1081+
[#1959]: https://github.com/NanoComp/meep/issues/1959
10641082
[#1968]: https://github.com/NanoComp/meep/issues/1968
10651083
[#2005]: https://github.com/NanoComp/meep/issues/2005
10661084
[#2016]: https://github.com/NanoComp/meep/issues/2016
10671085
[#2021]: https://github.com/NanoComp/meep/issues/2021
10681086
[#2027]: https://github.com/NanoComp/meep/issues/2027
1087+
[#2032]: https://github.com/NanoComp/meep/issues/2032
1088+
[#2044]: https://github.com/NanoComp/meep/issues/2044
1089+
[#2049]: https://github.com/NanoComp/meep/issues/2049
1090+
[#2053]: https://github.com/NanoComp/meep/issues/2053
1091+
[#2066]: https://github.com/NanoComp/meep/issues/2066
1092+
[#2073]: https://github.com/NanoComp/meep/issues/2073
1093+
[#2076]: https://github.com/NanoComp/meep/issues/2076
1094+
[#2077]: https://github.com/NanoComp/meep/issues/2077
1095+
[#2079]: https://github.com/NanoComp/meep/issues/2079
1096+
[#2082]: https://github.com/NanoComp/meep/issues/2082
1097+
[#2091]: https://github.com/NanoComp/meep/issues/2091
1098+
[#2095]: https://github.com/NanoComp/meep/issues/2095
1099+
[#2114]: https://github.com/NanoComp/meep/issues/2114
1100+
[#2176]: https://github.com/NanoComp/meep/issues/2176
1101+
[#2179]: https://github.com/NanoComp/meep/issues/2179
1102+
[#2186]: https://github.com/NanoComp/meep/issues/2186
1103+
[#2190]: https://github.com/NanoComp/meep/issues/2190
1104+
[#2194]: https://github.com/NanoComp/meep/issues/2194
1105+
[#2202]: https://github.com/NanoComp/meep/issues/2202
1106+
[#2203]: https://github.com/NanoComp/meep/issues/2203
1107+
[#2207]: https://github.com/NanoComp/meep/issues/2207
1108+
[#2208]: https://github.com/NanoComp/meep/issues/2208
1109+
[#2251]: https://github.com/NanoComp/meep/issues/2251
1110+
[#2253]: https://github.com/NanoComp/meep/issues/2253
1111+
[#2264]: https://github.com/NanoComp/meep/issues/2264
1112+
[#2271]: https://github.com/NanoComp/meep/issues/2271
1113+
[#2289]: https://github.com/NanoComp/meep/issues/2289
1114+
[#2290]: https://github.com/NanoComp/meep/issues/2290
1115+
[#2305]: https://github.com/NanoComp/meep/issues/2305

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Process this file with autoconf to produce a configure script.
22

3-
AC_INIT([meep],[m4_esyscmd(./version.sh 1.25.0-beta)])
3+
AC_INIT([meep],[m4_esyscmd(./version.sh 1.25.0)])
44
AC_CONFIG_SRCDIR(src/step.cpp)
55

66
# Shared-library version number; indicates api compatibility, and is
77
# not the same as the "public" version number. (Don't worry about this
88
# except for public releases.) Note that any change to a C++ class
99
# definition (in the .hpp file) generally breaks binary compatibility.
10-
SHARED_VERSION_INFO="29:0:0" # CURRENT:REVISION:AGE
10+
SHARED_VERSION_INFO="30:0:0" # CURRENT:REVISION:AGE
1111

1212
AM_INIT_AUTOMAKE([foreign color-tests parallel-tests silent-rules 1.11])
1313
AM_SILENT_RULES(yes)

doc/docs/Python_User_Interface.md

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,20 +2745,22 @@ This module provides basic visualization functionality for the simulation domain
27452745

27462746
```python
27472747
def plot2D(self,
2748-
ax=None,
2749-
output_plane=None,
2750-
fields=None,
2751-
labels=False,
2752-
eps_parameters=None,
2753-
boundary_parameters=None,
2754-
source_parameters=None,
2755-
monitor_parameters=None,
2756-
field_parameters=None,
2757-
frequency=None,
2758-
plot_eps_flag=True,
2759-
plot_sources_flag=True,
2760-
plot_monitors_flag=True,
2761-
plot_boundaries_flag=True,
2748+
ax: Optional[matplotlib.axes._axes.Axes] = None,
2749+
output_plane: Optional[meep.simulation.Volume] = None,
2750+
fields: Optional = None,
2751+
labels: Optional[bool] = False,
2752+
eps_parameters: Optional[dict] = None,
2753+
boundary_parameters: Optional[dict] = None,
2754+
source_parameters: Optional[dict] = None,
2755+
monitor_parameters: Optional[dict] = None,
2756+
field_parameters: Optional[dict] = None,
2757+
colorbar_parameters: Optional[dict] = None,
2758+
frequency: Optional[float] = None,
2759+
plot_eps_flag: bool = True,
2760+
plot_sources_flag: bool = True,
2761+
plot_monitors_flag: bool = True,
2762+
plot_boundaries_flag: bool = True,
2763+
nb: bool = False,
27622764
**kwargs):
27632765
```
27642766

@@ -2814,6 +2816,7 @@ to be called on all processes, but only generates a plot on the master process.
28142816
plot. Defaults to the `frequency` parameter of the [Source](#source) object.
28152817
- `resolution=None`: the resolution of the $\varepsilon$ grid. Defaults to the
28162818
`resolution` of the `Simulation` object.
2819+
- `colorbar=False`: whether to add a colorbar to the plot's parent Figure based on epsilon values.
28172820
* `boundary_parameters`: a `dict` of optional plotting parameters that override
28182821
the default parameters for the boundary layers.
28192822
- `alpha=1.0`: transparency of boundary layers
@@ -2850,6 +2853,21 @@ to be called on all processes, but only generates a plot on the master process.
28502853
- `alpha=0.6`: transparency of fields
28512854
- `post_process=np.real`: post processing function to apply to fields (must be
28522855
a function object)
2856+
- `colorbar=False`: whether to add a colorbar to the plot's parent Figure based on field values.
2857+
* `colorbar_parameters`: a `dict` of optional plotting parameters that override the default parameters for
2858+
the colorbar.
2859+
- `label=None`: an optional label for the colorbar, defaults to '$\epsilon_r$' for epsilon and
2860+
'field values' for fields.
2861+
- `orientation='vertical'`: the orientation of the colorbar gradient
2862+
- `extend=None`: make pointed end(s) for out-of-range values. Allowed values are:
2863+
['neither', 'both', 'min', 'max']
2864+
- `format=None`: formatter for tick labels. Can be an fstring (i.e. "{x:.2e}") or a
2865+
[matplotlib.ticker.ScalarFormatter](https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.ScalarFormatter).
2866+
- `position='right'`: position of the colorbar with respect to the Axes
2867+
- `size='5%'`: size of the colorbar in the dimension perpendicular to its `orientation`
2868+
- `pad='2%'`: fraction of original axes between colorbar and image axes
2869+
* `nb`: set this to True if plotting in a Jupyter notebook to use ipympl for plotting. Note: this requires
2870+
ipympl to be installed.
28532871

28542872
</div>
28552873

@@ -6241,7 +6259,7 @@ def __init__(self,
62416259
side: int = -1,
62426260
R_asymptotic: float = 1e-15,
62436261
mean_stretch: float = 1.0,
6244-
pml_profile: Callable[[float], float] = <function <lambda> at 0x7f0880782ca0>):
6262+
pml_profile: Callable[[float], float] = <function <lambda> at 0x7f41474eeb00>):
62456263
```
62466264

62476265
<div class="method_docstring" markdown="1">
@@ -7147,14 +7165,12 @@ class Animate2D(object):
71477165
<div class="class_docstring" markdown="1">
71487166

71497167
A class used to record the fields during timestepping (i.e., a [`run`](#run-functions)
7150-
function). The object is initialized prior to timestepping by specifying the
7151-
simulation object and the field component. The object can then be passed to any
7152-
[step-function modifier](#step-function-modifiers). For example, one can record the
7153-
$E_z$ fields at every one time unit using:
7168+
function). The object is initialized prior to timestepping by specifying the field component.
7169+
The object can then be passed to any [step-function modifier](#step-function-modifiers).
7170+
For example, one can record the $E_z$ fields at every one time unit using:
71547171

71557172
```py
7156-
animate = mp.Animate2D(sim,
7157-
fields=mp.Ez,
7173+
animate = mp.Animate2D(fields=mp.Ez,
71587174
realtime=True,
71597175
field_parameters={'alpha':0.8, 'cmap':'RdBu', 'interpolation':'none'},
71607176
boundary_parameters={'hatch':'o', 'linewidth':1.5, 'facecolor':'y', 'edgecolor':'b', 'alpha':0.3})
@@ -7183,7 +7199,9 @@ track different volume locations (using `mp.in_volume`) or field components.
71837199
<div class="class_members" markdown="1">
71847200

71857201
```python
7186-
def __call__(self, sim, todo):
7202+
def __call__(self,
7203+
sim: meep.simulation.Simulation,
7204+
todo: str):
71877205
```
71887206

71897207
<div class="method_docstring" markdown="1">
@@ -7201,12 +7219,12 @@ Call self as a function.
72017219

72027220
```python
72037221
def __init__(self,
7204-
fields,
7205-
sim=None,
7206-
f=None,
7207-
realtime=False,
7208-
normalize=False,
7209-
plot_modifiers=None,
7222+
sim: Optional[meep.simulation.Simulation] = None,
7223+
fields: Optional = None,
7224+
f: Optional[matplotlib.figure.Figure] = None,
7225+
realtime: bool = False,
7226+
normalize: bool = False,
7227+
plot_modifiers: Optional[list] = None,
72107228
update_epsilon: bool = False,
72117229
nb: bool = False,
72127230
**customization_args):
@@ -7216,9 +7234,9 @@ def __init__(self,
72167234

72177235
Construct an `Animate2D` object.
72187236

7219-
+ **`sim`** — Simulation object.
7237+
+ **`sim=None`**Optional Simulation object (this has no effect, and is included for backwards compatibility).
72207238

7221-
+ **`fields`** — Field component to record at each time instant.
7239+
+ **`fields=None`** Optional Field component to record at each time instant.
72227240

72237241
+ **`f=None`** — Optional `matplotlib` figure object that the routine will update
72247242
on each call. If not supplied, then a new one will be created upon
@@ -7261,7 +7279,7 @@ Construct an `Animate2D` object.
72617279
<div class="class_members" markdown="1">
72627280

72637281
```python
7264-
def to_gif(self, fps, filename):
7282+
def to_gif(self, fps: int, filename: str) -> None:
72657283
```
72667284

72677285
<div class="method_docstring" markdown="1">
@@ -7282,7 +7300,8 @@ format only supports 256 colors from a _predefined_ color palette. Requires
72827300
<div class="class_members" markdown="1">
72837301

72847302
```python
7285-
def to_jshtml(self, fps):
7303+
def to_jshtml(self,
7304+
fps: int):
72867305
```
72877306

72887307
<div class="method_docstring" markdown="1">
@@ -7301,7 +7320,7 @@ playback. User must specify a frame rate `fps` in frames per second.
73017320
<div class="class_members" markdown="1">
73027321

73037322
```python
7304-
def to_mp4(self, fps, filename):
7323+
def to_mp4(self, fps: int, filename: str) -> None:
73057324
```
73067325

73077326
<div class="method_docstring" markdown="1">

0 commit comments

Comments
 (0)