Skip to content

Commit 3c71cd4

Browse files
committed
update
1 parent 895d348 commit 3c71cd4

9 files changed

Lines changed: 209 additions & 205 deletions

File tree

Makefile

Lines changed: 73 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
11
# CMAKE generated file: DO NOT EDIT!
2-
# Generated by "Unix Makefiles" Generator, CMake Version 3.16
2+
# Generated by "Unix Makefiles" Generator, CMake Version 3.23
33

44
# Default target executed when no arguments are given to make.
55
default_target: all
6-
76
.PHONY : default_target
87

98
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
109
.NOTPARALLEL:
1110

12-
1311
#=============================================================================
1412
# Special targets provided by cmake.
1513

1614
# Disable implicit rules so canonical targets will work.
1715
.SUFFIXES:
1816

17+
# Disable VCS-based implicit rules.
18+
% : %,v
19+
20+
# Disable VCS-based implicit rules.
21+
% : RCS/%
22+
23+
# Disable VCS-based implicit rules.
24+
% : RCS/%,v
25+
26+
# Disable VCS-based implicit rules.
27+
% : SCCS/s.%
1928

20-
# Remove some rules from gmake that .SUFFIXES does not remove.
21-
SUFFIXES =
29+
# Disable VCS-based implicit rules.
30+
% : s.%
2231

2332
.SUFFIXES: .hpux_make_needs_suffix_list
2433

34+
# Command-line flag to silence nested $(MAKE).
35+
$(VERBOSE)MAKESILENT = -s
2536

26-
# Suppress display of executed commands.
37+
#Suppress display of executed commands.
2738
$(VERBOSE).SILENT:
2839

29-
3040
# A target that is always out of date.
3141
cmake_force:
32-
3342
.PHONY : cmake_force
3443

3544
#=============================================================================
@@ -39,46 +48,42 @@ cmake_force:
3948
SHELL = /bin/sh
4049

4150
# The CMake executable.
42-
CMAKE_COMMAND = /usr/bin/cmake
51+
CMAKE_COMMAND = /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake
4352

4453
# The command to remove a file.
45-
RM = /usr/bin/cmake -E remove -f
54+
RM = /opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -E rm -f
4655

4756
# Escaping for special characters.
4857
EQUALS = =
4958

5059
# The top-level source directory on which CMake was run.
51-
CMAKE_SOURCE_DIR = /home/martth/Desktop/git_project/SuPyMode
60+
CMAKE_SOURCE_DIR = /Users/martinpdes/Desktop/GitProject/SuPyMode
5261

5362
# The top-level build directory on which CMake was run.
54-
CMAKE_BINARY_DIR = /home/martth/Desktop/git_project/SuPyMode
63+
CMAKE_BINARY_DIR = /Users/martinpdes/Desktop/GitProject/SuPyMode
5564

5665
#=============================================================================
5766
# Targets provided globally by CMake.
5867

59-
# Special rule for the target install/local
60-
install/local: preinstall
61-
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
62-
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
63-
.PHONY : install/local
68+
# Special rule for the target edit_cache
69+
edit_cache:
70+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
71+
/opt/homebrew/Cellar/cmake/3.23.1/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
72+
.PHONY : edit_cache
6473

65-
# Special rule for the target install/local
66-
install/local/fast: preinstall/fast
67-
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
68-
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
69-
.PHONY : install/local/fast
74+
# Special rule for the target edit_cache
75+
edit_cache/fast: edit_cache
76+
.PHONY : edit_cache/fast
7077

71-
# Special rule for the target install
72-
install: preinstall
73-
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
74-
/usr/bin/cmake -P cmake_install.cmake
75-
.PHONY : install
78+
# Special rule for the target rebuild_cache
79+
rebuild_cache:
80+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
81+
/opt/homebrew/Cellar/cmake/3.23.1/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
82+
.PHONY : rebuild_cache
7683

77-
# Special rule for the target install
78-
install/fast: preinstall/fast
79-
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
80-
/usr/bin/cmake -P cmake_install.cmake
81-
.PHONY : install/fast
84+
# Special rule for the target rebuild_cache
85+
rebuild_cache/fast: rebuild_cache
86+
.PHONY : rebuild_cache/fast
8287

8388
# Special rule for the target list_install_components
8489
list_install_components:
@@ -87,68 +92,68 @@ list_install_components:
8792

8893
# Special rule for the target list_install_components
8994
list_install_components/fast: list_install_components
90-
9195
.PHONY : list_install_components/fast
9296

