Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix devsim #806

Merged
merged 5 commits into from Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 1 addition & 9 deletions Makefile
Expand Up @@ -175,13 +175,5 @@ link:

spell:
codespell -i 3 -w -L TE,TE/TM,te,ba,FPR,fpr_spacing

devsim:
wget -P devsim https://github.com/devsim/devsim/releases/download/v2.1.0/devsim_linux_v2.1.0.tgz
tar zxvf devsim/devsim_linux_v2.1.0.tgz --directory devsim
python devsim/devsim_linux_v2.1.0/install.py
pip install -e devsim/devsim_linux_v2.1.0/lib # Works in this specific way
pip install mkl
mamba install -c conda-forge pyvista -y


.PHONY: gdsdiff build conda
15 changes: 15 additions & 0 deletions gdsfactory/simulation/devsim/__init__.py
@@ -0,0 +1,15 @@
import devsim as tcad

from gdsfactory.config import logger
from gdsfactory.simulation.devsim.get_simulation_xsection import (
PINWaveguide,
alpha_to_k,
dalpha_carriers,
dn_carriers,
k_to_alpha,
)

logger.info(f"DEVSIM {tcad.__version__!r} installed at {tcad.__path__!r}")

__all__ = ["dn_carriers", "dalpha_carriers", "alpha_to_k", "k_to_alpha", "PINWaveguide"]
__version__ = "0.0.1"
2 changes: 1 addition & 1 deletion gdsfactory/simulation/devsim/get_simulation_xsection.py
Expand Up @@ -50,7 +50,7 @@ def dn_carriers(wavelength: float, dN: float, dP: float) -> float:
wavelength *= 1e-6
return (
-3.64 * 1e-10 * wavelength**2 * dN
- 3.51 * 1e-6 * wavelength**2 * np.poewr(dP, 0.8)
- 3.51 * 1e-6 * wavelength**2 * np.power(dP, 0.8)
)


Expand Down
4 changes: 4 additions & 0 deletions requirements_devsim.txt
@@ -0,0 +1,4 @@
devsim
mkl
pyvista
tidy3d-beta==1.7.1
2 changes: 0 additions & 2 deletions requirements_full.txt
@@ -1,14 +1,12 @@
autograd
bokeh
devsim
freetype-py
holoviews
ipympl
ipywidgets
klayout
lytest==0.0.20
mapbox_earcut
mkl
networkx
nlopt
phidl
Expand Down
6 changes: 6 additions & 0 deletions setup.py
Expand Up @@ -30,6 +30,11 @@
line.strip() for line in f.readlines() if not line.strip().startswith("-")
]

with open("requirements_devsim.txt") as f:
requirements_devsim = [
line.strip() for line in f.readlines() if not line.strip().startswith("-")
]

with open("README.md") as f:
long_description = f.read()

Expand All @@ -55,6 +60,7 @@
"full": list(set(requirements + requirements_full)),
"sipann": requirements_sipann,
"tidy3d": requirements_tidy3d,
"devsim": requirements_devsim,
"dev": list(set(requirements + requirements_dev)),
"exp": list(set(requirements + requirements_exp)),
},
Expand Down