From 9fadf4f58ca9bed47a5818edd141f3fc2f939fe4 Mon Sep 17 00:00:00 2001 From: MartinPdeS Date: Wed, 6 Jul 2022 17:53:34 -0400 Subject: [PATCH] update --- Makefile | 258 ------------------------------------- Perso/ABAB.py | 49 ++++--- SuPyMode/Geometry.py | 4 +- SuPyMode/Plotting/Plots.py | 20 +-- SuPyMode/Solver.py | 9 +- SuPyMode/SuperMode.py | 5 - SuPyMode/__init__.py | 1 - SuPyMode/fibers.py | 17 +++ Tests/perso.py | 73 ----------- cmake_install.cmake | 66 ---------- examples/2x2SMF28.py | 10 +- install_manifest.txt | 1 - 12 files changed, 60 insertions(+), 453 deletions(-) delete mode 100644 Makefile delete mode 100644 Tests/perso.py delete mode 100644 cmake_install.cmake delete mode 100644 install_manifest.txt diff --git a/Makefile b/Makefile deleted file mode 100644 index e1a7cf6f0..000000000 --- a/Makefile +++ /dev/null @@ -1,258 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.23 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake - -# The command to remove a file. -RM = /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /Users/martinpdes/Desktop/GitProject/SuPyMode - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /Users/martinpdes/Desktop/GitProject/SuPyMode - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# The main all target -all: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start /Users/martinpdes/Desktop/GitProject/SuPyMode/CMakeFiles /Users/martinpdes/Desktop/GitProject/SuPyMode//CMakeFiles/progress.marks - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all - $(CMAKE_COMMAND) -E cmake_progress_start /Users/martinpdes/Desktop/GitProject/SuPyMode/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -#============================================================================= -# Target rules for targets named EigenSolver - -# Build rule for target. -EigenSolver: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 EigenSolver -.PHONY : EigenSolver - -# fast build rule for target. -EigenSolver/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/build -.PHONY : EigenSolver/fast - -#============================================================================= -# Target rules for targets named Upload - -# Build rule for target. -Upload: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Upload -.PHONY : Upload - -# fast build rule for target. -Upload/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Upload.dir/build.make CMakeFiles/Upload.dir/build -.PHONY : Upload/fast - -#============================================================================= -# Target rules for targets named Clean - -# Build rule for target. -Clean: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Clean -.PHONY : Clean - -# fast build rule for target. -Clean/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Clean.dir/build.make CMakeFiles/Clean.dir/build -.PHONY : Clean/fast - -SuPyMode/includes/interface.o: SuPyMode/includes/interface.cpp.o -.PHONY : SuPyMode/includes/interface.o - -# target to build an object file -SuPyMode/includes/interface.cpp.o: - $(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.o -.PHONY : SuPyMode/includes/interface.cpp.o - -SuPyMode/includes/interface.i: SuPyMode/includes/interface.cpp.i -.PHONY : SuPyMode/includes/interface.i - -# target to preprocess a source file -SuPyMode/includes/interface.cpp.i: - $(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.i -.PHONY : SuPyMode/includes/interface.cpp.i - -SuPyMode/includes/interface.s: SuPyMode/includes/interface.cpp.s -.PHONY : SuPyMode/includes/interface.s - -# target to generate assembly for a file -SuPyMode/includes/interface.cpp.s: - $(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.s -.PHONY : SuPyMode/includes/interface.cpp.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... install/strip" - @echo "... list_install_components" - @echo "... rebuild_cache" - @echo "... Clean" - @echo "... Upload" - @echo "... EigenSolver" - @echo "... SuPyMode/includes/interface.o" - @echo "... SuPyMode/includes/interface.i" - @echo "... SuPyMode/includes/interface.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/Perso/ABAB.py b/Perso/ABAB.py index 983af60f8..a85f0268e 100644 --- a/Perso/ABAB.py +++ b/Perso/ABAB.py @@ -1,4 +1,4 @@ -from SuPyMode.Geometry import Geometry, Fused4, Circle +from SuPyMode.Geometry import Geometry, Fused3, Circle from SuPyMode.Solver import SuPySolver from SuPyMode.fibers import * from PyOptik import ExpData @@ -7,49 +7,46 @@ FiberA = Fiber_DCF1300S_20(Wavelength=1.55) FiberB = Fiber_DCF1300S_33(Wavelength=1.55) +FiberC = Fiber_New(Wavelength=1.55) -nMode = 6 -Xbound = [-150, 0] -Ybound = [-150, 0] -Nx = 100 -Ny = 100 +Xbound = [-130, 130] +Ybound = [-130, 130] +Nx = 130 +Ny = 130 Index = ExpData('FusedSilica').GetRI(1.55e-6) -Clad = Fused4(Radius = 62.5, Fusion = 0.95, Index = Index) +Clad = Fused3(Radius = 62.5, Fusion = 0.95, Index = Index) Core0 = FiberA.Get(Clad.C[0]) Core1 = FiberB.Get(Clad.C[1]) -Core2 = FiberA.Get(Clad.C[2]) -Core3 = FiberB.Get(Clad.C[3]) +Core2 = FiberC.Get(Clad.C[2]) + Geo = Geometry(Clad = Clad, - Objects = [*Core0, *Core1, *Core2, *Core3], + Objects = [*Core0, *Core1, *Core2], Xbound = Xbound, Ybound = Ybound, Nx = Nx, Ny = Ny) -#Geo.Rotate(45) +Geo.Rotate(45) + +Geo.Plot() + -#Geo.Plot() +Sol = SuPySolver(Coupler=Geo, Tolerance=1e-8, MaxIter = 10000) +Sol.CreateSuperSet(Wavelength=1.55, NStep=300, ITRi=1, ITRf=0.05) +Sol.AddModes(Sorting = 'Field', + Symmetries = {'Right': 0, 'Left': 0, 'Top': 0, 'Bottom': 0}, + nMode = 8, + sMode = 4 ) -Sol = SuPySolver(Coupler=Geo, Tolerance=1e-8, MaxIter = 10000, nMode=8, sMode=5) +Set = Sol.GetSet() -SuperSet = Sol.GetModes(wavelength = 1.55, - Nstep = 300, - ITRi = 1, - ITRf = 0.05, - Sorting = 'Index', - RightSymmetry = 1, - LeftSymmetry = 0, - TopSymmetry = -1, - BottomSymmetry = 0 - ) +Set.PlotAdiabatic() -#SuperSet.PlotFields(iter=-1) -#SuperSet.Plot(Input=['Index', 'Adiabatic'], iter=[-1]) -SuperSet.ExportPDF(Directory='ABAB_xS_yA', iter=[0, 200, 290]) +# SuperSet.ExportPDF(Directory='ABAB_xS_yA', iter=[0, 200, 290]) diff --git a/SuPyMode/Geometry.py b/SuPyMode/Geometry.py index af653b97f..2328cc9db 100644 --- a/SuPyMode/Geometry.py +++ b/SuPyMode/Geometry.py @@ -258,7 +258,7 @@ def Plot(self): self.CreateMesh() - Fig = Scene('SuPyMode Figure', UnitSize=(4,4)) + Fig = Scene('SuPyMode Figure', UnitSize=(6,6)) Colorbar = ColorBar(Discreet=True, Position='right') ax = Axis(Row = 0, @@ -322,7 +322,7 @@ class BaseFused(): Index: float debug: bool Gradient: object = None - + def __post_init__(self): self.hole = None self.N = len(self.Angle) diff --git a/SuPyMode/Plotting/Plots.py b/SuPyMode/Plotting/Plots.py index 8d64a9c77..34f23bca5 100644 --- a/SuPyMode/Plotting/Plots.py +++ b/SuPyMode/Plotting/Plots.py @@ -164,7 +164,7 @@ def Render(self): Image = art.Render(self) if self.Legend: - self._ax.legend() + self._ax.legend(fancybox=True, facecolor='white', edgecolor='k') self._ax.grid(self.Grid) @@ -178,6 +178,10 @@ def Render(self): self._ax.set_xscale(self.xScale) self._ax.set_yscale(self.yScale) + self._ax.text(0.5, 0.1, 'SuPyMode', transform=self._ax.transAxes, + fontsize=30, color='white', alpha=0.2, + ha='center', va='baseline', rotation='0') + if self.Equal: self._ax.set_aspect("equal") @@ -188,12 +192,12 @@ def Render(self): class Scene: UnitSize = (10, 3) - plt.rcParams['ytick.labelsize'] = 8 - plt.rcParams['xtick.labelsize'] = 8 - plt.rcParams["font.size"] = 8 + plt.rcParams['ytick.labelsize'] = 10 + plt.rcParams['xtick.labelsize'] = 10 + plt.rcParams["font.size"] = 12 plt.rcParams["font.family"] = "serif" - plt.rcParams['axes.edgecolor'] = 'black' - plt.rcParams['axes.linewidth'] = 1.5 + plt.rcParams['axes.edgecolor'] = 'black' + plt.rcParams['axes.linewidth'] = 1.5 def __init__(self, Title='', UnitSize=None): self.Axis = [] @@ -230,9 +234,9 @@ def GenerateAxis(self): if Ax.ndim == 1: Ax = np.asarray([Ax]) self.Figure.suptitle(self.Title) - + print(Ax.shape) for ax in self.Axis: - ax._ax = Ax[ax.Row, ax.Col] + ax._ax = Ax[ax.Col, ax.Row] def Render(self): diff --git a/SuPyMode/Solver.py b/SuPyMode/Solver.py index 886caa6a0..4fedc4e2f 100644 --- a/SuPyMode/Solver.py +++ b/SuPyMode/Solver.py @@ -11,9 +11,8 @@ class SuPySolver(object): It solves the eigenvalues problems for a given geometry. """ - _Sorting = None - def __init__(self, Coupler, Tolerance, MaxIter, Error=2, Debug=True): + def __init__(self, Coupler, Tolerance: float=1e-5, MaxIter: int=10000, Error: int=2, Debug: bool=True): Coupler.CreateMesh() self.Geometry = Coupler @@ -45,10 +44,8 @@ def InitBinding(self, Symmetries: dict, Wavelength: float, nMode: int, sMode: in CppSolver.LeftSymmetry = Symmetries['Left'] CppSolver.RightSymmetry = Symmetries['Right'] - CppSolver.ComputeLaplacian(self.Error) - return CppSolver @@ -78,14 +75,10 @@ def AddModes(self, nMode: int, sMode: int, Symmetries: dict, Sorting: str = 'Ind self.SolverNumber += 1 - - def GetSet(self): return self.Set - - @property def Axes(self): return self.Geometry.Axes diff --git a/SuPyMode/SuperMode.py b/SuPyMode/SuperMode.py index 8bce8e494..e01c0abe1 100644 --- a/SuPyMode/SuperMode.py +++ b/SuPyMode/SuperMode.py @@ -1,7 +1,4 @@ -import logging import numpy as np -from scipy.integrate import solve_ivp -from scipy.interpolate import interp1d from mayavi import mlab @@ -10,8 +7,6 @@ from SuPyMode.Tools.Directories import RootPath from SuPyMode.Tools.BaseClass import ReprBase, ExtendField -Mlogger = logging.getLogger(__name__) - class SuperMode(ReprBase, ExtendField): Description = 'Supermode class' diff --git a/SuPyMode/__init__.py b/SuPyMode/__init__.py index 260c3637d..748c72c46 100644 --- a/SuPyMode/__init__.py +++ b/SuPyMode/__init__.py @@ -1,3 +1,2 @@ from SuPyMode.SuperMode import SuperMode from SuPyMode.SuperSet import SuperSet -from SuPyMode.SuperPosition import SuperPosition diff --git a/SuPyMode/fibers.py b/SuPyMode/fibers.py index 735102926..da76dadaf 100644 --- a/SuPyMode/fibers.py +++ b/SuPyMode/fibers.py @@ -37,6 +37,23 @@ def Get(self, Position): return self.Fiber +class Fiber_New(): + def __init__(self, Wavelength): + Index = ExpData('FusedSilica').GetRI(Wavelength*1e-6) + self.nClad = NA2nCore( 0.11, Index ) + self.nCore = NA2nCore( 0.15, self.nClad ) + self.rClad = 33/2 + self.rCore = 4.5 + + def Get(self, Position): + self.Fiber = [ + Circle( Position=Position, Radius=self.rClad, Index=self.nClad ), + Circle( Position=Position, Radius=self.rCore, Index=self.nCore ), + ] + return self.Fiber + + + class Fiber_2028M24(): def __init__(self, wavelength): self.nClad = NA2nCore( 0.19, Fused_silica(wavelength) ) diff --git a/Tests/perso.py b/Tests/perso.py deleted file mode 100644 index 5b5bf8d01..000000000 --- a/Tests/perso.py +++ /dev/null @@ -1,73 +0,0 @@ -from SuPyMode.Geometry import Geometry, Fused2, Fused3, Fused4, Circle -from SuPyMode.Solver import SuPySolver -from PyOptik import ExpData -import numpy as np -import matplotlib.pyplot as plt -from matplotlib import colors -import matplotlib - -from SuPyMode.fibers import * - -Index = ExpData('FusedSilica').GetRI(1.55e-6) - - - -Index = ExpData('FusedSilica').GetRI(1.55e-6) - - -Clad = Fused4(Radius = 62.5, Fusion = 0.99, Index = Index) - -Core0 = Circle( Position=Clad.C[0], Radius = 4.1, Index = Index+0.05 ) -Core1 = Circle( Position=Clad.C[1], Radius = 4.1, Index = Index+0.05 ) -Core2 = Circle( Position=Clad.C[2], Radius = 4.1, Index = Index+0.05 ) -Core3 = Circle( Position=Clad.C[3], Radius = 4.1, Index = Index+0.05 ) - -Geo0 = Geometry(Clad = Clad, - Objects = [Core0, Core1, Core2, Core3], - Xbound = [-150, 0], - Ybound = [-150, 0], - Nx = 10, - Ny = 10, - BackGroundIndex = 1.0) - -Geo0.Rotate(90) - - -Geo0.Plot() - - -Sol = SuPySolver(Coupler=Geo0, Tolerance=1e-8, MaxIter = 10000) - - -Sol.CreateSuperSet(Wavelength=1.55, NStep=300, ITRi=1, ITRf=0.05) - -Sol.AddModes(Sorting = 'Index', - Symmetries = {'Right': -1, 'Left': 0, 'Top': -1, 'Bottom': 0}, - nMode = 4, - sMode = 2 ) - -print("1 Finished") - -Sol.AddModes(Sorting = 'Index', - Symmetries = {'Right': 1, 'Left': 0, 'Top': -1, 'Bottom': 0}, - nMode = 4, - sMode = 2 ) -print("2 Finished") - -Sol.AddModes(Sorting = 'Index', - Symmetries = {'Right': -1, 'Left': 0, 'Top': 1, 'Bottom': 0}, - nMode = 4, - sMode = 2 ) -print("3 Finished") - -Sol.AddModes(Sorting = 'Index', - Symmetries = {'Right': 1, 'Left': 0, 'Top': 1, 'Bottom': 0}, - nMode = 4, - sMode = 2 ) -print("4 Finished") - - -Set = Sol.GetSet() -Set.PlotFields([0, -1]) - -Set.Plot("Adiabatic") diff --git a/cmake_install.cmake b/cmake_install.cmake deleted file mode 100644 index 2e637d836..000000000 --- a/cmake_install.cmake +++ /dev/null @@ -1,66 +0,0 @@ -# Install script for directory: /Users/martinpdes/Desktop/GitProject/SuPyMode - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "/usr/local") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Release") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Is this installation the result of a crosscompile? -if(NOT DEFINED CMAKE_CROSSCOMPILING) - set(CMAKE_CROSSCOMPILING "FALSE") -endif() - -# Set default install directory permissions. -if(NOT DEFINED CMAKE_OBJDUMP) - set(CMAKE_OBJDUMP "/Library/Developer/CommandLineTools/usr/bin/objdump") -endif() - -if(NOT CMAKE_INSTALL_LOCAL_ONLY) - # Include the install script for the subdirectory. - include("/Users/martinpdes/Desktop/GitProject/SuPyMode/extern/pybind11/cmake_install.cmake") -endif() - -if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) - if("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/SuPyMode/bin" TYPE MODULE FILES "/Users/martinpdes/Desktop/GitProject/SuPyMode/SuPyMode/bin/EigenSolver.cpython-39-darwin.so") - if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/SuPyMode/bin/EigenSolver.cpython-39-darwin.so" AND - NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/SuPyMode/bin/EigenSolver.cpython-39-darwin.so") - if(CMAKE_INSTALL_DO_STRIP) - execute_process(COMMAND "/Library/Developer/CommandLineTools/usr/bin/strip" -x "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/SuPyMode/bin/EigenSolver.cpython-39-darwin.so") - endif() - endif() - endif("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") -endif() - -if(CMAKE_INSTALL_COMPONENT) - set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") -else() - set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") -endif() - -string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT - "${CMAKE_INSTALL_MANIFEST_FILES}") -file(WRITE "/Users/martinpdes/Desktop/GitProject/SuPyMode/${CMAKE_INSTALL_MANIFEST}" - "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/examples/2x2SMF28.py b/examples/2x2SMF28.py index f877655b0..fe67e1632 100644 --- a/examples/2x2SMF28.py +++ b/examples/2x2SMF28.py @@ -16,8 +16,8 @@ Objects = [Core0, Core1], Xbound = [-100, 0], Ybound = [-100, 100], - Nx = 20, - Ny = 40) + Nx = 40, + Ny = 80) Geo.Rotate(90) #Geo.Plot() @@ -27,10 +27,10 @@ Sol.CreateSuperSet(Wavelength=1.55, NStep=300, ITRi=1, ITRf=0.05) -Sol.AddModes(Sorting = 'Index', +Sol.AddModes(Sorting = 'Field', Symmetries = {'Right': 1, 'Left': 0, 'Top': 0, 'Bottom': 0}, - nMode = 4, - sMode = 2 ) + nMode = 8, + sMode = 5 ) # Sol.AddModes(Sorting = 'Index', # Symmetries = {'Right': -1, 'Left': 0, 'Top': 0, 'Bottom': 0}, diff --git a/install_manifest.txt b/install_manifest.txt deleted file mode 100644 index f3111e678..000000000 --- a/install_manifest.txt +++ /dev/null @@ -1 +0,0 @@ -/usr/local/SuPyMode/bin/EigenSolver.cpython-39-darwin.so \ No newline at end of file