93-
# Special rule for the target rebuild_cache
94-
rebuild_cache:
95-
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
96-
/usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
97-
.PHONY : rebuild_cache
98-
99-
# Special rule for the target rebuild_cache
100-
rebuild_cache/fast: rebuild_cache
101-
102-
.PHONY : rebuild_cache/fast
97+
# Special rule for the target install
98+
install: preinstall
99+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
100+
/opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -P cmake_install.cmake
101+
.PHONY : install
103102

104-
# Special rule for the target edit_cache
105-
edit_cache:
106-
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
107-
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
108-
.PHONY : edit_cache
103+
# Special rule for the target install
104+
install/fast: preinstall/fast
105+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
106+
/opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -P cmake_install.cmake
107+
.PHONY : install/fast
109108

110-
# Special rule for the target edit_cache
111-
edit_cache/fast: edit_cache
109+
# Special rule for the target install/local
110+
install/local: preinstall
111+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
112+
/opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
113+
.PHONY : install/local
112114

113-
.PHONY : edit_cache/fast
115+
# Special rule for the target install/local
116+
install/local/fast: preinstall/fast
117+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
118+
/opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
119+
.PHONY : install/local/fast
114120

115121
# Special rule for the target install/strip
116122
install/strip: preinstall
117123
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
118-
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
124+
/opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
119125
.PHONY : install/strip
120126

121127
# Special rule for the target install/strip
122128
install/strip/fast: preinstall/fast
123129
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
124-
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
130+
/opt/homebrew/Cellar/cmake/3.23.1/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
125131
.PHONY : install/strip/fast
126132

127133
# The main all target
128134
all: cmake_check_build_system
129-
$(CMAKE_COMMAND) -E cmake_progress_start /home/martth/Desktop/git_project/SuPyMode/CMakeFiles /home/martth/Desktop/git_project/SuPyMode/CMakeFiles/progress.marks
130-
$(MAKE) -f CMakeFiles/Makefile2 all
131-
$(CMAKE_COMMAND) -E cmake_progress_start /home/martth/Desktop/git_project/SuPyMode/CMakeFiles 0
135+
$(CMAKE_COMMAND) -E cmake_progress_start /Users/martinpdes/Desktop/GitProject/SuPyMode/CMakeFiles /Users/martinpdes/Desktop/GitProject/SuPyMode//CMakeFiles/progress.marks
136+
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
137+
$(CMAKE_COMMAND) -E cmake_progress_start /Users/martinpdes/Desktop/GitProject/SuPyMode/CMakeFiles 0
132138
.PHONY : all
133139

134140
# The main clean target
135141
clean:
136-
$(MAKE) -f CMakeFiles/Makefile2 clean
142+
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
137143
.PHONY : clean
138144

139145
# The main clean target
140146
clean/fast: clean
141-
142147
.PHONY : clean/fast
143148

144149
# Prepare targets for installation.
145150
preinstall: all
146-
$(MAKE) -f CMakeFiles/Makefile2 preinstall
151+
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
147152
.PHONY : preinstall
148153

149154
# Prepare targets for installation.
150155
preinstall/fast:
151-
$(MAKE) -f CMakeFiles/Makefile2 preinstall
156+
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
152157
.PHONY : preinstall/fast
153158

154159
# clear depends
@@ -161,39 +166,36 @@ depend:
161166

162167
# Build rule for target.
163168
EigenSolver: cmake_check_build_system
164-
$(MAKE) -f CMakeFiles/Makefile2 EigenSolver
169+
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 EigenSolver
165170
.PHONY : EigenSolver
166171

