Skip to content

Commit 895d348

Browse files
committed
update
1 parent dc5ff92 commit 895d348

10 files changed

Lines changed: 183 additions & 155 deletions

File tree

Makefile

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

44
# Default target executed when no arguments are given to make.
55
default_target: all
6+
67
.PHONY : default_target
78

89
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
910
.NOTPARALLEL:
1011

12+
1113
#=============================================================================
1214
# Special targets provided by cmake.
1315

1416
# Disable implicit rules so canonical targets will work.
1517
.SUFFIXES:
1618

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.%
2819

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

3223
.SUFFIXES: .hpux_make_needs_suffix_list
3324

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

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

29+
4030
# A target that is always out of date.
4131
cmake_force:
32+
4233
.PHONY : cmake_force
4334

4435
#=============================================================================
@@ -48,42 +39,46 @@ cmake_force:
4839
SHELL = /bin/sh
4940

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

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

5647
# Escaping for special characters.
5748
EQUALS = =
5849

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

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

6556
#=============================================================================
6657
# Targets provided globally by CMake.
6758

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
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
7364

74-
# Special rule for the target edit_cache
75-
edit_cache/fast: edit_cache
76-
.PHONY : edit_cache/fast
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
7770

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
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
8376

84-
# Special rule for the target rebuild_cache
85-
rebuild_cache/fast: rebuild_cache
86-
.PHONY : rebuild_cache/fast
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
8782

8883
# Special rule for the target list_install_components
8984
list_install_components:
@@ -92,68 +87,68 @@ list_install_components:
9287

9388
# Special rule for the target list_install_components
9489
list_install_components/fast: list_install_components
90+
9591
.PHONY : list_install_components/fast
9692

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
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
10298

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
99+
# Special rule for the target rebuild_cache
100+
rebuild_cache/fast: rebuild_cache
108101

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
102+
.PHONY : rebuild_cache/fast
114103

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
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
109+
110+
# Special rule for the target edit_cache
111+
edit_cache/fast: edit_cache
112+
113+
.PHONY : edit_cache/fast
120114

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

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

133127
# The main all target
134128
all: cmake_check_build_system
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
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
138132
.PHONY : all
139133

140134
# The main clean target
141135
clean:
142-
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
136+
$(MAKE) -f CMakeFiles/Makefile2 clean
143137
.PHONY : clean
144138

145139
# The main clean target
146140
clean/fast: clean
141+
147142
.PHONY : clean/fast
148143

149144
# Prepare targets for installation.
150145
preinstall: all
151-
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
146+
$(MAKE) -f CMakeFiles/Makefile2 preinstall
152147
.PHONY : preinstall
153148

154149
# Prepare targets for installation.
155150
preinstall/fast:
156-
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
151+
$(MAKE) -f CMakeFiles/Makefile2 preinstall
157152
.PHONY : preinstall/fast
158153

159154
# clear depends
@@ -166,36 +161,39 @@ depend:
166161

167162
# Build rule for target.
168163
EigenSolver: cmake_check_build_system
169-
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 EigenSolver
164+
$(MAKE) -f CMakeFiles/Makefile2 EigenSolver
170165
.PHONY : EigenSolver
171166

