Skip to content

Commit 1f0e109

Browse files
committed
update
1 parent b1e4706 commit 1f0e109

6 files changed

Lines changed: 31 additions & 96 deletions

File tree

SuPyMode/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
__version__ = version = "2.2.1"
3232
__version_tuple__ = version_tuple = (2, 2, 1)
3333

34-
__commit_id__ = commit_id = "g30d05d89b"
34+
__commit_id__ = commit_id = "gb1e47061a"

SuPyMode/cpp/eigensolver/interface.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,6 @@ PYBIND11_MODULE(interface_eigensolver, module)
337337
338338
The sorting is based on the real part of the eigenvalue, which
339339
corresponds to the effective refractive index of the mode.
340-
341-
Examples
342-
--------
343-
>>> eigenvals, eigenvecs = solver.get_mode()
344-
>>> n_eff = numpy.sqrt(eigenvals.real) # Effective indices
345-
>>> fundamental_mode = eigenvecs[:, 0] # Fundamental mode field
346340
)pbdoc"
347341
)
348342
.def_readwrite(

SuPyMode/cpp/taper/taper.h

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,61 +11,8 @@
1111

1212
#include <utils/math.h>
1313
#include "interpolator.h"
14+
#include "taper_section.h"
1415

15-
16-
// -----------------------------
17-
// TaperSection
18-
// -----------------------------
19-
class TaperSection {
20-
public:
21-
TaperSection() = default;
22-
23-
TaperSection(
24-
std::vector<double> z_array,
25-
std::vector<double> radius_array,
26-
double heating_length_initial = std::numeric_limits<double>::quiet_NaN(),
27-
double heating_length_final = std::numeric_limits<double>::quiet_NaN())
28-
: z_array_(std::move(z_array)),
29-
radius_array_(std::move(radius_array)),
30-
heating_length_initial_(heating_length_initial),
31-
heating_length_final_(heating_length_final)
32-
{
33-
if (z_array_.size() != radius_array_.size()) {
34-
throw std::invalid_argument("TaperSection: z_array and radius_array size mismatch.");
35-
}
36-
if (z_array_.empty()) throw std::invalid_argument("TaperSection: arrays must not be empty.");
37-
if (!std::is_sorted(z_array_.begin(), z_array_.end())) {
38-
throw std::invalid_argument("TaperSection: z_array must be sorted ascending.");
39-
}
40-
}
41-
42-
double z_initial() const { return z_array_.front(); }
43-
double z_final() const { return z_array_.back(); }
44-
double radius_initial() const { return radius_array_.front(); }
45-
double radius_final() const { return radius_array_.back(); }
46-
bool is_constant() const { return radius_array_.front() == radius_array_.back(); }
47-
48-
double heating_length_initial() const { return heating_length_initial_; }
49-
double heating_length_final() const { return heating_length_final_; }
50-
51-
const std::vector<double>& z_array() const { return z_array_; }
52-
const std::vector<double>& radius_array() const { return radius_array_; }
53-
54-
// Similar to scipy interp1d(bounds_error=False, fill_value=0)
55-
LinearInterpolator interpolation(bool bounds_error = false, double fill_value = 0.0) const {
56-
return LinearInterpolator(z_array_, radius_array_, bounds_error, fill_value);
57-
}
58-
59-
private:
60-
std::vector<double> z_array_;
61-
std::vector<double> radius_array_;
62-
double heating_length_initial_ = std::numeric_limits<double>::quiet_NaN();
63-
double heating_length_final_ = std::numeric_limits<double>::quiet_NaN();
64-
};
65-
66-
// -----------------------------
67-
// AlphaProfile
68-
// -----------------------------
6916
class AlphaProfile {
7017
public:
7118
AlphaProfile(

SuPyMode/cpp/utils/math.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#pragma once
2+
13
#include <vector>
24
#include <stdexcept>
35
#include <cstddef>

SuPyMode/superset_plots.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,6 @@ def plot(self, plot_type: str, **kwargs) -> None:
346346
------
347347
ValueError
348348
If an unrecognized plot type is specified.
349-
350-
Examples
351-
--------
352-
>>> superset_plots.plot(plot_type='index', ax=ax)
353-
Generates an effective index plot.
354-
355-
>>> superset_plots.plot(plot_type='invalid')
356-
ValueError: Invalid plot type: invalid. Options are: index, beta, eigen-value, adiabatic, normalized-adiabatic, normalized-coupling, field, beating-length.
357349
"""
358350
match plot_type.lower().replace("_", "-"):
359351
case "index":

docs/source/sg_execution_times.rst

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Computation times
88
=================
9-
**05:15.336** total execution time for 14 files **from all galleries**:
9+
**00:12.833** total execution time for 14 files **from all galleries**:
1010

1111
.. container::
1212

@@ -32,45 +32,45 @@ Computation times
3232
* - Example
3333
- Time
3434
- Mem (MB)
35-
* - :ref:`sphx_glr_gallery_extra_plot_graded_index.py` (``../examples/extra/plot_graded_index.py``)
36-
- 00:56.359
35+
* - :ref:`sphx_glr_gallery_alpha_profile_plot_alpha_profile_0.py` (``../examples/alpha_profile/plot_alpha_profile_0.py``)
36+
- 00:06.428
3737
- 0.0
38-
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_07.py` (``../examples/workflow/plot_workflow_07.py``)
39-
- 00:43.612
38+
* - :ref:`sphx_glr_gallery_extra_plot_propagation.py` (``../examples/extra/plot_propagation.py``)
39+
- 00:06.406
4040
- 0.0
41-
* - :ref:`sphx_glr_gallery_validation_plot_validation.py` (``../examples/validation/plot_validation.py``)
42-
- 00:40.049
41+
* - :ref:`sphx_glr_gallery_alpha_profile_plot_alpha_profile_1.py` (``../examples/alpha_profile/plot_alpha_profile_1.py``)
42+
- 00:00.000
43+
- 0.0
44+
* - :ref:`sphx_glr_gallery_extra_plot_graded_index.py` (``../examples/extra/plot_graded_index.py``)
45+
- 00:00.000
4346
- 0.0
4447
* - :ref:`sphx_glr_gallery_validation_plot_beta_DCF.py` (``../examples/validation/plot_beta_DCF.py``)
45-
- 00:37.617
48+
- 00:00.000
4649
- 0.0
47-
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_06.py` (``../examples/workflow/plot_workflow_06.py``)
48-
- 00:31.365
50+
* - :ref:`sphx_glr_gallery_validation_plot_beta_SMF28.py` (``../examples/validation/plot_beta_SMF28.py``)
51+
- 00:00.000
4952
- 0.0
50-
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_01.py` (``../examples/workflow/plot_workflow_01.py``)
51-
- 00:23.715
53+
* - :ref:`sphx_glr_gallery_validation_plot_validation.py` (``../examples/validation/plot_validation.py``)
54+
- 00:00.000
5255
- 0.0
53-
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_05.py` (``../examples/workflow/plot_workflow_05.py``)
54-
- 00:19.661
56+
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_01.py` (``../examples/workflow/plot_workflow_01.py``)
57+
- 00:00.000
5558
- 0.0
56-
* - :ref:`sphx_glr_gallery_validation_plot_beta_SMF28.py` (``../examples/validation/plot_beta_SMF28.py``)
57-
- 00:17.226
59+
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_02.py` (``../examples/workflow/plot_workflow_02.py``)
60+
- 00:00.000
5861
- 0.0
5962
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_03.py` (``../examples/workflow/plot_workflow_03.py``)
60-
- 00:13.432
61-
- 0.0
62-
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_02.py` (``../examples/workflow/plot_workflow_02.py``)
63-
- 00:11.687
63+
- 00:00.000
6464
- 0.0
6565
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_04.py` (``../examples/workflow/plot_workflow_04.py``)
66-
- 00:11.508
66+
- 00:00.000
6767
- 0.0
68-
* - :ref:`sphx_glr_gallery_extra_plot_propagation.py` (``../examples/extra/plot_propagation.py``)
69-
- 00:08.315
68+
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_05.py` (``../examples/workflow/plot_workflow_05.py``)
69+
- 00:00.000
7070
- 0.0
71-
* - :ref:`sphx_glr_gallery_alpha_profile_plot_alpha_profile_1.py` (``../examples/alpha_profile/plot_alpha_profile_1.py``)
72-
- 00:00.479
71+
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_06.py` (``../examples/workflow/plot_workflow_06.py``)
72+
- 00:00.000
7373
- 0.0
74-
* - :ref:`sphx_glr_gallery_alpha_profile_plot_alpha_profile_0.py` (``../examples/alpha_profile/plot_alpha_profile_0.py``)
75-
- 00:00.311
74+
* - :ref:`sphx_glr_gallery_workflow_plot_workflow_07.py` (``../examples/workflow/plot_workflow_07.py``)
75+
- 00:00.000
7676
- 0.0

0 commit comments

Comments
 (0)