167172
# fast build rule for target.
168173
EigenSolver/fast:
169-
$(MAKE) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/build
174+
$(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/build
170175
.PHONY : EigenSolver/fast
171176

172177
SuPyMode/includes/interface.o: SuPyMode/includes/interface.cpp.o
173-
174178
.PHONY : SuPyMode/includes/interface.o
175179

176180
# target to build an object file
177181
SuPyMode/includes/interface.cpp.o:
178-
$(MAKE) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.o
182+
$(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.o
179183
.PHONY : SuPyMode/includes/interface.cpp.o
180184

181185
SuPyMode/includes/interface.i: SuPyMode/includes/interface.cpp.i
182-
183186
.PHONY : SuPyMode/includes/interface.i
184187

185188
# target to preprocess a source file
186189
SuPyMode/includes/interface.cpp.i:
187-
$(MAKE) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.i
190+
$(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.i
188191
.PHONY : SuPyMode/includes/interface.cpp.i
189192

190193
SuPyMode/includes/interface.s: SuPyMode/includes/interface.cpp.s
191-
192194
.PHONY : SuPyMode/includes/interface.s
193195

194196
# target to generate assembly for a file
195197
SuPyMode/includes/interface.cpp.s:
196-
$(MAKE) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.s
198+
$(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.s
197199
.PHONY : SuPyMode/includes/interface.cpp.s
198200

199201
# Help Target
@@ -202,12 +204,12 @@ help:
202204
@echo "... all (the default if no target is provided)"
203205
@echo "... clean"
204206
@echo "... depend"
205-
@echo "... install/local"
207+
@echo "... edit_cache"
206208
@echo "... install"
209+
@echo "... install/local"
210+
@echo "... install/strip"
207211
@echo "... list_install_components"
208212
@echo "... rebuild_cache"
209-
@echo "... edit_cache"
210-
@echo "... install/strip"
211213
@echo "... EigenSolver"
212214
@echo "... SuPyMode/includes/interface.o"
213215
@echo "... SuPyMode/includes/interface.i"

SuPyMode/Solver.py

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def __init__(self, Coupler, Tolerance, MaxIter, Error=2, debug='INFO'):
2424

2525

2626

27+
2728
def InitBinding(self, Symmetries: dict, Wavelength: float, nMode: int, sMode: int):
2829

2930
CppSolver = EigenSolving(Mesh = self.Geometry._Mesh,
@@ -51,47 +52,37 @@ def InitBinding(self, Symmetries: dict, Wavelength: float, nMode: int, sMode: in
5152
return CppSolver
5253

5354

54-
def GetSuperSet(self,
55-
Wavelength: float,
56-
Nstep: int,
55+
def CreateSuperSet(self, Wavelength: float, NStep: int, ITRi: float, ITRf: float):
56+
self.Wavelength = Wavelength
57+
self.NStep = NStep
58+
self.ITRi = ITRi
59+
self.ITRf = ITRf
60+
self.ITRList = np.linspace(ITRi, ITRf, NStep)
61+
self.Set = SuperSet(ParentSolver=self)
62+
63+
64+
def AddModes(self,
5765
nMode: int,
5866
sMode: int,
59-
ITRi: float = 1.0,
60-
ITRf: float = 0.1,
6167
Symmetries: dict = 0,
6268
Sorting: str = 'Index',
6369
):
6470

65-
CppSolver = self.InitBinding(Symmetries, Wavelength, nMode, sMode)
66-
#CppSolver1 = self.InitBinding({'Right': -1, 'Left': 0, 'Top': 0, 'Bottom': 0}, Wavelength, nMode, sMode)
67-
68-
self.ITRList = np.linspace(ITRi, ITRf, Nstep)
69-
70-
71+
CppSolver = self.InitBinding(Symmetries, self.Wavelength, nMode, sMode)
7172

7273
CppSolver.LoopOverITR(ITR=self.ITRList, ExtrapolationOrder=3)
73-
#CppSolver1.LoopOverITR(ITR=self.ITRList, ExtrapolationOrder=3)
74-
75-
76-
77-
#CppSolver.SortModes(Sorting=Sorting)
78-
#CppSolver1.SortModes(Sorting=Sorting)
79-
CppSolver.ComputeCoupling()
80-
CppSolver.ComputeAdiabatic()
8174

82-
Set = SuperSet(ParentSolver=self)
75+
CppSolver.SortModes(Sorting=Sorting)
8376

84-
self.PopulateSuperSet(Set, [CppSolver])
77+
CppSolver.ComputeCouplingAdiabatic()
8578

86-
return Set
79+
for BindingNumber in range(CppSolver.sMode):
80+
self.Set.AppendSuperMode(CppSolver=CppSolver, BindingNumber=BindingNumber)
8781

8882

83+
def GetSet(self):
84+
return self.Set
8985

90-
def PopulateSuperSet(self, Set, CppSolvers):
91-
Set.CppSolvers = CppSolvers
92-
for CppSolver in CppSolvers:
93-
for BindingNumber in range(CppSolver.sMode):
94-
Set.AppendSuperMode(CppSolver=CppSolver, BindingNumber=BindingNumber)
9586

9687

9788

0 commit comments

Comments
 (0)