172167
# fast build rule for target.
173168
EigenSolver/fast:
174-
$(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/build
169+
$(MAKE) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/build
175170
.PHONY : EigenSolver/fast
176171

177172
SuPyMode/includes/interface.o: SuPyMode/includes/interface.cpp.o
173+
178174
.PHONY : SuPyMode/includes/interface.o
179175

180176
# target to build an object file
181177
SuPyMode/includes/interface.cpp.o:
182-
$(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.o
178+
$(MAKE) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.o
183179
.PHONY : SuPyMode/includes/interface.cpp.o
184180

185181
SuPyMode/includes/interface.i: SuPyMode/includes/interface.cpp.i
182+
186183
.PHONY : SuPyMode/includes/interface.i
187184

188185
# target to preprocess a source file
189186
SuPyMode/includes/interface.cpp.i:
190-
$(MAKE) $(MAKESILENT) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.i
187+
$(MAKE) -f CMakeFiles/EigenSolver.dir/build.make CMakeFiles/EigenSolver.dir/SuPyMode/includes/interface.cpp.i
191188
.PHONY : SuPyMode/includes/interface.cpp.i
192189

193190
SuPyMode/includes/interface.s: SuPyMode/includes/interface.cpp.s
191+
194192
.PHONY : SuPyMode/includes/interface.s
195193

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

201199
# Help Target
@@ -204,12 +202,12 @@ help:
204202
@echo "... all (the default if no target is provided)"
205203
@echo "... clean"
206204
@echo "... depend"
207-
@echo "... edit_cache"
208-
@echo "... install"
209205
@echo "... install/local"
210-
@echo "... install/strip"
206+
@echo "... install"
211207
@echo "... list_install_components"
212208
@echo "... rebuild_cache"
209+
@echo "... edit_cache"
210+
@echo "... install/strip"
213211
@echo "... EigenSolver"
214212
@echo "... SuPyMode/includes/interface.o"
215213
@echo "... SuPyMode/includes/interface.i"

SuPyMode/Solver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ def GetSuperSet(self,
7474

7575

7676

77-
CppSolver.SortModes(Sorting=Sorting)
77+
#CppSolver.SortModes(Sorting=Sorting)
7878
#CppSolver1.SortModes(Sorting=Sorting)
79+
CppSolver.ComputeCoupling()
80+
CppSolver.ComputeAdiabatic()
7981

8082
Set = SuperSet(ParentSolver=self)
8183

SuPyMode/SuperMode.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,30 @@ def __init__(self, ParentSet, ModeNumber, CppSolver, BindingNumber):
350350
self._FullxAxis = None
351351
self._Index = None
352352
self._Betas = None
353+
self._Adiabatic = None
354+
self._Coupling = None
353355

354356

355357
@property
356358
def BindingNumber(self):
357359
return self.Binded.BindingNumber
358360

359361

362+
@property
363+
def Adiabatic(self):
364+
if self._Adiabatic is None:
365+
self._Adiabatic = self.Binded.GetAdiabatic()
366+
367+
return self._Adiabatic
368+
369+
370+
@property
371+
def Coupling(self):
372+
if self._Coupling is None:
373+
self._Coupling = self.Binded.GetCoupling()
374+
return self._Coupling
375+
376+
360377
@property
361378
def Fields(self):
362379
if self._Fields is None:

SuPyMode/Tools/BaseClass.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,11 @@ def PlotBeta(self, Scene, Col, Row):
103103

104104

105105
def PlotCoupling(self, Scene, Col, Row, Combination):
106-
Coupling = Combination[0][0].CppSolver.ComputingCoupling()
107106
for (Mode0, Mode1) in Combination:
108107
Scene.AddLine(Row = Row,
109108
Col = Col,
110109
x = self.ITRList,
111-
y = Coupling[:, Mode0.ModeNumber, Mode1.ModeNumber],
110+
y = Mode0.Adiabatic[:, Mode1.ModeNumber],
112111
Fill = False,
113112
Legend = f'{Mode0.ModeNumber} - {Mode1.ModeNumber}',
114113
xLabel = r'ITR',
@@ -118,12 +117,12 @@ def PlotCoupling(self, Scene, Col, Row, Combination):
118117

119118

120119
def PlotAdiabatic(self, Scene, Col, Row, Combination):
121-
Adiabatic = self.Adiabatic
120+
122121
for (Mode0, Mode1) in Combination:
123122
Scene.AddLine(Row = Row,
124123
Col = Col,
125124
x = self.ITRList,
126-
y = Adiabatic[:, Mode0.ModeNumber, Mode1.ModeNumber],
125+
y = Mode0.Adiabatic[:, Mode1.ModeNumber],
127126
Fill = False,
128127
Legend = f'{Mode0.ModeNumber} - {Mode1.ModeNumber}',
129128
xLabel = r'ITR',

0 commit comments

Comments
 (0)