diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..7f3d6fd Binary files /dev/null and b/.DS_Store differ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b572f38 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,66 @@ +{ + "files.associations": { + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "initializer_list": "cpp", + "iosfwd": "cpp", + "istream": "cpp", + "limits": "cpp", + "new": "cpp", + "ostream": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "typeinfo": "cpp", + "iostream": "cpp", + "cstring": "cpp", + "forward_list": "cpp", + "list": "cpp", + "map": "cpp", + "set": "cpp", + "unordered_set": "cpp", + "cinttypes": "cpp", + "typeindex": "cpp", + "valarray": "cpp", + "variant": "cpp", + "chrono": "cpp", + "condition_variable": "cpp", + "ctime": "cpp", + "ratio": "cpp", + "mutex": "cpp", + "thread": "cpp", + "complex": "cpp" + }, + "cmake.configureOnOpen": false +} \ No newline at end of file diff --git a/ExampleResults/Modulated_specimen_65536000_electrons_for_display.png b/ExampleResults/Modulated_specimen_65536000_electrons_for_display.png deleted file mode 100644 index ac872c5..0000000 Binary files a/ExampleResults/Modulated_specimen_65536000_electrons_for_display.png and /dev/null differ diff --git a/ExampleResults/Unmodulated_specimen_65536000_electrons_for_display.png b/ExampleResults/Unmodulated_specimen_65536000_electrons_for_display.png deleted file mode 100644 index 51c88b8..0000000 Binary files a/ExampleResults/Unmodulated_specimen_65536000_electrons_for_display.png and /dev/null differ diff --git a/ExampleResults/topview80keV.png b/ExampleResults/topview80keV.png deleted file mode 100644 index 514ef56..0000000 Binary files a/ExampleResults/topview80keV.png and /dev/null differ diff --git a/README.md b/README.md deleted file mode 100644 index 30a2b74..0000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# InFluence - -InFluence converts unmodulated simulated TEM images to modulated images with a user defined flux. - -The Stobbs factor is the discrepancy between simulated images and experimental images. Its origin is instrument related, and can therefore be rectified by including the effect of the imaging system on the observed image intensities. Electrons scatter in the sensor layer of direct detectors; the lateral spread of the electrons can be far greater than the pixel size, resulting in the detection of electrons in pixels neighbouring the pixel of incidence. InFluence simulates modulation of the expected intensities due to the lateral spread of electrons by employing a Monte Carlo single scattering model to calculate the trajectories of the electrons in the sensor. - -InFluence has been designed around the Medipix3 detector operating in single pixel mode, but we expect that it can be applied to other detectors that have a similar design (single sensor layer sitting on pixel readout circuitry). - -Usage of the scripts is given in the Usage_Guide.txt document. Example unmodulated images can be found in the ExampleData folder. The slanted edge is oriented at approximately 0.1 rad to the x-axis. - -Note that these scripts will be refactored in the future to be more modular for easy integration with other simulation packages, so usage will change. diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..2701426 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1,58 @@ +# InFluence + + + + +## Running from main.py + +You can run influence from main.py by navigating into the InFluence directory and running python3 main.py. +You can folow the comments in the file to understand how to use the main.py file. + +## Directly Running CLI + +You can navigate to the InFluence/interface_code and run python3 InFluenceCLI.py along with any commands listed in the CLI section below. + + + +## Running GUI directly from source code: + + +You can navigate to the InFluence/interface_code and run python3 InFluenceCLI.py --gui and the gui will launch. + + + + +## Package Installation + +1. **Navigate to the InFluence Directory**: Open your terminal and navigate to the directory where you have InFluence installed. Use the `cd` command to change your working directory. + + ```bash + cd /path/to/InFluence +Build the Wheel Distribution: To build the wheel distribution, run the following command: +bash +Copy code +python3 setup.py bdist_wheel +This command generates a wheel distribution file for InFluence. +Install the Package: Now, you can install the package using pip. Use the following command, replacing InFluence-1.0-py3-none-any.whl with the actual filename generated in Step 2: +bash +Copy code +pip install dist/InFluence-1.0-py3-none-any.whl +Usage + +To use InFluence, you can simply launch the Command Line Interface (CLI) with the following command: + +bash +Copy code +InFluence +This command will start the InFluence CLI, allowing you to interact with the package and its functionalities. + + +## Running tests + +To run tests run the command PyTest in the Tsts directory. + + + + + + diff --git a/Scripts/InFluence.py b/Scripts/InFluence.py deleted file mode 100644 index 5e6b72e..0000000 --- a/Scripts/InFluence.py +++ /dev/null @@ -1,179 +0,0 @@ -import time - -import numpy as np - -from params import * -from common_functions import * - -from tqdm import tqdm -import matplotlib.pyplot as plt -from numba_progress import ProgressBar - - -#Main function -@jit(nopython = True, parallel =True) -def MCS_ChargeCounting(E_i, minimum_energy, t_counting, dE_threshold, N, Z, A, p, pixel_dimensions, pixel_information, perfect_image): - # counters - number_transmitted = 0 - number_backscattered = 0 - number_stopped = 0 - number_eh_pairs = 0 - new_image_MCS = np.zeros((perfect_image.shape[0], perfect_image.shape[1]), dtype=np.float64) - for pixel_counter in prange(len(pixel_information)): - number_of_electrons = int(pixel_information[pixel_counter][0]) - i_coordinate = int(pixel_information[pixel_counter][1]) - j_coordinate = int(pixel_information[pixel_counter][2]) - for _ in prange(1, number_of_electrons + 1): - eh_charge_counter = np.zeros((perfect_image.shape[0], perfect_image.shape[1]), dtype = np.float64) - # initial conditions - alpha = evaluate_alpha(E_i, Z) - cross = evaluate_cross_section(E_i, Z, alpha) - path_length = evaluate_path_length(A, N, p, cross) - RND_step = RND(a=0.000001, b=0.999999) - step = evaluate_step(path_length = path_length, RND=RND_step) - ip = initialise_postions(step=step, d = pixel_dimensions[0]) #d = probe diameter - cx = ip[0] - cy = ip[1] - cz = ip[2] - z0 = ip[3] - y0 = ip[4] - x0 = ip[5] - condition = True - E = E_i - while condition: #Monte Carlo Loop until backscatter, trasmission or stopping - RND_phi = RND(a=0, b=1) # generate random number for the phi angle - RND_step = RND(a = 0.000001, b = 0.999999) - RND_pho = RND(a = 0, b = 1) - - alpha = evaluate_alpha(E, Z) # calc screening constant, function of previous energy - cross = evaluate_cross_section(E, Z, alpha) # calc cross section - path_length = evaluate_path_length(A, N, p, cross) # calc mean free path length - step = evaluate_step(path_length=path_length, RND=RND_step) # calculate step of this iteration - dE = step * p * evaluate_energy_loss_rate(E, Z, A) - E = E + dE # calc new energy #separate out dE/dS - phi = evaluate_phi(RND=RND_phi, alpha=alpha) # calc scattering angle - psi = evaluate_pho(RND=RND_pho) # calc other scattering angle - ca = evaluate_direction_cosine_a(phi, psi, cx, cy, cz) # calc direction cosines - cb = evaluate_direction_cosine_b(phi, psi, cx, cy, cz) - cc = evaluate_direction_cosine_c(phi, psi, cz) - x0 = x0 + step * ca # find and reset to new positions - y0 = y0 + step * cb - z0 = z0 + step * cc - cx = ca # reset direction cosines - cy = cb - cz = cc - if E <= minimum_energy: #if electron stops in the material - number_stopped = number_stopped + 1 - condition = False - if z0 < 10**-2: #if electron backscatters - number_backscattered = number_backscattered + 1 - condition = False #not sure how to deal with electron scattering outside of material - if z0 > pixel_dimensions[2]: # if electron penetrates material #change to have de/ds as the counting - # thin - number_transmitted = number_transmitted + 1 - condition = False - if -1*dE >= dE_threshold: #if electron deposits sufficient energyo - new_eh_pairs = math.floor(-1*dE/dE_threshold) - number_eh_pairs = int(number_eh_pairs + new_eh_pairs) - - if (x0 <= 1*pixel_dimensions[0]) and (x0 >= -1*pixel_dimensions[0]) and (y0 <= 1*pixel_dimensions[ - 1])and (y0 >=-1*pixel_dimensions[1]): #electron stays within pixel region - - eh_charge_counter[i_coordinate, j_coordinate] = new_eh_pairs + eh_charge_counter[i_coordinate, j_coordinate] - - elif (x0 > 1*pixel_dimensions[0]) and (y0 > 1*pixel_dimensions[1]): #electron moves positively in x - # and y - translation_x = round_half_down(x = x0/(2*pixel_dimensions[0])) - translation_y = round_half_down(x =y0/(2*pixel_dimensions[1])) - if i_coordinate + translation_x <= perfect_image.shape[0] - 1 and j_coordinate + \ - translation_y <= perfect_image.shape[0] - 1: - eh_charge_counter[i_coordinate + translation_x, j_coordinate + translation_y] = new_eh_pairs + eh_charge_counter[i_coordinate +translation_x,j_coordinate +translation_y] - - - elif (x0 < -1*pixel_dimensions[0]) and (y0 < -1*pixel_dimensions[1]): #electron moves negatively in x - # and y - translation_x = round_half_down(x=x0 / (2 * pixel_dimensions[0])) - translation_y = round_half_down(x=y0 / (2 * pixel_dimensions[1])) - if i_coordinate - translation_x >= 0 and j_coordinate - translation_y >= 0: - eh_charge_counter[i_coordinate - translation_x, j_coordinate - translation_y] =new_eh_pairs + eh_charge_counter[i_coordinate -translation_x,j_coordinate -translation_y] - - - - elif x0 > (1*pixel_dimensions[0]) and y0 < (-1*pixel_dimensions[1]): # electron moves psoitively in - # x and negatively in y - translation_x = round_half_down(x=x0 / (2 * pixel_dimensions[0])) - translation_y = round_half_down(x=y0 / (2 * pixel_dimensions[1])) - if j_coordinate - translation_y >= 0 and i_coordinate + translation_x <= \ - perfect_image.shape[0] - 1: - eh_charge_counter[i_coordinate + translation_x, j_coordinate - translation_y] = new_eh_pairs + eh_charge_counter[i_coordinate +translation_x,j_coordinate -translation_y] - - elif x0 < (-1*pixel_dimensions[0]) and y0 > (1*pixel_dimensions[1]): # electron moves negatively in - # x and positively in y - translation_x = round_half_down(x=x0 / (2 * pixel_dimensions[0])) - translation_y = round_half_down(x=y0 / (2 * pixel_dimensions[1])) - if i_coordinate - translation_x >= 0 and j_coordinate + \ - translation_y <= perfect_image.shape[0] - 1: - eh_charge_counter[i_coordinate - translation_x, j_coordinate + translation_y] = new_eh_pairs + eh_charge_counter[i_coordinate -translation_x,j_coordinate +translation_y] - - elif x0 > (1*pixel_dimensions[0]): #electron moves in positive x direction - translation_x = round_half_down(x=x0 / (2 * pixel_dimensions[0])) - if i_coordinate + \ - translation_x <= perfect_image.shape[0] - 1: - - eh_charge_counter[i_coordinate + translation_x, j_coordinate] = new_eh_pairs + eh_charge_counter[i_coordinate +translation_x, j_coordinate] - - elif x0 < (-1*pixel_dimensions[0]): #electron moves in negative x direction - translation_x = round_half_down(x=x0 / (2 * pixel_dimensions[0])) - if i_coordinate - translation_x >= 0: - - eh_charge_counter[i_coordinate - translation_x, j_coordinate] = new_eh_pairs + eh_charge_counter[i_coordinate -translation_x,j_coordinate] - - elif y0 > (1*pixel_dimensions[1]): #electron moves in positive y direction - translation_y = round_half_down(x=y0 / (2 * pixel_dimensions[1])) - if j_coordinate + \ - translation_y <= perfect_image.shape[0] - 1: - - eh_charge_counter[i_coordinate, j_coordinate + translation_y] = new_eh_pairs + eh_charge_counter[i_coordinate,j_coordinate +translation_y] - - elif y0 < (-1*pixel_dimensions[0]): #electron moves in negative y direction - translation_y = round_half_down(x=y0 / (2 * pixel_dimensions[1])) - - if j_coordinate - translation_y >= 0: - - eh_charge_counter[i_coordinate, j_coordinate - translation_y] = new_eh_pairs + eh_charge_counter[i_coordinate,j_coordinate -translation_y] - - eh_charge_counter = (np.floor(dE_threshold*eh_charge_counter/t_counting)) - new_image_MCS += eh_charge_counter #+ new_image_MCS - return new_image_MCS - - -#image -if path_to_image.endswith('.dat'): #opens Dr Probe image - perfect_image = opendatfile(image = path_to_image) -elif path_to_image.endswith('.tif'): - from PIL import Image - perfect_image = Image.open(path_to_image) - perfect_image = np.array(perfect_image) -else: #opens most standard files - perfect_image = np.load(path_to_image)#io.imread(path_to_image)## -#perfect_image = np.ones((256,256)) -chosen_pixels = find_distribution(perfect_image, dose) -perfect_image = num_samples*distribute_electrons(perfect_image, chosen_pixels) -#output image -with open(path_to_unmodulated_image, 'wb') as f:############# - np.save(f, perfect_image/num_samples) - - -pixel_information = get_pixel_info(image = perfect_image) -pixel_information, _ = make_2D_array(pixel_information) -print('\nInFluence is running...') - -start = time.time() -modulated_image = np.uint32(MCS_ChargeCounting(E_i, minimum_energy, t_counting, dE_threshold, N, Z, A, p, pixel_dimensions,pixel_information, perfect_image)) -print('\nInFluence has generated the modulated image, saved to: ', path_to_modulated_image, '\n\nRun time: ', time.time() - start) - -#output image -with open(path_to_modulated_image, 'wb') as f: - np.save(f, modulated_image/num_samples) - - diff --git a/Scripts/InFluence/InFluence.egg-info/PKG-INFO b/Scripts/InFluence/InFluence.egg-info/PKG-INFO new file mode 100644 index 0000000..1efee52 --- /dev/null +++ b/Scripts/InFluence/InFluence.egg-info/PKG-INFO @@ -0,0 +1,10 @@ +Metadata-Version: 2.1 +Name: InFluence +Version: 1.0 +Summary: UNKNOWN +Home-page: UNKNOWN +License: UNKNOWN +Platform: UNKNOWN + +UNKNOWN + diff --git a/Scripts/InFluence/InFluence.egg-info/SOURCES.txt b/Scripts/InFluence/InFluence.egg-info/SOURCES.txt new file mode 100644 index 0000000..46e2c04 --- /dev/null +++ b/Scripts/InFluence/InFluence.egg-info/SOURCES.txt @@ -0,0 +1,26 @@ +main.py +setup.py +InFluence.egg-info/PKG-INFO +InFluence.egg-info/SOURCES.txt +InFluence.egg-info/dependency_links.txt +InFluence.egg-info/entry_points.txt +InFluence.egg-info/requires.txt +InFluence.egg-info/top_level.txt +interface_code/InFluence_CLI.py +simulation/__init__.py +simulation/simulation_interface.py +simulation/cpp_simulation/__init__.py +simulation/cpp_simulation/constants.py +simulation/cpp_simulation/cpp_simulation_interface.py +simulation/cuda_simulation/__init__.py +simulation/cuda_simulation/constants.py +simulation/cuda_simulation/cuda_kernel_wrapper.py +simulation/cuda_simulation/gpu_simulation_interface.py +simulation/python_simulation/__init__.py +simulation/python_simulation/electron_object_constructor.py +simulation/python_simulation/helper_functions.py +simulation/python_simulation/mcss_python_functions.py +simulation/python_simulation/mcss_python_functions_plot.py +simulation/python_simulation/mcss_python_functions_sparse.py +simulation/python_simulation/plot_trajectory_functions.py +simulation/python_simulation/python_simulation_interface.py \ No newline at end of file diff --git a/Scripts/InFluence/InFluence.egg-info/dependency_links.txt b/Scripts/InFluence/InFluence.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Scripts/InFluence/InFluence.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/Scripts/InFluence/InFluence.egg-info/entry_points.txt b/Scripts/InFluence/InFluence.egg-info/entry_points.txt new file mode 100644 index 0000000..548b6b0 --- /dev/null +++ b/Scripts/InFluence/InFluence.egg-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +InFluence = interface_code.InFluence_CLI:main + diff --git a/Scripts/InFluence/InFluence.egg-info/requires.txt b/Scripts/InFluence/InFluence.egg-info/requires.txt new file mode 100644 index 0000000..174774c --- /dev/null +++ b/Scripts/InFluence/InFluence.egg-info/requires.txt @@ -0,0 +1,5 @@ +argparse +configparser +inquirer +matplotlib +numpy diff --git a/Scripts/InFluence/InFluence.egg-info/top_level.txt b/Scripts/InFluence/InFluence.egg-info/top_level.txt new file mode 100644 index 0000000..913ce3d --- /dev/null +++ b/Scripts/InFluence/InFluence.egg-info/top_level.txt @@ -0,0 +1 @@ +simulation diff --git a/Scripts/InFluence/Output.npy b/Scripts/InFluence/Output.npy new file mode 100644 index 0000000..583c7f7 Binary files /dev/null and b/Scripts/InFluence/Output.npy differ diff --git a/Scripts/InFluence/Output.png b/Scripts/InFluence/Output.png new file mode 100644 index 0000000..7235420 Binary files /dev/null and b/Scripts/InFluence/Output.png differ diff --git a/Scripts/InFluence/__init__.py b/Scripts/InFluence/__init__.py new file mode 100644 index 0000000..96d6311 --- /dev/null +++ b/Scripts/InFluence/__init__.py @@ -0,0 +1 @@ +#DO NOT DELTE \ No newline at end of file diff --git a/Scripts/InFluence/__pycache__/__init__.cpython-310.pyc b/Scripts/InFluence/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..e7d88b9 Binary files /dev/null and b/Scripts/InFluence/__pycache__/__init__.cpython-310.pyc differ diff --git a/Scripts/InFluence/__pycache__/filepaths.cpython-310.pyc b/Scripts/InFluence/__pycache__/filepaths.cpython-310.pyc new file mode 100644 index 0000000..6058ce0 Binary files /dev/null and b/Scripts/InFluence/__pycache__/filepaths.cpython-310.pyc differ diff --git a/Scripts/InFluence/__pycache__/parameters.cpython-310.pyc b/Scripts/InFluence/__pycache__/parameters.cpython-310.pyc new file mode 100644 index 0000000..f642fc1 Binary files /dev/null and b/Scripts/InFluence/__pycache__/parameters.cpython-310.pyc differ diff --git a/Scripts/InFluence/build/lib/interface_code/InFluence_CLI.py b/Scripts/InFluence/build/lib/interface_code/InFluence_CLI.py new file mode 100644 index 0000000..fce85d4 --- /dev/null +++ b/Scripts/InFluence/build/lib/interface_code/InFluence_CLI.py @@ -0,0 +1,263 @@ +import sys +import argparse +import configparser +from inquirer import prompt +import inquirer + +sys.path.append('..') # Adds the parent directory to the sys.path +from main import RunSimulation +sys.path.remove('..') +from gui import InFluenceGUI + + +class SimulationApp: + + def __init__(self, config_file='../config.ini'): + self.config_file = config_file + self.config = configparser.ConfigParser() + self.config.read(self.config_file) + self.parser = self.create_parser() + + + def update_config(self,config_file, answers): + config = configparser.ConfigParser() + config.read(config_file) + + config['Energies']['e_i'] = str(answers['e_i']) + config['Energies']['minimum_energy'] = str(answers['minimum_energy']) + config['Energies']['t_counting'] = str(answers['t_counting']) + config['Material properties']['n'] = str(answers['n']) + config['Material properties']['ProtonNum'] = str(answers['ProtonNum']) + config['Material properties']['AtomicMass'] = str(answers['AtomicMass']) + config['Material properties']['Density'] = str(answers['Density']) + config['Material properties']['de_threshold'] = str(answers['de_threshold']) + config['Material properties']['pixel_dimensions'] = ", ".join(map(str.strip, answers['pixel_dimensions'].split(','))) + config['Electrons']['dose'] = str(answers['dose']) + config['Filepaths']['img_in'] = str(answers['InputImageLocation']) + config['Filepaths']['img_out'] = str(answers['SaveImageLocation']) + + with open(config_file, 'w') as configfile: + config.write(configfile) + + + def create_parser(self): + + + parser = argparse.ArgumentParser(description='InFluence, a package to simulate electron-detector interactions in TEM imaging.') + + parser.add_argument('--gui', action='store_true', help='Launch InFluence GUI.') + + parser.add_argument('--gpu', action='store_true', help='Run the simulation on the GPU using existing parameters in config file.') + parser.add_argument('--pysparse', action='store_true', help='Run the simulation on the CPU with PySparse using existing parameters in config file.') + parser.add_argument('--pydense', action='store_true', help='Run the simulation on the CPU with PyDense using existing parameters in config file.') + parser.add_argument('--cpp', action='store_true', help='Run the simulation on the CPU with CPP using existing parameters in config file') + parser.add_argument('--plot', action='store_true', help='Run the simulation on the CPU and plot electron trajectories using existing parameters in config file, the dose must not exceed 5,000 when using this option.') #add input check + parser.add_argument('--go', action='store_true', help='Use the existing parameters from config.ini and run simulation of default simulation type (PySparse)') + parser.add_argument('--show_params', action='store_true', help='Display stored simulation parameters') + + parser.add_argument('--update_dose', type=int, help='Set the electron dose value') + parser.add_argument('--e_i', type=int, help='Set the e_i value') + parser.add_argument('--minimum_energy', type=float, help='Set the minimum_energy') + parser.add_argument('--t_counting', type=int, help='Set the t_counting') + parser.add_argument('--n', type=float, help='Set the n value') + parser.add_argument('--proton_num', type=int, help='Set the proton number of the detector material') + parser.add_argument('--atomic_mass', type=float, help='Set the atomic mass of the detector material') + parser.add_argument('--Density', type=float, help='Set the density of the detector material') + parser.add_argument('--de_threshold', type=float, help='Set the detector threshold') + parser.add_argument('--pixel_dimensions', type=str, help='Set the pixel dimensions') + parser.add_argument('--InputImageLocation', type=str, help='Set the input image file path') + parser.add_argument('--SaveImageLocation', type=str, help='Set the saved image file path') + + + return parser + + + def display_stored_params(self, config_file): + config = configparser.ConfigParser() + config.read(config_file) + + print("*" * 84) + print("*" + " " * 34 + "\U0001F31F" + " Stored Parameters " + "\U0001F31F" + " " * 34 ) + for section in config.sections(): + print(f"* [{section}]") + for option in config[section]: + value = config.get(section, option) + print(f"* {option} = {value}") + print("*" + "-" * 82 ) + + def print_output(self, simulation_type, dose): + print("*" * 90) + print("*" + " " * 34 + "\U0001F31F" + " InFluence " + "\U0001F31F" + " " * 34 ) + + print() + print(" InFluence simulation will run using ", simulation_type, " for ", dose, " electrons...") + print() + + + + + def run_app(self): + + config_file = '../config.ini' + + parser = self.create_parser() + args = parser.parse_args() + config = configparser.ConfigParser() + config.read(config_file) + + if any(arg is not None for arg in [args.update_dose, args.e_i, args.minimum_energy, args.t_counting, args.n, args.proton_num, args.atomic_mass, args.Density, args.de_threshold, args.pixel_dimensions, args.InputImageLocation, args.SaveImageLocation]): + if args.update_dose is not None: + config['Electrons']['dose'] = str(args.update_dose) + if args.e_i is not None: + config['Energies']['e_i'] = str(args.e_i) + if args.minimum_energy is not None: + config['Energies']['minimum_energy'] = str(args.minimum_energy) + if args.t_counting is not None: + config['Energies']['t_counting'] = str(args.t_counting) + if args.n is not None: + config['Material properties']['n'] = str(args.n) + if args.proton_num is not None: + config['Material properties']['ProtonNum'] = str(args.ProtonNum) + if args.atomic_mass is not None: + config['Material properties']['AtomicMass'] = str(args.AtomicMass) + if args.Density is not None: + config['Material properties']['Density'] = str(args.Density) + if args.de_threshold is not None: + config['Material properties']['de_threshold'] = str(args.de_threshold) + if args.pixel_dimensions is not None: + config['Material properties']['pixel_dimensions'] = args.pixel_dimensions + if args.InputImageLocation is not None: + config['Filepaths']['img_in'] = args.InputImageLocation + if args.SaveImageLocation is not None: + config['Filepaths']['img_out'] = args.SaveImageLocation + + # Save updated config + with open(config_file, 'w') as configfile: + config.write(configfile) + print("Simulation configuration updated.") + + if all(arg is None for arg in [args.update_dose, args.e_i, args.minimum_energy, args.t_counting, args.n, args.proton_num, args.atomic_mass, args.Density, args.de_threshold, args.pixel_dimensions, args.InputImageLocation, args.SaveImageLocation]): + + + + + if len(sys.argv) >= 3: + print("Error: Too many arguments passed.") + sys.exit(1) + + if args.gui: + gui = InFluenceGUI() + gui.build_gui() + + + else: + + if args.show_params: + print('woo') + self.display_stored_params(config_file) + return + + elif args.update_dose is not None: + # Update dose value in the configuration file + config = configparser.ConfigParser() + config.read(config_file) + config['Electrons']['dose'] = str(args.update_dose) + + with open(config_file, 'w') as configfile: + config.write(configfile) + print(f"New stored dose value updated to: {args.update_dose}") + + elif len(sys.argv)==1: + # Read the existing values from the config file + config = configparser.ConfigParser() + config.read(config_file) + stored_ei = config.getint('Energies', 'e_i') + stored_min_energy = config.getfloat('Energies', 'minimum_energy') + stored_t_counting = config.getint('Energies', 't_counting') + stored_n = config.getfloat('Material properties', 'n') + stored_proton_num = config.getint('Material properties', 'ProtonNum') + stored_atomic_mass = config.getfloat('Material properties', 'AtomicMass') + stored_density = config.getfloat('Material properties', 'Density') + stored_de_threshold = config.getfloat('Material properties', 'de_threshold') + stored_pixel_dimensions = config.get('Material properties', 'pixel_dimensions') + stored_dose = config.getint('Electrons', 'dose') + stored_img_in = config.get('Filepaths', 'img_in') + stored_img_out = config.get('Filepaths', 'img_out') + + # Create a dictionary to store the user's input + answers = {} + + # Existing code for prompting user for input and updating the configuration + questions = [ + inquirer.Text('e_i', message='Enter value for e_i:', default=stored_ei), + inquirer.Text('minimum_energy', message='Enter value for minimum_energy:', default=stored_min_energy), + inquirer.Text('t_counting', message='Enter value for t_counting:', default=stored_t_counting), + inquirer.Text('n', message='Enter value for n:', default=stored_n), + inquirer.Text('ProtonNum', message='Enter value for ProtonNum:', default=stored_proton_num), + inquirer.Text('AtomicMass', message='Enter value for AtomicMass:', default=stored_atomic_mass), + inquirer.Text('Density', message='Enter value for Density:', default=stored_density), + inquirer.Text('de_threshold', message='Enter value for de_threshold:', default=stored_de_threshold), + inquirer.Text('pixel_dimensions', message='Enter pixel_dimensions (comma-separated x,y,z):', default=stored_pixel_dimensions), + inquirer.Text('dose', message='Enter value for electron dose:', default=stored_dose), + inquirer.Text('InputImageLocation', message='Enter filepath for input image.', default=stored_img_in), + inquirer.Text('SaveImageLocation', message='Enter filepath for saved image.', default=stored_img_out), + inquirer.Text('simulation_type', message='Enter simulation type, GPU, CPP, PySparse, PyDense.', default='PySparse') + ] + + answers = inquirer.prompt(questions) + self.update_config(config_file, answers) + simulation_type = answers['simulation_type'] + self.print_output('PySparse simulation on CPU', stored_dose) + RunSimulation(simulation_type) + + if len(sys.argv)==2: + + if args.gpu: + self.print_output('GPU', stored_dose) + RunSimulation('GPU') + return + + elif args.pysparse: + self.print_output('PySparse simulation on CPU', stored_dose) + RunSimulation('PySparse') + return + + if args.pysdense: + self.print_output('PyDense simulation on CPU', stored_dose) + RunSimulation('PyDense') + return + + if args.cpp: + self.print_output('CPP simulation on CPU', stored_dose) + RunSimulation('CPP') + return + + if args.pysparse: + self.print_output('using CPU and plot electron tragectories.', stored_dose) + RunSimulation('Plot') + return + + + if args.go: + + if len(sys.argv) == 2: + self.print_output('PySparse simulation on CPU', stored_dose) + RunSimulation('CPU') + return + + print(" Simulation complete. Output saved to ", stored_img_out) + print() + print() + print("*" * 90) + + return + + + +if __name__ == "__main__": + app = SimulationApp() + + app.run_app() + + + diff --git a/Scripts/InFluence/build/lib/main.py b/Scripts/InFluence/build/lib/main.py new file mode 100644 index 0000000..97e2051 --- /dev/null +++ b/Scripts/InFluence/build/lib/main.py @@ -0,0 +1,83 @@ + +import itertools +import sys +import time + +from matplotlib import pyplot as plt +import numpy as np + +from filepaths import Filepaths as filepaths +from image_preprocessing.image_object_constructor import image_pixels + +from simulation.simulation_interface import InFluenceSimulation +from parameters import SimulationParameters + + +def RunSimulation(simulation_type, gui=False): + + params = SimulationParameters() + params.refresh_config() + image_object = image_pixels(filepaths.InputImageLocation, params) + influence_simulator = InFluenceSimulation(image_object, params) + + if simulation_type =='GPU': + SimulationResults = influence_simulator.Run_GPU_KERNEL_MCScatteringSimulation() + elif simulation_type == "CPP": + SimulationResults = influence_simulator.RunCPPMCScatteringSimulation() + elif simulation_type == "PySparse": + SimulationResults = influence_simulator.RunMCSimulation_Py("PySparse") + elif simulation_type == "PyDense": + SimulationResults = influence_simulator.RunMCSimulation_Py("PyDense") + elif simulation_type == "Plot": + SimulationResults = influence_simulator.RunMCSimulation_Py("Plot") + + + if gui==True: + print('Simulation complete.') + return SimulationResults + + else: + + + plt.imshow(np.uint32(SimulationResults)) + plt.axis('off') + plt.show() + + + output_file = filepaths.SaveLocation + plt.savefig(output_file) + + # Save as an image + plt.savefig(output_file + '.png') + + # Save as a .npy file + np.save(output_file + '.npy', SimulationResults) + + return + + +import time # Import the time module + +def main(): + # Record the start time + start_time = time.time() + + # Run the simulation + RunSimulation('PySparse') + + # Record the end time + end_time = time.time() + + # Calculate the elapsed time + elapsed_time = end_time - start_time + + + print(f"Simulation completed in {elapsed_time:.2f} seconds.") # Print the elapsed time + + +if __name__ == "__main__": + try: + main() + except ValueError as e: + print(e) # Print the error message if an exception is raised + sys.exit(1) # Exit the program with an error code (1 indicates an error) diff --git a/Scripts/InFluence/build/lib/simulation/__init__.py b/Scripts/InFluence/build/lib/simulation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Scripts/InFluence/build/lib/simulation/cpp_simulation/__init__.py b/Scripts/InFluence/build/lib/simulation/cpp_simulation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Scripts/InFluence/build/lib/simulation/cpp_simulation/constants.py b/Scripts/InFluence/build/lib/simulation/cpp_simulation/constants.py new file mode 100644 index 0000000..d286e0d --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/cpp_simulation/constants.py @@ -0,0 +1,20 @@ +import sys +sys.path.append("../../") +from parameters import SimulationParameters + +def CalculateConstants(ProgramParameters): + + AlphaMultiplier = (3.4*10**-3)*(ProgramParameters.ProtonNum**0.67) + CrossSectionNumorator = (4.7 * 10 ** -18) * (ProgramParameters.ProtonNum ** 1.33 + 0.032 * ProgramParameters.ProtonNum ** 2) + CrossSectionLogArgMultiplier = 8 * ProgramParameters.ProtonNum ** -1.33 + CrossSectionDenominatorA = 0.0155 * ProgramParameters.ProtonNum ** 1.33 + CrossSectionDenominatorB = 0.02 * ProgramParameters.ProtonNum ** 0.5 + PathLengthMultiplier = ProgramParameters.AtomicMass/(ProgramParameters.N * ProgramParameters.Density) + EnergyLossMultiplierA = -78500*ProgramParameters.ProtonNum/ProgramParameters.AtomicMass + EnergyLossMultiplierB = (9.76*ProgramParameters.ProtonNum + 58.5/ProgramParameters.ProtonNum**0.19)*10**-3 + + return AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +params = SimulationParameters() +params.refresh_config() +AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB = CalculateConstants(params) \ No newline at end of file diff --git a/Scripts/InFluence/build/lib/simulation/cpp_simulation/cpp_simulation_interface.py b/Scripts/InFluence/build/lib/simulation/cpp_simulation/cpp_simulation_interface.py new file mode 100644 index 0000000..06d2e25 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/cpp_simulation/cpp_simulation_interface.py @@ -0,0 +1,59 @@ +from simulation.cpp_simulation import InFluence +from simulation.cuda_simulation.constants import AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB +import numpy as np + +def CPP_MCScatteringSimulation(pixels, + E_i, + ProbeDiameter, + MinimumEnergy, + pixel_dimensions, + dE_threshold, + perfect_image_0, + perfect_image_1, + Density, + t_counting + ): + + print('Simulation starting ...') + + + # Create a 2D array from the 'pixels' list + pixels_array = np.vstack(( + [pixel.electron_count for pixel in pixels], # Column 0: Number of electrons in the pixel + [pixel.i for pixel in pixels], # Column 1: Pixel index i + [pixel.j for pixel in pixels], # Column 2: Pixel index j + [pixel.x_dimension for pixel in pixels], # Column 3: Dimension along the x-axis + [pixel.y_dimension for pixel in pixels], # Column 4: Dimension along the y-axis + [pixel.z_dimension for pixel in pixels] # Column 5: Dimension along the z-axis + )).T # Transpose to get the desired shape (rows represent pixels, columns represent attributes) + + # Convert the data type of the first three columns to int and the last three columns to float + + pixels_list = pixels_array.tolist() + + print('Pixel data prepared ...') + + + print(len(pixels_list)) + print('Beginning main simulation loop...') + + import time + + start_time = time.time() + + + FlattenedImage = InFluence.RunMCScatteringSimulation(pixels_list, E_i, ProbeDiameter, MinimumEnergy, dE_threshold, + perfect_image_0, perfect_image_1, Density, t_counting, AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB) + + end_time = time.time() + + # Calculate the elapsed time + duration = end_time - start_time + print("Execution time:", duration, "seconds") + + OutputImage = np.array(FlattenedImage) + + + print('Simulation complete.') + + return OutputImage \ No newline at end of file diff --git a/Scripts/InFluence/build/lib/simulation/cuda_simulation/__init__.py b/Scripts/InFluence/build/lib/simulation/cuda_simulation/__init__.py new file mode 100644 index 0000000..7e9431c --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/cuda_simulation/__init__.py @@ -0,0 +1,6 @@ + +# DO NOT DELETE + +# This file existis in order that file CUDA may be recognised as a python module +# for the purposes of importing content of the CUDA file for use in py files. + diff --git a/Scripts/InFluence/build/lib/simulation/cuda_simulation/constants.py b/Scripts/InFluence/build/lib/simulation/cuda_simulation/constants.py new file mode 100644 index 0000000..d286e0d --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/cuda_simulation/constants.py @@ -0,0 +1,20 @@ +import sys +sys.path.append("../../") +from parameters import SimulationParameters + +def CalculateConstants(ProgramParameters): + + AlphaMultiplier = (3.4*10**-3)*(ProgramParameters.ProtonNum**0.67) + CrossSectionNumorator = (4.7 * 10 ** -18) * (ProgramParameters.ProtonNum ** 1.33 + 0.032 * ProgramParameters.ProtonNum ** 2) + CrossSectionLogArgMultiplier = 8 * ProgramParameters.ProtonNum ** -1.33 + CrossSectionDenominatorA = 0.0155 * ProgramParameters.ProtonNum ** 1.33 + CrossSectionDenominatorB = 0.02 * ProgramParameters.ProtonNum ** 0.5 + PathLengthMultiplier = ProgramParameters.AtomicMass/(ProgramParameters.N * ProgramParameters.Density) + EnergyLossMultiplierA = -78500*ProgramParameters.ProtonNum/ProgramParameters.AtomicMass + EnergyLossMultiplierB = (9.76*ProgramParameters.ProtonNum + 58.5/ProgramParameters.ProtonNum**0.19)*10**-3 + + return AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +params = SimulationParameters() +params.refresh_config() +AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB = CalculateConstants(params) \ No newline at end of file diff --git a/Scripts/InFluence/build/lib/simulation/cuda_simulation/cuda_kernel_wrapper.py b/Scripts/InFluence/build/lib/simulation/cuda_simulation/cuda_kernel_wrapper.py new file mode 100644 index 0000000..afd75b2 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/cuda_simulation/cuda_kernel_wrapper.py @@ -0,0 +1,30 @@ +import os + +def get_script_directory(): + # Get the directory where the currently executing script is located + script_path = os.path.abspath(__file__) + script_dir = os.path.dirname(script_path) + return script_dir + +def load_cuda_kernel_code(file_path): + with open(file_path, "r") as f: + return f.read() + +def get_combined_cuda_kernel_code(): + # Get the directory of the currently executing script + script_dir = get_script_directory() + + # Define the names of CUDA kernel files relative to the script directory + kernel_files = [ + "gpu_helpers.cu", + "MCLoop.cu" + ] + + combined_code = "" + for file_name in kernel_files: + file_path = os.path.join(script_dir, file_name) + combined_code += load_cuda_kernel_code(file_path) + "\n" + + return combined_code + + diff --git a/Scripts/InFluence/build/lib/simulation/cuda_simulation/gpu_simulation_interface.py b/Scripts/InFluence/build/lib/simulation/cuda_simulation/gpu_simulation_interface.py new file mode 100644 index 0000000..dc31b07 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/cuda_simulation/gpu_simulation_interface.py @@ -0,0 +1,96 @@ +from simulation.cuda_simulation.cuda_kernel_wrapper import get_combined_cuda_kernel_code +from simulation.cuda_simulation.constants import AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB +import pycuda.driver as drv +import pycuda.autoinit +import pycuda.compiler as cmp +import numpy as np +import pycuda.driver as drv +import pycuda.compiler as cmp +import numpy as np + + + +def GPU_KERNEL_MCScatteringSimulation(pixels, + E_i, + ProbeDiameter, + MinimumEnergy, + pixel_dimensions, + dE_threshold, + perfect_image_0, + perfect_image_1, + Density, + t_counting): + + # Create a CUDA context + ctx = drv.Device(0).make_context() + + # Create a 2D array from the 'pixels' list + pixels_array = np.vstack(( + [pixel.electron_count for pixel in pixels], # Column 0: Number of electrons in the pixel + [pixel.i for pixel in pixels], # Column 1: Pixel index i + [pixel.j for pixel in pixels], # Column 2: Pixel index j + [pixel.x_dimension for pixel in pixels], # Column 3: Dimension along the x-axis + [pixel.y_dimension for pixel in pixels], # Column 4: Dimension along the y-axis + [pixel.z_dimension for pixel in pixels] # Column 5: Dimension along the z-axis + )).T + + print('Pixel data prepared ...') + + + # Load the CUDA kernel code + kernel_code = get_combined_cuda_kernel_code() + + # Compile the kernel code + mcss_cuda_module = cmp.SourceModule(kernel_code, no_extern_c=True) + + # Get the kernel function + mcss_cuda_function = mcss_cuda_module.get_function("MCScatteringSimulationKernel") + + # Transfer the 'pixels' array to the GPU memory + pixels_gpu = drv.to_device(pixels_array) + + # Allocating memory on device + numPixels = pixels_array.size + + new_image_MCS_gpu = drv.mem_alloc(perfect_image_0 * perfect_image_1 * np.dtype(np.float64).itemsize) + + new_image_MCS = np.zeros((perfect_image_0, perfect_image_1), dtype=np.float64) + + drv.memcpy_htod(new_image_MCS_gpu, new_image_MCS) + + # 2D block and grid sizes + block_size_x = 16 + block_size_y = 16 + grid_size_x = (perfect_image_0 + block_size_x - 1) // block_size_x + grid_size_y = (perfect_image_1 + block_size_y - 1) // block_size_y + + print('Beginning simulation ...') + + # Launch the CUDA kernel + mcss_cuda_function(pixels_gpu, np.int32(numPixels), np.float64(E_i), np.float64(ProbeDiameter), + np.float64(MinimumEnergy), np.float64(dE_threshold), np.int32(perfect_image_0), + np.int32(perfect_image_1), np.float64(Density), np.float64(t_counting), + np.float64(AlphaMultiplier), + np.float64(CrossSectionNumorator), + np.float64(CrossSectionLogArgMultiplier), + np.float64(CrossSectionDenominatorA), + np.float64(CrossSectionDenominatorB), + np.float64(PathLengthMultiplier), + np.float64(EnergyLossMultiplierA), + np.float64(EnergyLossMultiplierB), + new_image_MCS_gpu, + + block=(block_size_x, block_size_y, 1), grid=(grid_size_x, grid_size_y)) + + print('Transferring data from GPU device back to host...') + drv.memcpy_dtoh(new_image_MCS, new_image_MCS_gpu) + + # Release GPU memory allocations + pixels_gpu.free() + new_image_MCS_gpu.free() + + # Release the CUDA context + ctx.pop() + + return new_image_MCS + diff --git a/Scripts/InFluence/build/lib/simulation/python_simulation/__init__.py b/Scripts/InFluence/build/lib/simulation/python_simulation/__init__.py new file mode 100644 index 0000000..ac744de --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/__init__.py @@ -0,0 +1 @@ +# Do not delete this empty file, it enables this directory to be recognised as a module. \ No newline at end of file diff --git a/Scripts/InFluence/build/lib/simulation/python_simulation/electron_object_constructor.py b/Scripts/InFluence/build/lib/simulation/python_simulation/electron_object_constructor.py new file mode 100644 index 0000000..c10bce2 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/electron_object_constructor.py @@ -0,0 +1,95 @@ +# electron.py + +from numba import float64, boolean +from numba.experimental import jitclass + +import math +import numpy as np +import random + +from simulation.python_simulation.helper_functions import custom_round_down, CalculateConstants, evaluate_alpha, evaluate_cross_section_opt, evaluate_path_length, evaluate_step, evaluate_phi, evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions, AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +local_random_uniform = random.uniform +spec = { + 'ProbeDiameter': float64, + 'E_i': float64, + 'E': float64, + 'alpha': float64, + 'CrossSection': float64, + 'PathLength': float64, + 'RND_step': float64, + 'step': float64, + 'InitialPosition': float64[:], + 'cosineX': float64, + 'cosineY': float64, + 'cosineZ': float64, + 'z0': float64, + 'y0': float64, + 'x0': float64, + 'condition': boolean, + 'dE': float64, + 'Density': float64 +} + +@jitclass(spec) +class ElectronEvolver: + + def __init__(self, E_i, ProbeDiameter, Density): + self.ProbeDiameter = ProbeDiameter + self.E_i = E_i + self.E = E_i + self.alpha = evaluate_alpha(self.E_i, AlphaMultiplier) + self.CrossSection = evaluate_cross_section_opt(self.E_i, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB) + self.PathLength = evaluate_path_length(self.CrossSection, PathLengthMultiplier) + self.RND_step = np.random.uniform(0.000001, 0.999999) + self.step = evaluate_step(self.PathLength, self.RND_step) + self.InitialPosition = initialise_postions(self.step, self.ProbeDiameter) + self.cosineX = self.InitialPosition[0] + self.cosineY = self.InitialPosition[1] + self.cosineZ = self.InitialPosition[2] + self.z0 = self.InitialPosition[3] + self.y0 = self.InitialPosition[4] + self.x0 = self.InitialPosition[5] + self.condition = True + self.dE = 0 + self.Density = Density + + def update_state(self): + """Updates the state of the electron based on input parameters and methods.""" + + RND_phi = local_random_uniform(0, 1) + RND_step = local_random_uniform(0.000001, 0.999999) + RND_pho = local_random_uniform(0, 1) + + alpha = evaluate_alpha(self.E, AlphaMultiplier) + cross = evaluate_cross_section_opt(self.E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB) + path_length = evaluate_path_length(self.CrossSection, PathLengthMultiplier) + step = evaluate_step(path_length, RND_step) + self.dE = step * self.Density * evaluate_energy_loss_rate(self.E, EnergyLossMultiplierA, EnergyLossMultiplierB) + self.E += self.dE + phi = evaluate_phi(RND_phi, alpha=alpha) + psi = evaluate_pho(RND_pho, math.pi) + + ca = evaluate_direction_cosine_a(phi, psi, self.cosineX, self.cosineY, self.cosineZ) + cb = evaluate_direction_cosine_b(phi, psi, self.cosineX, self.cosineY, self.cosineZ) + cc = evaluate_direction_cosine_c(phi, psi, self.cosineZ) + + self.x0 += step * ca + self.y0 += step * cb + self.z0 += step * cc + + self.cosineX = ca + self.cosineY = cb + self.cosineZ = cc + + + + + + + + + + + + diff --git a/Scripts/InFluence/build/lib/simulation/python_simulation/helper_functions.py b/Scripts/InFluence/build/lib/simulation/python_simulation/helper_functions.py new file mode 100644 index 0000000..c40ba91 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/helper_functions.py @@ -0,0 +1,119 @@ +import numpy as np +import random +from numba import jit +import os + + +import sys +sys.path.append("../../") +from parameters import SimulationParameters + +params = SimulationParameters() +params.refresh_config() + +local_log10 = np.log10 +local_log = np.log +local_arccos = np.arccos +local_sin = np.sin +local_cos = np.cos +local_sqrt = np.sqrt +local_exp = np.exp +local_ceil = np.ceil +local_abs = np.abs + +@jit(nopython=True) +def custom_round_down(x, decimals=0): + multiplier = 10 ** decimals + rounded_value = local_ceil(local_abs(x) * multiplier - 0.5) + rounded_value /= multiplier + return int(rounded_value) + +def CalculateConstants(ProgramParameters): + + AlphaMultiplier = (3.4*10**-3)*(ProgramParameters.ProtonNum**0.67) + CrossSectionNumorator = (4.7 * 10 ** -18) * (ProgramParameters.ProtonNum ** 1.33 + 0.032 * ProgramParameters.ProtonNum ** 2) + CrossSectionLogArgMultiplier = 8 * ProgramParameters.ProtonNum ** -1.33 + CrossSectionDenominatorA = 0.0155 * ProgramParameters.ProtonNum ** 1.33 + CrossSectionDenominatorB = 0.02 * ProgramParameters.ProtonNum ** 0.5 + PathLengthMultiplier = ProgramParameters.AtomicMass/(ProgramParameters.N * ProgramParameters.Density) + EnergyLossMultiplierA = -78500*ProgramParameters.ProtonNum/ProgramParameters.AtomicMass + EnergyLossMultiplierB = (9.76*ProgramParameters.ProtonNum + 58.5/ProgramParameters.ProtonNum**0.19)*10**-3 + + return AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB = CalculateConstants(params) + +@jit(nopython=True) +def evaluate_alpha(E, AlphaMultiplier): + return AlphaMultiplier / E + +@jit(nopython=True) +def evaluate_cross_section_opt(E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB): + LogArg = local_log10(E * CrossSectionLogArgMultiplier) + CrossSection = CrossSectionNumorator / ((E + (E ** 0.5) * CrossSectionDenominatorA) * (1 - local_exp(-1 * LogArg ** 2) * CrossSectionDenominatorB)) + return CrossSection + +@jit(nopython=True) +def evaluate_path_length(CrossSection, PathLengthMultiplier): + PathLength = PathLengthMultiplier * (1/CrossSection) + return PathLength + +@jit(nopython=True) +def evaluate_step(path_length, RandomStep): + return -path_length*local_log(RandomStep) + +@jit(nopython=True) +def evaluate_phi(RandomNum, alpha): + cosPhi = 1 - (2*alpha*RandomNum**2)/(1+alpha-RandomNum) + return local_arccos(cosPhi) + +@jit(nopython=True) +def evaluate_pho(RandomNum, pi): + return 2*pi*RandomNum + +@jit(nopython=True) +def evaluate_direction_cosine_a(phi, psi, cosineX, cosineY, cosineZ): + alpha = local_sin(psi) * local_sin(phi) + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ**2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return alpha * cos_2 + sin_2 * (beta * cos_1 + gamma * sin_1) + +@jit(nopython=True) +def evaluate_direction_cosine_b(phi, psi, cosineX, cosineY, cosineZ): + alpha = local_sin(phi) * local_sin(psi) + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ ** 2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return -alpha * sin_2 + cos_2 * (beta * cos_1 + gamma * sin_1) + +@jit(nopython=True) +def evaluate_direction_cosine_c(phi, psi, cosineZ): + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ ** 2) + return -beta*sin_1 + gamma*cos_1 + +@jit(nopython=True) +def evaluate_energy_loss_rate(E, EnergyLossMultiplierA, EnergyLossMultiplier): + return EnergyLossMultiplierA*(1/E)*local_log(1.166*(E+0.85*EnergyLossMultiplier)/EnergyLossMultiplier) + +@jit(nopython=True) +def initialise_postions(step, ProbeDiameter): + z0 = 10**-2 + step + x0 = ProbeDiameter * random.uniform(-1, 1) + y0 = ProbeDiameter * random.uniform(-1, 1) + vector_length = local_sqrt(x0**2 + y0**2 + z0**2) + cosineX = x0/vector_length + cosineY = y0/vector_length + cosineZ = z0/vector_length + return np.array([cosineX, cosineY, cosineZ, z0, y0, x0, vector_length]) + + diff --git a/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions.py b/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions.py new file mode 100644 index 0000000..1c2e31c --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions.py @@ -0,0 +1,195 @@ + +import math +import random +import numpy as np +from tqdm import tqdm +from multiprocessing import Pool, cpu_count +from joblib import Parallel, delayed +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 + + +from simulation.python_simulation.helper_functions import ( + custom_round_down, evaluate_alpha, evaluate_cross_section_opt, + evaluate_path_length, evaluate_step, evaluate_phi, + evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, + evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions +) +from simulation.python_simulation.electron_object_constructor import ElectronEvolver + +from numba import njit, prange, jit, float64, int32, typed, typeof +from numba.experimental import jitclass +from numba.typed import List +from threading import Lock +from scipy.sparse import csr_matrix, lil_matrix + + + +@jit(nopython=True, parallel=True) +def MonteCarloScatteringSimulation_function( + pixels, + E_i, + dE_threshold, + MinimumEnergy, + Density, + t_counting, + N, + ProbeDiameter, + image_shape_0, + image_shape_1 + ): + + + ModulatedImage = np.zeros((image_shape_0, image_shape_1), dtype=np.float64) + local_random_uniform = random.uniform + + print(len(pixels)) + + for i in prange(len(pixels)): + + pixel = pixels[i] + for j in prange(pixel.electron_count): + + pixel_x_dimension = pixel.x_dimension + pixel_y_dimension = pixel.y_dimension + pixel_z_dimension = pixel.z_dimension + pixel_i = pixel.i + pixel_j = pixel.j + + electron = ElectronEvolver( + E_i, ProbeDiameter, Density) + + ElectronHoleChargeCounter = np.zeros((image_shape_0, image_shape_1), dtype = np.float64) + + + while electron.condition: + + + electron.update_state() + + electron_x0 = electron.x0 + electron_y0 = electron.y0 + electron_z0 = electron.z0 + number_stopped=0 + number_backscattered =0 + number_transmitted=0 + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + if electron.E <= MinimumEnergy: #if electron stops in the material + number_stopped = number_stopped + 1 + electron.condition = False + + if electron_z0 < 0.01: #if electron backscatters + number_backscattered = number_backscattered + 1 + electron.condition = False + + if electron_z0 > pixel_z_dimension: # if electron penetrates material #change to have de/ds as the counting + + number_transmitted = number_transmitted + 1 + electron.condition = False + + # ------------------------------------------------------------------------------ Electron Deposits Sufficient Energy ------------------------------------------------------------------------------ # + + if -1*electron.dE >= dE_threshold: + new_eh_pairs = math.floor(-1*electron.dE/dE_threshold) + + # ------------------------------------------------------------------------------ Electron Stays Within Pixel Boundary ------------------------------------------------------------------------------ # + + if (electron_x0 <= 1*pixel_x_dimension) and (electron_x0 >= -1*pixel_x_dimension) and (electron_y0 <= 1*pixel_y_dimension)and (electron_y0 >=-1*pixel_y_dimension): #electron stays within pixel region + + ElectronHoleChargeCounter[pixel_i, pixel_j] += new_eh_pairs + + + # ------------------------------------------------------------------------------ Electron Moves Positively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 > 1*pixel_x_dimension) and (electron_y0 > 1*pixel_y_dimension): + translation_x = custom_round_down(x = electron_x0/(pixel_x_dimension)) + translation_y = custom_round_down(x = electron_y0/(2*pixel_y_dimension)) + + if pixel_i + translation_x <= image_shape_0 - 1 and pixel_j + translation_y <= image_shape_0 - 1: + ElectronHoleChargeCounter[pixel_i + translation_x, pixel_j + translation_y] += new_eh_pairs + + # ------------------------------------------------------------------------------ Electron Moves Negatively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 < -1*pixel_x_dimension) and (electron_y0 < -1*pixel_y_dimension): #electron moves negatively in x + # and y + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j - translation_y >= 0: + ElectronHoleChargeCounter[pixel_i - translation_x, pixel_j - translation_y] += new_eh_pairs + + # ----------------------------------------------------------------------- Electron Moves Positively in X and Negatively in Y ------------------------------------------------------------------------ # + + + elif electron_x0 > (1*pixel_x_dimension) and electron_y0 < (-1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j - translation_y >= 0 and pixel_i + translation_x <= image_shape_0 - 1: + + ElectronHoleChargeCounter[pixel_i + translation_x, pixel_j - translation_y] += new_eh_pairs + + + # ----------------------------------------------------------------------- Electron Moves Negatively in X and Positively in Y ------------------------------------------------------------------------ # + + + elif electron_x0 < (-1*pixel_x_dimension) and electron_y0 > (1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j + translation_y <= image_shape_0 - 1: + ElectronHoleChargeCounter[pixel_i - translation_x, pixel_j + translation_y] += new_eh_pairs + + + # ------------------------------------------------------------------------------ Electron Moves Positively in X Direction ----------------------------------------------------------------------------- # + + + elif electron_x0 > (1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i + \ + translation_x <= image_shape_0 - 1: + + ElectronHoleChargeCounter[pixel_i + translation_x, pixel_j] += new_eh_pairs + + + # ------------------------------------------------------------------------------ Electron Moves in Negative in X Direction ----------------------------------------------------------------------------- # + + + elif electron_x0 < (-1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i - translation_x >= 0: + + ElectronHoleChargeCounter[pixel_i - translation_x, pixel_j] += new_eh_pairs + + + # --------------------------------------------------------------------------------- Electron Moves in Positive Y Direction ------------------------------------------------------------------------------ # + + + elif electron_y0 > (1*pixel_y_dimension): + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j + \ + translation_y <= image_shape_0 - 1: + + ElectronHoleChargeCounter[pixel_i, pixel_j + translation_y] += new_eh_pairs + + # ---------------------------------------------------------------------------------- Electron Moves in Negative Y Direction ------------------------------------------------------------------------------- # + + elif electron_y0 < (-1*pixel_x_dimension): #electron moves in negative y direction + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + + if pixel_j - translation_y >= 0: + + ElectronHoleChargeCounter[pixel_i, pixel_j - translation_y] += new_eh_pairs + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + + ElectronHoleChargeCounter = np.floor(dE_threshold * ElectronHoleChargeCounter / t_counting) + + ModulatedImage += ElectronHoleChargeCounter + + return ModulatedImage + + + diff --git a/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions_plot.py b/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions_plot.py new file mode 100644 index 0000000..584fd22 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions_plot.py @@ -0,0 +1,124 @@ + +import math +import random +import numpy as np +from tqdm import tqdm +from multiprocessing import Pool, cpu_count +from joblib import Parallel, delayed +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 +import numba + + +from simulation.python_simulation.helper_functions import ( + custom_round_down, evaluate_alpha, evaluate_cross_section_opt, + evaluate_path_length, evaluate_step, evaluate_phi, + evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, + evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions +) +from simulation.python_simulation.electron_object_constructor import ElectronEvolver + + +from numba import njit, prange, jit, float64, int32, typed, typeof +from numba.experimental import jitclass +from numba.typed import List + + + + +def MonteCarloScatteringSimulationPlot_function( + pixels, + E_i, + dE_threshold, + MinimumEnergy, + Density, + t_counting, + N, + ProbeDiameter, + image_shape_0, + image_shape_1): + + + #counters + number_transmitted = 0 + number_backscattered = 0 + number_stopped = 0 + vector_coordinates_x = List([np.float64(0)]) + vector_coordinates_y = List([np.float64(0)]) + vector_coordinates_z = List([np.float64(0)]) + points_per_trajectory = List([np.float64(0)]) + + ModulatedImage_flat = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + local_math_floor = math.floor + local_numpy_floor = np.floor + + ModulatedImage_total = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + + counter = 0 + + for i in range(len(pixels)): + + counter +=1 + print(counter) + + + pixel = pixels[i] + for j in range(pixel.electron_count): + + point_counter = 1 + + pixel_x_dimension = pixel.x_dimension + pixel_y_dimension = pixel.y_dimension + pixel_z_dimension = pixel.z_dimension + pixel_i = pixel.i + pixel_j = pixel.j + + electron = ElectronEvolver(E_i, ProbeDiameter, Density) + + vector_coordinates_x.append(electron.x0) + vector_coordinates_y.append(electron.y0) + vector_coordinates_z.append(electron.z0) + + ElectronHoleChargeCounter_index = List([np.float64(0)]) + ElectronHoleChargeCounter_values = List([np.float64(0)]) + + + while electron.condition: # Monte Carlo Loop until backscatter, trasmission or stopping + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + if electron.E <= MinimumEnergy: #if electron stops in the material + number_stopped = number_stopped + 1 + electron.condition = False + + if electron.z0 < 0.01: #if electron backscatters + number_backscattered = number_backscattered + 1 + electron.condition = False #not sure how to deal with electron scattering outside of material + + if electron.z0 > pixel_z_dimension: # if electron penetrates material #change to have de/ds as the counting + + number_transmitted = number_transmitted + 1 + electron.condition = False + + + electron.update_state() + + + number_stopped=0 + number_backscattered =0 + number_transmitted=0 + + vector_coordinates_x.append(electron.x0) + vector_coordinates_y.append(electron.y0) + vector_coordinates_z.append(electron.z0) + point_counter += 1 + + points_per_trajectory.append(point_counter) + + + return np.reshape(ModulatedImage_flat, (image_shape_0, image_shape_1)), vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory + + + + + \ No newline at end of file diff --git a/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions_sparse.py b/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions_sparse.py new file mode 100644 index 0000000..5bbec82 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/mcss_python_functions_sparse.py @@ -0,0 +1,285 @@ + +import math +import random +import numpy as np +from tqdm import tqdm +from multiprocessing import Pool, cpu_count +from joblib import Parallel, delayed +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 +import numba + + +from simulation.python_simulation.helper_functions import ( + custom_round_down, evaluate_alpha, evaluate_cross_section_opt, + evaluate_path_length, evaluate_step, evaluate_phi, + evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, + evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions +) +from simulation.python_simulation.electron_object_constructor import ElectronEvolver + + +from numba import njit, prange, jit, float64, int32, typed, typeof +from numba.experimental import jitclass +from numba.typed import List + + + +@jit(nopython=True, parallel = True) +def MonteCarloScatteringSimulationSparse_function( + pixels, + E_i, + dE_threshold, + MinimumEnergy, + Density, + t_counting, + N, + ProbeDiameter, + image_shape_0, + image_shape_1): + + + ModulatedImage_flat = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + local_math_floor = math.floor + local_numpy_floor = np.floor + + ModulatedImage_total = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + + for i in prange(len(pixels)): + + + pixel = pixels[i] + for j in prange(pixel.electron_count): + + pixel_x_dimension = pixel.x_dimension + pixel_y_dimension = pixel.y_dimension + pixel_z_dimension = pixel.z_dimension + pixel_i = pixel.i + pixel_j = pixel.j + + electron = ElectronEvolver(E_i, ProbeDiameter, Density) + + ElectronHoleChargeCounter_index = List([np.float64(0)]) + ElectronHoleChargeCounter_values = List([np.float64(0)]) + + + while electron.condition: # Monte Carlo Loop until backscatter, trasmission or stopping + + + electron.update_state() + + electron_x0 = electron.x0 + electron_y0 = electron.y0 + electron_z0 = electron.z0 + electron_dE = electron.dE + number_stopped=0 + number_backscattered =0 + number_transmitted=0 + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + if electron.E <= MinimumEnergy: #if electron stops in the material + number_stopped = number_stopped + 1 + electron.condition = False + + if electron_z0 < 0.01: #if electron backscatters + number_backscattered = number_backscattered + 1 + electron.condition = False + + if electron_z0 > pixel_z_dimension: # if electron penetrates material #change to have de/ds as the counting + + number_transmitted = number_transmitted + 1 + electron.condition = False + + # ------------------------------------------------------------------------------ Electron Deposits Sufficient Energy ------------------------------------------------------------------------------ # + + if -1*electron_dE >= dE_threshold: + new_eh_pairs = local_math_floor(-1*electron_dE/dE_threshold) + + # ------------------------------------------------------------------------------ Electron Stays Within Pixel Boundary ------------------------------------------------------------------------------ # + + if (electron_x0 <= 1*pixel_x_dimension) and (electron_x0 >= -1*pixel_x_dimension) and (electron_y0 <= 1*pixel_y_dimension)and (electron_y0 >=-1*pixel_y_dimension): #electron stays within pixel region + + pixel_1D_index = pixel_i*image_shape_1+pixel_j + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves Positively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 > 1*pixel_x_dimension) and (electron_y0 > 1*pixel_y_dimension): + translation_x = custom_round_down(x = electron_x0/(pixel_x_dimension)) + translation_y = custom_round_down(x = electron_y0/(2*pixel_y_dimension)) + + if pixel_i + translation_x <= image_shape_0 - 1 and pixel_j + translation_y <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves Negatively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 < -1*pixel_x_dimension) and (electron_y0 < -1*pixel_y_dimension): #electron moves negatively in x + # and y + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j - translation_y >= 0: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ----------------------------------------------------------------------- Electron Moves Positively in X and Negatively in Y ------------------------------------------------------------------------ # + + elif electron_x0 > (1*pixel_x_dimension) and electron_y0 < (-1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j - translation_y >= 0 and pixel_i + translation_x <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i + translation_x) * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ----------------------------------------------------------------------- Electron Moves Negatively in X and Positively in Y ------------------------------------------------------------------------ # + + + elif electron_x0 < (-1*pixel_x_dimension) and electron_y0 > (1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j + translation_y <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + (pixel_j + translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves Positively in X Direction ----------------------------------------------------------------------------- # + + elif electron_x0 > (1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i + \ + translation_x <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i + translation_x) * image_shape_1 + pixel_j + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves in Negative in X Direction ----------------------------------------------------------------------------- # + + elif electron_x0 < (-1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i - translation_x >= 0: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + pixel_j + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # --------------------------------------------------------------------------------- Electron Moves in Positive Y Direction ------------------------------------------------------------------------------ # + + + elif electron_y0 > (1*pixel_y_dimension): + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j + \ + translation_y <= image_shape_0 - 1: + + pixel_1D_index = pixel_i * image_shape_1 + (pixel_j + translation_y) + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ---------------------------------------------------------------------------------- Electron Moves in Negative Y Direction ------------------------------------------------------------------------------- # + + elif electron_y0 < (-1*pixel_x_dimension): #electron moves in negative y direction + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + + if pixel_j - translation_y >= 0: + + pixel_1D_index = pixel_i * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + for k in prange(len(ElectronHoleChargeCounter_index)): + idx = int(ElectronHoleChargeCounter_index[k]) + value = ElectronHoleChargeCounter_values[k] + ModulatedImage_flat[idx] += local_numpy_floor(dE_threshold * value / t_counting) + + + return np.reshape(ModulatedImage_flat, (image_shape_0, image_shape_1)) + + + + + \ No newline at end of file diff --git a/Scripts/plot_trajectories.py b/Scripts/InFluence/build/lib/simulation/python_simulation/plot_trajectory_functions.py similarity index 59% rename from Scripts/plot_trajectories.py rename to Scripts/InFluence/build/lib/simulation/python_simulation/plot_trajectory_functions.py index 86a85d6..cfcc9f9 100644 --- a/Scripts/plot_trajectories.py +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/plot_trajectory_functions.py @@ -1,214 +1,141 @@ -from params import * - -N = scc.physical_constants['Avogadro constant'][0] -material_thickness = pixel_dimensions[2] - - -@jit(nopython = True) -def MCSA_Loop(E_i, minimum_energy, N, Z, A, p, material_thickness, dose): - #counters - number_transmitted = 0 - number_backscattered = 0 - number_stopped = 0 - vector_coordinates_x = List([np.float64(0)]) - vector_coordinates_y = List([np.float64(0)]) - vector_coordinates_z = List([np.float64(0)]) - points_per_trajectory = List([np.float64(0)]) - for _ in range(1, dose+1): - point_counter = 1 - # calculate initial conditions for all electrons - alpha = evaluate_alpha(E_i, Z) - cross = evaluate_cross_section(E_i, Z, alpha) - path_length = evaluate_path_length(A, N, p, cross) - RND_step = RND(a=0.000001, b=0.999999) - step = evaluate_step(path_length, RND=RND_step) - ip = initialise_postions(step = step, d = 27.5*10**-7 ) #units a are in cm - cx = ip[0] - cy = ip[1] - cz = ip[2] - z0 = ip[3] - y0 = ip[4] - x0 = ip[5] - vector_coordinates_x.append(x0) - vector_coordinates_y.append(y0) - vector_coordinates_z.append(z0) - condition = True - E = E_i - while condition: - - if z0 < 0.01: - number_backscattered += 1 - condition = False - - if E <= minimum_energy: - number_stopped += 1 - condition = False - if z0 > material_thickness: - number_transmitted += 1 - condition = False - - RND_phi = RND(a=0, b=1) # generate random number for the phi angle - RND_step = RND(a = 0, b = 1) - RND_pho = RND(a = 0, b = 1) - alpha = evaluate_alpha(E, Z) #calc screening constant, function of previous energy - cross = evaluate_cross_section(E, Z, alpha) #calc cross section - path_length = evaluate_path_length(A, N, p, cross) #calc mean free path length - step = evaluate_step(path_length = path_length, RND=RND_step) #calculate step of this iteration - E = E + step*p*evaluate_energy_loss_rate(E, Z, A) #calc new energy - - phi = evaluate_phi(RND = RND_phi, alpha = alpha) #calc scattering angle - psi = evaluate_pho(RND = RND_pho) #calc other scattering angle - - ca = evaluate_direction_cosine_a(phi, psi, cx, cy, cz) #calc direction cosines - cb = evaluate_direction_cosine_b(phi, psi, cx, cy, cz) - cc = evaluate_direction_cosine_c(phi, psi, cz) - - x0 = x0 + step*ca #find and reset to new positions - y0 = y0 + step*cb - z0 = z0 + step*cc - cx = ca #reset direction cosines - cy = cb - cz = cc - vector_coordinates_x.append(x0) - vector_coordinates_y.append(y0) - vector_coordinates_z.append(z0) - point_counter += 1 - - points_per_trajectory.append(point_counter) - - return vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory - - -if __name__ == '__main__': - start = time.time() - print('\nCalculating electron trajectories...') - random.seed() - x_axis, y_axis, z_axis, p= MCSA_Loop(E_i, minimum_energy, N, Z, A, p, material_thickness, dose) - print('\nPlotting electron trajectories...') - del p[0] - del x_axis[0] - del y_axis[0] - del z_axis[0] - p = List(map(int, p)) - - distance_from_centre = [] #for plotting lateral spread bar chart - - #suppress plotting to use savefig - - import matplotlib as mpl - #mpl.use('Agg') - import matplotlib.font_manager as fm - import matplotlib.pyplot as plt - # Rebuild the matplotlib font cache - fm._rebuild() - mpl.rcParams['font.family'] = 'Arial' - plt.rcParams['font.size'] = 12 - plt.rcParams['axes.linewidth'] = 2 - - #Plot 3D spread - fig = plt.figure(figsize=(12, 12), dpi= 100) #change resolution of plot, size of plot - ax = plt.axes(projection = '3d') #initialise axes - ax.view_init(elev = 185, azim = 135) #view down z axis #185, 135 fro diaganal view - plt.xlabel('x direction [$\mu$m]', fontsize = 24, labelpad= 40) #um because multiplied by 10000 - # later - plt.ylabel('y direction [$\mu$m]', fontsize = 24, labelpad= 40) - ax.set_zlabel('z direction [$\mu$m]', fontsize = 24, labelpad = 40) - #ax.w_zaxis.line.set_lw(0.) #make z linewidth zero and remove labels -> effectively make z axis invisible - #ax.set_zticks([]) - ax.xaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) - ax.xaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) - ax.yaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) - ax.yaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) - ax.zaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) - ax.zaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) - #ax.xaxis.set_major_locator(mpl.ticker.MultipleLocator(10)) - #ax.yaxis.set_major_locator(mpl.ticker.MultipleLocator(10)) - ax.xaxis.pane.fill = False - ax.yaxis.pane.fill = False - ax.zaxis.pane.fill = False - ax.xaxis.pane.set_edgecolor('w') - ax.yaxis.pane.set_edgecolor('w') - ax.zaxis.pane.set_edgecolor('w') - num = len(p) - beginning = 0 - for i in range(0, num): - end = beginning + p[i] - x_coords = 10000*np.array(x_axis[beginning:end]) #multiply to change to um - y_coords = 10000*np.array(y_axis[beginning:end]) - z_coords = 10000*np.array(z_axis[beginning:end]) - - - #Get info. for distance from centre - distance = (x_coords[-1]**2 +y_coords[-1]**2)**0.5 - distance_from_centre.append(distance) - - #Plot 3D spread - ax.plot(x_coords, y_coords, z_coords, color=(random.uniform(0, 1), random.uniform(0, 1), random.uniform( - 0, 1))) - - beginning = end - - #Plot 3D spread - plt.tight_layout() - plt.autoscale() - lim_upper = np.max([abs(max(plt.xlim())), abs(max(plt.ylim())), abs(min(plt.xlim())), abs(min(plt.ylim()))]) - plt.xlim(-lim_upper, lim_upper) - plt.ylim(-lim_upper, lim_upper) #these limits ensure that x and y axes are the same size, ie. square box. Size is - #biggest distance away from centre - fig.show() - plt.pause(1e-30) - - - - #filename = r'I:\Monte Carlo stuff\ImagesForPaper\sideview60keV.svg' - plt.savefig(path_to_trajectory_plot, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0) - plt.savefig(path_to_trajectory_plot_svg, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) - ax.view_init(elev=90, azim=0) - ax.zaxis.set_ticklabels([]) - ax.set_zlabel('') - plt.savefig(path_to_trajectory_plot_v2, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) - plt.savefig(path_to_trajectory_plot_v2_svg, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) - plt.close(fig) - #print('time elapsed: ', time.clock() - start) - - # Plot histogram - - def bins_labels(bins, **kwargs): - bin_w = ((max(bins) - min(bins)) / (len(bins) - 1)) - lbls = np.around(bins[1:] - bin_w / 2, decimals=2) - plt.xticks(np.arange(min(bins) + bin_w / 2, max(bins), bin_w), lbls, - **kwargs) - - - from matplotlib.ticker import PercentFormatter - - distance_from_centre = np.around(np.array(distance_from_centre), decimals=2) - distance_from_centre = distance_from_centre[~np.isnan(distance_from_centre)] - # Plot distance from centre - fig_hist = plt.figure(figsize=(14, 7), dpi=100) - plt.style.use('seaborn-whitegrid') - n, bins, patches = plt.hist(distance_from_centre, bins=10, facecolor='#2ab0ff', edgecolor='black', - linewidth=1.5, weights=np.ones(len(distance_from_centre)) / len(distance_from_centre)) - plt.gca().yaxis.set_major_formatter(PercentFormatter(1)) - # plt.title('Histogram of the final distance travelled by each electron relative to the centre of the pixel', - # fontsize=16) - plt.xlabel('Final distance of an electron from its point of incidence [$\mu$m]', fontsize=14, labelpad=25) - plt.ylabel('Counts', fontsize=14, labelpad=25) - for count, patch in enumerate(patches): - #patch.set_facecolor(colors[np.random.randint(100) % nbins]) - x = patch.get_x() + patch.get_width() / 2 - y = patch.get_height() - #print(y) - plt.annotate('{}%'.format(np.around(y*100, decimals = 2)), (x, y+0.0075), ha='center') - #plt.grid() - #plt.box(on=None) - bins_labels(bins, rotation=0, fontsize=10) - plt.ylim() - plt.pause(1e-30) - bottom, top = plt.ylim() - plt.ylim(top = 1.2*top) - - plt.savefig(path_to_trajectory_histogram_plot, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0 ) - plt.savefig(path_to_trajectory_histogram_plot_svg, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0 ) - plt.close(fig_hist) - print('\n\nRun time: ', time.time() - start) +import time +import random +from numba.typed import List +import numpy as np +import matplotlib +import matplotlib.pyplot as plt + + +def PlotTrajectories(vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory): + + + path_to_trajectory_plot = "./3D_plot.png" + path_to_trajectory_plot_svg = "./3D_plot.svg" + path_to_trajectory_plot_v2 = "./3D_plot_v2.png" + path_to_trajectory_plot_v2_svg = "./3D_plot_v2.svg" + path_to_trajectory_histogram_plot = './histogram_plot.png' + path_to_trajectory_histogram_plot_svg = './histogram_plot.svg' + + + start = time.time() + print('\nCalculating electron trajectories...') + random.seed() + x_axis, y_axis, z_axis, p= vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory + print('\nPlotting electron trajectories...') + del p[0] + del x_axis[0] + del y_axis[0] + del z_axis[0] + p = List(map(int, p)) + + distance_from_centre = [] #for plotting lateral spread bar chart + + #suppress plotting to use savefig + + + + #Plot 3D spread + fig = plt.figure(figsize=(12, 12), dpi= 100) #change resolution of plot, size of plot + ax = plt.axes(projection = '3d') #initialise axes + ax.view_init(elev = 185, azim = 135) #view down z axis #185, 135 fro diaganal view + plt.xlabel('x direction [$\mu$m]', fontsize = 24, labelpad= 40) #um because multiplied by 10000 + # later + plt.ylabel('y direction [$\mu$m]', fontsize = 24, labelpad= 40) + ax.set_zlabel('z direction [$\mu$m]', fontsize = 24, labelpad = 40) + #ax.w_zaxis.line.set_lw(0.) #make z linewidth zero and remove labels -> effectively make z axis invisible + #ax.set_zticks([]) + ax.xaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) + ax.xaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) + ax.yaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) + ax.yaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) + ax.zaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) + ax.zaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) + #ax.xaxis.set_major_locator(mpl.ticker.MultipleLocator(10)) + #ax.yaxis.set_major_locator(mpl.ticker.MultipleLocator(10)) + ax.xaxis.pane.fill = False + ax.yaxis.pane.fill = False + ax.zaxis.pane.fill = False + ax.xaxis.pane.set_edgecolor('w') + ax.yaxis.pane.set_edgecolor('w') + ax.zaxis.pane.set_edgecolor('w') + num = len(p) + beginning = 0 + for i in range(0, num): + end = beginning + p[i] + x_coords = 10000*np.array(x_axis[beginning:end]) #multiply to change to um + y_coords = 10000*np.array(y_axis[beginning:end]) + z_coords = 10000*np.array(z_axis[beginning:end]) + + + #Get info. for distance from centre + distance = (x_coords[-1]**2 +y_coords[-1]**2)**0.5 + distance_from_centre.append(distance) + + #Plot 3D spread + ax.plot(x_coords, y_coords, z_coords, color=(random.uniform(0, 1), random.uniform(0, 1), random.uniform( + 0, 1))) + + beginning = end + + #Plot 3D spread + plt.tight_layout() + plt.autoscale() + lim_upper = np.max([abs(max(plt.xlim())), abs(max(plt.ylim())), abs(min(plt.xlim())), abs(min(plt.ylim()))]) + plt.xlim(-lim_upper, lim_upper) + plt.ylim(-lim_upper, lim_upper) #these limits ensure that x and y axes are the same size, ie. square box. Size is + #biggest distance away from centre + + + + + #filename = r'I:\Monte Carlo stuff\ImagesForPaper\sideview60keV.svg' + plt.savefig(path_to_trajectory_plot, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0) + plt.savefig(path_to_trajectory_plot_svg, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) + ax.view_init(elev=90, azim=0) + ax.zaxis.set_ticklabels([]) + ax.set_zlabel('') + plt.savefig(path_to_trajectory_plot_v2, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) + plt.savefig(path_to_trajectory_plot_v2_svg, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) + plt.close(fig) + #print('time elapsed: ', time.clock() - start) + + # Plot histogram + + def bins_labels(bins, **kwargs): + bin_w = ((max(bins) - min(bins)) / (len(bins) - 1)) + lbls = np.around(bins[1:] - bin_w / 2, decimals=2) + plt.xticks(np.arange(min(bins) + bin_w / 2, max(bins), bin_w), lbls, + **kwargs) + + + from matplotlib.ticker import PercentFormatter + + distance_from_centre = np.around(np.array(distance_from_centre), decimals=2) + distance_from_centre = distance_from_centre[~np.isnan(distance_from_centre)] + # Plot distance from centre + fig_hist = plt.figure(figsize=(14, 7), dpi=100) + plt.style.use('seaborn-whitegrid') + n, bins, patches = plt.hist(distance_from_centre, bins=10, facecolor='#2ab0ff', edgecolor='black', + linewidth=1.5, weights=np.ones(len(distance_from_centre)) / len(distance_from_centre)) + plt.gca().yaxis.set_major_formatter(PercentFormatter(1)) + # plt.title('Histogram of the final distance travelled by each electron relative to the centre of the pixel', + # fontsize=16) + plt.xlabel('Final distance of an electron from its point of incidence [$\mu$m]', fontsize=14, labelpad=25) + plt.ylabel('Counts', fontsize=14, labelpad=25) + for count, patch in enumerate(patches): + #patch.set_facecolor(colors[np.random.randint(100) % nbins]) + x = patch.get_x() + patch.get_width() / 2 + y = patch.get_height() + #print(y) + plt.annotate('{}%'.format(np.around(y*100, decimals = 2)), (x, y+0.0075), ha='center') + #plt.grid() + #plt.box(on=None) + bins_labels(bins, rotation=0, fontsize=10) + plt.ylim() + bottom, top = plt.ylim() + plt.ylim(top = 1.2*top) + + plt.savefig(path_to_trajectory_histogram_plot, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0 ) + plt.savefig(path_to_trajectory_histogram_plot_svg, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0 ) + plt.close(fig_hist) + print('\n\nRun time: ', time.time() - start) \ No newline at end of file diff --git a/Scripts/InFluence/build/lib/simulation/python_simulation/python_simulation_interface.py b/Scripts/InFluence/build/lib/simulation/python_simulation/python_simulation_interface.py new file mode 100644 index 0000000..ebbd4fe --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/python_simulation/python_simulation_interface.py @@ -0,0 +1,108 @@ +from simulation.python_simulation.mcss_python_functions import MonteCarloScatteringSimulation_function +from simulation.python_simulation.mcss_python_functions_sparse import MonteCarloScatteringSimulationSparse_function +from simulation.python_simulation.mcss_python_functions_plot import MonteCarloScatteringSimulationPlot_function +from simulation.python_simulation.plot_trajectory_functions import PlotTrajectories + + +from math import pi +import numpy as np + +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 + +from numba.typed import List + + +class MonteCarloScatteringSimulation: + + def __init__(self, image_object, params): + + + pixels_typed = List() + for pixel in image_object.pixels: + pixels_typed.append(pixel) + + self.pixels = pixels_typed + self.image_object = image_object + + self.E_i = params.E_i + self.dE_threshold = params.dE_threshold + self.MinimumEnergy = params.minimum_energy + self.ProtonNum = params.ProtonNum + self.AtomicMass = params.AtomicMass + self.Density = params.Density + self.t_counting = params.t_counting + self.N = params.N + self.ProbeDiameter = image_object.pixel_dimensions[0] + self.image_shape_0 = image_object.perfect_image.shape[0] + self.image_shape_1 = image_object.perfect_image.shape[1] + self.pi = pi + self.params = params + + + + + self.new_image_MCS = np.zeros((self.image_shape_0, self.image_shape_1), dtype=np.float64) + + + def RunMCScatteringSimulation(self): + SimulationResult = MonteCarloScatteringSimulation_function(self.pixels, + self.E_i, + self.dE_threshold, + self.MinimumEnergy, + self.Density, + self.t_counting, + self.N, + self.ProbeDiameter, + self.image_shape_0, + self.image_shape_1) + + return SimulationResult + + def RunMCScatteringSimulation_Sparse(self): + SimulationResult = MonteCarloScatteringSimulationSparse_function(self.pixels, + self.E_i, + self.dE_threshold, + self.MinimumEnergy, + self.Density, + self.t_counting, + self.N, + self.ProbeDiameter, + self.image_shape_0, + self.image_shape_1) + + + return np.reshape(SimulationResult, (self.image_shape_0, self.image_shape_1)) + + + def RunMCScatteringSimulation_Plot(self): + if self.params.dose > 5000: + # Raise an exception and exit the program with an error code + error_message = "Dose is too high. Please enter an electron dose lower than 5000." + raise ValueError(error_message) + + SimulationResult, vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory = MonteCarloScatteringSimulationPlot_function(self.pixels, + self.E_i, + self.dE_threshold, + self.MinimumEnergy, + self.Density, + self.t_counting, + self.N, + self.ProbeDiameter, + self.image_shape_0, + self.image_shape_1) + PlotTrajectories(vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory) + return SimulationResult + + + + + + + + + + + + + diff --git a/Scripts/InFluence/build/lib/simulation/simulation_interface.py b/Scripts/InFluence/build/lib/simulation/simulation_interface.py new file mode 100644 index 0000000..362dec6 --- /dev/null +++ b/Scripts/InFluence/build/lib/simulation/simulation_interface.py @@ -0,0 +1,90 @@ +from numba.typed import List +from simulation.python_simulation.python_simulation_interface import MonteCarloScatteringSimulation + + + +class InFluenceSimulation: + + def __init__(self, image_object, params): + self.image_object = image_object + self.image_object.generate_scaled_perfect_image() + self.image_object.generate_perfect_image_pixel_objects() + self.ProbeDiameter = self.image_object.pixel_dimensions[0] + self.E_i = params.E_i + self.dE_threshold = params.dE_threshold + self.MinimumEnergy = params.minimum_energy + self.ProtonNum = params.ProtonNum + self.AtomicMass = params.AtomicMass + self.Density = params.Density + self.t_counting = params.t_counting + self.N = params.N + image_object = None + image_object = None + self.params = params + + def RunMCSimulation_Py(self, py_sim_type): + + + simulation = MonteCarloScatteringSimulation( + self.image_object, self.params + ) + if py_sim_type == "PySparse": + simulation_results = simulation.RunMCScatteringSimulation_Sparse() + if py_sim_type == "PyDense": + simulation_results = simulation.RunMCScatteringSimulation() + if py_sim_type == "Plot": + simulation_results = simulation.RunMCScatteringSimulation_Plot() + return simulation_results + + + + def RunCPPMCScatteringSimulation(self): + + from simulation.cpp_simulation.cpp_simulation_interface import CPP_MCScatteringSimulation + model = CPP_MCScatteringSimulation( + self.image_object.pixels, + self.E_i, + self.ProbeDiameter, + self.MinimumEnergy, + self.image_object.pixel_dimensions, + self.dE_threshold, + self.image_object.perfect_image.shape[0], + self.image_object.perfect_image.shape[1], + self.Density, + self.t_counting + ) + return model + + def Run_GPU_KERNEL_MCScatteringSimulation(self): + from simulation.cuda_simulation.gpu_simulation_interface import GPU_KERNEL_MCScatteringSimulation + + + + + model = GPU_KERNEL_MCScatteringSimulation( + self.image_object.pixels, + self.E_i, + self.ProbeDiameter, + self.MinimumEnergy, + self.image_object.pixel_dimensions, + self.dE_threshold, + self.image_object.perfect_image.shape[0], + self.image_object.perfect_image.shape[1], + self.Density, + self.t_counting + ) + + + return model + + + def SaveModulatedImage(): + + pass + + + + + + + diff --git a/Scripts/InFluence/config.ini b/Scripts/InFluence/config.ini new file mode 100644 index 0000000..02211a1 --- /dev/null +++ b/Scripts/InFluence/config.ini @@ -0,0 +1,20 @@ +[Energies] +e_i = 200 +minimum_energy = 0.05 +t_counting = 40 + +[Material properties] +n = 6.02214076e+23 +protonnum = 14 +atomicmass = 28 +density = 2.33 +de_threshold = 0.00362 +pixel_dimensions = 0.00275, 0.00275, 0.04 + +[Electrons] +dose = 1000 + +[Filepaths] +img_in = /home/uclworkstation1/InFluence/ExampleData/slanted_edge.npy +img_out = Output + diff --git a/Scripts/InFluence/dist/InFluence-1.0-py3-none-any.whl b/Scripts/InFluence/dist/InFluence-1.0-py3-none-any.whl new file mode 100644 index 0000000..5a38aa8 Binary files /dev/null and b/Scripts/InFluence/dist/InFluence-1.0-py3-none-any.whl differ diff --git a/Scripts/InFluence/filepaths.py b/Scripts/InFluence/filepaths.py new file mode 100644 index 0000000..4b9564c --- /dev/null +++ b/Scripts/InFluence/filepaths.py @@ -0,0 +1,16 @@ +import os +from pathlib import Path +import configparser + +class Filepaths: + # Get the directory where this Python script resides + current_dir = Path(os.path.dirname(os.path.abspath(__file__))) + + # Define the location of the config.ini relative to the script's location + config_path = current_dir / "config.ini" + + config = configparser.ConfigParser() + config.read(config_path) + + InputImageLocation = config.get('Filepaths', 'img_in') + SaveLocation = config.get('Filepaths', 'img_out') diff --git a/Scripts/InFluence/image_preprocessing/__pycache__/image_object_constructor.cpython-310.pyc b/Scripts/InFluence/image_preprocessing/__pycache__/image_object_constructor.cpython-310.pyc new file mode 100644 index 0000000..e4fc1a0 Binary files /dev/null and b/Scripts/InFluence/image_preprocessing/__pycache__/image_object_constructor.cpython-310.pyc differ diff --git a/Scripts/InFluence/image_preprocessing/__pycache__/image_object_constructor.cpython-38.pyc b/Scripts/InFluence/image_preprocessing/__pycache__/image_object_constructor.cpython-38.pyc new file mode 100644 index 0000000..60a26e3 Binary files /dev/null and b/Scripts/InFluence/image_preprocessing/__pycache__/image_object_constructor.cpython-38.pyc differ diff --git a/Scripts/InFluence/image_preprocessing/__pycache__/pixel_object_constructor.cpython-310.pyc b/Scripts/InFluence/image_preprocessing/__pycache__/pixel_object_constructor.cpython-310.pyc new file mode 100644 index 0000000..800f0ba Binary files /dev/null and b/Scripts/InFluence/image_preprocessing/__pycache__/pixel_object_constructor.cpython-310.pyc differ diff --git a/Scripts/InFluence/image_preprocessing/__pycache__/pixel_object_constructor.cpython-38.pyc b/Scripts/InFluence/image_preprocessing/__pycache__/pixel_object_constructor.cpython-38.pyc new file mode 100644 index 0000000..b055687 Binary files /dev/null and b/Scripts/InFluence/image_preprocessing/__pycache__/pixel_object_constructor.cpython-38.pyc differ diff --git a/Scripts/InFluence/image_preprocessing/image_object_constructor.py b/Scripts/InFluence/image_preprocessing/image_object_constructor.py new file mode 100644 index 0000000..d83973c --- /dev/null +++ b/Scripts/InFluence/image_preprocessing/image_object_constructor.py @@ -0,0 +1,77 @@ +from PIL import Image +import numpy as np +from image_preprocessing.pixel_object_constructor import pixel_constructor + +class image_pixels: + + def __init__(self, filepath, params): + # Initialize instance variables + self.original_image = None + self.perfect_image = None + self.electron_dose = params.dose + self.pixels = None + self.pixel_dimensions = params.pixel_dimensions + self.params = params + + # Load image based on the file type + if filepath.endswith('.dat'): + self.original_image = opendatfile(image=filepath) + elif filepath.endswith('.tif'): + self.original_image = np.array(Image.open(filepath)) + else: + self.original_image = np.load(filepath) + + def create_pixel_objects(self, image=None): + # Create pixel objects from the image matrix + if image is None: + image = self.original_image + + rows, cols = image.shape + indices = np.indices((rows, cols)) + counts = image.flatten() + i_coordinates = indices[0].flatten() # Flattened row indices + j_coordinates = indices[1].flatten() # Flattened column indices + pixel_info = np.column_stack((counts, i_coordinates, j_coordinates)) + pixel_info = pixel_info.tolist() + + self.pixels = [ + pixel_constructor( + electron_count, i, j, + self.pixel_dimensions[0], + self.pixel_dimensions[1], + self.pixel_dimensions[2] + ) for electron_count, i, j in pixel_info + ] + + return self.pixels + + def find_distribution(self): + # Find pixel distribution for the given dose + electron_counts = self.original_image.flatten() + probabilities = electron_counts / np.sum(electron_counts) + selected_indices = np.random.choice(len(self.pixels), size=self.params.dose, p=probabilities) + selected_pixels = [self.pixels[i] for i in selected_indices] + return selected_pixels + + def distribute_electrons(self, selected_pixels): + # Create a scaled perfect image + scaled_perfect_image = np.zeros(self.original_image.shape) + for pixel in selected_pixels: # Loop through each selected pixel + i, j = pixel.i, pixel.j + scaled_perfect_image[i, j] += 1 + return scaled_perfect_image # Return the perfect image after distribution + + def generate_scaled_perfect_image(self): + # Wrapper function to generate the scaled perfect image + self.create_pixel_objects() + selected_pixels = self.find_distribution() + self.perfect_image = self.distribute_electrons(selected_pixels) + self.pixels = None # Free up memory + + def generate_perfect_image_pixel_objects(self): + # Create pixel objects for the perfect image + self.pixels = self.create_pixel_objects(self.perfect_image) + + def save_image(self): + # Placeholder function for saving the image + pass diff --git a/Scripts/InFluence/image_preprocessing/pixel_object_constructor.py b/Scripts/InFluence/image_preprocessing/pixel_object_constructor.py new file mode 100644 index 0000000..0be065e --- /dev/null +++ b/Scripts/InFluence/image_preprocessing/pixel_object_constructor.py @@ -0,0 +1,27 @@ +from numba import int32, float64 +from numba.experimental import jitclass + + + + +# Define the specification for the pixel_constructor class +pixel_spec = [ + ('electron_count', int32), + ('i', int32), + ('j', int32), + ('x_dimension', float64), + ('y_dimension', float64), + ('z_dimension', float64) +] + +@jitclass(pixel_spec) +class pixel_constructor: + + def __init__(self, electron_count, i, j, x_dimension, y_dimension, z_dimension): + #Update class variables + self.electron_count = int(electron_count) + self.i = int(i) + self.j = int(j) + self.x_dimension = x_dimension + self.y_dimension = y_dimension + self.z_dimension = z_dimension \ No newline at end of file diff --git a/Scripts/InFluence/interface_code/InFluence_CLI.py b/Scripts/InFluence/interface_code/InFluence_CLI.py new file mode 100644 index 0000000..fce85d4 --- /dev/null +++ b/Scripts/InFluence/interface_code/InFluence_CLI.py @@ -0,0 +1,263 @@ +import sys +import argparse +import configparser +from inquirer import prompt +import inquirer + +sys.path.append('..') # Adds the parent directory to the sys.path +from main import RunSimulation +sys.path.remove('..') +from gui import InFluenceGUI + + +class SimulationApp: + + def __init__(self, config_file='../config.ini'): + self.config_file = config_file + self.config = configparser.ConfigParser() + self.config.read(self.config_file) + self.parser = self.create_parser() + + + def update_config(self,config_file, answers): + config = configparser.ConfigParser() + config.read(config_file) + + config['Energies']['e_i'] = str(answers['e_i']) + config['Energies']['minimum_energy'] = str(answers['minimum_energy']) + config['Energies']['t_counting'] = str(answers['t_counting']) + config['Material properties']['n'] = str(answers['n']) + config['Material properties']['ProtonNum'] = str(answers['ProtonNum']) + config['Material properties']['AtomicMass'] = str(answers['AtomicMass']) + config['Material properties']['Density'] = str(answers['Density']) + config['Material properties']['de_threshold'] = str(answers['de_threshold']) + config['Material properties']['pixel_dimensions'] = ", ".join(map(str.strip, answers['pixel_dimensions'].split(','))) + config['Electrons']['dose'] = str(answers['dose']) + config['Filepaths']['img_in'] = str(answers['InputImageLocation']) + config['Filepaths']['img_out'] = str(answers['SaveImageLocation']) + + with open(config_file, 'w') as configfile: + config.write(configfile) + + + def create_parser(self): + + + parser = argparse.ArgumentParser(description='InFluence, a package to simulate electron-detector interactions in TEM imaging.') + + parser.add_argument('--gui', action='store_true', help='Launch InFluence GUI.') + + parser.add_argument('--gpu', action='store_true', help='Run the simulation on the GPU using existing parameters in config file.') + parser.add_argument('--pysparse', action='store_true', help='Run the simulation on the CPU with PySparse using existing parameters in config file.') + parser.add_argument('--pydense', action='store_true', help='Run the simulation on the CPU with PyDense using existing parameters in config file.') + parser.add_argument('--cpp', action='store_true', help='Run the simulation on the CPU with CPP using existing parameters in config file') + parser.add_argument('--plot', action='store_true', help='Run the simulation on the CPU and plot electron trajectories using existing parameters in config file, the dose must not exceed 5,000 when using this option.') #add input check + parser.add_argument('--go', action='store_true', help='Use the existing parameters from config.ini and run simulation of default simulation type (PySparse)') + parser.add_argument('--show_params', action='store_true', help='Display stored simulation parameters') + + parser.add_argument('--update_dose', type=int, help='Set the electron dose value') + parser.add_argument('--e_i', type=int, help='Set the e_i value') + parser.add_argument('--minimum_energy', type=float, help='Set the minimum_energy') + parser.add_argument('--t_counting', type=int, help='Set the t_counting') + parser.add_argument('--n', type=float, help='Set the n value') + parser.add_argument('--proton_num', type=int, help='Set the proton number of the detector material') + parser.add_argument('--atomic_mass', type=float, help='Set the atomic mass of the detector material') + parser.add_argument('--Density', type=float, help='Set the density of the detector material') + parser.add_argument('--de_threshold', type=float, help='Set the detector threshold') + parser.add_argument('--pixel_dimensions', type=str, help='Set the pixel dimensions') + parser.add_argument('--InputImageLocation', type=str, help='Set the input image file path') + parser.add_argument('--SaveImageLocation', type=str, help='Set the saved image file path') + + + return parser + + + def display_stored_params(self, config_file): + config = configparser.ConfigParser() + config.read(config_file) + + print("*" * 84) + print("*" + " " * 34 + "\U0001F31F" + " Stored Parameters " + "\U0001F31F" + " " * 34 ) + for section in config.sections(): + print(f"* [{section}]") + for option in config[section]: + value = config.get(section, option) + print(f"* {option} = {value}") + print("*" + "-" * 82 ) + + def print_output(self, simulation_type, dose): + print("*" * 90) + print("*" + " " * 34 + "\U0001F31F" + " InFluence " + "\U0001F31F" + " " * 34 ) + + print() + print(" InFluence simulation will run using ", simulation_type, " for ", dose, " electrons...") + print() + + + + + def run_app(self): + + config_file = '../config.ini' + + parser = self.create_parser() + args = parser.parse_args() + config = configparser.ConfigParser() + config.read(config_file) + + if any(arg is not None for arg in [args.update_dose, args.e_i, args.minimum_energy, args.t_counting, args.n, args.proton_num, args.atomic_mass, args.Density, args.de_threshold, args.pixel_dimensions, args.InputImageLocation, args.SaveImageLocation]): + if args.update_dose is not None: + config['Electrons']['dose'] = str(args.update_dose) + if args.e_i is not None: + config['Energies']['e_i'] = str(args.e_i) + if args.minimum_energy is not None: + config['Energies']['minimum_energy'] = str(args.minimum_energy) + if args.t_counting is not None: + config['Energies']['t_counting'] = str(args.t_counting) + if args.n is not None: + config['Material properties']['n'] = str(args.n) + if args.proton_num is not None: + config['Material properties']['ProtonNum'] = str(args.ProtonNum) + if args.atomic_mass is not None: + config['Material properties']['AtomicMass'] = str(args.AtomicMass) + if args.Density is not None: + config['Material properties']['Density'] = str(args.Density) + if args.de_threshold is not None: + config['Material properties']['de_threshold'] = str(args.de_threshold) + if args.pixel_dimensions is not None: + config['Material properties']['pixel_dimensions'] = args.pixel_dimensions + if args.InputImageLocation is not None: + config['Filepaths']['img_in'] = args.InputImageLocation + if args.SaveImageLocation is not None: + config['Filepaths']['img_out'] = args.SaveImageLocation + + # Save updated config + with open(config_file, 'w') as configfile: + config.write(configfile) + print("Simulation configuration updated.") + + if all(arg is None for arg in [args.update_dose, args.e_i, args.minimum_energy, args.t_counting, args.n, args.proton_num, args.atomic_mass, args.Density, args.de_threshold, args.pixel_dimensions, args.InputImageLocation, args.SaveImageLocation]): + + + + + if len(sys.argv) >= 3: + print("Error: Too many arguments passed.") + sys.exit(1) + + if args.gui: + gui = InFluenceGUI() + gui.build_gui() + + + else: + + if args.show_params: + print('woo') + self.display_stored_params(config_file) + return + + elif args.update_dose is not None: + # Update dose value in the configuration file + config = configparser.ConfigParser() + config.read(config_file) + config['Electrons']['dose'] = str(args.update_dose) + + with open(config_file, 'w') as configfile: + config.write(configfile) + print(f"New stored dose value updated to: {args.update_dose}") + + elif len(sys.argv)==1: + # Read the existing values from the config file + config = configparser.ConfigParser() + config.read(config_file) + stored_ei = config.getint('Energies', 'e_i') + stored_min_energy = config.getfloat('Energies', 'minimum_energy') + stored_t_counting = config.getint('Energies', 't_counting') + stored_n = config.getfloat('Material properties', 'n') + stored_proton_num = config.getint('Material properties', 'ProtonNum') + stored_atomic_mass = config.getfloat('Material properties', 'AtomicMass') + stored_density = config.getfloat('Material properties', 'Density') + stored_de_threshold = config.getfloat('Material properties', 'de_threshold') + stored_pixel_dimensions = config.get('Material properties', 'pixel_dimensions') + stored_dose = config.getint('Electrons', 'dose') + stored_img_in = config.get('Filepaths', 'img_in') + stored_img_out = config.get('Filepaths', 'img_out') + + # Create a dictionary to store the user's input + answers = {} + + # Existing code for prompting user for input and updating the configuration + questions = [ + inquirer.Text('e_i', message='Enter value for e_i:', default=stored_ei), + inquirer.Text('minimum_energy', message='Enter value for minimum_energy:', default=stored_min_energy), + inquirer.Text('t_counting', message='Enter value for t_counting:', default=stored_t_counting), + inquirer.Text('n', message='Enter value for n:', default=stored_n), + inquirer.Text('ProtonNum', message='Enter value for ProtonNum:', default=stored_proton_num), + inquirer.Text('AtomicMass', message='Enter value for AtomicMass:', default=stored_atomic_mass), + inquirer.Text('Density', message='Enter value for Density:', default=stored_density), + inquirer.Text('de_threshold', message='Enter value for de_threshold:', default=stored_de_threshold), + inquirer.Text('pixel_dimensions', message='Enter pixel_dimensions (comma-separated x,y,z):', default=stored_pixel_dimensions), + inquirer.Text('dose', message='Enter value for electron dose:', default=stored_dose), + inquirer.Text('InputImageLocation', message='Enter filepath for input image.', default=stored_img_in), + inquirer.Text('SaveImageLocation', message='Enter filepath for saved image.', default=stored_img_out), + inquirer.Text('simulation_type', message='Enter simulation type, GPU, CPP, PySparse, PyDense.', default='PySparse') + ] + + answers = inquirer.prompt(questions) + self.update_config(config_file, answers) + simulation_type = answers['simulation_type'] + self.print_output('PySparse simulation on CPU', stored_dose) + RunSimulation(simulation_type) + + if len(sys.argv)==2: + + if args.gpu: + self.print_output('GPU', stored_dose) + RunSimulation('GPU') + return + + elif args.pysparse: + self.print_output('PySparse simulation on CPU', stored_dose) + RunSimulation('PySparse') + return + + if args.pysdense: + self.print_output('PyDense simulation on CPU', stored_dose) + RunSimulation('PyDense') + return + + if args.cpp: + self.print_output('CPP simulation on CPU', stored_dose) + RunSimulation('CPP') + return + + if args.pysparse: + self.print_output('using CPU and plot electron tragectories.', stored_dose) + RunSimulation('Plot') + return + + + if args.go: + + if len(sys.argv) == 2: + self.print_output('PySparse simulation on CPU', stored_dose) + RunSimulation('CPU') + return + + print(" Simulation complete. Output saved to ", stored_img_out) + print() + print() + print("*" * 90) + + return + + + +if __name__ == "__main__": + app = SimulationApp() + + app.run_app() + + + diff --git a/Scripts/InFluence/interface_code/__pycache__/gui.cpython-310.pyc b/Scripts/InFluence/interface_code/__pycache__/gui.cpython-310.pyc new file mode 100644 index 0000000..f7800ab Binary files /dev/null and b/Scripts/InFluence/interface_code/__pycache__/gui.cpython-310.pyc differ diff --git a/Scripts/InFluence/interface_code/gui.py b/Scripts/InFluence/interface_code/gui.py new file mode 100644 index 0000000..7d0e20a --- /dev/null +++ b/Scripts/InFluence/interface_code/gui.py @@ -0,0 +1,555 @@ +import tkinter as tk +from tkinter import Tk, Label +from tkinter import ttk +from tkinter import filedialog +from PIL import Image, ImageTk +from mendeleev import element +import platform +import psutil +from threading import Thread, Event +import GPUtil +import configparser +import sys +import matplotlib.pyplot as plt +import io +import importlib +import tkinter.messagebox as messagebox +import os +import tkinter as tk +from tkinter import Toplevel, Text, Scrollbar, Button + +from PIL import Image, ImageDraw, ImageFont +from queue import Queue +import numpy as np + +sys.path.append('..') +from main import RunSimulation +sys.path.remove('..') + + + +class InFluenceGUI: + + def __init__(self): + + self.root = tk.Tk() + self.root.title("InFluence") + self.image_label = None + + self.simulation_type = "PySparse" + + self.stop_event = Event() + self.simulation_thread = None + self.queue = Queue() + + self.config_file = '../config.ini' + self.config = configparser.ConfigParser() + self.config.read(self.config_file) + + + def start_simulation(self): + print("Starting simulation...") + self.create_simulating_display_image() + if self.simulation_thread and self.simulation_thread.is_alive(): + print("A simulation is already running.") + return + self.stop_event.clear() + + self.simulation_thread = Thread(target=self.run_simulation) + self.simulation_thread.start() + + def run_simulation(self): + try: + if not self.stop_event.is_set(): + + + self.simulation_result = RunSimulation(self.simulation_type, gui=True) + self.display_simulation_results() + self.queue.put("Done") + except KeyboardInterrupt: + print("Simulation stopped.") + finally: + self.reset_simulation() + + + + def stop_simulation(self): + self.stop_event.set() + print("Stopping simulation...") + if self.simulation_thread: + self.simulation_thread.join() # Wait for the simulation thread to finish + + def reset_simulation(self): + print("Resetting simulation...") + self.stop_event.set() + print('Simulation reset.') + + # Here, check for messages in the queue and update the GUI as needed + + + def plot(self): + self.simulation_type = 'Plot' + self.start_simulation() + messagebox.showinfo("Notification", "Plots will be saved to current directory.") + + + + def create_image_with_text(self, text): + width, height = 128, 128 + influence_image = Image.new('RGB', (width, height), 'black') + draw = ImageDraw.Draw(influence_image) + color = '#E0EEEE' + font = ImageFont.load_default() + text_width, text_height = draw.textsize(text, font) + text_x = (width - text_width) // 2 + text_y = (height - text_height) // 2 + draw.text((text_x, text_y), text, fill=color, font=font) + resized_image = influence_image.resize((700,700), Image.ANTIALIAS) + return ImageTk.PhotoImage(image=resized_image) + + def create_influence_display_image(self): + influence_image_tk = self.create_image_with_text("InFluence") + self.image_label = Label(self.frame, image=influence_image_tk, bg='#E0EEEE', padx=40, pady=40) + self.image_label.grid(row=0, column=6, rowspan=15) + self.image_label.image = influence_image_tk + + def create_simulating_display_image(self): + simulating_image_tk = self.create_image_with_text("Simulating...") + self.image_label.config(image=simulating_image_tk) + self.image_label.image = simulating_image_tk + self.frame.update_idletasks() + + def numpy_to_image(self): + # Normalize the array to scale between 0-255 + normalized_array = ((self.simulation_result - self.simulation_result.min()) * (1/(self.simulation_result.max() - self.simulation_result.min()) * 255)).astype('uint8') + image = Image.fromarray(normalized_array, 'L') # 'L' indicates grayscale + resized_image = image.resize((700, 700), Image.ANTIALIAS) + return ImageTk.PhotoImage(image=resized_image) + + + def display_simulation_results(self): + simulation_results_tk = self.numpy_to_image() + self.image_label.config(image=simulation_results_tk) + self.image_label.image = simulation_results_tk + self.frame.update_idletasks() + + def show_user_tutorial(self): + new_window = Toplevel(self.root) + new_window.title("User Tutorial") + + text_widget = Text(new_window, wrap='word') + text_widget.pack(expand=1, fill='both') + + # Add a Scrollbar + scrollbar = Scrollbar(new_window, command=text_widget.yview) + scrollbar.pack(side='right', fill='y') + text_widget['yscrollcommand'] = scrollbar.set + + # Read text from file and insert into the Text widget + with open('gui_user_guide.txt', 'r') as f: + content = f.read() + text_widget.insert('1.0', content) + + # Add Close button + close_button = Button(new_window, text='Close', command=new_window.destroy) + close_button.pack() + + + + def choose_input_file(self): + file_path = filedialog.askopenfilename() + self.file_path_entry_in.delete(0, tk.END) # Remove current text in entry + self.file_path_entry_in.insert(0, file_path) # Insert the file path + + + def choose_ouput_file(self): + file_path = filedialog.askopenfilename() + self.file_path_entry_out.delete(0, tk.END) # Remove current text in entry + self.file_path_entry_out.insert(0, file_path) # Insert the file path + + + def set_file_paths(self): + input_path = self.file_path_entry_in.get().strip() + output_path = self.file_path_entry_out.get().strip() + + if not input_path: + input_path = os.getcwd() # Sets to current directory if entry is empty + if not output_path: + output_path = os.getcwd() # Sets to current directory if entry is empty + + self.config['Filepaths']['img_out'] = str(output_path) + self.config['Filepaths']['img_in'] = str(input_path) + + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + print(f"Set input path to: {input_path}") + print(f"Set output path to: {output_path}") + + + + def update_electron_dose_scale(self, *args): + self.electron_dose_entry.delete(0, tk.END) + value = self.electron_dose_scale.get() + self.electron_dose_entry.insert(0, str(value)) + self.electron_dose = value + self.config['Electrons']['dose'] = str(self.electron_dose) + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + + def update_electron_dose_entry(self, *args): + value = int(self.electron_dose_entry.get()) + self.electron_dose_scale.set(value) + self.electron_dose = value + self.config['Electrons']['dose'] = str(self.electron_dose) + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + + + def update_energy_scale(self, *args): + self.electron_energy_entry.delete(0, tk.END) + value = self.electron_energy_scale.get() + self.electron_energy_entry.insert(0, str(value)) + self.e_i = value # Assuming you want to update self.e_i + self.config['Energies']['e_i'] = str(self.e_i) + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + + def update_energy_entry(self, *args): + value = int(self.electron_energy_entry.get()) + self.electron_energy_scale.set(value) + self.e_i = value # Assuming you want to update self.e_i + self.config['Energies']['e_i'] = str(self.e_i) + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + + + def update_tecount_scale(self, *args): + self.tecount_entry.delete(0, tk.END) + value = self.tecount_scale.get() + self.tecount_entry.insert(0, str(value)) + self.tecount = value # Assuming you want to update self.e_i + self.config['Energies']['t_counting'] = str(self.tecount) + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + + def update_tecount_entry(self, *args): + value = int(self.tecount_entry.get()) + self.tecount_scale.set(value) + self.tecount = value # Assuming you want to update self.e_i + self.config['Energies']['t_counting'] = str(self.tecount) + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + + + def update_simulation_type(self, event): + self.simulation_type = event.widget.get() + print(f"Updated simulation type to {self.simulation_type}") + + def update_proton_number(self, *args): + # Get the value from the proton number entry box + proton_number_value = self.proton_num_entry.get() + # Check if the value is valid (you can add more validation as needed) + if proton_number_value.isdigit(): + # Update the proton number variable + self.proton_number = int(proton_number_value) + # Update the config + self.config['Material properties']['protonnum'] = str(self.proton_number) + # Save the updated config to the file + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + else: + # Handle invalid input (e.g., show an error message) + print("Invalid proton number input") + + + + def update_detector_settings(self, detector_threshold_entry, proton_num_entry, atomic_mass_entry, material_density_entry, + pixel_dimension_x_entry, pixel_dimension_y_entry, pixel_dimension_z_entry): + # Read values from GUI widgets and convert them to the appropriate types + detector_threshold = detector_threshold_entry.get() + atomic_mass = atomic_mass_entry.get() + proton_num = proton_num_entry.get() + material_density = material_density_entry.get() + pixel_dimension_x = pixel_dimension_x_entry.get() + pixel_dimension_y = pixel_dimension_y_entry.get() + pixel_dimension_z = pixel_dimension_z_entry.get() + + # Check if any of the required values are empty + if any(value == '' for value in [detector_threshold, atomic_mass, proton_num, material_density, + pixel_dimension_x, pixel_dimension_y, pixel_dimension_z]): + # Show an error message if any of the values are empty + messagebox.showerror("Error", "All values must be entered.") + return + + # Update the config object with the new values + self.config['Energies']['e_i'] = str(detector_threshold) + self.config['Material properties']['atomicmass'] = str(atomic_mass) + self.config['Material properties']['protonnum'] = str(proton_num) + self.config['Material properties']['density'] = str(material_density) + self.config['Material properties']['pixel_dimensions'] = f"{pixel_dimension_x}, {pixel_dimension_y}, {pixel_dimension_z}" + + # Save the updated config to the file + with open(self.config_file, 'w') as configfile: + self.config.write(configfile) + + # Optionally, print a message to confirm the update + print("Detector settings updated and saved.") + + + + def check_system_specs(self): + specs_window = tk.Toplevel(self.root) + specs_window.title("System Specifications") + + os_info = platform.uname() + cpu_count = psutil.cpu_count(logical=False) + logical_cpu_count = psutil.cpu_count(logical=True) + + GPUs = GPUtil.getGPUs() + num_of_gpus = len(GPUs) + + specs_text = tk.Text(specs_window, height=20, width=80) + specs_text.pack() + + specs_text.insert(tk.END, f"System: {os_info.system}\n") + specs_text.insert(tk.END, f"Node Name: {os_info.node}\n") + specs_text.insert(tk.END, f"Release: {os_info.release}\n") + specs_text.insert(tk.END, f"Version: {os_info.version}\n") + specs_text.insert(tk.END, f"Machine: {os_info.machine}\n") + specs_text.insert(tk.END, f"Processor: {os_info.processor}\n") + specs_text.insert(tk.END, f"Physical Cores: {cpu_count}\n") + specs_text.insert(tk.END, f"Logical Cores: {logical_cpu_count}\n") + + + + def user_guide_window(): + pass + + + def detector_settings_widnow(self): + + detector_window = tk.Toplevel(self.root, bg='#E0EEEE', padx=20, pady=20) + detector_window.title('InFluence: Detector Settings') + + # Load existing values from the config + detector_threshold_default = self.config.get('Energies', 'e_i', fallback=0.0) + material_density_default = self.config.get('Material properties', 'density', fallback=0.0) + pixel_dimensions_default = self.config.get('Material properties', 'pixel_dimensions', fallback="0.0, 0.0, 0.0") + proton_num_default = self.config.get('Material properties', 'protonnum', fallback=0) + atomic_mass_default = self.config.get('Material properties', 'atomicmass', fallback=0.0) + + # Detector Threshold + tk.Label(detector_window, text="Detector Threshold", bg='#E0EEEE', padx=4, pady=4).grid(row=0, column=0) + detector_threshold_entry = tk.Entry(detector_window) + detector_threshold_entry.insert(0, detector_threshold_default) # Set the default value + detector_threshold_entry.grid(row=0, column=1) + tk.Label(detector_window, text="(keV)", bg='#E0EEEE').grid(row=0, column=2) + + # Material Density + tk.Label(detector_window, text="Material Density", bg='#E0EEEE', padx=4, pady=4).grid(row=3, column=0) + material_density_entry = tk.Entry(detector_window) + material_density_entry.insert(0, material_density_default) # Set the default value + material_density_entry.grid(row=3, column=1) + tk.Label(detector_window, text="(m^-3)", bg='#E0EEEE').grid(row=3, column=2) + + # Pixel Dimensions + tk.Label(detector_window, text="Pixel Dimensions:", bg='#E0EEEE', padx=6, pady=6).grid(row=4, column=0) + tk.Label(detector_window, text="x:", bg='#E0EEEE').grid(row=5, column=0) + pixel_dimension_x_entry = tk.Entry(detector_window, width=10) + pixel_dimension_x_entry.insert(0, pixel_dimensions_default.split(", ")[0]) # Set the default value + pixel_dimension_x_entry.grid(row=5, column=1) + + tk.Label(detector_window, text="y:", bg='#E0EEEE', padx=6, pady=6).grid(row=6, column=0) + pixel_dimension_y_entry = tk.Entry(detector_window, width=10) + pixel_dimension_y_entry.insert(0, pixel_dimensions_default.split(", ")[1]) # Set the default value + pixel_dimension_y_entry.grid(row=6, column=1) + + tk.Label(detector_window, text="z:", bg='#E0EEEE', padx=6, pady=6).grid(row=7, column=0) + pixel_dimension_z_entry = tk.Entry(detector_window, width=10) + pixel_dimension_z_entry.insert(0, pixel_dimensions_default.split(", ")[2]) # Set the default value + pixel_dimension_z_entry.grid(row=7, column=1) + + # Proton Number Entry + tk.Label(detector_window, text="Proton Number:", bg='#E0EEEE', padx=4, pady=4).grid(row=1, column=0) + proton_num_entry = tk.Entry(detector_window) + proton_num_entry.insert(0, proton_num_default) # Set the default value + proton_num_entry.grid(row=1, column=1) + + # Atomic Mass Entry + tk.Label(detector_window, text="Atomic Mass:", bg='#E0EEEE', padx=4, pady=4).grid(row=2, column=0) + atomic_mass_entry = tk.Entry(detector_window) + atomic_mass_entry.insert(0, atomic_mass_default) # Set the default value + atomic_mass_entry.grid(row=2, column=1) + + # Elements, their proton numbers, and atomic masses + element_data_dict = { + 'Silicon': {'Proton Number': 14, 'Atomic Mass': 28.085}, + 'Germanium': {'Proton Number': 32, 'Atomic Mass': 72.63}, + 'Beryllium': {'Proton Number': 4, 'Atomic Mass': 9.0122}, + 'Gold': {'Proton Number': 79, 'Atomic Mass': 196.966569}, + 'Platinum': {'Proton Number': 78, 'Atomic Mass': 195.084}, + 'Aluminium': {'Proton Number': 13, 'Atomic Mass': 26.9815386} + } + + + + # Create a Tkinter variable + chosen_element = tk.StringVar(detector_window) + chosen_element.set('Select Element') # default value + + # Define the update_element_data function + def update_element_data(*args): + selected_element = chosen_element.get() + if selected_element in element_data_dict: + proton_num_entry.delete(0, tk.END) + proton_num_entry.insert(0, element_data_dict[selected_element]['Proton Number']) + + atomic_mass_entry.delete(0, tk.END) + atomic_mass_entry.insert(0, element_data_dict[selected_element]['Atomic Mass']) + + chosen_element.trace("w", update_element_data) + + # Create the dropdown menu + tk.Label(detector_window, text="Choose an element:", bg='#E0EEEE', padx=4, pady=4).grid(row=0, column=2) + element_menu = ttk.Combobox(detector_window, textvariable=chosen_element, values=list(element_data_dict.keys()), width=10) + element_menu.grid(row=1, column=3) + + # Update Proton Number and Atomic Mass based on chosen element + + # Save detector settings + save_button = tk.Button(detector_window, text="Save Settings", bg='#C1CDCD', padx=6, pady=6, command=lambda: self.update_detector_settings( + detector_threshold_entry, proton_num_entry, atomic_mass_entry, material_density_entry, + pixel_dimension_x_entry, pixel_dimension_y_entry, pixel_dimension_z_entry)) + save_button.grid(row=8, column=4, columnspan=5) + + + def menu_bar(self): + # Create a frame for the menu bar with a different background color + menu_frame = tk.Frame(self.root, bg='#0052cc') + menu_frame.pack(side='top', fill='x') + + # Create a menu bar + menu_bar = tk.Menu(menu_frame, bg='#0052cc', fg='#ffffff') + self.root.config(menu=menu_bar) + + # Create the Options menu + options_menu = tk.Menu(menu_bar, tearoff=0) + options_menu.add_command(label='View System Spec', command=self.check_system_specs) + options_menu.add_command(label='Plot Trajectories', command=self.plot) + + # Add Options to Menu Bar + menu_bar.add_cascade(label='Options', menu=options_menu, background='#0052cc', foreground='#ffffff') + + # Detector Settings + menu_bar.add_command(label='Detector Settings', command=self.detector_settings_widnow, background='#0052cc', foreground='#ffffff') + + # Create the Help menu + help_menu = tk.Menu(menu_bar, tearoff=0) + help_menu.add_command(label='User Tutorial', command=self.show_user_tutorial) + help_menu.add_command(label='View Software Documentation') + + # Add Help to Menu Bar + menu_bar.add_cascade(label='Help', menu=help_menu, background='#0052cc', foreground='#ffffff') + + + def main_window(self): + + # Set background color + self.root.configure(bg='#E0EEEE') + + # Create a frame + self.frame = tk.Frame(self.root, bg='#E0EEEE', padx=20, pady=20) + self.frame.pack(expand=True, fill='both') + + info_label = tk.Label(self.frame, text="Update parameters and press Enter on your keyboard to apply changes.", bg='#E0EEEE', padx=4, pady=4) + info_label.grid(row=0, column=0, columnspan=3, sticky="W") + + # Simulation Type + simulation_type_label = tk.Label(self.frame, text="Simulation Type", bg='#E0EEEE', padx=4, pady=4) + simulation_type_label.grid(row=6, column=0) + + simulation_type_options = ["PySparse", "PyDense", "CPP"] + simulation_type_combobox = ttk.Combobox(self.frame, values=simulation_type_options) + simulation_type_combobox.grid(row=6, column=1) # Removed columnspan + simulation_type_combobox.bind("<>", self.update_simulation_type) + + # Counting Threshold Label + tk.Label(self.frame, text="Counting Threshold", bg='#E0EEEE', padx=20, pady=3).grid(row=1, column=0) + + # Counting Threshold Entry + self.tecount_entry = tk.Entry(self.frame) + self.tecount_entry.grid(row=1, column=1) + self.tecount_entry.bind('', self.update_tecount_entry) + + # Counting Threshold Scale + self.tecount_scale = tk.Scale(self.frame, from_=5, to=80, orient='horizontal', length=300, bg='#E0EEEE', command=self.update_tecount_scale) + self.tecount_scale.grid(row=1, column=2, columnspan=2) + + + + # Electron Energy Label + tk.Label(self.frame, text="Electron Energy", bg='#E0EEEE', padx=20, pady=3).grid(row=2, column=0) + + # Electron Energy Entry + self.electron_energy_entry = tk.Entry(self.frame) + self.electron_energy_entry.grid(row=2, column=1) + self.electron_energy_entry.bind('', self.update_energy_entry) + + # Electron Energy Scale + self.electron_energy_scale = tk.Scale(self.frame, from_=5, to=500, orient='horizontal', length=300, bg='#E0EEEE', command=self.update_energy_scale) + self.electron_energy_scale.grid(row=2, column=2, columnspan=2) + + # Electron Dose Label + tk.Label(self.frame, text="Electron Dose", bg='#E0EEEE', padx=2, pady=3).grid(row=3, column=0) + + # Electron Dose Entry + self.electron_dose_entry = tk.Entry(self.frame) + self.electron_dose_entry.grid(row=3, column=1) + self.electron_dose_entry.bind('', self.update_electron_dose_entry) + + # Electron Dose Scale + self.electron_dose_scale = tk.Scale(self.frame, from_=0, to=3000000, orient='horizontal', length=300, bg='#E0EEEE', command=self.update_electron_dose_scale) + self.electron_dose_scale.grid(row=3, column=2, columnspan=2) + tk.Label(self.frame, bg='#E0EEEE', width=10).grid(row=3, column=4) + + # File path entry + tk.Label(self.frame, text="Input Image File Path:", bg='#E0EEEE').grid(row=8, column=0) + self.file_path_entry_in = tk.Entry(self.frame, width=50) + self.file_path_entry_in.grid(row=8, column=1, columnspan=2) + + # File chooser button + choose_file_button = tk.Button(self.frame, text="Choose File", command=self.choose_input_file, bg='#C1CDCD', padx=6, pady=6) + choose_file_button.grid(row=8, column=3) + + # File path entry + tk.Label(self.frame, text="Output Image File Path:", bg='#E0EEEE', padx=6, pady=6).grid(row=9, column=0) + self.file_path_entry_out = tk.Entry(self.frame, width=50) + self.file_path_entry_out.grid(row=9, column=1, columnspan=2) + + # File chooser button + choose_file_button = tk.Button(self.frame, text="Choose File", command=self.choose_ouput_file, bg='#C1CDCD', padx=6, pady=6) + choose_file_button.grid(row=9, column=3) + tk.Label(self.frame, bg='#E0EEEE', width=10).grid(row=17, column=4) + + # set paths + set_paths_button = tk.Button(self.frame, text="Set File Paths", command=self.set_file_paths, bg='#C1CDCD', padx=6, pady=6) + set_paths_button.grid(row=10, column=1) + + # Start Simulation Button + start_button = tk.Button(self.frame, text="Start Simulation", command=self.start_simulation, bg='#32CD32', padx=6, pady=6) + start_button.grid(row=15, column=2) # Changed column + + + def build_gui(self): + + self.main_window() + self.menu_bar() + self.create_influence_display_image() + self.root.mainloop() + + + + + + + diff --git a/Scripts/InFluence/interface_code/gui_user_guide.txt b/Scripts/InFluence/interface_code/gui_user_guide.txt new file mode 100644 index 0000000..b9352d4 --- /dev/null +++ b/Scripts/InFluence/interface_code/gui_user_guide.txt @@ -0,0 +1,30 @@ +*********************************************** User Guide *********************************************** +Open the application and navigate to the main window. +*Main Window + Simulation Type: Choose the type of simulation from "PySparse", "PyDense", or "CPP". + To Update: Select a type from the dropdown and press Enter. + Counting Threshold: Set the counting threshold. + To Update: Either manually input a value and press Enter or use the scale. + Electron Energy: Set the electron energy. + To Update: Either manually input a value and press Enter or use the scale. + +*Menu Bar + Options + View System Spec: Click to display system specifications. + Plot Trajectories: Click to plot the trajectories. + Detector Settings: Navigate here to change detector-related settings. + Help + User Tutorial: Click to get a tutorial. + View Software Documentation: Click to view software documentation. + +*Detector Settings Window + Detector Threshold: Set the threshold in keV. + Material Density: Set the material density in g/cm^3 + Pixel Dimensions: Set dimensions for x, y, and z. + Proton Number: Set the proton number. + Atomic Mass: Set the atomic mass. + Choose an Element: Select a predefined element to autofill proton number and atomic mass. + To Update: Input your settings and click "Save Settings" - zFor any empty or invalid entries, an error message will display. Always remember to click "Save Settings" after making changes. + +*System Specifications Window + This window displays information about your system, such as CPU cores and GPU. diff --git a/Scripts/InFluence/main.py b/Scripts/InFluence/main.py new file mode 100644 index 0000000..d20d6e8 --- /dev/null +++ b/Scripts/InFluence/main.py @@ -0,0 +1,83 @@ + +import itertools +import sys +import time + +from matplotlib import pyplot as plt +import numpy as np + +from .filepaths import Filepaths as filepaths +from image_preprocessing.image_object_constructor import image_pixels + +from simulation.simulation_interface import InFluenceSimulation +from parameters import SimulationParameters + + +def RunSimulation(simulation_type, gui=False): + + params = SimulationParameters() + params.refresh_config() + image_object = image_pixels(filepaths.InputImageLocation, params) + influence_simulator = InFluenceSimulation(image_object, params) + + if simulation_type =='GPU': + SimulationResults = influence_simulator.Run_GPU_KERNEL_MCScatteringSimulation() + elif simulation_type == "CPP": + SimulationResults = influence_simulator.RunCPPMCScatteringSimulation() + elif simulation_type == "PySparse": + SimulationResults = influence_simulator.RunMCSimulation_Py("PySparse") + elif simulation_type == "PyDense": + SimulationResults = influence_simulator.RunMCSimulation_Py("PyDense") + elif simulation_type == "Plot": + SimulationResults = influence_simulator.RunMCSimulation_Py("Plot") + + + if gui==True: + print('Simulation complete.') + return SimulationResults + + else: + + + plt.imshow(np.uint32(SimulationResults)) + plt.axis('off') + plt.show() + + + output_file = filepaths.SaveLocation + plt.savefig(output_file) + + # Save as an image + plt.savefig(output_file + '.png') + + # Save as a .npy file + np.save(output_file + '.npy', SimulationResults) + + return + + +import time # Import the time module + +def main(): + # Record the start time + start_time = time.time() + + # Run the simulation + RunSimulation('PySparse') + + # Record the end time + end_time = time.time() + + # Calculate the elapsed time + elapsed_time = end_time - start_time + + + print(f"Simulation completed in {elapsed_time:.2f} seconds.") # Print the elapsed time + + +if __name__ == "__main__": + try: + main() + except ValueError as e: + print(e) # Print the error message if an exception is raised + sys.exit(1) # Exit the program with an error code (1 indicates an error) diff --git a/Scripts/InFluence/parameters.py b/Scripts/InFluence/parameters.py new file mode 100644 index 0000000..a567f20 --- /dev/null +++ b/Scripts/InFluence/parameters.py @@ -0,0 +1,86 @@ +import os +from pathlib import Path +import configparser + + +class SimulationParameters: + + # Define class variables with default values + E_i = None + minimum_energy = None + t_counting = None + N = None + ProtonNum = None + AtomicMass = None + Density = None + dE_threshold = None + pixel_dimensions = None + dose = None + + def __init__(self): + self.config_path = self.get_config_path() + self.config = self.load_config() + self.refresh_config() + + + def get_config_path(self): + # Get the directory where this Python script resides + current_dir = Path(os.path.dirname(os.path.abspath(__file__))) + + # Define the location of the config.ini relative to the script's location + config_path = current_dir / "config.ini" + return config_path + + def load_config(self): + config = configparser.ConfigParser() + config.read(self.config_path) + return config + + def refresh_config(self): + # Reload the configuration from the file + self.config = self.load_config() + + # Update class variables using the get_ functions + self.E_i = self.get_E_i() + self.minimum_energy = self.get_minimum_energy() + self.t_counting = self.get_t_counting() + self.N = self.get_N() + self.ProtonNum = self.get_ProtonNum() + self.AtomicMass = self.get_AtomicMass() + self.Density = self.get_Density() + self.dE_threshold = self.get_dE_threshold() + self.pixel_dimensions = self.get_pixel_dimensions() + self.dose = self.get_electron_dose() + + def get_E_i(self): + return self.config.getint('Energies', 'e_i') + + def get_minimum_energy(self): + return self.config.getfloat('Energies', 'minimum_energy') + + def get_t_counting(self): + return self.config.getint('Energies', 't_counting') + + def get_N(self): + return self.config.getfloat('Material properties', 'n') + + def get_ProtonNum(self): + return self.config.getint('Material properties', 'ProtonNum') + + def get_AtomicMass(self): + return self.config.getfloat('Material properties', 'AtomicMass') + + def get_Density(self): + return self.config.getfloat('Material properties', 'Density') + + def get_dE_threshold(self): + return self.config.getfloat('Material properties', 'dE_threshold') + + def get_pixel_dimensions(self): + pixel_dimensions_str = self.config.get('Material properties', 'pixel_dimensions') + pixel_dimensions_list = [float(val) for val in pixel_dimensions_str.split(',')] + return pixel_dimensions_list + + + def get_electron_dose(self): + return self.config.getint('Electrons', 'dose') diff --git a/Scripts/InFluence/setup.py b/Scripts/InFluence/setup.py new file mode 100644 index 0000000..5fe13e1 --- /dev/null +++ b/Scripts/InFluence/setup.py @@ -0,0 +1,19 @@ +from setuptools import setup, find_packages + +setup( + name='InFluence', + version='1.0', + packages=find_packages(), # Automatically discover and include all packages + install_requires=[ + 'argparse', + 'configparser', + 'inquirer', + 'matplotlib', + 'numpy', + ], + entry_points={ + 'console_scripts': [ + 'InFluence=interface_code.InFluence_CLI:main', + ], + }, +) diff --git a/Scripts/InFluence/simulation/__init__.py b/Scripts/InFluence/simulation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Scripts/InFluence/simulation/__pycache__/__init__.cpython-310.pyc b/Scripts/InFluence/simulation/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..b2c5921 Binary files /dev/null and b/Scripts/InFluence/simulation/__pycache__/__init__.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/__pycache__/__init__.cpython-38.pyc b/Scripts/InFluence/simulation/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..23a1ab2 Binary files /dev/null and b/Scripts/InFluence/simulation/__pycache__/__init__.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/__pycache__/simulation_interface.cpython-310.pyc b/Scripts/InFluence/simulation/__pycache__/simulation_interface.cpython-310.pyc new file mode 100644 index 0000000..2d12e4f Binary files /dev/null and b/Scripts/InFluence/simulation/__pycache__/simulation_interface.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/__pycache__/simulation_interface.cpython-38.pyc b/Scripts/InFluence/simulation/__pycache__/simulation_interface.cpython-38.pyc new file mode 100644 index 0000000..4851cdd Binary files /dev/null and b/Scripts/InFluence/simulation/__pycache__/simulation_interface.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/CMakeLists.txt b/Scripts/InFluence/simulation/cpp_simulation/CMakeLists.txt new file mode 100644 index 0000000..38174ce --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.5) +project(InFluence) + +# Set the C++ standard to C++11 or higher +set(CMAKE_CXX_STANDARD 11) + +# Set the name of the Python module +set(PYTHON_MODULE_NAME "InFluence") + +# Add your source files here +set(SRCS + + helper_functions.cpp + MCloop.cpp + wrapper.cpp +) + +# Find the Python library and include directories +find_package(Python3 REQUIRED COMPONENTS Development) +# Add Pybind11 module + + +# Add the include directories for Python headers +include_directories(${Python3_INCLUDE_DIRS}) +include_directories(/home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include) + +# Set the path to the Eigen3 directory +set(EIGEN3_INCLUDE_DIR "/usr/include/eigen3") + +# Include the directory in your project +include_directories(${EIGEN3_INCLUDE_DIR}) + +# Create the target for your shared library (Python module) +add_library(${PYTHON_MODULE_NAME} MODULE ${SRCS}) + +# Link against Python library +target_link_libraries(${PYTHON_MODULE_NAME} PRIVATE Python3::Python) + +# Set output name of the shared library (Python module) +set_target_properties(${PYTHON_MODULE_NAME} PROPERTIES OUTPUT_NAME ${PYTHON_MODULE_NAME}) + +# If you need to add additional compile options, you can add them here +# For example, to add specific compiler flags: +# target_compile_options(${PYTHON_MODULE_NAME} PRIVATE -Wall -Wextra -fPIC) + +# If you need to link against additional libraries, you can add them here +# For example, to link against some external library: +# target_link_libraries(${PYTHON_MODULE_NAME} PRIVATE YourExternalLibrary) diff --git a/Scripts/InFluence/simulation/cpp_simulation/InFluence.so b/Scripts/InFluence/simulation/cpp_simulation/InFluence.so new file mode 100755 index 0000000..73922ac Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/InFluence.so differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp b/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp new file mode 100644 index 0000000..612e4be --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp @@ -0,0 +1,278 @@ +#include +#include +#include +#include +#include +#include + +#include "MCloop.h" +#include "helper_functions.h" +#include +#include + +std::vector> RunMCScatteringSimulation(const std::vector>& pixels, double E_i, double ProbeDiameter, double MinimumEnergy, + double dE_threshold, int perfect_image_0, int perfect_image_1, double Density, double t_counting, double AlphaMultiplier, + double CrossSectionNumorator, + double CrossSectionLogArgMultiplier, + double CrossSectionDenominatorA, + double CrossSectionDenominatorB, + double PathLengthMultiplier, + double EnergyLossMultiplierA, + double EnergyLossMultiplierB) { + + // Initialize 2D arrays as vectors of vectors + + Eigen::SparseMatrix eh_charge_counter(perfect_image_0, perfect_image_1); + std::vector> new_image_MCS(perfect_image_0, std::vector(perfect_image_1, 0.0)); + + int number_stopped = 0; + int number_backscattered = 0; + int number_transmitted = 0; + int number_eh_pairs = 0; + + int pixel_counter = 0; + int electron_per_pixel = 0; + + + + #pragma omp parallel + for (const std::vector& pixel : pixels) { + int count = static_cast(pixel[0]); + double i_coordinate = pixel[1]; + double j_coordinate = pixel[2]; + double x_dimension = pixel[3]; + double y_dimension = pixel[4]; + double z_dimension = pixel[5]; + + + + if (count == 0) { + + int do_nothing = 0; + } + + else{ + + + + for (int i = 0; i < count; ++i) { + + + for (int k = 0; k < eh_charge_counter.outerSize(); ++k) { + for (Eigen::SparseMatrix::InnerIterator it(eh_charge_counter, k); it; ++it) { + it.valueRef() = 0.0; // Set the non-zero element to zero + } + } + + //std::cout<> eh_charge_counter(perfect_image_0, std::vector(perfect_image_1, 0.0)); + double alpha = evaluate_alpha(E_i, AlphaMultiplier); + double CrossSection = evaluate_cross_section_opt(E_i, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB); + double PathLength = evaluate_path_length(CrossSection, PathLengthMultiplier); + double RND_step = get_random_uniform(0.000001, 0.999999); + double step = evaluate_step(PathLength, RND_step); + std::vector ip = initialize_positions(step, ProbeDiameter); + double cosineX = ip[0]; + double cosineY = ip[1]; + double cosineZ = ip[2]; + double z0 = ip[3]; + double y0 = ip[4]; + double x0 = ip[5]; + double E = E_i; + bool condition = true; + + pixel_counter +=1; + + + + + while (condition == true) { + + + // Generate random numbers + double RND_phi = get_random_uniform(0, 1); + double RND_step = get_random_uniform(0.000001, 0.999999); + double RND_pho = get_random_uniform(0, 1); + + // Calculate alpha, cross section, path length, and step + double alpha = evaluate_alpha(E_i, AlphaMultiplier); + double CrossSection = evaluate_cross_section_opt(E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB); + double PathLength = evaluate_path_length(CrossSection, PathLengthMultiplier); + double step = evaluate_step(PathLength, RND_step); + + // Calculate energy loss and update energy + double dE = step * Density * evaluate_energy_loss_rate(E, EnergyLossMultiplierA, EnergyLossMultiplierB); + E = E + dE; + + // Calculate scattering angles and direction cosines + double phi = evaluate_phi(RND_phi, alpha); + double psi = evaluate_pho(RND_pho, M_PI); + + double ca = evaluate_direction_cosine_a(phi, psi, cosineY, cosineZ); + double cb = evaluate_direction_cosine_b(phi, psi, cosineX, cosineY, cosineZ); + double cc = evaluate_direction_cosine_c(phi, psi, cosineZ); + + // Update positions + x0 = x0 + step * ca; + y0 = y0 + step * cb; + z0 = z0 + step * cc; + + // Update direction cosines + cosineX = ca; + cosineY = cb; + cosineZ = cc; + + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 1 : Electron stops in material. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (E <= MinimumEnergy) { + number_stopped++; + condition = false; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 2 : Electron backscatters. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (z0 < std::pow(10, -2)) { + number_backscattered++; + condition = false; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 3 : Electron penetrates the material. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (z0 > z_dimension) { + number_transmitted++; + condition = false; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 4 : Electron deposits sufficient energy. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (-dE >= dE_threshold) { + int new_eh_pairs = std::floor(-dE / dE_threshold); + number_eh_pairs += new_eh_pairs; + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 5 : Electron deposits sufficient energy and stays within pixel boundary. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if ((x0 <= x_dimension) && (x0 >= -x_dimension) && (y0 <= y_dimension) && (y0 >= -y_dimension)) { + #pragma omp critical + eh_charge_counter.coeffRef(i_coordinate, j_coordinate) += new_eh_pairs; + + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 6 : Electron deposits sufficient energy and moves positively in x and y. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if ((x0 > x_dimension) && (y0 > y_dimension)) { + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + if ((i_coordinate + translation_x <= perfect_image_0 - 1) && (j_coordinate + translation_y <= perfect_image_1 - 1)) { + #pragma omp critical + eh_charge_counter.coeffRef(i_coordinate + translation_x, j_coordinate + translation_y) += new_eh_pairs; + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 7 : Electron deposits sufficient energy and moves negatively in x and y. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if ((x0 < -x_dimension) && (y0 < -y_dimension)) { + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + if ((i_coordinate - translation_x >= 0) && (j_coordinate - translation_y >= 0)) { + + #pragma omp critical + eh_charge_counter.coeffRef(i_coordinate - translation_x, j_coordinate - translation_y) += new_eh_pairs; + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 8 : Electron deposits sufficient energy and moves positively in x only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (x0 > x_dimension) { + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + if (i_coordinate + translation_x <= perfect_image_0 - 1) { + + #pragma omp critical + eh_charge_counter.coeffRef(i_coordinate + translation_x, j_coordinate) += new_eh_pairs; + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 9 : Electron deposits sufficient energy and moves negatively in x only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (x0 < -x_dimension) { + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + if (i_coordinate - translation_x >= 0) { + + #pragma omp critical + eh_charge_counter.coeffRef(i_coordinate - translation_x, j_coordinate) += new_eh_pairs; + + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 10 : Electron deposits sufficient energy and moves positively in y only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (y0 > y_dimension) { + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + if (j_coordinate + translation_y <= perfect_image_0 - 1) { + + #pragma omp critical + eh_charge_counter.coeffRef(i_coordinate, j_coordinate + translation_y) += new_eh_pairs; + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 11 : Electron deposits sufficient energy and moves negatively in y only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (y0 < -y_dimension) { + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + if (j_coordinate - translation_y >= 0) { + + #pragma omp critical + eh_charge_counter.coeffRef(i_coordinate, j_coordinate - translation_y) += new_eh_pairs; + + } + } + + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------- + + + } // Sufficient energy loop + } // While loop + // Add updated eh_charge_counter to new_image_MCS + + for (int k = 0; k < eh_charge_counter.outerSize(); ++k) { + for (Eigen::SparseMatrix::InnerIterator it(eh_charge_counter, k); it; ++it) { + new_image_MCS[it.row()][it.col()] += it.value(); + it.valueRef() = 0.0; // Reset the non-zero elements for the next iteration + } + } + + + + } //electron level loop + } + + } //pixels + +return new_image_MCS; +} diff --git a/Scripts/InFluence/simulation/cpp_simulation/MCloop.h b/Scripts/InFluence/simulation/cpp_simulation/MCloop.h new file mode 100644 index 0000000..edd5528 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/MCloop.h @@ -0,0 +1,18 @@ + +#ifndef MCLOOP_H +#define MCLOOP_H + +#include + +std::vector> RunMCScatteringSimulation(const std::vector>& pixels, double E_i, double ProbeDiameter, double MinimumEnergy, + double dE_threshold, int perfect_image_0, + int perfect_image_1, double Density, double t_counting, double AlphaMultiplier, + double CrossSectionNumorator, + double CrossSectionLogArgMultiplier, + double CrossSectionDenominatorA, + double CrossSectionDenominatorB, + double PathLengthMultiplier, + double EnergyLossMultiplierA, + double EnergyLossMultiplierB); + +#endif MCLOOP_H \ No newline at end of file diff --git a/Scripts/InFluence/simulation/cpp_simulation/__init__.py b/Scripts/InFluence/simulation/cpp_simulation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Scripts/InFluence/simulation/cpp_simulation/__pycache__/__init__.cpython-310.pyc b/Scripts/InFluence/simulation/cpp_simulation/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..6c94c0f Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/__pycache__/__init__.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/__pycache__/cpp_simulation_interface.cpython-310.pyc b/Scripts/InFluence/simulation/cpp_simulation/__pycache__/cpp_simulation_interface.cpython-310.pyc new file mode 100644 index 0000000..f606240 Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/__pycache__/cpp_simulation_interface.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeCache.txt b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeCache.txt new file mode 100644 index 0000000..1384191 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeCache.txt @@ -0,0 +1,400 @@ +# This is the CMakeCache file. +# For build in directory: /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build +# It was generated by CMake: /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11 + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//Value Computed by CMake. +CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/pkgRedirects + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=InFluence + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/usr/bin/readelf + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//Path to a program. +CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +InFluence_BINARY_DIR:STATIC=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build + +//Value Computed by CMake +InFluence_IS_TOP_LEVEL:STATIC=ON + +//Dependencies for the target +InFluence_LIB_DEPENDS:STATIC=general;Python3::Python; + +//Value Computed by CMake +InFluence_SOURCE_DIR:STATIC=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=27 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=2 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_TAPI +CMAKE_TAPI-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//Details about finding Python3 +FIND_PACKAGE_MESSAGE_DETAILS_Python3:INTERNAL=[/usr/include/python3.10][/usr/lib/x86_64-linux-gnu/libpython3.10.so][cfound components: Development Development.Module Development.Embed ][v3.10.12()] +//linker supports push/pop state +_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE +//Path to a program. +_Python3_CONFIG:INTERNAL=/usr/bin/x86_64-linux-gnu-python3.10-config +//Compiler reason failure +_Python3_Compiler_REASON_FAILURE:INTERNAL= +_Python3_DEVELOPMENT_EMBED_SIGNATURE:INTERNAL=625d9e0f7a1af1ddb80bfa11fbea90e0 +_Python3_DEVELOPMENT_MODULE_SIGNATURE:INTERNAL=4bc14a0ea6a21ea267e38aa660e9b54b +//Development reason failure +_Python3_Development_REASON_FAILURE:INTERNAL= +//Path to a file. +_Python3_INCLUDE_DIR:INTERNAL=/usr/include/python3.10 +//Interpreter reason failure +_Python3_Interpreter_REASON_FAILURE:INTERNAL= +//Path to a library. +_Python3_LIBRARY_RELEASE:INTERNAL=/usr/lib/x86_64-linux-gnu/libpython3.10.so +//NumPy reason failure +_Python3_NumPy_REASON_FAILURE:INTERNAL= + diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeCCompiler.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeCCompiler.cmake new file mode 100644 index 0000000..8c50177 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeCCompiler.cmake @@ -0,0 +1,74 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "11.4.0") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "c_std_17") +set(CMAKE_C23_COMPILE_FEATURES "c_std_23") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-11") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_TAPI "CMAKE_TAPI-NOTFOUND") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) +set(CMAKE_C_LINKER_DEPFILE_SUPPORTED TRUE) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeCXXCompiler.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..32b5a24 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeCXXCompiler.cmake @@ -0,0 +1,85 @@ +set(CMAKE_CXX_COMPILER "/usr/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "11.4.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") +set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23") + +set(CMAKE_CXX_PLATFORM_ID "Linux") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-11") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_TAPI "CMAKE_TAPI-NOTFOUND") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm;ccm;cxxm;c++m) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) +set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED TRUE) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "ELF") +set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/11;/usr/include/x86_64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeDetermineCompilerABI_C.bin b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000..a469133 Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeDetermineCompilerABI_C.bin differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeDetermineCompilerABI_CXX.bin b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 0000000..15e6e3f Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeSystem.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeSystem.cmake new file mode 100644 index 0000000..5875fe7 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-6.2.0-32-generic") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "6.2.0-32-generic") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Linux-6.2.0-32-generic") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "6.2.0-32-generic") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdC/CMakeCCompilerId.c b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..66be365 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,866 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TASKING__) +# define COMPILER_ID "Tasking" + # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) + # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) +# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_VERSION "90" +# else +# define C_VERSION +# endif +#elif __STDC_VERSION__ > 201710L +# define C_VERSION "23" +#elif __STDC_VERSION__ >= 201710L +# define C_VERSION "17" +#elif __STDC_VERSION__ >= 201000L +# define C_VERSION "11" +#elif __STDC_VERSION__ >= 199901L +# define C_VERSION "99" +#else +# define C_VERSION "90" +#endif +const char* info_language_standard_default = + "INFO" ":" "standard_default[" C_VERSION "]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdC/a.out b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdC/a.out new file mode 100755 index 0000000..c786756 Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdC/a.out differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdCXX/CMakeCXXCompilerId.cpp b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..52d56e2 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,855 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TASKING__) +# define COMPILER_ID "Tasking" + # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) + # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) +# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_standard_default = "INFO" ":" "standard_default[" +#if CXX_STD > 202002L + "23" +#elif CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdCXX/a.out b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdCXX/a.out new file mode 100755 index 0000000..6f75914 Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdCXX/a.out differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeConfigureLog.yaml b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeConfigureLog.yaml new file mode 100644 index 0000000..29169b9 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeConfigureLog.yaml @@ -0,0 +1,541 @@ + +--- +events: + - + kind: "message-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineSystem.cmake:211 (message)" + - "CMakeLists.txt:2 (project)" + message: | + The system is: Linux - 6.2.0-32-generic - x86_64 + - + kind: "message-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)" + - "CMakeLists.txt:2 (project)" + message: | + Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. + Compiler: /usr/bin/cc + Build flags: + Id flags: + + The output was: + 0 + + + Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + + The C compiler identification is GNU, found in: + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdC/a.out + + - + kind: "message-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)" + - "CMakeLists.txt:2 (project)" + message: | + Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. + Compiler: /usr/bin/c++ + Build flags: + Id flags: + + The output was: + 0 + + + Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + + The CXX compiler identification is GNU, found in: + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/3.27.2/CompilerIdCXX/a.out + + - + kind: "try_compile-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:2 (project)" + checks: + - "Detecting C compiler ABI info" + directories: + source: "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-9MMcTs" + binary: "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-9MMcTs" + cmakeVariables: + CMAKE_C_FLAGS: "" + CMAKE_EXE_LINKER_FLAGS: "" + buildResult: + variable: "CMAKE_C_ABI_COMPILED" + cached: true + stdout: | + Change Dir: '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-9MMcTs' + + Run Build Command(s): /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_fef49/fast + /usr/bin/gmake -f CMakeFiles/cmTC_fef49.dir/build.make CMakeFiles/cmTC_fef49.dir/build + gmake[1]: Entering directory '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-9MMcTs' + Building C object CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o + /usr/bin/cc -v -o CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o -c /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCCompilerABI.c + Using built-in specs. + COLLECT_GCC=/usr/bin/cc + OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa + OFFLOAD_TARGET_DEFAULT=1 + Target: x86_64-linux-gnu + Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 + Thread model: posix + Supported LTO compression algorithms: zlib zstd + gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) + COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_fef49.dir/' + /usr/lib/gcc/x86_64-linux-gnu/11/cc1 -quiet -v -imultiarch x86_64-linux-gnu /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_fef49.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccLegZTp.s + GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" + ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed" + ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include" + #include "..." search starts here: + #include <...> search starts here: + /usr/lib/gcc/x86_64-linux-gnu/11/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include + End of search list. + GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + Compiler executable checksum: 50eaa2331df977b8016186198deb2d18 + COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_fef49.dir/' + as -v --64 -o CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o /tmp/ccLegZTp.s + GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38 + COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/ + LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/ + COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.' + Linking C executable cmTC_fef49 + /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fef49.dir/link.txt --verbose=1 + /usr/bin/cc -v CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o -o cmTC_fef49 + Using built-in specs. + COLLECT_GCC=/usr/bin/cc + COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper + OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa + OFFLOAD_TARGET_DEFAULT=1 + Target: x86_64-linux-gnu + Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 + Thread model: posix + Supported LTO compression algorithms: zlib zstd + gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) + COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/ + LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/ + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_fef49' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_fef49.' + /usr/lib/gcc/x86_64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccn8GQzQ.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_fef49 /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_fef49' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_fef49.' + gmake[1]: Leaving directory '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-9MMcTs' + + exitCode: 0 + - + kind: "message-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake:127 (message)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:2 (project)" + message: | + Parsed C implicit include dir info: rv=done + found start of include info + found start of implicit include info + add: [/usr/lib/gcc/x86_64-linux-gnu/11/include] + add: [/usr/local/include] + add: [/usr/include/x86_64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/11/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/11/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include] + + + - + kind: "message-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake:152 (message)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:2 (project)" + message: | + Parsed C implicit link information: + link line regex: [^( *|.*[/\\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)] + ignore line: [Change Dir: '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-9MMcTs'] + ignore line: [] + ignore line: [Run Build Command(s): /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_fef49/fast] + ignore line: [/usr/bin/gmake -f CMakeFiles/cmTC_fef49.dir/build.make CMakeFiles/cmTC_fef49.dir/build] + ignore line: [gmake[1]: Entering directory '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-9MMcTs'] + ignore line: [Building C object CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/cc -v -o CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o -c /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCCompilerABI.c] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_fef49.dir/'] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/11/cc1 -quiet -v -imultiarch x86_64-linux-gnu /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_fef49.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccLegZTp.s] + ignore line: [GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/11/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/x86_64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: 50eaa2331df977b8016186198deb2d18] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_fef49.dir/'] + ignore line: [ as -v --64 -o CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o /tmp/ccLegZTp.s] + ignore line: [GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.'] + ignore line: [Linking C executable cmTC_fef49] + ignore line: [/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fef49.dir/link.txt --verbose=1] + ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o -o cmTC_fef49 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_fef49' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_fef49.'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccn8GQzQ.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_fef49 /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccn8GQzQ.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_fef49] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../..] + arg [CMakeFiles/cmTC_fef49.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] + collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] ==> [/usr/lib/x86_64-linux-gnu/Scrt1.o] + collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] ==> [/usr/lib/x86_64-linux-gnu/crti.o] + collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] ==> [/usr/lib/x86_64-linux-gnu/crtn.o] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11] ==> [/usr/lib/gcc/x86_64-linux-gnu/11] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../..] ==> [/usr/lib] + implicit libs: [gcc;gcc_s;c;gcc;gcc_s] + implicit objs: [/usr/lib/x86_64-linux-gnu/Scrt1.o;/usr/lib/x86_64-linux-gnu/crti.o;/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o;/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o;/usr/lib/x86_64-linux-gnu/crtn.o] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + + - + kind: "try_compile-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:2 (project)" + checks: + - "Detecting CXX compiler ABI info" + directories: + source: "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-h5Su1e" + binary: "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-h5Su1e" + cmakeVariables: + CMAKE_CXX_FLAGS: "" + CMAKE_EXE_LINKER_FLAGS: "" + buildResult: + variable: "CMAKE_CXX_ABI_COMPILED" + cached: true + stdout: | + Change Dir: '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-h5Su1e' + + Run Build Command(s): /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_05329/fast + /usr/bin/gmake -f CMakeFiles/cmTC_05329.dir/build.make CMakeFiles/cmTC_05329.dir/build + gmake[1]: Entering directory '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-h5Su1e' + Building CXX object CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o + /usr/bin/c++ -v -o CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o -c /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCXXCompilerABI.cpp + Using built-in specs. + COLLECT_GCC=/usr/bin/c++ + OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa + OFFLOAD_TARGET_DEFAULT=1 + Target: x86_64-linux-gnu + Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 + Thread model: posix + Supported LTO compression algorithms: zlib zstd + gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) + COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_05329.dir/' + /usr/lib/gcc/x86_64-linux-gnu/11/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_05329.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccH2vfLn.s + GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/11" + ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" + ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed" + ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include" + #include "..." search starts here: + #include <...> search starts here: + /usr/include/c++/11 + /usr/include/x86_64-linux-gnu/c++/11 + /usr/include/c++/11/backward + /usr/lib/gcc/x86_64-linux-gnu/11/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include + End of search list. + GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + Compiler executable checksum: d591828bb4d392ae8b7b160e5bb0b95f + COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_05329.dir/' + as -v --64 -o CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccH2vfLn.s + GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38 + COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/ + LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/ + COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.' + Linking CXX executable cmTC_05329 + /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_05329.dir/link.txt --verbose=1 + /usr/bin/c++ -v CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_05329 + Using built-in specs. + COLLECT_GCC=/usr/bin/c++ + COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper + OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa + OFFLOAD_TARGET_DEFAULT=1 + Target: x86_64-linux-gnu + Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 + Thread model: posix + Supported LTO compression algorithms: zlib zstd + gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) + COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/ + LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/ + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_05329' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_05329.' + /usr/lib/gcc/x86_64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccfoCpKl.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_05329 /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_05329' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_05329.' + gmake[1]: Leaving directory '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-h5Su1e' + + exitCode: 0 + - + kind: "message-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake:127 (message)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:2 (project)" + message: | + Parsed CXX implicit include dir info: rv=done + found start of include info + found start of implicit include info + add: [/usr/include/c++/11] + add: [/usr/include/x86_64-linux-gnu/c++/11] + add: [/usr/include/c++/11/backward] + add: [/usr/lib/gcc/x86_64-linux-gnu/11/include] + add: [/usr/local/include] + add: [/usr/include/x86_64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/include/c++/11] ==> [/usr/include/c++/11] + collapse include dir [/usr/include/x86_64-linux-gnu/c++/11] ==> [/usr/include/x86_64-linux-gnu/c++/11] + collapse include dir [/usr/include/c++/11/backward] ==> [/usr/include/c++/11/backward] + collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/11/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/11/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/include/c++/11;/usr/include/x86_64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/x86_64-linux-gnu/11/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include] + + + - + kind: "message-v1" + backtrace: + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake:152 (message)" + - "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:2 (project)" + message: | + Parsed CXX implicit link information: + link line regex: [^( *|.*[/\\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)] + ignore line: [Change Dir: '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-h5Su1e'] + ignore line: [] + ignore line: [Run Build Command(s): /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_05329/fast] + ignore line: [/usr/bin/gmake -f CMakeFiles/cmTC_05329.dir/build.make CMakeFiles/cmTC_05329.dir/build] + ignore line: [gmake[1]: Entering directory '/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeScratch/TryCompile-h5Su1e'] + ignore line: [Building CXX object CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/c++ -v -o CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o -c /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_05329.dir/'] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/11/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_05329.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccH2vfLn.s] + ignore line: [GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/11"] + ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/include/c++/11] + ignore line: [ /usr/include/x86_64-linux-gnu/c++/11] + ignore line: [ /usr/include/c++/11/backward] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/11/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/x86_64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: d591828bb4d392ae8b7b160e5bb0b95f] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_05329.dir/'] + ignore line: [ as -v --64 -o CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccH2vfLn.s] + ignore line: [GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.'] + ignore line: [Linking CXX executable cmTC_05329] + ignore line: [/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_05329.dir/link.txt --verbose=1] + ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_05329 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_05329' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_05329.'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccfoCpKl.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_05329 /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccfoCpKl.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_05329] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../..] + arg [CMakeFiles/cmTC_05329.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] + collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] ==> [/usr/lib/x86_64-linux-gnu/Scrt1.o] + collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] ==> [/usr/lib/x86_64-linux-gnu/crti.o] + collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] ==> [/usr/lib/x86_64-linux-gnu/crtn.o] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11] ==> [/usr/lib/gcc/x86_64-linux-gnu/11] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../..] ==> [/usr/lib] + implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc] + implicit objs: [/usr/lib/x86_64-linux-gnu/Scrt1.o;/usr/lib/x86_64-linux-gnu/crti.o;/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o;/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o;/usr/lib/x86_64-linux-gnu/crtn.o] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + +... diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeDirectoryInformation.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..b34368e --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/DependInfo.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/DependInfo.cmake new file mode 100644 index 0000000..e3150bc --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/DependInfo.cmake @@ -0,0 +1,21 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp" "CMakeFiles/InFluence.dir/MCloop.cpp.o" "gcc" "CMakeFiles/InFluence.dir/MCloop.cpp.o.d" + "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp" "CMakeFiles/InFluence.dir/helper_functions.cpp.o" "gcc" "CMakeFiles/InFluence.dir/helper_functions.cpp.o.d" + "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/wrapper.cpp" "CMakeFiles/InFluence.dir/wrapper.cpp.o" "gcc" "CMakeFiles/InFluence.dir/wrapper.cpp.o.d" + ) + +# Targets to which this target links which contain Fortran sources. +set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/MCloop.cpp.o b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/MCloop.cpp.o new file mode 100644 index 0000000..c511a1d Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/MCloop.cpp.o differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/MCloop.cpp.o.d b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/MCloop.cpp.o.d new file mode 100644 index 0000000..930af44 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/MCloop.cpp.o.d @@ -0,0 +1,404 @@ +CMakeFiles/InFluence.dir/MCloop.cpp.o: \ + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/iostream \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/ostream /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/alloca.h /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/cmath \ + /usr/include/math.h /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/random /usr/include/c++/11/limits \ + /usr/include/c++/11/bits/random.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/opt_random.h \ + /usr/include/c++/11/bits/random.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.h \ + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.h \ + /usr/include/eigen3/Eigen/Sparse /usr/include/eigen3/Eigen/SparseCore \ + /usr/include/eigen3/Eigen/Core \ + /usr/include/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h \ + /usr/include/eigen3/Eigen/src/Core/util/Macros.h \ + /usr/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/mmintrin.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/emmintrin.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/xmmintrin.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/mm_malloc.h \ + /usr/include/c++/11/stdlib.h /usr/include/c++/11/complex \ + /usr/include/c++/11/sstream /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/eigen3/Eigen/src/Core/util/MKL_support.h \ + /usr/include/c++/11/cstddef /usr/include/c++/11/cassert \ + /usr/include/assert.h /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h /usr/include/c++/11/cstring \ + /usr/include/string.h /usr/include/strings.h /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \ + /usr/include/x86_64-linux-gnu/bits/xopen_lim.h \ + /usr/include/x86_64-linux-gnu/bits/uio_lim.h \ + /usr/include/eigen3/Eigen/src/Core/util/Constants.h \ + /usr/include/eigen3/Eigen/src/Core/util/Meta.h \ + /usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h \ + /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h \ + /usr/include/eigen3/Eigen/src/Core/util/XprHelper.h \ + /usr/include/eigen3/Eigen/src/Core/util/Memory.h \ + /usr/include/eigen3/Eigen/src/Core/util/IntegralConstant.h \ + /usr/include/eigen3/Eigen/src/Core/util/SymbolicIndex.h \ + /usr/include/eigen3/Eigen/src/Core/NumTraits.h \ + /usr/include/eigen3/Eigen/src/Core/MathFunctions.h \ + /usr/include/eigen3/Eigen/src/Core/GenericPacketMath.h \ + /usr/include/eigen3/Eigen/src/Core/MathFunctionsImpl.h \ + /usr/include/eigen3/Eigen/src/Core/arch/Default/ConjHelper.h \ + /usr/include/eigen3/Eigen/src/Core/arch/Default/Half.h \ + /usr/include/eigen3/Eigen/src/Core/arch/Default/BFloat16.h \ + /usr/include/eigen3/Eigen/src/Core/arch/Default/TypeCasting.h \ + /usr/include/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h \ + /usr/include/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h \ + /usr/include/eigen3/Eigen/src/Core/arch/SSE/TypeCasting.h \ + /usr/include/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h \ + /usr/include/eigen3/Eigen/src/Core/arch/SSE/Complex.h \ + /usr/include/eigen3/Eigen/src/Core/arch/Default/Settings.h \ + /usr/include/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h \ + /usr/include/eigen3/Eigen/src/Core/functors/TernaryFunctors.h \ + /usr/include/eigen3/Eigen/src/Core/functors/BinaryFunctors.h \ + /usr/include/eigen3/Eigen/src/Core/functors/UnaryFunctors.h \ + /usr/include/eigen3/Eigen/src/Core/functors/NullaryFunctors.h \ + /usr/include/eigen3/Eigen/src/Core/functors/StlFunctors.h \ + /usr/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h \ + /usr/include/eigen3/Eigen/src/Core/util/IndexedViewHelper.h \ + /usr/include/eigen3/Eigen/src/Core/util/ReshapedHelper.h \ + /usr/include/eigen3/Eigen/src/Core/ArithmeticSequence.h \ + /usr/include/eigen3/Eigen/src/Core/IO.h \ + /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h \ + /usr/include/eigen3/Eigen/src/Core/DenseBase.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/CommonCwiseUnaryOps.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/IndexedViewMethods.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/IndexedViewMethods.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/ReshapedMethods.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/ReshapedMethods.h \ + /usr/include/eigen3/Eigen/src/Core/MatrixBase.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/CommonCwiseBinaryOps.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/MatrixCwiseUnaryOps.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/MatrixCwiseBinaryOps.h \ + /usr/include/eigen3/Eigen/src/Core/EigenBase.h \ + /usr/include/eigen3/Eigen/src/Core/Product.h \ + /usr/include/eigen3/Eigen/src/Core/CoreEvaluators.h \ + /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h \ + /usr/include/eigen3/Eigen/src/Core/Assign.h \ + /usr/include/eigen3/Eigen/src/Core/ArrayBase.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h \ + /usr/include/eigen3/Eigen/src/Core/../plugins/ArrayCwiseBinaryOps.h \ + /usr/include/eigen3/Eigen/src/Core/util/BlasUtil.h \ + /usr/include/eigen3/Eigen/src/Core/DenseStorage.h \ + /usr/include/eigen3/Eigen/src/Core/NestByValue.h \ + /usr/include/eigen3/Eigen/src/Core/ReturnByValue.h \ + /usr/include/eigen3/Eigen/src/Core/NoAlias.h \ + /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h \ + /usr/include/eigen3/Eigen/src/Core/Matrix.h \ + /usr/include/eigen3/Eigen/src/Core/Array.h \ + /usr/include/eigen3/Eigen/src/Core/CwiseTernaryOp.h \ + /usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h \ + /usr/include/eigen3/Eigen/src/Core/CwiseUnaryOp.h \ + /usr/include/eigen3/Eigen/src/Core/CwiseNullaryOp.h \ + /usr/include/eigen3/Eigen/src/Core/CwiseUnaryView.h \ + /usr/include/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h \ + /usr/include/eigen3/Eigen/src/Core/Dot.h \ + /usr/include/eigen3/Eigen/src/Core/StableNorm.h \ + /usr/include/eigen3/Eigen/src/Core/Stride.h \ + /usr/include/eigen3/Eigen/src/Core/MapBase.h \ + /usr/include/eigen3/Eigen/src/Core/Map.h \ + /usr/include/eigen3/Eigen/src/Core/Ref.h \ + /usr/include/eigen3/Eigen/src/Core/Block.h \ + /usr/include/eigen3/Eigen/src/Core/VectorBlock.h \ + /usr/include/eigen3/Eigen/src/Core/IndexedView.h \ + /usr/include/eigen3/Eigen/src/Core/Reshaped.h \ + /usr/include/eigen3/Eigen/src/Core/Transpose.h \ + /usr/include/eigen3/Eigen/src/Core/DiagonalMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/Diagonal.h \ + /usr/include/eigen3/Eigen/src/Core/DiagonalProduct.h \ + /usr/include/eigen3/Eigen/src/Core/Redux.h \ + /usr/include/eigen3/Eigen/src/Core/Visitor.h \ + /usr/include/eigen3/Eigen/src/Core/Fuzzy.h \ + /usr/include/eigen3/Eigen/src/Core/Swap.h \ + /usr/include/eigen3/Eigen/src/Core/CommaInitializer.h \ + /usr/include/eigen3/Eigen/src/Core/GeneralProduct.h \ + /usr/include/eigen3/Eigen/src/Core/Solve.h \ + /usr/include/eigen3/Eigen/src/Core/Inverse.h \ + /usr/include/eigen3/Eigen/src/Core/SolverBase.h \ + /usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/Transpositions.h \ + /usr/include/eigen3/Eigen/src/Core/TriangularMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/SelfAdjointView.h \ + /usr/include/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h \ + /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h \ + /usr/include/c++/11/atomic /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/eigen3/Eigen/src/Core/ProductEvaluators.h \ + /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h \ + /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/SolveTriangular.h \ + /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h \ + /usr/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h \ + /usr/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/products/SelfadjointProduct.h \ + /usr/include/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h \ + /usr/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h \ + /usr/include/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/products/TriangularSolverVector.h \ + /usr/include/eigen3/Eigen/src/Core/BandMatrix.h \ + /usr/include/eigen3/Eigen/src/Core/CoreIterators.h \ + /usr/include/eigen3/Eigen/src/Core/ConditionEstimator.h \ + /usr/include/eigen3/Eigen/src/Core/BooleanRedux.h \ + /usr/include/eigen3/Eigen/src/Core/Select.h \ + /usr/include/eigen3/Eigen/src/Core/VectorwiseOp.h \ + /usr/include/eigen3/Eigen/src/Core/PartialReduxEvaluator.h \ + /usr/include/eigen3/Eigen/src/Core/Random.h \ + /usr/include/eigen3/Eigen/src/Core/Replicate.h \ + /usr/include/eigen3/Eigen/src/Core/Reverse.h \ + /usr/include/eigen3/Eigen/src/Core/ArrayWrapper.h \ + /usr/include/eigen3/Eigen/src/Core/StlIterators.h \ + /usr/include/eigen3/Eigen/src/Core/GlobalFunctions.h \ + /usr/include/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseUtil.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseMatrixBase.h \ + /usr/include/eigen3/Eigen/src/SparseCore/../plugins/CommonCwiseUnaryOps.h \ + /usr/include/eigen3/Eigen/src/SparseCore/../plugins/CommonCwiseBinaryOps.h \ + /usr/include/eigen3/Eigen/src/SparseCore/../plugins/MatrixCwiseUnaryOps.h \ + /usr/include/eigen3/Eigen/src/SparseCore/../plugins/MatrixCwiseBinaryOps.h \ + /usr/include/eigen3/Eigen/src/SparseCore/../plugins/BlockMethods.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseAssign.h \ + /usr/include/eigen3/Eigen/src/SparseCore/CompressedStorage.h \ + /usr/include/eigen3/Eigen/src/SparseCore/AmbiVector.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseCompressedBase.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseMatrix.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseMap.h \ + /usr/include/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseVector.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseRef.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseCwiseUnaryOp.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseCwiseBinaryOp.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseTranspose.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseBlock.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseDot.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseRedux.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseView.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseDiagonalProduct.h \ + /usr/include/eigen3/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseSparseProductWithPruning.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseProduct.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseTriangularView.h \ + /usr/include/eigen3/Eigen/src/SparseCore/TriangularSolver.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparsePermutation.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseFuzzy.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseSolverBase.h \ + /usr/include/eigen3/Eigen/OrderingMethods \ + /usr/include/eigen3/Eigen/src/OrderingMethods/Amd.h \ + /usr/include/eigen3/Eigen/src/OrderingMethods/Ordering.h \ + /usr/include/eigen3/Eigen/src/OrderingMethods/Eigen_Colamd.h \ + /usr/include/eigen3/Eigen/SparseCholesky \ + /usr/include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h \ + /usr/include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h \ + /usr/include/eigen3/Eigen/SparseLU \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_gemm_kernel.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_Structs.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLUImpl.h \ + /usr/include/eigen3/Eigen/src/SparseCore/SparseColEtree.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_Memory.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_pivotL.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_panel_dfs.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_kernel_bmod.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_panel_bmod.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_column_bmod.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_pruneL.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU_Utils.h \ + /usr/include/eigen3/Eigen/src/SparseLU/SparseLU.h \ + /usr/include/eigen3/Eigen/SparseQR \ + /usr/include/eigen3/Eigen/src/SparseQR/SparseQR.h \ + /usr/include/eigen3/Eigen/IterativeLinearSolvers \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h \ + /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h \ + /usr/include/c++/11/list /usr/include/c++/11/bits/stl_list.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/list.tcc \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/omp.h diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/build.make b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/build.make new file mode 100644 index 0000000..0d5ca8f --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/build.make @@ -0,0 +1,143 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# 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 = /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake + +# The command to remove a file. +RM = /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build + +# Include any dependencies generated for this target. +include CMakeFiles/InFluence.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include CMakeFiles/InFluence.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/InFluence.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/InFluence.dir/flags.make + +CMakeFiles/InFluence.dir/helper_functions.cpp.o: CMakeFiles/InFluence.dir/flags.make +CMakeFiles/InFluence.dir/helper_functions.cpp.o: /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp +CMakeFiles/InFluence.dir/helper_functions.cpp.o: CMakeFiles/InFluence.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/InFluence.dir/helper_functions.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/InFluence.dir/helper_functions.cpp.o -MF CMakeFiles/InFluence.dir/helper_functions.cpp.o.d -o CMakeFiles/InFluence.dir/helper_functions.cpp.o -c /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp + +CMakeFiles/InFluence.dir/helper_functions.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/InFluence.dir/helper_functions.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp > CMakeFiles/InFluence.dir/helper_functions.cpp.i + +CMakeFiles/InFluence.dir/helper_functions.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/InFluence.dir/helper_functions.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp -o CMakeFiles/InFluence.dir/helper_functions.cpp.s + +CMakeFiles/InFluence.dir/MCloop.cpp.o: CMakeFiles/InFluence.dir/flags.make +CMakeFiles/InFluence.dir/MCloop.cpp.o: /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp +CMakeFiles/InFluence.dir/MCloop.cpp.o: CMakeFiles/InFluence.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/InFluence.dir/MCloop.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/InFluence.dir/MCloop.cpp.o -MF CMakeFiles/InFluence.dir/MCloop.cpp.o.d -o CMakeFiles/InFluence.dir/MCloop.cpp.o -c /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp + +CMakeFiles/InFluence.dir/MCloop.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/InFluence.dir/MCloop.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp > CMakeFiles/InFluence.dir/MCloop.cpp.i + +CMakeFiles/InFluence.dir/MCloop.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/InFluence.dir/MCloop.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.cpp -o CMakeFiles/InFluence.dir/MCloop.cpp.s + +CMakeFiles/InFluence.dir/wrapper.cpp.o: CMakeFiles/InFluence.dir/flags.make +CMakeFiles/InFluence.dir/wrapper.cpp.o: /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/wrapper.cpp +CMakeFiles/InFluence.dir/wrapper.cpp.o: CMakeFiles/InFluence.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/InFluence.dir/wrapper.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/InFluence.dir/wrapper.cpp.o -MF CMakeFiles/InFluence.dir/wrapper.cpp.o.d -o CMakeFiles/InFluence.dir/wrapper.cpp.o -c /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/wrapper.cpp + +CMakeFiles/InFluence.dir/wrapper.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Preprocessing CXX source to CMakeFiles/InFluence.dir/wrapper.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/wrapper.cpp > CMakeFiles/InFluence.dir/wrapper.cpp.i + +CMakeFiles/InFluence.dir/wrapper.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green "Compiling CXX source to assembly CMakeFiles/InFluence.dir/wrapper.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/wrapper.cpp -o CMakeFiles/InFluence.dir/wrapper.cpp.s + +# Object files for target InFluence +InFluence_OBJECTS = \ +"CMakeFiles/InFluence.dir/helper_functions.cpp.o" \ +"CMakeFiles/InFluence.dir/MCloop.cpp.o" \ +"CMakeFiles/InFluence.dir/wrapper.cpp.o" + +# External object files for target InFluence +InFluence_EXTERNAL_OBJECTS = + +libInFluence.so: CMakeFiles/InFluence.dir/helper_functions.cpp.o +libInFluence.so: CMakeFiles/InFluence.dir/MCloop.cpp.o +libInFluence.so: CMakeFiles/InFluence.dir/wrapper.cpp.o +libInFluence.so: CMakeFiles/InFluence.dir/build.make +libInFluence.so: /usr/lib/x86_64-linux-gnu/libpython3.10.so +libInFluence.so: CMakeFiles/InFluence.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --bold --progress-dir=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Linking CXX shared module libInFluence.so" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/InFluence.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/InFluence.dir/build: libInFluence.so +.PHONY : CMakeFiles/InFluence.dir/build + +CMakeFiles/InFluence.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/InFluence.dir/cmake_clean.cmake +.PHONY : CMakeFiles/InFluence.dir/clean + +CMakeFiles/InFluence.dir/depend: + cd /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/DependInfo.cmake "--color=$(COLOR)" +.PHONY : CMakeFiles/InFluence.dir/depend + diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/cmake_clean.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/cmake_clean.cmake new file mode 100644 index 0000000..30f5a81 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/cmake_clean.cmake @@ -0,0 +1,15 @@ +file(REMOVE_RECURSE + "CMakeFiles/InFluence.dir/MCloop.cpp.o" + "CMakeFiles/InFluence.dir/MCloop.cpp.o.d" + "CMakeFiles/InFluence.dir/helper_functions.cpp.o" + "CMakeFiles/InFluence.dir/helper_functions.cpp.o.d" + "CMakeFiles/InFluence.dir/wrapper.cpp.o" + "CMakeFiles/InFluence.dir/wrapper.cpp.o.d" + "libInFluence.pdb" + "libInFluence.so" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/InFluence.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/compiler_depend.make b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/compiler_depend.make new file mode 100644 index 0000000..adec939 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty compiler generated dependencies file for InFluence. +# This may be replaced when dependencies are built. diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/compiler_depend.ts b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/compiler_depend.ts new file mode 100644 index 0000000..e87ca0f --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for InFluence. diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/depend.make b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/depend.make new file mode 100644 index 0000000..7920760 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for InFluence. +# This may be replaced when dependencies are built. diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/flags.make b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/flags.make new file mode 100644 index 0000000..004325f --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# compile CXX with /usr/bin/c++ +CXX_DEFINES = -DInFluence_EXPORTS + +CXX_INCLUDES = -I/home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include -I/usr/include/eigen3 -isystem /usr/include/python3.10 + +CXX_FLAGS = -std=gnu++11 -fPIC + diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/helper_functions.cpp.o b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/helper_functions.cpp.o new file mode 100644 index 0000000..eee28fd Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/helper_functions.cpp.o differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/helper_functions.cpp.o.d b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/helper_functions.cpp.o.d new file mode 100644 index 0000000..e09e967 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/helper_functions.cpp.o.d @@ -0,0 +1,148 @@ +CMakeFiles/InFluence.dir/helper_functions.cpp.o: \ + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp \ + /usr/include/stdc-predef.h \ + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/helper_functions.h \ + /usr/include/c++/11/vector /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/c++/11/random /usr/include/c++/11/cstdlib \ + /usr/include/c++/11/string /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/postypes.h /usr/include/c++/11/cwchar \ + /usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/limits \ + /usr/include/c++/11/bits/random.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/opt_random.h \ + /usr/include/c++/11/bits/random.tcc /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/link.txt b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/link.txt new file mode 100644 index 0000000..e1c343b --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ -fPIC -shared -o libInFluence.so CMakeFiles/InFluence.dir/helper_functions.cpp.o CMakeFiles/InFluence.dir/MCloop.cpp.o CMakeFiles/InFluence.dir/wrapper.cpp.o /usr/lib/x86_64-linux-gnu/libpython3.10.so diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/progress.make b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/progress.make new file mode 100644 index 0000000..a69a57e --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/progress.make @@ -0,0 +1,5 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 +CMAKE_PROGRESS_3 = 3 +CMAKE_PROGRESS_4 = 4 + diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/wrapper.cpp.o b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/wrapper.cpp.o new file mode 100644 index 0000000..bc5d422 Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/wrapper.cpp.o differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/wrapper.cpp.o.d b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/wrapper.cpp.o.d new file mode 100644 index 0000000..83cfcca --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir/wrapper.cpp.o.d @@ -0,0 +1,342 @@ +CMakeFiles/InFluence.dir/wrapper.cpp.o: \ + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/wrapper.cpp \ + /usr/include/stdc-predef.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/pybind11.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/class.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../attr.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../detail/common.h \ + /usr/include/python3.10/Python.h /usr/include/python3.10/patchlevel.h \ + /usr/include/python3.10/pyconfig.h \ + /usr/include/x86_64-linux-gnu/python3.10/pyconfig.h \ + /usr/include/python3.10/pymacconfig.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \ + /usr/include/x86_64-linux-gnu/bits/xopen_lim.h \ + /usr/include/x86_64-linux-gnu/bits/uio_lim.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h /usr/include/errno.h \ + /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/x86_64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/x86_64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/stdlib.h /usr/include/c++/11/cstdlib \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/unistd.h \ + /usr/include/x86_64-linux-gnu/bits/posix_opt.h \ + /usr/include/x86_64-linux-gnu/bits/environments.h \ + /usr/include/x86_64-linux-gnu/bits/confname.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_posix.h \ + /usr/include/x86_64-linux-gnu/bits/getopt_core.h \ + /usr/include/x86_64-linux-gnu/bits/unistd_ext.h \ + /usr/include/linux/close_range.h /usr/include/assert.h \ + /usr/include/python3.10/pyport.h /usr/include/inttypes.h \ + /usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/math.h /usr/include/c++/11/cmath \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/x86_64-linux-gnu/bits/fp-logb.h \ + /usr/include/x86_64-linux-gnu/bits/fp-fast.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/x86_64-linux-gnu/bits/iscanonical.h \ + /usr/include/x86_64-linux-gnu/sys/time.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h \ + /usr/include/x86_64-linux-gnu/bits/struct_stat.h \ + /usr/include/x86_64-linux-gnu/bits/statx.h /usr/include/linux/stat.h \ + /usr/include/linux/types.h /usr/include/x86_64-linux-gnu/asm/types.h \ + /usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \ + /usr/include/x86_64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types.h \ + /usr/include/x86_64-linux-gnu/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/x86_64-linux-gnu/bits/statx-generic.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_statx_timestamp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_statx.h \ + /usr/include/python3.10/exports.h /usr/include/python3.10/pymacro.h \ + /usr/include/python3.10/pymath.h /usr/include/python3.10/pymem.h \ + /usr/include/python3.10/cpython/pymem.h /usr/include/python3.10/object.h \ + /usr/include/python3.10/cpython/object.h \ + /usr/include/python3.10/objimpl.h \ + /usr/include/python3.10/cpython/objimpl.h \ + /usr/include/python3.10/typeslots.h /usr/include/python3.10/pyhash.h \ + /usr/include/python3.10/cpython/pydebug.h \ + /usr/include/python3.10/bytearrayobject.h \ + /usr/include/python3.10/cpython/bytearrayobject.h \ + /usr/include/python3.10/bytesobject.h \ + /usr/include/python3.10/cpython/bytesobject.h \ + /usr/include/python3.10/unicodeobject.h /usr/include/ctype.h \ + /usr/include/wchar.h /usr/include/x86_64-linux-gnu/bits/types/wint_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/python3.10/cpython/unicodeobject.h \ + /usr/include/python3.10/longobject.h \ + /usr/include/python3.10/longintrepr.h \ + /usr/include/python3.10/boolobject.h \ + /usr/include/python3.10/floatobject.h \ + /usr/include/python3.10/complexobject.h \ + /usr/include/python3.10/rangeobject.h \ + /usr/include/python3.10/memoryobject.h \ + /usr/include/python3.10/tupleobject.h \ + /usr/include/python3.10/cpython/tupleobject.h \ + /usr/include/python3.10/listobject.h \ + /usr/include/python3.10/cpython/listobject.h \ + /usr/include/python3.10/dictobject.h \ + /usr/include/python3.10/cpython/dictobject.h \ + /usr/include/python3.10/cpython/odictobject.h \ + /usr/include/python3.10/enumobject.h /usr/include/python3.10/setobject.h \ + /usr/include/python3.10/methodobject.h \ + /usr/include/python3.10/cpython/methodobject.h \ + /usr/include/python3.10/moduleobject.h \ + /usr/include/python3.10/funcobject.h \ + /usr/include/python3.10/classobject.h \ + /usr/include/python3.10/fileobject.h \ + /usr/include/python3.10/cpython/fileobject.h \ + /usr/include/python3.10/pycapsule.h /usr/include/python3.10/code.h \ + /usr/include/python3.10/cpython/code.h /usr/include/python3.10/pyframe.h \ + /usr/include/python3.10/traceback.h \ + /usr/include/python3.10/cpython/traceback.h \ + /usr/include/python3.10/sliceobject.h \ + /usr/include/python3.10/cellobject.h \ + /usr/include/python3.10/iterobject.h \ + /usr/include/python3.10/cpython/initconfig.h \ + /usr/include/python3.10/genobject.h /usr/include/python3.10/pystate.h \ + /usr/include/python3.10/cpython/pystate.h \ + /usr/include/python3.10/abstract.h \ + /usr/include/python3.10/cpython/abstract.h \ + /usr/include/python3.10/descrobject.h \ + /usr/include/python3.10/genericaliasobject.h \ + /usr/include/python3.10/warnings.h \ + /usr/include/python3.10/weakrefobject.h \ + /usr/include/python3.10/structseq.h \ + /usr/include/python3.10/namespaceobject.h \ + /usr/include/python3.10/cpython/picklebufobject.h \ + /usr/include/python3.10/cpython/pytime.h \ + /usr/include/python3.10/codecs.h /usr/include/python3.10/pyerrors.h \ + /usr/include/python3.10/cpython/pyerrors.h \ + /usr/include/python3.10/pythread.h /usr/include/pthread.h \ + /usr/include/sched.h /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/x86_64-linux-gnu/bits/cpu-set.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/python3.10/context.h /usr/include/python3.10/modsupport.h \ + /usr/include/python3.10/compile.h \ + /usr/include/python3.10/cpython/compile.h \ + /usr/include/python3.10/pythonrun.h \ + /usr/include/python3.10/cpython/pythonrun.h \ + /usr/include/python3.10/pylifecycle.h \ + /usr/include/python3.10/cpython/pylifecycle.h \ + /usr/include/python3.10/ceval.h /usr/include/python3.10/cpython/ceval.h \ + /usr/include/python3.10/sysmodule.h \ + /usr/include/python3.10/cpython/sysmodule.h \ + /usr/include/python3.10/osmodule.h /usr/include/python3.10/intrcheck.h \ + /usr/include/python3.10/import.h \ + /usr/include/python3.10/cpython/import.h \ + /usr/include/python3.10/bltinmodule.h /usr/include/python3.10/eval.h \ + /usr/include/python3.10/cpython/pyctype.h \ + /usr/include/python3.10/pystrtod.h /usr/include/python3.10/pystrcmp.h \ + /usr/include/python3.10/fileutils.h \ + /usr/include/python3.10/cpython/fileutils.h \ + /usr/include/python3.10/cpython/pyfpe.h \ + /usr/include/python3.10/tracemalloc.h \ + /usr/include/python3.10/frameobject.h \ + /usr/include/python3.10/cpython/frameobject.h \ + /usr/include/python3.10/pythread.h /usr/include/c++/11/cstddef \ + /usr/include/c++/11/cstring /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/forward_list /usr/include/c++/11/bits/forward_list.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/forward_list.tcc /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/shared_ptr.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/x86_64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/string /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint /usr/include/c++/11/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/typeindex \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/unordered_set \ + /usr/include/c++/11/bits/unordered_set.h /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc /usr/include/c++/11/version \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../cast.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../detail/descr.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../detail/type_caster_base.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../detail/../pytypes.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../detail/../buffer_info.h \ + /usr/include/c++/11/iterator /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/x86_64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/bits/streambuf.tcc \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../detail/internals.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../detail/typeid.h \ + /usr/include/c++/11/cxxabi.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/cxxabi_tweaks.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/std_function.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../options.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/detail/init.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/gil.h \ + /home/uclworkstation1/.local/lib/python3.10/site-packages/pybind11/include/pybind11/stl.h \ + /usr/include/c++/11/deque /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc /usr/include/c++/11/list \ + /usr/include/c++/11/bits/stl_list.h /usr/include/c++/11/bits/list.tcc \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/set \ + /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h /usr/include/c++/11/valarray \ + /usr/include/c++/11/algorithm /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/bits/valarray_array.h \ + /usr/include/c++/11/bits/valarray_array.tcc \ + /usr/include/c++/11/bits/valarray_before.h \ + /usr/include/c++/11/bits/slice_array.h \ + /usr/include/c++/11/bits/valarray_after.h \ + /usr/include/c++/11/bits/gslice.h \ + /usr/include/c++/11/bits/gslice_array.h \ + /usr/include/c++/11/bits/mask_array.h \ + /usr/include/c++/11/bits/indirect_array.h \ + /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/MCloop.h diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/Makefile.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/Makefile.cmake new file mode 100644 index 0000000..0a6e0a5 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/Makefile.cmake @@ -0,0 +1,132 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCCompiler.cmake.in" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCCompilerABI.c" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCInformation.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCXXCompiler.cmake.in" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCXXCompilerABI.cpp" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCXXInformation.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCommonLanguageInclude.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeCompilerIdDetection.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCXXCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompileFeatures.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeDetermineSystem.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeFindBinUtils.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeGenericSystem.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeInitializeConfigs.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeLanguageInformation.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeParseImplicitIncludeInfo.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeParseImplicitLinkInfo.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeParseLibraryArchitecture.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeSystem.cmake.in" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeSystemSpecificInformation.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeSystemSpecificInitialize.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCompilerCommon.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeUnixFindMake.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/ARMClang-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/GNU-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/GNU-C.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/GNU-CXX.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/GNU-FindBinUtils.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/GNU.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/HP-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/LCC-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/NVHPC-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/TI-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Tasking-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/XL-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/XLClang-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindPackageMessage.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindPython/Support.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindPython3.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Internal/FeatureTesting.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Platform/Linux-Determine-CXX.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Platform/Linux-GNU-C.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Platform/Linux-GNU-CXX.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Platform/Linux-GNU.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Platform/Linux-Initialize.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Platform/Linux.cmake" + "/home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/Platform/UnixPaths.cmake" + "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/CMakeLists.txt" + "CMakeFiles/3.27.2/CMakeCCompiler.cmake" + "CMakeFiles/3.27.2/CMakeCXXCompiler.cmake" + "CMakeFiles/3.27.2/CMakeSystem.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.27.2/CMakeSystem.cmake" + "CMakeFiles/3.27.2/CMakeCCompiler.cmake" + "CMakeFiles/3.27.2/CMakeCXXCompiler.cmake" + "CMakeFiles/3.27.2/CMakeCCompiler.cmake" + "CMakeFiles/3.27.2/CMakeCXXCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/InFluence.dir/DependInfo.cmake" + ) diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/Makefile2 b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/Makefile2 new file mode 100644 index 0000000..a4c81cc --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/Makefile2 @@ -0,0 +1,112 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# 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 = /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake + +# The command to remove a file. +RM = /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build + +#============================================================================= +# Directory level rules for the build root directory + +# The main recursive "all" target. +all: CMakeFiles/InFluence.dir/all +.PHONY : all + +# The main recursive "preinstall" target. +preinstall: +.PHONY : preinstall + +# The main recursive "clean" target. +clean: CMakeFiles/InFluence.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/InFluence.dir + +# All Build rule for target. +CMakeFiles/InFluence.dir/all: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --progress-dir=/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles --progress-num=1,2,3,4 "Built target InFluence" +.PHONY : CMakeFiles/InFluence.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/InFluence.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles 4 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/InFluence.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles 0 +.PHONY : CMakeFiles/InFluence.dir/rule + +# Convenience name for target. +InFluence: CMakeFiles/InFluence.dir/rule +.PHONY : InFluence + +# clean rule for target. +CMakeFiles/InFluence.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/clean +.PHONY : CMakeFiles/InFluence.dir/clean + +#============================================================================= +# 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/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/TargetDirectories.txt b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..419cc79 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,3 @@ +/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/InFluence.dir +/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/edit_cache.dir +/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/rebuild_cache.dir diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/cmake.check_cache b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/progress.marks b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/progress.marks new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles/progress.marks @@ -0,0 +1 @@ +4 diff --git a/Scripts/InFluence/simulation/cpp_simulation/build/Makefile b/Scripts/InFluence/simulation/cpp_simulation/build/Makefile new file mode 100644 index 0000000..5e988d9 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/Makefile @@ -0,0 +1,235 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.27 + +# 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 = /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake + +# The command to remove a file. +RM = /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." + /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.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..." + /home/uclworkstation1/.local/lib/python3.10/site-packages/cmake/data/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 + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/CMakeFiles /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build//CMakeFiles/progress.marks + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/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 InFluence + +# Build rule for target. +InFluence: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 InFluence +.PHONY : InFluence + +# fast build rule for target. +InFluence/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/build +.PHONY : InFluence/fast + +MCloop.o: MCloop.cpp.o +.PHONY : MCloop.o + +# target to build an object file +MCloop.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/MCloop.cpp.o +.PHONY : MCloop.cpp.o + +MCloop.i: MCloop.cpp.i +.PHONY : MCloop.i + +# target to preprocess a source file +MCloop.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/MCloop.cpp.i +.PHONY : MCloop.cpp.i + +MCloop.s: MCloop.cpp.s +.PHONY : MCloop.s + +# target to generate assembly for a file +MCloop.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/MCloop.cpp.s +.PHONY : MCloop.cpp.s + +helper_functions.o: helper_functions.cpp.o +.PHONY : helper_functions.o + +# target to build an object file +helper_functions.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/helper_functions.cpp.o +.PHONY : helper_functions.cpp.o + +helper_functions.i: helper_functions.cpp.i +.PHONY : helper_functions.i + +# target to preprocess a source file +helper_functions.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/helper_functions.cpp.i +.PHONY : helper_functions.cpp.i + +helper_functions.s: helper_functions.cpp.s +.PHONY : helper_functions.s + +# target to generate assembly for a file +helper_functions.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/helper_functions.cpp.s +.PHONY : helper_functions.cpp.s + +wrapper.o: wrapper.cpp.o +.PHONY : wrapper.o + +# target to build an object file +wrapper.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/wrapper.cpp.o +.PHONY : wrapper.cpp.o + +wrapper.i: wrapper.cpp.i +.PHONY : wrapper.i + +# target to preprocess a source file +wrapper.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/wrapper.cpp.i +.PHONY : wrapper.cpp.i + +wrapper.s: wrapper.cpp.s +.PHONY : wrapper.s + +# target to generate assembly for a file +wrapper.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/InFluence.dir/build.make CMakeFiles/InFluence.dir/wrapper.cpp.s +.PHONY : wrapper.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 "... rebuild_cache" + @echo "... InFluence" + @echo "... MCloop.o" + @echo "... MCloop.i" + @echo "... MCloop.s" + @echo "... helper_functions.o" + @echo "... helper_functions.i" + @echo "... helper_functions.s" + @echo "... wrapper.o" + @echo "... wrapper.i" + @echo "... wrapper.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/Scripts/InFluence/simulation/cpp_simulation/build/cmake_install.cmake b/Scripts/InFluence/simulation/cpp_simulation/build/cmake_install.cmake new file mode 100644 index 0000000..e608b38 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/build/cmake_install.cmake @@ -0,0 +1,54 @@ +# Install script for directory: /home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation + +# 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 "") + 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() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +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 "/usr/bin/objdump") +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 "/home/uclworkstation1/InFluence/Scripts/InFluence/simulation/cpp_simulation/build/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/Scripts/InFluence/simulation/cpp_simulation/constants.py b/Scripts/InFluence/simulation/cpp_simulation/constants.py new file mode 100644 index 0000000..d286e0d --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/constants.py @@ -0,0 +1,20 @@ +import sys +sys.path.append("../../") +from parameters import SimulationParameters + +def CalculateConstants(ProgramParameters): + + AlphaMultiplier = (3.4*10**-3)*(ProgramParameters.ProtonNum**0.67) + CrossSectionNumorator = (4.7 * 10 ** -18) * (ProgramParameters.ProtonNum ** 1.33 + 0.032 * ProgramParameters.ProtonNum ** 2) + CrossSectionLogArgMultiplier = 8 * ProgramParameters.ProtonNum ** -1.33 + CrossSectionDenominatorA = 0.0155 * ProgramParameters.ProtonNum ** 1.33 + CrossSectionDenominatorB = 0.02 * ProgramParameters.ProtonNum ** 0.5 + PathLengthMultiplier = ProgramParameters.AtomicMass/(ProgramParameters.N * ProgramParameters.Density) + EnergyLossMultiplierA = -78500*ProgramParameters.ProtonNum/ProgramParameters.AtomicMass + EnergyLossMultiplierB = (9.76*ProgramParameters.ProtonNum + 58.5/ProgramParameters.ProtonNum**0.19)*10**-3 + + return AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +params = SimulationParameters() +params.refresh_config() +AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB = CalculateConstants(params) \ No newline at end of file diff --git a/Scripts/InFluence/simulation/cpp_simulation/cpp_simulation_interface.py b/Scripts/InFluence/simulation/cpp_simulation/cpp_simulation_interface.py new file mode 100644 index 0000000..06d2e25 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/cpp_simulation_interface.py @@ -0,0 +1,59 @@ +from simulation.cpp_simulation import InFluence +from simulation.cuda_simulation.constants import AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB +import numpy as np + +def CPP_MCScatteringSimulation(pixels, + E_i, + ProbeDiameter, + MinimumEnergy, + pixel_dimensions, + dE_threshold, + perfect_image_0, + perfect_image_1, + Density, + t_counting + ): + + print('Simulation starting ...') + + + # Create a 2D array from the 'pixels' list + pixels_array = np.vstack(( + [pixel.electron_count for pixel in pixels], # Column 0: Number of electrons in the pixel + [pixel.i for pixel in pixels], # Column 1: Pixel index i + [pixel.j for pixel in pixels], # Column 2: Pixel index j + [pixel.x_dimension for pixel in pixels], # Column 3: Dimension along the x-axis + [pixel.y_dimension for pixel in pixels], # Column 4: Dimension along the y-axis + [pixel.z_dimension for pixel in pixels] # Column 5: Dimension along the z-axis + )).T # Transpose to get the desired shape (rows represent pixels, columns represent attributes) + + # Convert the data type of the first three columns to int and the last three columns to float + + pixels_list = pixels_array.tolist() + + print('Pixel data prepared ...') + + + print(len(pixels_list)) + print('Beginning main simulation loop...') + + import time + + start_time = time.time() + + + FlattenedImage = InFluence.RunMCScatteringSimulation(pixels_list, E_i, ProbeDiameter, MinimumEnergy, dE_threshold, + perfect_image_0, perfect_image_1, Density, t_counting, AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB) + + end_time = time.time() + + # Calculate the elapsed time + duration = end_time - start_time + print("Execution time:", duration, "seconds") + + OutputImage = np.array(FlattenedImage) + + + print('Simulation complete.') + + return OutputImage \ No newline at end of file diff --git a/Scripts/InFluence/simulation/cpp_simulation/electron_generator.cpp b/Scripts/InFluence/simulation/cpp_simulation/electron_generator.cpp new file mode 100644 index 0000000..f068145 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/electron_generator.cpp @@ -0,0 +1,45 @@ +#include "electrons_generator.h" +#include "helper_functions.h" // Include any necessary custom functions +#include "constants.h" + +std::vector> generate_electrons(int electron_count, double E_i, double ProbeDiameter, double AlphaMultiplier, + double CrossSectionNumorator, + double CrossSectionLogArgMultiplier, + double CrossSectionDenominatorA, + double CrossSectionDenominatorB, + double PathLengthMultiplier, + double EnergyLossMultiplierA, + double EnergyLossMultiplierB) { + std::vector> electrons(electron_count, std::vector(16)); + + // Pre-calculate some common values + double alpha = evaluate_alpha(E_i, AlphaMultiplier); + double crossSection = evaluate_cross_section_opt(E_i, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB); + double pathLength = evaluate_path_length(crossSection, PathLengthMultiplier); + + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_real_distribution dis(0.000001, 0.999999); + + for (int i = 0; i < electron_count; ++i) { + electrons[i][0] = E_i; // E_i + electrons[i][1] = E_i; // E + electrons[i][2] = alpha; // Alpha + electrons[i][3] = crossSection; // CrossSection + electrons[i][4] = pathLength; // PathLength + electrons[i][5] = dis(gen); // RND_step + electrons[i][6] = evaluate_step(pathLength, electrons[i][5]); // step + electrons[i][7] = ProbeDiameter; // ProbeDiameter + + std::vector initialPositions = initialize_positions(electrons[i][6], ProbeDiameter); // InitialPosition + electrons[i][9] = initialPositions[0]; // cosineX + electrons[i][10] = initialPositions[1]; // cosineY + electrons[i][11] = initialPositions[2]; // cosineZ + electrons[i][12] = initialPositions[3]; // z0 + electrons[i][13] = initialPositions[4]; // y0 + electrons[i][14] = initialPositions[5]; // x0 + electrons[i][15] = 0; // dE + } + + return electrons; +} diff --git a/Scripts/InFluence/simulation/cpp_simulation/electron_generator.o b/Scripts/InFluence/simulation/cpp_simulation/electron_generator.o new file mode 100644 index 0000000..76d3258 Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/electron_generator.o differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/electrons_generator.h b/Scripts/InFluence/simulation/cpp_simulation/electrons_generator.h new file mode 100644 index 0000000..d07d39f --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/electrons_generator.h @@ -0,0 +1,18 @@ +#ifndef ELECTRONS_GENERATOR_H +#define ELECTRONS_GENERATOR_H + +#include +#include +#include +#include + +std::vector> generate_electrons(int electron_count, double E_i, double ProbeDiameter, double AlphaMultiplier, + double CrossSectionNumorator, + double CrossSectionLogArgMultiplier, + double CrossSectionDenominatorA, + double CrossSectionDenominatorB, + double PathLengthMultiplier, + double EnergyLossMultiplierA, + double EnergyLossMultiplierB); + +#endif // ELECTRONS_GENERATOR_H diff --git a/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp b/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp new file mode 100644 index 0000000..0929cf4 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/helper_functions.cpp @@ -0,0 +1,277 @@ +#include "helper_functions.h" +#include +#include + + + + +int custom_round_down(double x, int decimals) { + double multiplier = pow(10, decimals); + double rounded_value = ceil(fabs(x) * multiplier - 0.5); + rounded_value /= multiplier; + return static_cast(rounded_value); +} + +std::vector custom_round_down_vector(const std::vector& input_vec, int decimals) { + std::vector result_vec; + + for (const double& value : input_vec) { + int result = custom_round_down(value, decimals); + result_vec.push_back(result); + } + + return result_vec; +} + +double evaluate_alpha(double E, double AlphaMultiplier) { + return AlphaMultiplier / E; +} + +std::vector evaluate_alpha_vector(const std::vector& energies, double AlphaMultiplier) { + std::vector alpha_values; + + for (const double& E : energies) { + double alpha = evaluate_alpha(E, AlphaMultiplier); + alpha_values.push_back(alpha); + } + + return alpha_values; +} + +double evaluate_cross_section_opt(double E, double CrossSectionLogArgMultiplier, double CrossSectionNumorator, double CrossSectionDenominatorA, double CrossSectionDenominatorB) { + double LogArg = log10(E * CrossSectionLogArgMultiplier); + double CrossSection = CrossSectionNumorator / ((E + sqrt(E) * CrossSectionDenominatorA) * (1 - exp(-1 * LogArg * LogArg) * CrossSectionDenominatorB)); + return CrossSection; +} + +std::vector evaluate_cross_section_opt_vector(const std::vector& energies, double CrossSectionLogArgMultiplier, double CrossSectionNumorator, double CrossSectionDenominatorA, double CrossSectionDenominatorB) { + std::vector cross_section_values; + + for (const double& E : energies) { + double cross_section = evaluate_cross_section_opt(E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB); + cross_section_values.push_back(cross_section); + } + + return cross_section_values; +} + +double evaluate_path_length(double CrossSection, double PathLengthMultiplier) { + double PathLength = PathLengthMultiplier * (1 / CrossSection); + return PathLength; +} + +std::vector evaluate_path_length_vector(const std::vector& cross_sections, double PathLengthMultiplier) { + std::vector path_length_values; + + for (const double& cross_section : cross_sections) { + double path_length = evaluate_path_length(cross_section, PathLengthMultiplier); + path_length_values.push_back(path_length); + } + + return path_length_values; +} + + +double evaluate_step(double path_length, double RandomStep) { + return -path_length * std::log(RandomStep); +} + + +std::vector evaluate_step(const std::vector& path_lengths, const std::vector& RandomSteps) { + std::vector results; + results.reserve(path_lengths.size()); + + for (size_t i = 0; i < path_lengths.size(); ++i) { + results.push_back(-path_lengths[i] * std::log(RandomSteps[i])); + } + + return results; +} + +double evaluate_phi(double RandomNum, double alpha) { + double cosPhi = 1.0 - (2.0 * alpha * std::pow(RandomNum, 2)) / (1.0 + alpha - RandomNum); + return std::acos(cosPhi); +} + +std::vector evaluate_phi(const std::vector& RandomNums, double alpha) { + std::vector cosPhis; + cosPhis.reserve(RandomNums.size()); + + for (double RandomNum : RandomNums) { + double cosPhi = 1.0 - (2.0 * alpha * std::pow(RandomNum, 2)) / (1.0 + alpha - RandomNum); + cosPhis.push_back(cosPhi); + } + + std::vector phis; + phis.reserve(cosPhis.size()); + + for (double cosPhi : cosPhis) { + phis.push_back(std::acos(cosPhi)); + } + + return phis; +} + +double evaluate_pho(double RandomNum, double pi) { + return 2.0 * pi * RandomNum; +} + +std::vector evaluate_pho(const std::vector& RandomNums, double pi) { + std::vector phos; + phos.reserve(RandomNums.size()); + + for (double RandomNum : RandomNums) { + phos.push_back(2.0 * pi * RandomNum); + } + + return phos; +} + +double evaluate_direction_cosine_a(double phi, double psi, double cosineY, double cosineZ) { + double alpha = std::sin(psi) * std::sin(phi); + double beta = std::sin(phi) * std::cos(psi); + double gamma = std::cos(phi); + double cos_1 = cosineZ; + double sin_1 = std::sqrt(1.0 - cosineZ * cosineZ); + double cos_2 = cosineY / sin_1; + double sin_2 = cosineY / sin_1; + return alpha * cos_2 + sin_2 * (beta * cos_1 + gamma * sin_1); +} + +std::vector evaluate_direction_cosine_a(const std::vector& phis, + const std::vector& psis, + const std::vector& cosineYs, + const std::vector& cosineZs) { + std::vector results; + results.reserve(phis.size()); + + for (size_t i = 0; i < phis.size(); ++i) { + double phi = phis[i]; + double psi = psis[i]; + double cosineY = cosineYs[i]; + double cosineZ = cosineZs[i]; + + double alpha = std::sin(psi) * std::sin(phi); + double beta = std::sin(phi) * std::cos(psi); + double gamma = std::cos(phi); + double sin_1 = std::sqrt(1.0 - cosineZ * cosineZ); + double cos_2 = cosineY / sin_1; + double sin_2 = cosineY / sin_1; + + results.push_back(alpha * cos_2 + sin_2 * (beta * cosineZ + gamma * sin_1)); + } + + return results; +} + +double evaluate_direction_cosine_b(double phi, double psi, double cosineX, double cosineY, double cosineZ) { + double alpha = std::sin(phi) * std::sin(psi); + double beta = std::sin(phi) * std::cos(psi); + double gamma = std::cos(phi); + double sin_1 = std::sqrt(1.0 - cosineZ * cosineZ); + double cos_2 = cosineY / sin_1; + double sin_2 = cosineX / sin_1; + + return -alpha * sin_2 + cos_2 * (beta * cosineZ + gamma * sin_1); +} + +std::vector evaluate_direction_cosine_b(const std::vector& phis, + const std::vector& psis, + const std::vector& cosineXs, + const std::vector& cosineYs, + const std::vector& cosineZs) { + std::vector results; + results.reserve(phis.size()); + + for (size_t i = 0; i < phis.size(); ++i) { + double alpha = std::sin(phis[i]) * std::sin(psis[i]); + double beta = std::sin(phis[i]) * std::cos(psis[i]); + double gamma = std::cos(phis[i]); + double sin_1 = std::sqrt(1.0 - cosineZs[i] * cosineZs[i]); + double cos_2 = cosineYs[i] / sin_1; + double sin_2 = cosineXs[i] / sin_1; + + results.push_back(-alpha * sin_2 + cos_2 * (beta * cosineZs[i] + gamma * sin_1)); + } + + return results; +} + +double evaluate_direction_cosine_c(double phi, double psi, double cosineZ) { + double beta = std::sin(phi) * std::cos(psi); + double gamma = std::cos(phi); + double sin_1 = std::sqrt(1.0 - cosineZ * cosineZ); + double cos_1 = cosineZ; + + return -beta * sin_1 + gamma * cos_1; +} + + +std::vector evaluate_direction_cosine_c(const std::vector& phis, + const std::vector& psis, + const std::vector& cosineZs) { + std::vector results; + results.reserve(phis.size()); + + for (size_t i = 0; i < phis.size(); ++i) { + double beta = std::sin(phis[i]) * std::cos(psis[i]); + double gamma = std::cos(phis[i]); + double sin_1 = std::sqrt(1.0 - cosineZs[i] * cosineZs[i]); + double cos_1 = cosineZs[i]; + + results.push_back(-beta * sin_1 + gamma * cos_1); + } + + return results; +} + + +double evaluate_energy_loss_rate(double E, double EnergyLossMultiplierA, double EnergyLossMultiplier) { + return EnergyLossMultiplierA * (1.0 / E) * std::log(1.166 * (E + 0.85 * EnergyLossMultiplier) / EnergyLossMultiplier); +} + +std::vector evaluate_energy_loss_rate(const std::vector& energies, + double EnergyLossMultiplierA, + double EnergyLossMultiplier) { + std::vector results; + results.reserve(energies.size()); + + for (size_t i = 0; i < energies.size(); ++i) { + results.push_back(evaluate_energy_loss_rate(energies[i], EnergyLossMultiplierA, EnergyLossMultiplier)); + } + + return results; +} + +double get_random_uniform(double a, double b) { + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_real_distribution dis(a, b); + return dis(gen); +} + +std::vector initialize_positions(double step, double ProbeDiameter) { + double z0 = 1e-2 + step; + double x0 = ProbeDiameter * get_random_uniform(-1.0, 1.0); + double y0 = ProbeDiameter * get_random_uniform(-1.0, 1.0); + double vector_length = std::sqrt(x0 * x0 + y0 * y0 + z0 * z0); + double cosineX = x0 / vector_length; + double cosineY = y0 / vector_length; + double cosineZ = z0 / vector_length; + + return {cosineX, cosineY, cosineZ, z0, y0, x0, vector_length}; +} + +std::vector> initialize_positions(const std::vector& steps, double ProbeDiameter) { + std::vector> results; + results.reserve(steps.size()); + + for (double step : steps) { + results.push_back(initialize_positions(step, ProbeDiameter)); + } + + return results; +} + + + diff --git a/Scripts/InFluence/simulation/cpp_simulation/helper_functions.h b/Scripts/InFluence/simulation/cpp_simulation/helper_functions.h new file mode 100644 index 0000000..03197d2 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/helper_functions.h @@ -0,0 +1,58 @@ +#ifndef HELPER_FUNCTIONS_H +#define HELPER_FUNCTIONS_H + +#include +#include +#include + +int custom_round_down(double x, int decimals = 0); + +std::vector custom_round_down_vector(const std::vector& input_vec, int decimals); + +double evaluate_alpha(double E, double AlphaMultiplier); + +std::vector evaluate_alpha_vector(const std::vector& energies, double AlphaMultiplier); + +double evaluate_cross_section_opt(double E, double CrossSectionLogArgMultiplier, double CrossSectionNumorator, double CrossSectionDenominatorA, double CrossSectionDenominatorB); + +std::vector evaluate_cross_section_opt_vector(const std::vector& energies, double CrossSectionLogArgMultiplier, double CrossSectionNumorator, double CrossSectionDenominatorA, double CrossSectionDenominatorB); + +double evaluate_path_length(double CrossSection, double PathLengthMultiplier); + +std::vector evaluate_path_length_vector(const std::vector& cross_sections, double PathLengthMultiplier); + +double evaluate_step(double path_length, double RandomStep); + +std::vector evaluate_step(const std::vector& path_lengths, const std::vector& RandomSteps); + +double evaluate_phi(double RandomNum, double alpha); + +std::vector evaluate_phi(const std::vector& RandomNums, double alpha); + +double evaluate_pho(double RandomNum, double pi); + +std::vector evaluate_pho(const std::vector& RandomNums, double pi); + +double evaluate_direction_cosine_a(double phi, double psi, double cosineY, double cosineZ); + +std::vector evaluate_direction_cosine_a(const std::vector& phis, const std::vector& psis, const std::vector& cosineYs, const std::vector& cosineZs); + +double evaluate_direction_cosine_b(double phi, double psi, double cosineX, double cosineY, double cosineZ); + +std::vector evaluate_direction_cosine_b(const std::vector& phis, const std::vector& psis, const std::vector& cosineXs, const std::vector& cosineYs, const std::vector& cosineZs); + +double evaluate_direction_cosine_c(double phi, double psi, double cosineZ); + +std::vector evaluate_direction_cosine_c(const std::vector& phis, const std::vector& psis, const std::vector& cosineZs); + +double evaluate_energy_loss_rate(double E, double EnergyLossMultiplierA, double EnergyLossMultiplier); + +std::vector evaluate_energy_loss_rate(const std::vector& energies, double EnergyLossMultiplierA, double EnergyLossMultiplier); + +double get_random_uniform(double a, double b); + +std::vector initialize_positions(double step, double ProbeDiameter); + +std::vector> initialize_positions(const std::vector& steps, double ProbeDiameter); + +#endif // HELPER_FUNCTIONS_H diff --git a/Scripts/InFluence/simulation/cpp_simulation/helper_functions.o b/Scripts/InFluence/simulation/cpp_simulation/helper_functions.o new file mode 100644 index 0000000..e36934e Binary files /dev/null and b/Scripts/InFluence/simulation/cpp_simulation/helper_functions.o differ diff --git a/Scripts/InFluence/simulation/cpp_simulation/main.cpp b/Scripts/InFluence/simulation/cpp_simulation/main.cpp new file mode 100644 index 0000000..e02ea90 --- /dev/null +++ b/Scripts/InFluence/simulation/cpp_simulation/main.cpp @@ -0,0 +1,60 @@ +#include +#include + +#include "helper_functions.h" +#include "electrons_generator.h" +#include "MCloop.h" + +int main() { + // Create the sample 2D vector "Pixels" + + + double x_dimension = 1.0; + double y_dimension = 2.0; + double z_dimension = 3.0; + + // Number of rows in the array + int num_rows = 10000; + + // Initialize the vector of vectors + std::vector> Pixels; + + for (int i = 0; i < num_rows; ++i) { + int count = i % 4 + 1; + int x = i % 10 + 1; + int y = i % 10 + 1; + std::vector row = {static_cast(count), static_cast(x), static_cast(y), x_dimension, y_dimension, z_dimension}; + Pixels.push_back(row); + } + + + + + double E_i = 200; // Replace with the desired value of E_i + double ProbeDiameter = 0.1; // Replace with the desired value of ProbeDiameter + double MinimumEnergy = 0.05; // Replace with the desired value of MinimumEnergy + + + double dE_threshold = 0.00362; // Replace with the desired value of dE_threshold + int perfect_image_0 = 10000; // Replace with the desired value of perfect_image_0 + int perfect_image_1 = 10000; // Replace with the desired value of perfect_image_1 + double Density = 2.33; // Replace with the desired value of Density + double t_counting = 40; // Replace with the desired value of t_counting + + // Call the function for each row of Pixels + RunMCScatteringSimulation(Pixels, E_i, ProbeDiameter, MinimumEnergy, dE_threshold, perfect_image_0, perfect_image_1, Density, t_counting, AlphaMultiplier, + CrossSectionNumorator, + CrossSectionLogArgMultiplier, + double CrossSectionDenominatorA, + double CrossSectionDenominatorB, + double PathLengthMultiplier, + double EnergyLossMultiplierA, + double EnergyLossMultiplierB); + + std::cout<<"Simulation complete."< +#include // Include this header for automatic conversion + +#include "MCloop.h" + +namespace py = pybind11; + +// Wrap the RunMCScatteringSimulation function +py::list runMCScatteringSimulationWrapper( + py::list pixels, + double E_i, + double ProbeDiameter, + double MinimumEnergy, + double dE_threshold, + int perfect_image_0, + int perfect_image_1, + double Density, + double t_counting, + double AlphaMultiplier, + double CrossSectionNumorator, + double CrossSectionLogArgMultiplier, + double CrossSectionDenominatorA, + double CrossSectionDenominatorB, + double PathLengthMultiplier, + double EnergyLossMultiplierA, + double EnergyLossMultiplierB +) { + // Convert Python list of lists to C++ vector of vectors explicitly + std::vector> pixels_cpp; + for (const auto& row : pixels) { + // Convert each row (Python list) to a C++ vector explicitly + pixels_cpp.emplace_back(py::cast>(row)); + } + + // Call the original C++ function + std::vector> result = RunMCScatteringSimulation( + pixels_cpp, + E_i, + ProbeDiameter, + MinimumEnergy, + dE_threshold, + perfect_image_0, + perfect_image_1, + Density, + t_counting, + AlphaMultiplier, + CrossSectionNumorator, + CrossSectionLogArgMultiplier, + CrossSectionDenominatorA, + CrossSectionDenominatorB, + PathLengthMultiplier, + EnergyLossMultiplierA, + EnergyLossMultiplierB + ); + + // Convert the result back to a Python list of lists + py::list result_py; + for (const auto& row : result) { + result_py.append(py::cast(row)); + } + + return result_py; +} + +PYBIND11_MODULE(InFluence, m) { + m.doc() = "Your module's docstring"; // Optional module docstring + + // Bind the runMCScatteringSimulationWrapper function + m.def("RunMCScatteringSimulation", &runMCScatteringSimulationWrapper, "A description of your function"); +} diff --git a/Scripts/InFluence/simulation/cuda_simulation/MCLoop.cu b/Scripts/InFluence/simulation/cuda_simulation/MCLoop.cu new file mode 100644 index 0000000..4e9a58c --- /dev/null +++ b/Scripts/InFluence/simulation/cuda_simulation/MCLoop.cu @@ -0,0 +1,533 @@ +#include +#include + + + + +__device__ float getRand(float a, float b, curandState* state) +{ + return a + (b - a) * curand_uniform(state); +} + + +extern "C" { + + +__device__ int custom_round_down(double x, int decimals=0) { + double multiplier = pow(10.0, static_cast(decimals)); + double rounded_value = ceil(fabs(x) * multiplier - 0.5); + rounded_value /= multiplier; + return static_cast(rounded_value); +} + +__device__ double evaluate_alpha(double E, double AlphaMultiplier) { + return AlphaMultiplier / E; +} + +__device__ double evaluate_path_length(double CrossSection, double PathLengthMultiplier) { + double PathLength = PathLengthMultiplier * (1.0 / CrossSection); + return PathLength; +} + +__device__ float evaluate_cross_section_opt(float E, float CrossSectionLogArgMultiplier, float CrossSectionNumorator, float CrossSectionDenominatorA, float CrossSectionDenominatorB) { + float LogArg = log10f(E * CrossSectionLogArgMultiplier); + float CrossSection = CrossSectionNumorator / ((E + sqrtf(E) * CrossSectionDenominatorA) * (1.0f - expf(-1.0f * LogArg * LogArg) * CrossSectionDenominatorB)); + return CrossSection; +} + +__device__ double evaluate_step(double path_length, double RandomStep) { + return -path_length * logf(RandomStep); +} + +__device__ double evaluate_phi(double RandomNum, double alpha) { + double cosPhi = 1.0 - (2.0 * alpha * pow(RandomNum, 2)) / (1.0 + alpha - RandomNum); + return acosf(cosPhi); +} + +__device__ double evaluate_pho(double RandomNum, double pi) { + return 2.0 * pi * RandomNum; +} +__device__ double evaluate_direction_cosine_a(double phi, double psi, double cosineX, double cosineY, double cosineZ) { + float alpha = sinf(psi) * sinf(phi); + float beta = sinf(phi) * cosf(psi); + float gamma = cosf(phi); + float cos_1 = static_cast(cosineZ); + float sin_1 = sqrtf(1.0f - cos_1 * cos_1); + float cos_2 = static_cast(cosineY) / sin_1; + float sin_2 = static_cast(cosineX) / sin_1; // Corrected line + return static_cast(alpha * cos_2 + sin_2 * (beta * cos_1 + gamma * sin_1)); +} + +__device__ double evaluate_direction_cosine_b(double phi, double psi, double cosineX, double cosineY, double cosineZ) { + float alpha = sinf(static_cast(phi)) * sinf(static_cast(psi)); + float beta = sinf(static_cast(phi)) * cosf(static_cast(psi)); + float gamma = cosf(static_cast(phi)); + float sin_1 = sqrtf(1.0f - static_cast(cosineZ) * static_cast(cosineZ)); + float cos_2 = static_cast(cosineY) / sin_1; + float sin_2 = static_cast(cosineX) / sin_1; + + return static_cast(-alpha * sin_2 + cos_2 * (beta * static_cast(cosineZ) + gamma * sin_1)); +} + + +__device__ double evaluate_direction_cosine_c(double phi, double psi, double cosineZ) { + float beta = sinf(static_cast(phi)) * cosf(static_cast(psi)); + float gamma = cosf(static_cast(phi)); + float sin_1 = sqrtf(1.0f - static_cast(cosineZ) * static_cast(cosineZ)); + float cos_1 = static_cast(cosineZ); + + return static_cast(-beta * sin_1 + gamma * cos_1); +} + +__device__ double evaluate_energy_loss_rate(double E, double EnergyLossMultiplierA, double EnergyLossMultiplier) { + float log_arg = logf(1.166f * (E + 0.85f * static_cast(EnergyLossMultiplier)) / static_cast(EnergyLossMultiplier)); + return static_cast(EnergyLossMultiplierA * (1.0f / static_cast(E)) * log_arg); +} + + +__device__ void initialize_positions(double step, double ProbeDiameter, double* position_data, curandState* state) { + double z0 = 1e-2 + step; + double x0 = ProbeDiameter * getRand(-1.0, 1.0, state); + double y0 = ProbeDiameter * getRand(-1.0, 1.0, state); + double vector_length = sqrtf(x0 * x0 + y0 * y0 + z0 * z0); + double cosineX = x0 / vector_length; + double cosineY = y0 / vector_length; + double cosineZ = z0 / vector_length; + + // Store the results in the custom data structure (array) + position_data[0] = cosineX; + position_data[1] = cosineY; + position_data[2] = cosineZ; + position_data[3] = z0; + position_data[4] = y0; + position_data[5] = x0; + position_data[6] = vector_length; +} + + + +__device__ void atomicAdd_double(double* address, double value) { + unsigned long long int* address_as_ull = (unsigned long long int*)address; + unsigned long long int old = *address_as_ull, assumed; + + do { + assumed = old; + old = atomicCAS(address_as_ull, assumed, + __double_as_longlong(value + + __longlong_as_double(assumed))); + } while (assumed != old); + } + + +__global__ void MCScatteringSimulationKernel( + const double* pixels, + int numPixels, + double E_i, + double ProbeDiameter, + double MinimumEnergy, + double dE_threshold, + int perfect_image_0, + int perfect_image_1, + double Density, + double t_counting, + double AlphaMultiplier, + double CrossSectionNumorator, + double CrossSectionLogArgMultiplier, + double CrossSectionDenominatorA, + double CrossSectionDenominatorB, + double PathLengthMultiplier, + double EnergyLossMultiplierA, + double EnergyLossMultiplierB, + double* new_image_MCS) + + { + + int threadIndex_x = blockIdx.x * blockDim.x + threadIdx.x; + int threadIndex_y = blockIdx.y * blockDim.y + threadIdx.y; + + + + // Convert 2D thread indices to 1D index + int threadIndex = threadIndex_y * perfect_image_1 + threadIndex_x; + + curandState state; + curand_init(1234, threadIndex, 0, &state); + + + // Check if the thread index is within the valid range of pixels + if (threadIndex < numPixels) { + // Get pixel data for this thread + int pixelOffset = threadIndex * 6; // Each pixel has 6 values: count, i_coordinate, j_coordinate, x_dimension, y_dimension, z_dimension + int count = static_cast(pixels[pixelOffset]); + double i_coordinate = pixels[pixelOffset + 1]; + double j_coordinate = pixels[pixelOffset + 2]; + double x_dimension = pixels[pixelOffset + 3]; + double y_dimension = pixels[pixelOffset + 4]; + double z_dimension = pixels[pixelOffset + 5]; + + + // Initialize 2D arrays as device arrays (raw pointers) + int pixelIndex = static_cast(i_coordinate) * perfect_image_0 + static_cast(j_coordinate); + //eh_charge_counter[pixelIndex] = 0.0; + //new_image_MCS[pixelIndex] = 0.0; + + int number_transmitted = 0; + int number_eh_pairs = 0; + int number_stopped = 0; + int number_backscattered = 0; + + + if (count == 0) { + // Do nothing for this pixel + + } else { + // Loop 'count' times for this pixel + + + + for (int k = 0; k < count; ++k) { + + const int max_nnz = 50; // Maximum number of non-zero values + double values[max_nnz]; + int indices[max_nnz]; + int nnz = 0; // This will keep track of the number of non-zero values currently stored + int localCount = 0; + // Initialize variables for electron conditions + double alpha = evaluate_alpha(E_i, AlphaMultiplier); + double CrossSection = evaluate_cross_section_opt(E_i, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB); + double PathLength = evaluate_path_length(CrossSection, PathLengthMultiplier); + double RND_step = getRand(0.000001, 0.999999, &state); + double step = evaluate_step(PathLength, RND_step); + + // Initialize position data + double position_data[7]; + initialize_positions(step, ProbeDiameter, position_data, &state); + double cosineX = position_data[0]; + double cosineY = position_data[1]; + double cosineZ = position_data[2]; + double z0 = position_data[3]; + double y0 = position_data[4]; + double x0 = position_data[5]; + double E = E_i; + bool condition = true; + + + while (condition == true) { + + + // Generate random numbers + double RND_phi = getRand(0, 1, &state); + double RND_step = getRand(0.000001, 0.999999, &state); + double RND_pho = getRand(0, 1, &state); + + // Calculate alpha, cross section, path length, and step + double alpha = evaluate_alpha(E_i, AlphaMultiplier); + double CrossSection = evaluate_cross_section_opt(E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB); + double PathLength = evaluate_path_length(CrossSection, PathLengthMultiplier); + double step = evaluate_step(PathLength, RND_step); + + // Calculate energy loss and update energy + double dE = step * Density * evaluate_energy_loss_rate(E, EnergyLossMultiplierA, EnergyLossMultiplierB); + E = E + dE; + + // Calculate scattering angles and direction cosines + double phi = evaluate_phi(RND_phi, alpha); + double psi = evaluate_pho(RND_pho, M_PI); + + double ca = evaluate_direction_cosine_a(phi, psi, cosineX, cosineY, cosineZ); + double cb = evaluate_direction_cosine_b(phi, psi, cosineX, cosineY, cosineZ); + double cc = evaluate_direction_cosine_c(phi, psi, cosineZ); + + // Update positions + x0 = x0 + step * ca; + y0 = y0 + step * cb; + z0 = z0 + step * cc; + + // Update direction cosines + cosineX = ca; + cosineY = cb; + cosineZ = cc; + + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 1 : Electron stops in material. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (E <= MinimumEnergy) { + number_stopped++; + condition = false; + + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 2 : Electron backscatters. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (z0 < std::pow(10, -2)) { + number_backscattered++; + condition = false; + + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 3 : Electron penetrates the material. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (z0 > z_dimension) { + number_transmitted++; + condition = false; + + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 4 : Electron deposits sufficient energy. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if (-dE >= dE_threshold) { + int new_eh_pairs = std::floor(-dE / dE_threshold); + number_eh_pairs += new_eh_pairs; + + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 5 : Electron deposits sufficient energy and stays within pixel boundary. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if ((x0 <= x_dimension) && (x0 >= -x_dimension) && + (y0 <= y_dimension) && (y0 >= -y_dimension)) { + int pixel_1D_index = static_cast(i_coordinate) * perfect_image_1 + static_cast(j_coordinate); + + bool found = false; + for (int i = 0; i < nnz; ++i) { + if (indices[i] == pixel_1D_index) { + values[i] += static_cast(new_eh_pairs); + found = true; + break; + } + } + + if (!found && nnz < max_nnz) { + indices[nnz] = pixel_1D_index; + values[nnz] = static_cast(new_eh_pairs); + nnz++; + } + + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 6 : Electron deposits sufficient energy and moves positively in x and y. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if ((x0 > x_dimension) && (y0 > y_dimension)) { + + // Electron moves positively in x and y + + + + // Calculate the translations + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + + + + if ((i_coordinate + translation_x <= perfect_image_0 - 1) && (j_coordinate + translation_y <= perfect_image_1 - 1)) { + // Update the value in the device array using an atomic add + + int pixel_1D_index = (i_coordinate + translation_x) * perfect_image_1 + (j_coordinate + translation_y); + + + bool found = false; + for (int i = 0; i < nnz; ++i) { + if (indices[i] == pixel_1D_index) { + values[i] += static_cast(new_eh_pairs); + found = true; + break; + } + } + + if (!found && nnz < max_nnz) { + indices[nnz] = pixel_1D_index; + values[nnz] = static_cast(new_eh_pairs); + nnz++; + } + + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 7 : Electron deposits sufficient energy and moves negatively in x and y. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if ((x0 < -x_dimension) && (y0 < -y_dimension)) { + + + // Calculate the translations + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + + if ((i_coordinate - translation_x >= 0) && (j_coordinate - translation_y >= 0)) { + + + int pixel_1D_index = (i_coordinate - translation_x) * perfect_image_1 + (j_coordinate - translation_y); + + bool found = false; + for (int i = 0; i < nnz; ++i) { + if (indices[i] == pixel_1D_index) { + values[i] += static_cast(new_eh_pairs); + found = true; + break; + } + } + + if (!found && nnz < max_nnz) { + indices[nnz] = pixel_1D_index; + values[nnz] = static_cast(new_eh_pairs); + nnz++; + } + + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 8 : Electron deposits sufficient energy and moves positively in x only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (x0 > x_dimension) { + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + if (i_coordinate + translation_x <= perfect_image_0 - 1) { + // Update the value in the device array using an atomic add + + int pixel_1D_index = (i_coordinate + translation_x) * perfect_image_1 + j_coordinate; + + bool found = false; + for (int i = 0; i < nnz; ++i) { + if (indices[i] == pixel_1D_index) { + values[i] += static_cast(new_eh_pairs); + found = true; + break; + } + } + + if (!found && nnz < max_nnz) { + indices[nnz] = pixel_1D_index; + values[nnz] = static_cast(new_eh_pairs); + nnz++; + } + + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 9 : Electron deposits sufficient energy and moves negatively in x only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (x0 < -x_dimension) { + int translation_x = custom_round_down(x0 / (2 * x_dimension)); + if (i_coordinate - translation_x >= 0) { + // Update the value in the device array using an atomic add + + int pixel_1D_index = (i_coordinate - translation_x) * perfect_image_1 + j_coordinate; + + bool found = false; + for (int i = 0; i < nnz; ++i) { + if (indices[i] == pixel_1D_index) { + values[i] += static_cast(new_eh_pairs); + found = true; + break; + } + } + + if (!found && nnz < max_nnz) { + indices[nnz] = pixel_1D_index; + values[nnz] = static_cast(new_eh_pairs); + nnz++; + } + + } + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 10 : Electron deposits sufficient energy and moves positively in y only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (y0 > y_dimension) { + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + if (j_coordinate + translation_y <= perfect_image_1 - 1) { + // Update the value in the device array using an atomic add + + int pixel_1D_index = i_coordinate * perfect_image_1 + (j_coordinate + translation_y); + + + bool found = false; + for (int i = 0; i < nnz; ++i) { + if (indices[i] == pixel_1D_index) { + values[i] += static_cast(new_eh_pairs); + found = true; + break; + } + } + + if (!found && nnz < max_nnz) { + indices[nnz] = pixel_1D_index; + values[nnz] = static_cast(new_eh_pairs); + nnz++; + } + + } + + } + + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Scenario 11 : Electron deposits sufficient energy and moves negatively in y only. // + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + else if (y0 < -y_dimension) { + int translation_y = custom_round_down(y0 / (2 * y_dimension)); + if (j_coordinate - translation_y >= 0) { + // Update the value in the device array using an atomic add + + int pixel_1D_index = i_coordinate * perfect_image_1 + (j_coordinate - translation_y); + + + bool found = false; + for (int i = 0; i < nnz; ++i) { + if (indices[i] == pixel_1D_index) { + values[i] += static_cast(new_eh_pairs); + found = true; + break; + } + } + + if (!found && nnz < max_nnz) { + indices[nnz] = pixel_1D_index; + values[nnz] = static_cast(new_eh_pairs); + nnz++; + } + + + } + } + + } // Sufficient energy loop + } // wile loop + + for (int i = 0; i < nnz; ++i) { // nnz is the number of non-zero entries + int globalIndex = indices[i]; + values[i] = floor(dE_threshold * values[i] / t_counting); + atomicAdd_double(&(new_image_MCS[globalIndex]), values[i]); + + } + + + } //electron level + + } //else + + } //pixel_lop + + +} + +} // c linkage + + diff --git a/Scripts/InFluence/simulation/cuda_simulation/__init__.py b/Scripts/InFluence/simulation/cuda_simulation/__init__.py new file mode 100644 index 0000000..7e9431c --- /dev/null +++ b/Scripts/InFluence/simulation/cuda_simulation/__init__.py @@ -0,0 +1,6 @@ + +# DO NOT DELETE + +# This file existis in order that file CUDA may be recognised as a python module +# for the purposes of importing content of the CUDA file for use in py files. + diff --git a/Scripts/InFluence/simulation/cuda_simulation/__pycache__/__init__.cpython-310.pyc b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..dd325d6 Binary files /dev/null and b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/__init__.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/cuda_simulation/__pycache__/constants.cpython-310.pyc b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/constants.cpython-310.pyc new file mode 100644 index 0000000..1abda27 Binary files /dev/null and b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/constants.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/cuda_simulation/__pycache__/cuda_kernel_wrapper.cpython-310.pyc b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/cuda_kernel_wrapper.cpython-310.pyc new file mode 100644 index 0000000..4f4e6c3 Binary files /dev/null and b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/cuda_kernel_wrapper.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/cuda_simulation/__pycache__/gpu_simulation_interface.cpython-310.pyc b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/gpu_simulation_interface.cpython-310.pyc new file mode 100644 index 0000000..a568936 Binary files /dev/null and b/Scripts/InFluence/simulation/cuda_simulation/__pycache__/gpu_simulation_interface.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/cuda_simulation/constants.py b/Scripts/InFluence/simulation/cuda_simulation/constants.py new file mode 100644 index 0000000..d286e0d --- /dev/null +++ b/Scripts/InFluence/simulation/cuda_simulation/constants.py @@ -0,0 +1,20 @@ +import sys +sys.path.append("../../") +from parameters import SimulationParameters + +def CalculateConstants(ProgramParameters): + + AlphaMultiplier = (3.4*10**-3)*(ProgramParameters.ProtonNum**0.67) + CrossSectionNumorator = (4.7 * 10 ** -18) * (ProgramParameters.ProtonNum ** 1.33 + 0.032 * ProgramParameters.ProtonNum ** 2) + CrossSectionLogArgMultiplier = 8 * ProgramParameters.ProtonNum ** -1.33 + CrossSectionDenominatorA = 0.0155 * ProgramParameters.ProtonNum ** 1.33 + CrossSectionDenominatorB = 0.02 * ProgramParameters.ProtonNum ** 0.5 + PathLengthMultiplier = ProgramParameters.AtomicMass/(ProgramParameters.N * ProgramParameters.Density) + EnergyLossMultiplierA = -78500*ProgramParameters.ProtonNum/ProgramParameters.AtomicMass + EnergyLossMultiplierB = (9.76*ProgramParameters.ProtonNum + 58.5/ProgramParameters.ProtonNum**0.19)*10**-3 + + return AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +params = SimulationParameters() +params.refresh_config() +AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB = CalculateConstants(params) \ No newline at end of file diff --git a/Scripts/InFluence/simulation/cuda_simulation/cuda_kernel_wrapper.py b/Scripts/InFluence/simulation/cuda_simulation/cuda_kernel_wrapper.py new file mode 100644 index 0000000..afd75b2 --- /dev/null +++ b/Scripts/InFluence/simulation/cuda_simulation/cuda_kernel_wrapper.py @@ -0,0 +1,30 @@ +import os + +def get_script_directory(): + # Get the directory where the currently executing script is located + script_path = os.path.abspath(__file__) + script_dir = os.path.dirname(script_path) + return script_dir + +def load_cuda_kernel_code(file_path): + with open(file_path, "r") as f: + return f.read() + +def get_combined_cuda_kernel_code(): + # Get the directory of the currently executing script + script_dir = get_script_directory() + + # Define the names of CUDA kernel files relative to the script directory + kernel_files = [ + "gpu_helpers.cu", + "MCLoop.cu" + ] + + combined_code = "" + for file_name in kernel_files: + file_path = os.path.join(script_dir, file_name) + combined_code += load_cuda_kernel_code(file_path) + "\n" + + return combined_code + + diff --git a/Scripts/InFluence/simulation/cuda_simulation/gpu_helpers.cu b/Scripts/InFluence/simulation/cuda_simulation/gpu_helpers.cu new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Scripts/InFluence/simulation/cuda_simulation/gpu_helpers.cu @@ -0,0 +1 @@ + diff --git a/Scripts/InFluence/simulation/cuda_simulation/gpu_simulation_interface.py b/Scripts/InFluence/simulation/cuda_simulation/gpu_simulation_interface.py new file mode 100644 index 0000000..dc31b07 --- /dev/null +++ b/Scripts/InFluence/simulation/cuda_simulation/gpu_simulation_interface.py @@ -0,0 +1,96 @@ +from simulation.cuda_simulation.cuda_kernel_wrapper import get_combined_cuda_kernel_code +from simulation.cuda_simulation.constants import AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB +import pycuda.driver as drv +import pycuda.autoinit +import pycuda.compiler as cmp +import numpy as np +import pycuda.driver as drv +import pycuda.compiler as cmp +import numpy as np + + + +def GPU_KERNEL_MCScatteringSimulation(pixels, + E_i, + ProbeDiameter, + MinimumEnergy, + pixel_dimensions, + dE_threshold, + perfect_image_0, + perfect_image_1, + Density, + t_counting): + + # Create a CUDA context + ctx = drv.Device(0).make_context() + + # Create a 2D array from the 'pixels' list + pixels_array = np.vstack(( + [pixel.electron_count for pixel in pixels], # Column 0: Number of electrons in the pixel + [pixel.i for pixel in pixels], # Column 1: Pixel index i + [pixel.j for pixel in pixels], # Column 2: Pixel index j + [pixel.x_dimension for pixel in pixels], # Column 3: Dimension along the x-axis + [pixel.y_dimension for pixel in pixels], # Column 4: Dimension along the y-axis + [pixel.z_dimension for pixel in pixels] # Column 5: Dimension along the z-axis + )).T + + print('Pixel data prepared ...') + + + # Load the CUDA kernel code + kernel_code = get_combined_cuda_kernel_code() + + # Compile the kernel code + mcss_cuda_module = cmp.SourceModule(kernel_code, no_extern_c=True) + + # Get the kernel function + mcss_cuda_function = mcss_cuda_module.get_function("MCScatteringSimulationKernel") + + # Transfer the 'pixels' array to the GPU memory + pixels_gpu = drv.to_device(pixels_array) + + # Allocating memory on device + numPixels = pixels_array.size + + new_image_MCS_gpu = drv.mem_alloc(perfect_image_0 * perfect_image_1 * np.dtype(np.float64).itemsize) + + new_image_MCS = np.zeros((perfect_image_0, perfect_image_1), dtype=np.float64) + + drv.memcpy_htod(new_image_MCS_gpu, new_image_MCS) + + # 2D block and grid sizes + block_size_x = 16 + block_size_y = 16 + grid_size_x = (perfect_image_0 + block_size_x - 1) // block_size_x + grid_size_y = (perfect_image_1 + block_size_y - 1) // block_size_y + + print('Beginning simulation ...') + + # Launch the CUDA kernel + mcss_cuda_function(pixels_gpu, np.int32(numPixels), np.float64(E_i), np.float64(ProbeDiameter), + np.float64(MinimumEnergy), np.float64(dE_threshold), np.int32(perfect_image_0), + np.int32(perfect_image_1), np.float64(Density), np.float64(t_counting), + np.float64(AlphaMultiplier), + np.float64(CrossSectionNumorator), + np.float64(CrossSectionLogArgMultiplier), + np.float64(CrossSectionDenominatorA), + np.float64(CrossSectionDenominatorB), + np.float64(PathLengthMultiplier), + np.float64(EnergyLossMultiplierA), + np.float64(EnergyLossMultiplierB), + new_image_MCS_gpu, + + block=(block_size_x, block_size_y, 1), grid=(grid_size_x, grid_size_y)) + + print('Transferring data from GPU device back to host...') + drv.memcpy_dtoh(new_image_MCS, new_image_MCS_gpu) + + # Release GPU memory allocations + pixels_gpu.free() + new_image_MCS_gpu.free() + + # Release the CUDA context + ctx.pop() + + return new_image_MCS + diff --git a/Scripts/InFluence/simulation/python_simulation/__init__.py b/Scripts/InFluence/simulation/python_simulation/__init__.py new file mode 100644 index 0000000..ac744de --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/__init__.py @@ -0,0 +1 @@ +# Do not delete this empty file, it enables this directory to be recognised as a module. \ No newline at end of file diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/__init__.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..8a88114 Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/__init__.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/__init__.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..2af7183 Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/__init__.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/electron_object_constructor.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/electron_object_constructor.cpython-310.pyc new file mode 100644 index 0000000..fc72a86 Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/electron_object_constructor.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/electron_object_constructor.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/electron_object_constructor.cpython-38.pyc new file mode 100644 index 0000000..835199d Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/electron_object_constructor.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/helper_functions.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/helper_functions.cpython-310.pyc new file mode 100644 index 0000000..e10d744 Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/helper_functions.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/helper_functions.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/helper_functions.cpython-38.pyc new file mode 100644 index 0000000..bd5aaad Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/helper_functions.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions.cpython-310.pyc new file mode 100644 index 0000000..419070d Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions.cpython-38.pyc new file mode 100644 index 0000000..0693edd Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_plot.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_plot.cpython-310.pyc new file mode 100644 index 0000000..9ce5c5c Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_plot.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_plot.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_plot.cpython-38.pyc new file mode 100644 index 0000000..7a8d97e Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_plot.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_sparse.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_sparse.cpython-310.pyc new file mode 100644 index 0000000..638f121 Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_sparse.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_sparse.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_sparse.cpython-38.pyc new file mode 100644 index 0000000..29d2d1d Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/mcss_python_functions_sparse.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/plot_trajectory_functions.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/plot_trajectory_functions.cpython-310.pyc new file mode 100644 index 0000000..029e9cc Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/plot_trajectory_functions.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/plot_trajectory_functions.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/plot_trajectory_functions.cpython-38.pyc new file mode 100644 index 0000000..fae660f Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/plot_trajectory_functions.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/python_simulation_interface.cpython-310.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/python_simulation_interface.cpython-310.pyc new file mode 100644 index 0000000..f629a77 Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/python_simulation_interface.cpython-310.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/__pycache__/python_simulation_interface.cpython-38.pyc b/Scripts/InFluence/simulation/python_simulation/__pycache__/python_simulation_interface.cpython-38.pyc new file mode 100644 index 0000000..ebedbbb Binary files /dev/null and b/Scripts/InFluence/simulation/python_simulation/__pycache__/python_simulation_interface.cpython-38.pyc differ diff --git a/Scripts/InFluence/simulation/python_simulation/electron_object_constructor.py b/Scripts/InFluence/simulation/python_simulation/electron_object_constructor.py new file mode 100644 index 0000000..c10bce2 --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/electron_object_constructor.py @@ -0,0 +1,95 @@ +# electron.py + +from numba import float64, boolean +from numba.experimental import jitclass + +import math +import numpy as np +import random + +from simulation.python_simulation.helper_functions import custom_round_down, CalculateConstants, evaluate_alpha, evaluate_cross_section_opt, evaluate_path_length, evaluate_step, evaluate_phi, evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions, AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +local_random_uniform = random.uniform +spec = { + 'ProbeDiameter': float64, + 'E_i': float64, + 'E': float64, + 'alpha': float64, + 'CrossSection': float64, + 'PathLength': float64, + 'RND_step': float64, + 'step': float64, + 'InitialPosition': float64[:], + 'cosineX': float64, + 'cosineY': float64, + 'cosineZ': float64, + 'z0': float64, + 'y0': float64, + 'x0': float64, + 'condition': boolean, + 'dE': float64, + 'Density': float64 +} + +@jitclass(spec) +class ElectronEvolver: + + def __init__(self, E_i, ProbeDiameter, Density): + self.ProbeDiameter = ProbeDiameter + self.E_i = E_i + self.E = E_i + self.alpha = evaluate_alpha(self.E_i, AlphaMultiplier) + self.CrossSection = evaluate_cross_section_opt(self.E_i, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB) + self.PathLength = evaluate_path_length(self.CrossSection, PathLengthMultiplier) + self.RND_step = np.random.uniform(0.000001, 0.999999) + self.step = evaluate_step(self.PathLength, self.RND_step) + self.InitialPosition = initialise_postions(self.step, self.ProbeDiameter) + self.cosineX = self.InitialPosition[0] + self.cosineY = self.InitialPosition[1] + self.cosineZ = self.InitialPosition[2] + self.z0 = self.InitialPosition[3] + self.y0 = self.InitialPosition[4] + self.x0 = self.InitialPosition[5] + self.condition = True + self.dE = 0 + self.Density = Density + + def update_state(self): + """Updates the state of the electron based on input parameters and methods.""" + + RND_phi = local_random_uniform(0, 1) + RND_step = local_random_uniform(0.000001, 0.999999) + RND_pho = local_random_uniform(0, 1) + + alpha = evaluate_alpha(self.E, AlphaMultiplier) + cross = evaluate_cross_section_opt(self.E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB) + path_length = evaluate_path_length(self.CrossSection, PathLengthMultiplier) + step = evaluate_step(path_length, RND_step) + self.dE = step * self.Density * evaluate_energy_loss_rate(self.E, EnergyLossMultiplierA, EnergyLossMultiplierB) + self.E += self.dE + phi = evaluate_phi(RND_phi, alpha=alpha) + psi = evaluate_pho(RND_pho, math.pi) + + ca = evaluate_direction_cosine_a(phi, psi, self.cosineX, self.cosineY, self.cosineZ) + cb = evaluate_direction_cosine_b(phi, psi, self.cosineX, self.cosineY, self.cosineZ) + cc = evaluate_direction_cosine_c(phi, psi, self.cosineZ) + + self.x0 += step * ca + self.y0 += step * cb + self.z0 += step * cc + + self.cosineX = ca + self.cosineY = cb + self.cosineZ = cc + + + + + + + + + + + + diff --git a/Scripts/InFluence/simulation/python_simulation/helper_functions.py b/Scripts/InFluence/simulation/python_simulation/helper_functions.py new file mode 100644 index 0000000..c40ba91 --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/helper_functions.py @@ -0,0 +1,119 @@ +import numpy as np +import random +from numba import jit +import os + + +import sys +sys.path.append("../../") +from parameters import SimulationParameters + +params = SimulationParameters() +params.refresh_config() + +local_log10 = np.log10 +local_log = np.log +local_arccos = np.arccos +local_sin = np.sin +local_cos = np.cos +local_sqrt = np.sqrt +local_exp = np.exp +local_ceil = np.ceil +local_abs = np.abs + +@jit(nopython=True) +def custom_round_down(x, decimals=0): + multiplier = 10 ** decimals + rounded_value = local_ceil(local_abs(x) * multiplier - 0.5) + rounded_value /= multiplier + return int(rounded_value) + +def CalculateConstants(ProgramParameters): + + AlphaMultiplier = (3.4*10**-3)*(ProgramParameters.ProtonNum**0.67) + CrossSectionNumorator = (4.7 * 10 ** -18) * (ProgramParameters.ProtonNum ** 1.33 + 0.032 * ProgramParameters.ProtonNum ** 2) + CrossSectionLogArgMultiplier = 8 * ProgramParameters.ProtonNum ** -1.33 + CrossSectionDenominatorA = 0.0155 * ProgramParameters.ProtonNum ** 1.33 + CrossSectionDenominatorB = 0.02 * ProgramParameters.ProtonNum ** 0.5 + PathLengthMultiplier = ProgramParameters.AtomicMass/(ProgramParameters.N * ProgramParameters.Density) + EnergyLossMultiplierA = -78500*ProgramParameters.ProtonNum/ProgramParameters.AtomicMass + EnergyLossMultiplierB = (9.76*ProgramParameters.ProtonNum + 58.5/ProgramParameters.ProtonNum**0.19)*10**-3 + + return AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB = CalculateConstants(params) + +@jit(nopython=True) +def evaluate_alpha(E, AlphaMultiplier): + return AlphaMultiplier / E + +@jit(nopython=True) +def evaluate_cross_section_opt(E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB): + LogArg = local_log10(E * CrossSectionLogArgMultiplier) + CrossSection = CrossSectionNumorator / ((E + (E ** 0.5) * CrossSectionDenominatorA) * (1 - local_exp(-1 * LogArg ** 2) * CrossSectionDenominatorB)) + return CrossSection + +@jit(nopython=True) +def evaluate_path_length(CrossSection, PathLengthMultiplier): + PathLength = PathLengthMultiplier * (1/CrossSection) + return PathLength + +@jit(nopython=True) +def evaluate_step(path_length, RandomStep): + return -path_length*local_log(RandomStep) + +@jit(nopython=True) +def evaluate_phi(RandomNum, alpha): + cosPhi = 1 - (2*alpha*RandomNum**2)/(1+alpha-RandomNum) + return local_arccos(cosPhi) + +@jit(nopython=True) +def evaluate_pho(RandomNum, pi): + return 2*pi*RandomNum + +@jit(nopython=True) +def evaluate_direction_cosine_a(phi, psi, cosineX, cosineY, cosineZ): + alpha = local_sin(psi) * local_sin(phi) + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ**2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return alpha * cos_2 + sin_2 * (beta * cos_1 + gamma * sin_1) + +@jit(nopython=True) +def evaluate_direction_cosine_b(phi, psi, cosineX, cosineY, cosineZ): + alpha = local_sin(phi) * local_sin(psi) + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ ** 2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return -alpha * sin_2 + cos_2 * (beta * cos_1 + gamma * sin_1) + +@jit(nopython=True) +def evaluate_direction_cosine_c(phi, psi, cosineZ): + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ ** 2) + return -beta*sin_1 + gamma*cos_1 + +@jit(nopython=True) +def evaluate_energy_loss_rate(E, EnergyLossMultiplierA, EnergyLossMultiplier): + return EnergyLossMultiplierA*(1/E)*local_log(1.166*(E+0.85*EnergyLossMultiplier)/EnergyLossMultiplier) + +@jit(nopython=True) +def initialise_postions(step, ProbeDiameter): + z0 = 10**-2 + step + x0 = ProbeDiameter * random.uniform(-1, 1) + y0 = ProbeDiameter * random.uniform(-1, 1) + vector_length = local_sqrt(x0**2 + y0**2 + z0**2) + cosineX = x0/vector_length + cosineY = y0/vector_length + cosineZ = z0/vector_length + return np.array([cosineX, cosineY, cosineZ, z0, y0, x0, vector_length]) + + diff --git a/Scripts/InFluence/simulation/python_simulation/mcss_python_functions.py b/Scripts/InFluence/simulation/python_simulation/mcss_python_functions.py new file mode 100644 index 0000000..1c2e31c --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/mcss_python_functions.py @@ -0,0 +1,195 @@ + +import math +import random +import numpy as np +from tqdm import tqdm +from multiprocessing import Pool, cpu_count +from joblib import Parallel, delayed +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 + + +from simulation.python_simulation.helper_functions import ( + custom_round_down, evaluate_alpha, evaluate_cross_section_opt, + evaluate_path_length, evaluate_step, evaluate_phi, + evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, + evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions +) +from simulation.python_simulation.electron_object_constructor import ElectronEvolver + +from numba import njit, prange, jit, float64, int32, typed, typeof +from numba.experimental import jitclass +from numba.typed import List +from threading import Lock +from scipy.sparse import csr_matrix, lil_matrix + + + +@jit(nopython=True, parallel=True) +def MonteCarloScatteringSimulation_function( + pixels, + E_i, + dE_threshold, + MinimumEnergy, + Density, + t_counting, + N, + ProbeDiameter, + image_shape_0, + image_shape_1 + ): + + + ModulatedImage = np.zeros((image_shape_0, image_shape_1), dtype=np.float64) + local_random_uniform = random.uniform + + print(len(pixels)) + + for i in prange(len(pixels)): + + pixel = pixels[i] + for j in prange(pixel.electron_count): + + pixel_x_dimension = pixel.x_dimension + pixel_y_dimension = pixel.y_dimension + pixel_z_dimension = pixel.z_dimension + pixel_i = pixel.i + pixel_j = pixel.j + + electron = ElectronEvolver( + E_i, ProbeDiameter, Density) + + ElectronHoleChargeCounter = np.zeros((image_shape_0, image_shape_1), dtype = np.float64) + + + while electron.condition: + + + electron.update_state() + + electron_x0 = electron.x0 + electron_y0 = electron.y0 + electron_z0 = electron.z0 + number_stopped=0 + number_backscattered =0 + number_transmitted=0 + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + if electron.E <= MinimumEnergy: #if electron stops in the material + number_stopped = number_stopped + 1 + electron.condition = False + + if electron_z0 < 0.01: #if electron backscatters + number_backscattered = number_backscattered + 1 + electron.condition = False + + if electron_z0 > pixel_z_dimension: # if electron penetrates material #change to have de/ds as the counting + + number_transmitted = number_transmitted + 1 + electron.condition = False + + # ------------------------------------------------------------------------------ Electron Deposits Sufficient Energy ------------------------------------------------------------------------------ # + + if -1*electron.dE >= dE_threshold: + new_eh_pairs = math.floor(-1*electron.dE/dE_threshold) + + # ------------------------------------------------------------------------------ Electron Stays Within Pixel Boundary ------------------------------------------------------------------------------ # + + if (electron_x0 <= 1*pixel_x_dimension) and (electron_x0 >= -1*pixel_x_dimension) and (electron_y0 <= 1*pixel_y_dimension)and (electron_y0 >=-1*pixel_y_dimension): #electron stays within pixel region + + ElectronHoleChargeCounter[pixel_i, pixel_j] += new_eh_pairs + + + # ------------------------------------------------------------------------------ Electron Moves Positively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 > 1*pixel_x_dimension) and (electron_y0 > 1*pixel_y_dimension): + translation_x = custom_round_down(x = electron_x0/(pixel_x_dimension)) + translation_y = custom_round_down(x = electron_y0/(2*pixel_y_dimension)) + + if pixel_i + translation_x <= image_shape_0 - 1 and pixel_j + translation_y <= image_shape_0 - 1: + ElectronHoleChargeCounter[pixel_i + translation_x, pixel_j + translation_y] += new_eh_pairs + + # ------------------------------------------------------------------------------ Electron Moves Negatively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 < -1*pixel_x_dimension) and (electron_y0 < -1*pixel_y_dimension): #electron moves negatively in x + # and y + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j - translation_y >= 0: + ElectronHoleChargeCounter[pixel_i - translation_x, pixel_j - translation_y] += new_eh_pairs + + # ----------------------------------------------------------------------- Electron Moves Positively in X and Negatively in Y ------------------------------------------------------------------------ # + + + elif electron_x0 > (1*pixel_x_dimension) and electron_y0 < (-1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j - translation_y >= 0 and pixel_i + translation_x <= image_shape_0 - 1: + + ElectronHoleChargeCounter[pixel_i + translation_x, pixel_j - translation_y] += new_eh_pairs + + + # ----------------------------------------------------------------------- Electron Moves Negatively in X and Positively in Y ------------------------------------------------------------------------ # + + + elif electron_x0 < (-1*pixel_x_dimension) and electron_y0 > (1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j + translation_y <= image_shape_0 - 1: + ElectronHoleChargeCounter[pixel_i - translation_x, pixel_j + translation_y] += new_eh_pairs + + + # ------------------------------------------------------------------------------ Electron Moves Positively in X Direction ----------------------------------------------------------------------------- # + + + elif electron_x0 > (1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i + \ + translation_x <= image_shape_0 - 1: + + ElectronHoleChargeCounter[pixel_i + translation_x, pixel_j] += new_eh_pairs + + + # ------------------------------------------------------------------------------ Electron Moves in Negative in X Direction ----------------------------------------------------------------------------- # + + + elif electron_x0 < (-1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i - translation_x >= 0: + + ElectronHoleChargeCounter[pixel_i - translation_x, pixel_j] += new_eh_pairs + + + # --------------------------------------------------------------------------------- Electron Moves in Positive Y Direction ------------------------------------------------------------------------------ # + + + elif electron_y0 > (1*pixel_y_dimension): + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j + \ + translation_y <= image_shape_0 - 1: + + ElectronHoleChargeCounter[pixel_i, pixel_j + translation_y] += new_eh_pairs + + # ---------------------------------------------------------------------------------- Electron Moves in Negative Y Direction ------------------------------------------------------------------------------- # + + elif electron_y0 < (-1*pixel_x_dimension): #electron moves in negative y direction + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + + if pixel_j - translation_y >= 0: + + ElectronHoleChargeCounter[pixel_i, pixel_j - translation_y] += new_eh_pairs + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + + ElectronHoleChargeCounter = np.floor(dE_threshold * ElectronHoleChargeCounter / t_counting) + + ModulatedImage += ElectronHoleChargeCounter + + return ModulatedImage + + + diff --git a/Scripts/InFluence/simulation/python_simulation/mcss_python_functions_plot.py b/Scripts/InFluence/simulation/python_simulation/mcss_python_functions_plot.py new file mode 100644 index 0000000..584fd22 --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/mcss_python_functions_plot.py @@ -0,0 +1,124 @@ + +import math +import random +import numpy as np +from tqdm import tqdm +from multiprocessing import Pool, cpu_count +from joblib import Parallel, delayed +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 +import numba + + +from simulation.python_simulation.helper_functions import ( + custom_round_down, evaluate_alpha, evaluate_cross_section_opt, + evaluate_path_length, evaluate_step, evaluate_phi, + evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, + evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions +) +from simulation.python_simulation.electron_object_constructor import ElectronEvolver + + +from numba import njit, prange, jit, float64, int32, typed, typeof +from numba.experimental import jitclass +from numba.typed import List + + + + +def MonteCarloScatteringSimulationPlot_function( + pixels, + E_i, + dE_threshold, + MinimumEnergy, + Density, + t_counting, + N, + ProbeDiameter, + image_shape_0, + image_shape_1): + + + #counters + number_transmitted = 0 + number_backscattered = 0 + number_stopped = 0 + vector_coordinates_x = List([np.float64(0)]) + vector_coordinates_y = List([np.float64(0)]) + vector_coordinates_z = List([np.float64(0)]) + points_per_trajectory = List([np.float64(0)]) + + ModulatedImage_flat = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + local_math_floor = math.floor + local_numpy_floor = np.floor + + ModulatedImage_total = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + + counter = 0 + + for i in range(len(pixels)): + + counter +=1 + print(counter) + + + pixel = pixels[i] + for j in range(pixel.electron_count): + + point_counter = 1 + + pixel_x_dimension = pixel.x_dimension + pixel_y_dimension = pixel.y_dimension + pixel_z_dimension = pixel.z_dimension + pixel_i = pixel.i + pixel_j = pixel.j + + electron = ElectronEvolver(E_i, ProbeDiameter, Density) + + vector_coordinates_x.append(electron.x0) + vector_coordinates_y.append(electron.y0) + vector_coordinates_z.append(electron.z0) + + ElectronHoleChargeCounter_index = List([np.float64(0)]) + ElectronHoleChargeCounter_values = List([np.float64(0)]) + + + while electron.condition: # Monte Carlo Loop until backscatter, trasmission or stopping + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + if electron.E <= MinimumEnergy: #if electron stops in the material + number_stopped = number_stopped + 1 + electron.condition = False + + if electron.z0 < 0.01: #if electron backscatters + number_backscattered = number_backscattered + 1 + electron.condition = False #not sure how to deal with electron scattering outside of material + + if electron.z0 > pixel_z_dimension: # if electron penetrates material #change to have de/ds as the counting + + number_transmitted = number_transmitted + 1 + electron.condition = False + + + electron.update_state() + + + number_stopped=0 + number_backscattered =0 + number_transmitted=0 + + vector_coordinates_x.append(electron.x0) + vector_coordinates_y.append(electron.y0) + vector_coordinates_z.append(electron.z0) + point_counter += 1 + + points_per_trajectory.append(point_counter) + + + return np.reshape(ModulatedImage_flat, (image_shape_0, image_shape_1)), vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory + + + + + \ No newline at end of file diff --git a/Scripts/InFluence/simulation/python_simulation/mcss_python_functions_sparse.py b/Scripts/InFluence/simulation/python_simulation/mcss_python_functions_sparse.py new file mode 100644 index 0000000..5bbec82 --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/mcss_python_functions_sparse.py @@ -0,0 +1,285 @@ + +import math +import random +import numpy as np +from tqdm import tqdm +from multiprocessing import Pool, cpu_count +from joblib import Parallel, delayed +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 +import numba + + +from simulation.python_simulation.helper_functions import ( + custom_round_down, evaluate_alpha, evaluate_cross_section_opt, + evaluate_path_length, evaluate_step, evaluate_phi, + evaluate_pho, evaluate_direction_cosine_a, evaluate_direction_cosine_b, + evaluate_direction_cosine_c, evaluate_energy_loss_rate, initialise_postions +) +from simulation.python_simulation.electron_object_constructor import ElectronEvolver + + +from numba import njit, prange, jit, float64, int32, typed, typeof +from numba.experimental import jitclass +from numba.typed import List + + + +@jit(nopython=True, parallel = True) +def MonteCarloScatteringSimulationSparse_function( + pixels, + E_i, + dE_threshold, + MinimumEnergy, + Density, + t_counting, + N, + ProbeDiameter, + image_shape_0, + image_shape_1): + + + ModulatedImage_flat = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + local_math_floor = math.floor + local_numpy_floor = np.floor + + ModulatedImage_total = np.zeros(image_shape_0 * image_shape_1, dtype=np.float64) + + for i in prange(len(pixels)): + + + pixel = pixels[i] + for j in prange(pixel.electron_count): + + pixel_x_dimension = pixel.x_dimension + pixel_y_dimension = pixel.y_dimension + pixel_z_dimension = pixel.z_dimension + pixel_i = pixel.i + pixel_j = pixel.j + + electron = ElectronEvolver(E_i, ProbeDiameter, Density) + + ElectronHoleChargeCounter_index = List([np.float64(0)]) + ElectronHoleChargeCounter_values = List([np.float64(0)]) + + + while electron.condition: # Monte Carlo Loop until backscatter, trasmission or stopping + + + electron.update_state() + + electron_x0 = electron.x0 + electron_y0 = electron.y0 + electron_z0 = electron.z0 + electron_dE = electron.dE + number_stopped=0 + number_backscattered =0 + number_transmitted=0 + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + if electron.E <= MinimumEnergy: #if electron stops in the material + number_stopped = number_stopped + 1 + electron.condition = False + + if electron_z0 < 0.01: #if electron backscatters + number_backscattered = number_backscattered + 1 + electron.condition = False + + if electron_z0 > pixel_z_dimension: # if electron penetrates material #change to have de/ds as the counting + + number_transmitted = number_transmitted + 1 + electron.condition = False + + # ------------------------------------------------------------------------------ Electron Deposits Sufficient Energy ------------------------------------------------------------------------------ # + + if -1*electron_dE >= dE_threshold: + new_eh_pairs = local_math_floor(-1*electron_dE/dE_threshold) + + # ------------------------------------------------------------------------------ Electron Stays Within Pixel Boundary ------------------------------------------------------------------------------ # + + if (electron_x0 <= 1*pixel_x_dimension) and (electron_x0 >= -1*pixel_x_dimension) and (electron_y0 <= 1*pixel_y_dimension)and (electron_y0 >=-1*pixel_y_dimension): #electron stays within pixel region + + pixel_1D_index = pixel_i*image_shape_1+pixel_j + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves Positively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 > 1*pixel_x_dimension) and (electron_y0 > 1*pixel_y_dimension): + translation_x = custom_round_down(x = electron_x0/(pixel_x_dimension)) + translation_y = custom_round_down(x = electron_y0/(2*pixel_y_dimension)) + + if pixel_i + translation_x <= image_shape_0 - 1 and pixel_j + translation_y <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves Negatively in X and Y ------------------------------------------------------------------------------ # + + elif (electron_x0 < -1*pixel_x_dimension) and (electron_y0 < -1*pixel_y_dimension): #electron moves negatively in x + # and y + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j - translation_y >= 0: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ----------------------------------------------------------------------- Electron Moves Positively in X and Negatively in Y ------------------------------------------------------------------------ # + + elif electron_x0 > (1*pixel_x_dimension) and electron_y0 < (-1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j - translation_y >= 0 and pixel_i + translation_x <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i + translation_x) * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ----------------------------------------------------------------------- Electron Moves Negatively in X and Positively in Y ------------------------------------------------------------------------ # + + + elif electron_x0 < (-1*pixel_x_dimension) and electron_y0 > (1*pixel_y_dimension): + + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_i - translation_x >= 0 and pixel_j + translation_y <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + (pixel_j + translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves Positively in X Direction ----------------------------------------------------------------------------- # + + elif electron_x0 > (1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i + \ + translation_x <= image_shape_0 - 1: + + pixel_1D_index = (pixel_i + translation_x) * image_shape_1 + pixel_j + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ------------------------------------------------------------------------------ Electron Moves in Negative in X Direction ----------------------------------------------------------------------------- # + + elif electron_x0 < (-1*pixel_x_dimension): + translation_x = custom_round_down(x=electron_x0 / (2 * pixel_x_dimension)) + if pixel_i - translation_x >= 0: + + pixel_1D_index = (pixel_i - translation_x) * image_shape_1 + pixel_j + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # --------------------------------------------------------------------------------- Electron Moves in Positive Y Direction ------------------------------------------------------------------------------ # + + + elif electron_y0 > (1*pixel_y_dimension): + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + if pixel_j + \ + translation_y <= image_shape_0 - 1: + + pixel_1D_index = pixel_i * image_shape_1 + (pixel_j + translation_y) + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + # ---------------------------------------------------------------------------------- Electron Moves in Negative Y Direction ------------------------------------------------------------------------------- # + + elif electron_y0 < (-1*pixel_x_dimension): #electron moves in negative y direction + translation_y = custom_round_down(x=electron_y0 / (2 * pixel_y_dimension)) + + if pixel_j - translation_y >= 0: + + pixel_1D_index = pixel_i * image_shape_1 + (pixel_j - translation_y) + + if pixel_1D_index in ElectronHoleChargeCounter_index: + + i = ElectronHoleChargeCounter_index.index(pixel_1D_index) + ElectronHoleChargeCounter_values[i] += new_eh_pairs + + else: + + ElectronHoleChargeCounter_index.append(pixel_1D_index) + ElectronHoleChargeCounter_values.append(new_eh_pairs) + + + # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # + + for k in prange(len(ElectronHoleChargeCounter_index)): + idx = int(ElectronHoleChargeCounter_index[k]) + value = ElectronHoleChargeCounter_values[k] + ModulatedImage_flat[idx] += local_numpy_floor(dE_threshold * value / t_counting) + + + return np.reshape(ModulatedImage_flat, (image_shape_0, image_shape_1)) + + + + + \ No newline at end of file diff --git a/Scripts/InFluence/simulation/python_simulation/plot_trajectory_functions.py b/Scripts/InFluence/simulation/python_simulation/plot_trajectory_functions.py new file mode 100644 index 0000000..cfcc9f9 --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/plot_trajectory_functions.py @@ -0,0 +1,141 @@ +import time +import random +from numba.typed import List +import numpy as np +import matplotlib +import matplotlib.pyplot as plt + + +def PlotTrajectories(vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory): + + + path_to_trajectory_plot = "./3D_plot.png" + path_to_trajectory_plot_svg = "./3D_plot.svg" + path_to_trajectory_plot_v2 = "./3D_plot_v2.png" + path_to_trajectory_plot_v2_svg = "./3D_plot_v2.svg" + path_to_trajectory_histogram_plot = './histogram_plot.png' + path_to_trajectory_histogram_plot_svg = './histogram_plot.svg' + + + start = time.time() + print('\nCalculating electron trajectories...') + random.seed() + x_axis, y_axis, z_axis, p= vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory + print('\nPlotting electron trajectories...') + del p[0] + del x_axis[0] + del y_axis[0] + del z_axis[0] + p = List(map(int, p)) + + distance_from_centre = [] #for plotting lateral spread bar chart + + #suppress plotting to use savefig + + + + #Plot 3D spread + fig = plt.figure(figsize=(12, 12), dpi= 100) #change resolution of plot, size of plot + ax = plt.axes(projection = '3d') #initialise axes + ax.view_init(elev = 185, azim = 135) #view down z axis #185, 135 fro diaganal view + plt.xlabel('x direction [$\mu$m]', fontsize = 24, labelpad= 40) #um because multiplied by 10000 + # later + plt.ylabel('y direction [$\mu$m]', fontsize = 24, labelpad= 40) + ax.set_zlabel('z direction [$\mu$m]', fontsize = 24, labelpad = 40) + #ax.w_zaxis.line.set_lw(0.) #make z linewidth zero and remove labels -> effectively make z axis invisible + #ax.set_zticks([]) + ax.xaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) + ax.xaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) + ax.yaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) + ax.yaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) + ax.zaxis.set_tick_params(which='major', size=22, width=2, direction='inout', pad = 15) + ax.zaxis.set_tick_params(which='minor', size=17, width=2, direction='inout', pad = 15) + #ax.xaxis.set_major_locator(mpl.ticker.MultipleLocator(10)) + #ax.yaxis.set_major_locator(mpl.ticker.MultipleLocator(10)) + ax.xaxis.pane.fill = False + ax.yaxis.pane.fill = False + ax.zaxis.pane.fill = False + ax.xaxis.pane.set_edgecolor('w') + ax.yaxis.pane.set_edgecolor('w') + ax.zaxis.pane.set_edgecolor('w') + num = len(p) + beginning = 0 + for i in range(0, num): + end = beginning + p[i] + x_coords = 10000*np.array(x_axis[beginning:end]) #multiply to change to um + y_coords = 10000*np.array(y_axis[beginning:end]) + z_coords = 10000*np.array(z_axis[beginning:end]) + + + #Get info. for distance from centre + distance = (x_coords[-1]**2 +y_coords[-1]**2)**0.5 + distance_from_centre.append(distance) + + #Plot 3D spread + ax.plot(x_coords, y_coords, z_coords, color=(random.uniform(0, 1), random.uniform(0, 1), random.uniform( + 0, 1))) + + beginning = end + + #Plot 3D spread + plt.tight_layout() + plt.autoscale() + lim_upper = np.max([abs(max(plt.xlim())), abs(max(plt.ylim())), abs(min(plt.xlim())), abs(min(plt.ylim()))]) + plt.xlim(-lim_upper, lim_upper) + plt.ylim(-lim_upper, lim_upper) #these limits ensure that x and y axes are the same size, ie. square box. Size is + #biggest distance away from centre + + + + + #filename = r'I:\Monte Carlo stuff\ImagesForPaper\sideview60keV.svg' + plt.savefig(path_to_trajectory_plot, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0) + plt.savefig(path_to_trajectory_plot_svg, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) + ax.view_init(elev=90, azim=0) + ax.zaxis.set_ticklabels([]) + ax.set_zlabel('') + plt.savefig(path_to_trajectory_plot_v2, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) + plt.savefig(path_to_trajectory_plot_v2_svg, dpi=300, transparent=True, bbox_inches='tight', pad_inches=0) + plt.close(fig) + #print('time elapsed: ', time.clock() - start) + + # Plot histogram + + def bins_labels(bins, **kwargs): + bin_w = ((max(bins) - min(bins)) / (len(bins) - 1)) + lbls = np.around(bins[1:] - bin_w / 2, decimals=2) + plt.xticks(np.arange(min(bins) + bin_w / 2, max(bins), bin_w), lbls, + **kwargs) + + + from matplotlib.ticker import PercentFormatter + + distance_from_centre = np.around(np.array(distance_from_centre), decimals=2) + distance_from_centre = distance_from_centre[~np.isnan(distance_from_centre)] + # Plot distance from centre + fig_hist = plt.figure(figsize=(14, 7), dpi=100) + plt.style.use('seaborn-whitegrid') + n, bins, patches = plt.hist(distance_from_centre, bins=10, facecolor='#2ab0ff', edgecolor='black', + linewidth=1.5, weights=np.ones(len(distance_from_centre)) / len(distance_from_centre)) + plt.gca().yaxis.set_major_formatter(PercentFormatter(1)) + # plt.title('Histogram of the final distance travelled by each electron relative to the centre of the pixel', + # fontsize=16) + plt.xlabel('Final distance of an electron from its point of incidence [$\mu$m]', fontsize=14, labelpad=25) + plt.ylabel('Counts', fontsize=14, labelpad=25) + for count, patch in enumerate(patches): + #patch.set_facecolor(colors[np.random.randint(100) % nbins]) + x = patch.get_x() + patch.get_width() / 2 + y = patch.get_height() + #print(y) + plt.annotate('{}%'.format(np.around(y*100, decimals = 2)), (x, y+0.0075), ha='center') + #plt.grid() + #plt.box(on=None) + bins_labels(bins, rotation=0, fontsize=10) + plt.ylim() + bottom, top = plt.ylim() + plt.ylim(top = 1.2*top) + + plt.savefig(path_to_trajectory_histogram_plot, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0 ) + plt.savefig(path_to_trajectory_histogram_plot_svg, dpi = 300,transparent = True, bbox_inches = 'tight', pad_inches = 0 ) + plt.close(fig_hist) + print('\n\nRun time: ', time.time() - start) \ No newline at end of file diff --git a/Scripts/InFluence/simulation/python_simulation/python_simulation_interface.py b/Scripts/InFluence/simulation/python_simulation/python_simulation_interface.py new file mode 100644 index 0000000..ebbd4fe --- /dev/null +++ b/Scripts/InFluence/simulation/python_simulation/python_simulation_interface.py @@ -0,0 +1,108 @@ +from simulation.python_simulation.mcss_python_functions import MonteCarloScatteringSimulation_function +from simulation.python_simulation.mcss_python_functions_sparse import MonteCarloScatteringSimulationSparse_function +from simulation.python_simulation.mcss_python_functions_plot import MonteCarloScatteringSimulationPlot_function +from simulation.python_simulation.plot_trajectory_functions import PlotTrajectories + + +from math import pi +import numpy as np + +from numba.typed import Dict +from numba.types import UniTuple, int64, float64 + +from numba.typed import List + + +class MonteCarloScatteringSimulation: + + def __init__(self, image_object, params): + + + pixels_typed = List() + for pixel in image_object.pixels: + pixels_typed.append(pixel) + + self.pixels = pixels_typed + self.image_object = image_object + + self.E_i = params.E_i + self.dE_threshold = params.dE_threshold + self.MinimumEnergy = params.minimum_energy + self.ProtonNum = params.ProtonNum + self.AtomicMass = params.AtomicMass + self.Density = params.Density + self.t_counting = params.t_counting + self.N = params.N + self.ProbeDiameter = image_object.pixel_dimensions[0] + self.image_shape_0 = image_object.perfect_image.shape[0] + self.image_shape_1 = image_object.perfect_image.shape[1] + self.pi = pi + self.params = params + + + + + self.new_image_MCS = np.zeros((self.image_shape_0, self.image_shape_1), dtype=np.float64) + + + def RunMCScatteringSimulation(self): + SimulationResult = MonteCarloScatteringSimulation_function(self.pixels, + self.E_i, + self.dE_threshold, + self.MinimumEnergy, + self.Density, + self.t_counting, + self.N, + self.ProbeDiameter, + self.image_shape_0, + self.image_shape_1) + + return SimulationResult + + def RunMCScatteringSimulation_Sparse(self): + SimulationResult = MonteCarloScatteringSimulationSparse_function(self.pixels, + self.E_i, + self.dE_threshold, + self.MinimumEnergy, + self.Density, + self.t_counting, + self.N, + self.ProbeDiameter, + self.image_shape_0, + self.image_shape_1) + + + return np.reshape(SimulationResult, (self.image_shape_0, self.image_shape_1)) + + + def RunMCScatteringSimulation_Plot(self): + if self.params.dose > 5000: + # Raise an exception and exit the program with an error code + error_message = "Dose is too high. Please enter an electron dose lower than 5000." + raise ValueError(error_message) + + SimulationResult, vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory = MonteCarloScatteringSimulationPlot_function(self.pixels, + self.E_i, + self.dE_threshold, + self.MinimumEnergy, + self.Density, + self.t_counting, + self.N, + self.ProbeDiameter, + self.image_shape_0, + self.image_shape_1) + PlotTrajectories(vector_coordinates_x, vector_coordinates_y, vector_coordinates_z, points_per_trajectory) + return SimulationResult + + + + + + + + + + + + + diff --git a/Scripts/InFluence/simulation/simulation_interface.py b/Scripts/InFluence/simulation/simulation_interface.py new file mode 100644 index 0000000..362dec6 --- /dev/null +++ b/Scripts/InFluence/simulation/simulation_interface.py @@ -0,0 +1,90 @@ +from numba.typed import List +from simulation.python_simulation.python_simulation_interface import MonteCarloScatteringSimulation + + + +class InFluenceSimulation: + + def __init__(self, image_object, params): + self.image_object = image_object + self.image_object.generate_scaled_perfect_image() + self.image_object.generate_perfect_image_pixel_objects() + self.ProbeDiameter = self.image_object.pixel_dimensions[0] + self.E_i = params.E_i + self.dE_threshold = params.dE_threshold + self.MinimumEnergy = params.minimum_energy + self.ProtonNum = params.ProtonNum + self.AtomicMass = params.AtomicMass + self.Density = params.Density + self.t_counting = params.t_counting + self.N = params.N + image_object = None + image_object = None + self.params = params + + def RunMCSimulation_Py(self, py_sim_type): + + + simulation = MonteCarloScatteringSimulation( + self.image_object, self.params + ) + if py_sim_type == "PySparse": + simulation_results = simulation.RunMCScatteringSimulation_Sparse() + if py_sim_type == "PyDense": + simulation_results = simulation.RunMCScatteringSimulation() + if py_sim_type == "Plot": + simulation_results = simulation.RunMCScatteringSimulation_Plot() + return simulation_results + + + + def RunCPPMCScatteringSimulation(self): + + from simulation.cpp_simulation.cpp_simulation_interface import CPP_MCScatteringSimulation + model = CPP_MCScatteringSimulation( + self.image_object.pixels, + self.E_i, + self.ProbeDiameter, + self.MinimumEnergy, + self.image_object.pixel_dimensions, + self.dE_threshold, + self.image_object.perfect_image.shape[0], + self.image_object.perfect_image.shape[1], + self.Density, + self.t_counting + ) + return model + + def Run_GPU_KERNEL_MCScatteringSimulation(self): + from simulation.cuda_simulation.gpu_simulation_interface import GPU_KERNEL_MCScatteringSimulation + + + + + model = GPU_KERNEL_MCScatteringSimulation( + self.image_object.pixels, + self.E_i, + self.ProbeDiameter, + self.MinimumEnergy, + self.image_object.pixel_dimensions, + self.dE_threshold, + self.image_object.perfect_image.shape[0], + self.image_object.perfect_image.shape[1], + self.Density, + self.t_counting + ) + + + return model + + + def SaveModulatedImage(): + + pass + + + + + + + diff --git a/Scripts/Tests/HelperFunctionOptimizationTest.py b/Scripts/Tests/HelperFunctionOptimizationTest.py new file mode 100644 index 0000000..0318f3f --- /dev/null +++ b/Scripts/Tests/HelperFunctionOptimizationTest.py @@ -0,0 +1,113 @@ +import math +import timeit +import numpy as np + +def evaluate_cross_section(E, Z): + u = math.log10(8 * E * Z ** -1.33) + return (4.7 * 10 ** -18) * (Z ** 1.33 + 0.032 * Z ** 2) / ( + (E + (E ** 0.5) * 0.0155 * Z ** 1.33) * (1 - math.exp(-1*u**2) * 0.02 * Z ** 0.5)) + +def constants(Z): + CrossSectionNumorator = (4.7 * 10 ** -18) * (Z ** 1.33 + 0.032 * Z ** 2) + CrossSectionLogArgMultiplier = 8 * Z ** -1.33 + CrossSectionDenominatorA = 0.0155 * Z ** 1.33 + CrossSectionDenominatorB = 0.02 * Z ** 0.5 + return CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB + +def evaluate_cross_section_opt(CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, E): + LogArg = math.log10(E * CrossSectionLogArgMultiplier) + CrossSection = CrossSectionNumorator / ((E + (E ** 0.5) * CrossSectionDenominatorA) * (1 - math.exp(-1 * LogArg ** 2) * CrossSectionDenominatorB)) + return CrossSection + +Z = 16 +CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB = constants(Z) + + + +# Additional functions +def retrieve_pi(): + val = np.sin(0.25) + +local_sin = np.sin(0.25) # This should be outside the function, so it's pre-computed. +def use_assigned_pi(): + val = local_sin + +# Benchmarking for original and optimized versions +N_values = [1000, 10000, 100000, 1000000] +original_times = [] +opt_times = [] + +for N in N_values: + orig_time = timeit.timeit(lambda: evaluate_cross_section(200, Z), number=N) + opt_time = timeit.timeit(lambda: evaluate_cross_section_opt(CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, 200), number=N) + + original_times.append(orig_time) + opt_times.append(opt_time) + +# Print the results in table format for original and optimized versions +print("N-values | Evaluate Cross Section Function | Opt Function") +print("------------|---------------------------------|--------------") +for N, orig_time, opt_time in zip(N_values, original_times, opt_times): + print(f"{N:<12}| {orig_time:<17.5f} | {opt_time:.5f}") +print("\n") + +# Benchmarking for retrieve_pi and use_assigned_pi functions +retrieve_times = [] +assigned_times = [] + +for N in N_values: + retrieve_time = timeit.timeit(retrieve_pi, number=N) + assigned_time = timeit.timeit(use_assigned_pi, number=N) + + retrieve_times.append(retrieve_time) + assigned_times.append(assigned_time) + +# Print the results in table format for retrieve_pi and use_assigned_pi +print("N-values | Retrieve Pi | Use Local Pi") +print("------------|-------------------|---------------") +for N, retrieve_time, assigned_time in zip(N_values, retrieve_times, assigned_times): + print(f"{N:<12}| {retrieve_time:<17.5f} | {assigned_time:.5f}") + + +local_sin = math.sin +local_cos = math.cos +local_sqrt = math.sqrt + +# Your new function using local_sin and local_cos +def evaluate_direction_cosine_a_local(phi, psi, cosineX, cosineY, cosineZ): + alpha = local_sin(psi) * local_sin(phi) + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ**2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return alpha * cos_2 + sin_2 * (beta * cos_1 + gamma * sin_1) + +# Your new function using numpy +def evaluate_direction_cosine_a_numpy(phi, psi, cosineX, cosineY, cosineZ): + alpha = math.sin(psi) * math.sin(phi) + beta = math.sin(phi) * math.cos(psi) + gamma = math.cos(phi) + cos_1 = cosineZ + sin_1 = math.sqrt(1 - cosineZ**2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return alpha * cos_2 + sin_2 * (beta * cos_1 + gamma * sin_1) + +# Benchmarking for the direction cosine functions +local_times = [] +numpy_times = [] + +for N in N_values: + local_time = timeit.timeit(lambda: evaluate_direction_cosine_a_local(0.2, 0.2, 0.2, 0.2, 0.2), number=N) + numpy_time = timeit.timeit(lambda: evaluate_direction_cosine_a_numpy(0.2, 0.2, 0.2, 0.2, 0.2), number=N) + + local_times.append(local_time) + numpy_times.append(numpy_time) + +# Print the results in table format for the direction cosine functions +print("N-values | Evaluate Diretion Cosine Function with Local Math Function | Evaluate Diretion Cosine Function with Math Function") +print("------------|-------------------------------------------------------------|------------------------------------------------------") +for N, local_time, numpy_time in zip(N_values, local_times, numpy_times): + print(f"{N:<12}| {local_time:<17.5f} | {numpy_time:.5f}") diff --git a/Scripts/Tests/HelperFunctionOptimizationTestOutput.txt b/Scripts/Tests/HelperFunctionOptimizationTestOutput.txt new file mode 100644 index 0000000..5efd032 --- /dev/null +++ b/Scripts/Tests/HelperFunctionOptimizationTestOutput.txt @@ -0,0 +1,32 @@ + + + + +N-values | Evaluate Cross Section Function | Opt Function +------------|---------------------------------|-------------- +1000 | 0.00069 | 0.00032 +10000 | 0.00629 | 0.00320 +100000 | 0.06713 | 0.03120 +1000000 | 0.63914 | 0.31770 + + + + + +N-values | Retrieve Pi | Use Local Pi +------------|-------------------|--------------- +1000 | 0.00075 | 0.00004 +10000 | 0.00650 | 0.00035 +100000 | 0.06201 | 0.00353 +1000000 | 0.62541 | 0.03531 + + + + + +N-values | Evaluate Diretion Cosine Function with Local Math Function | Evaluate Diretion Cosine Function with Math Function +------------|-------------------------------------------------------------|------------------------------------------------------ +1000 | 0.00051 | 0.00049 +10000 | 0.00334 | 0.00405 +100000 | 0.03290 | 0.04091 +1000000 | 0.32899 | 0.44286 \ No newline at end of file diff --git a/Scripts/Tests/ListLookupTest.py b/Scripts/Tests/ListLookupTest.py new file mode 100644 index 0000000..5f2f7d7 --- /dev/null +++ b/Scripts/Tests/ListLookupTest.py @@ -0,0 +1,31 @@ +import random +import timeit + +# Setting up the lists +list_1d = [i for i in range(100)] +list_2d = [[i, i + 1] for i in range(0, 100, 2)] # This creates pairs of numbers in sublists + +def test_1d_list(): + item = random.randint(0, 9999) + if item in list_1d: + pass + +def test_2d_list(): + sublist = [random.randint(0, 9998), random.randint(0, 9998)] # Adjusted to create pairs + if sublist in list_2d: + pass + +Ns = [1000, 10000, 100000, 1000000] +results = [] + +# Loop through values of N and measure time for both 1D and 2D lists +for N in Ns: + time_1d = timeit.timeit(test_1d_list, number=N) + time_2d = timeit.timeit(test_2d_list, number=N) + results.append((N, time_1d, time_2d)) + +# Printing the results in table format +print("N | 1D List Time | 2D List Time") +print("--------------------------------------") +for N, time_1d, time_2d in results: + print(f"{N:<8} | {time_1d:<12.6f} | {time_2d:.6f}") diff --git a/Scripts/Tests/__pycache__/helper_functions.cpython-310.pyc b/Scripts/Tests/__pycache__/helper_functions.cpython-310.pyc new file mode 100644 index 0000000..d17a4fa Binary files /dev/null and b/Scripts/Tests/__pycache__/helper_functions.cpython-310.pyc differ diff --git a/Scripts/Tests/__pycache__/legacy_helper_functions.cpython-310.pyc b/Scripts/Tests/__pycache__/legacy_helper_functions.cpython-310.pyc new file mode 100644 index 0000000..092cf0b Binary files /dev/null and b/Scripts/Tests/__pycache__/legacy_helper_functions.cpython-310.pyc differ diff --git a/Scripts/Tests/__pycache__/parameters.cpython-310.pyc b/Scripts/Tests/__pycache__/parameters.cpython-310.pyc new file mode 100644 index 0000000..5cc3d3a Binary files /dev/null and b/Scripts/Tests/__pycache__/parameters.cpython-310.pyc differ diff --git a/Scripts/Tests/__pycache__/test_HelperFunctions.cpython-310-pytest-7.4.2.pyc b/Scripts/Tests/__pycache__/test_HelperFunctions.cpython-310-pytest-7.4.2.pyc new file mode 100644 index 0000000..0f92573 Binary files /dev/null and b/Scripts/Tests/__pycache__/test_HelperFunctions.cpython-310-pytest-7.4.2.pyc differ diff --git a/Scripts/Tests/config.ini b/Scripts/Tests/config.ini new file mode 100644 index 0000000..02211a1 --- /dev/null +++ b/Scripts/Tests/config.ini @@ -0,0 +1,20 @@ +[Energies] +e_i = 200 +minimum_energy = 0.05 +t_counting = 40 + +[Material properties] +n = 6.02214076e+23 +protonnum = 14 +atomicmass = 28 +density = 2.33 +de_threshold = 0.00362 +pixel_dimensions = 0.00275, 0.00275, 0.04 + +[Electrons] +dose = 1000 + +[Filepaths] +img_in = /home/uclworkstation1/InFluence/ExampleData/slanted_edge.npy +img_out = Output + diff --git a/Scripts/Tests/helper_functions.py b/Scripts/Tests/helper_functions.py new file mode 100644 index 0000000..259385e --- /dev/null +++ b/Scripts/Tests/helper_functions.py @@ -0,0 +1,113 @@ +import numpy as np +import random +import os +from parameters import SimulationParameters + +params = SimulationParameters() +params.refresh_config() + +local_log10 = np.log10 +local_log = np.log +local_arccos = np.arccos +local_sin = np.sin +local_cos = np.cos +local_sqrt = np.sqrt +local_exp = np.exp +local_ceil = np.ceil +local_abs = np.abs + + +def custom_round_down(x, decimals=0): + multiplier = 10 ** decimals + rounded_value = local_ceil(local_abs(x) * multiplier - 0.5) + rounded_value /= multiplier + return int(rounded_value) + +def CalculateConstants(ProgramParameters): + + AlphaMultiplier = (3.4*10**-3)*(ProgramParameters.ProtonNum**0.67) + CrossSectionNumorator = (4.7 * 10 ** -18) * (ProgramParameters.ProtonNum ** 1.33 + 0.032 * ProgramParameters.ProtonNum ** 2) + CrossSectionLogArgMultiplier = 8 * ProgramParameters.ProtonNum ** -1.33 + CrossSectionDenominatorA = 0.0155 * ProgramParameters.ProtonNum ** 1.33 + CrossSectionDenominatorB = 0.02 * ProgramParameters.ProtonNum ** 0.5 + PathLengthMultiplier = ProgramParameters.AtomicMass/(ProgramParameters.N * ProgramParameters.Density) + EnergyLossMultiplierA = -78500*ProgramParameters.ProtonNum/ProgramParameters.AtomicMass + EnergyLossMultiplierB = (9.76*ProgramParameters.ProtonNum + 58.5/ProgramParameters.ProtonNum**0.19)*10**-3 + + return AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB + +AlphaMultiplier, CrossSectionNumorator, CrossSectionLogArgMultiplier, CrossSectionDenominatorA, CrossSectionDenominatorB, PathLengthMultiplier, EnergyLossMultiplierA, EnergyLossMultiplierB = CalculateConstants(params) + + +def evaluate_alpha(E, AlphaMultiplier): + return AlphaMultiplier / E + + +def evaluate_cross_section_opt(E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB): + LogArg = local_log10(E * CrossSectionLogArgMultiplier) + CrossSection = CrossSectionNumorator / ((E + (E ** 0.5) * CrossSectionDenominatorA) * (1 - local_exp(-1 * LogArg ** 2) * CrossSectionDenominatorB)) + return CrossSection + + +def evaluate_path_length(CrossSection, PathLengthMultiplier): + PathLength = PathLengthMultiplier * (1/CrossSection) + return PathLength + + +def evaluate_step(path_length, RandomStep): + return -path_length*local_log(RandomStep) + + +def evaluate_phi(RandomNum, alpha): + cosPhi = 1 - (2*alpha*RandomNum**2)/(1+alpha-RandomNum) + return local_arccos(cosPhi) + + +def evaluate_pho(RandomNum, pi): + return 2*pi*RandomNum + + +def evaluate_direction_cosine_a(phi, psi, cosineX, cosineY, cosineZ): + alpha = local_sin(psi) * local_sin(phi) + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ**2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return alpha * cos_2 + sin_2 * (beta * cos_1 + gamma * sin_1) + +def evaluate_direction_cosine_b(phi, psi, cosineX, cosineY, cosineZ): + alpha = local_sin(phi) * local_sin(psi) + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ ** 2) + cos_2 = cosineY / sin_1 + sin_2 = cosineX / sin_1 + return -alpha * sin_2 + cos_2 * (beta * cos_1 + gamma * sin_1) + + +def evaluate_direction_cosine_c(phi, psi, cosineZ): + beta = local_sin(phi) * local_cos(psi) + gamma = local_cos(phi) + cos_1 = cosineZ + sin_1 = local_sqrt(1 - cosineZ ** 2) + return -beta*sin_1 + gamma*cos_1 + + +def evaluate_energy_loss_rate(E, EnergyLossMultiplierA, EnergyLossMultiplier): + return EnergyLossMultiplierA*(1/E)*local_log(1.166*(E+0.85*EnergyLossMultiplier)/EnergyLossMultiplier) + + +def initialise_postions(step, ProbeDiameter): + z0 = 10**-2 + step + x0 = ProbeDiameter * random.uniform(-1, 1) + y0 = ProbeDiameter * random.uniform(-1, 1) + vector_length = local_sqrt(x0**2 + y0**2 + z0**2) + cosineX = x0/vector_length + cosineY = y0/vector_length + cosineZ = z0/vector_length + return np.array([cosineX, cosineY, cosineZ, z0, y0, x0, vector_length]) + + diff --git a/Scripts/common_functions.py b/Scripts/Tests/legacy_helper_functions.py similarity index 95% rename from Scripts/common_functions.py rename to Scripts/Tests/legacy_helper_functions.py index 10677ab..1b06228 100644 --- a/Scripts/common_functions.py +++ b/Scripts/Tests/legacy_helper_functions.py @@ -1,169 +1,169 @@ -import math -import random -import numpy as np -from numba import jit, prange, cuda -from numba.typed import List -from skimage import io - -def opendatfile(image): - datfile = np.fromfile(image, - dtype='float32') - image_shape = int(math.sqrt(datfile.shape[0])) # obtains the square dimensions for the image from the one dimensional input file - image_shift = int(image_shape / 2) - datfile = datfile.reshape(image_shape, image_shape) - datfile = np.roll(datfile, shift=0, axis=1) #change shift to shape/2 for diff patterns - datfile = np.roll(datfile, shift=0, axis=0) - #datfile = (datfile )/ (np.max(datfile) - np.min(datfile)) #scaling for probability map - #datfile = datfile / np.sum(datfile) - return datfile -#get information about the pixel: counts, i, j coords -@jit(nopython = True) -def get_pixel_info(image): - pixel_info = [] - rows, cols = image.shape - for i in prange(rows): - for j in prange(cols): - counts = image[i, j] - pixel_info.append(np.array([counts, i, j])) - return pixel_info - -#A modified version of finding pixel information to scale the input image based on initial intensity. -@jit(nopython = True) -def get_pixel_info_mod(image): - pixel_info = [] - count_distribution = [] - rows, cols = image.shape - for i in range(rows): - for j in range(cols): - counts = image[i, j] - pixel_info.append([i, j]) - count_distribution.append(counts) - return pixel_info, count_distribution - -#function to distribute a budget of electrons based on probability of a pixel being bright. -def find_distribution(image, dose): - image = image.astype('float64') - image = image/np.sum(image) - p_coordinates, count_distribution = get_pixel_info_mod(image) - p_coordinates1 = np.empty(len(p_coordinates), dtype=object) - p_coordinates1[:] = p_coordinates - return np.random.choice(p_coordinates1, dose, p = count_distribution) -#@jit(nopython = True) -def distribute_electrons(image, chosen_pixels): - - scaled_perfect_image = np.zeros((image.shape[0], image.shape[1])) - for coordinates in chosen_pixels: - i, j = coordinates[0], coordinates[1] - scaled_perfect_image[i, j] = scaled_perfect_image[i, j] + 1 - - return scaled_perfect_image - - -def make_2D_array(lis): - """Funciton to get 2D array from a list of lists - """ - n = len(lis) - lengths = np.array([len(x) for x in lis]) - max_len = np.max(lengths) - arr = np.zeros((n, max_len)) - - for i in range(n): - arr[i, :lengths[i]] = lis[i] - return arr, lengths - - -@jit(nopython = True) -def round_half_down(x, decimals = 0): - - multiplier = 10**decimals - return int(math.ceil(abs(x)*multiplier - 0.5) / multiplier) -#binning -def rebin(arr, new_shape): - shape = (new_shape[0], arr.shape[0] // new_shape[0], - new_shape[1], arr.shape[1] // new_shape[1]) - return arr.reshape(shape).mean(-1).mean(1) - - -#The next set of functions are for Monte Carlo scattering -#generate a random variable -@jit(nopython = True) -def RND(a, b): - return random.uniform(a, b ) -#evaluate cross section and mean free path -@jit(nopython = True) -def evaluate_alpha(E, Z): - return (3.4*10**-3)*(Z**0.67)/E -@jit(nopython = True) -def evaluate_cross_section(E, Z, alpha): - # return (((E+511)/(E+1024))**2)*(5.21*10**-21)*((Z/E)**2)*(4*math.pi)/(alpha*(1+alpha)) - u = math.log10(8 * E * Z ** -1.33) - return (4.7 * 10 ** -18) * (Z ** 1.33 + 0.032 * Z ** 2) / ( - (E + (E ** 0.5) * 0.0155 * Z ** 1.33) * (1 - math.exp(-1*u**2) * 0.02 * Z ** 0.5)) -@jit(nopython = True) -def evaluate_path_length(A, N, p, cross): - return A/(N*p*cross) - -#evaluate step and angula changes -@jit(nopython = True) -def evaluate_step(path_length, RND): - return -path_length*np.log(RND) -@jit(nopython = True) -def evaluate_phi(RND, alpha): - cosphi = 1 - (2*alpha*RND**2)/(1+alpha-RND) - return math.acos(cosphi) -@jit(nopython = True) -def evaluate_pho(RND): - return 2*math.pi*RND - -##evaluate direction cosines -##evaluate direction cosines -@jit(nopython = True) -def evaluate_direction_cosine_a(phi, psi, cx, cy, cz): - alpha = math.sin(psi)*math.sin(phi) - beta = math.sin(phi)*math.cos(psi) - gamma = math.cos(phi) - cos_1 = cz - sin_1 = math.sqrt(1 -cz**2) - cos_2 = cy/sin_1 - sin_2 = cx/sin_1 - - return alpha*cos_2 + sin_2*(beta*cos_1 + gamma*sin_1) - -@jit(nopython = True) -def evaluate_direction_cosine_b(phi, psi, cx, cy, cz): - alpha = math.sin(phi) * math.sin(psi) - beta = math.sin(phi) * math.cos(psi) - gamma = math.cos(phi) - cos_1 = cz - sin_1 = math.sqrt(1 - cz ** 2) - cos_2 = cy / sin_1 - sin_2 = cx / sin_1 - return -alpha*sin_2 + cos_2*(beta*cos_1 + gamma*sin_1) - -@jit(nopython = True) -def evaluate_direction_cosine_c(phi, psi, cz): - - beta = math.sin(phi) * math.cos(psi) - gamma = math.cos(phi) - cos_1 = cz - sin_1 = math.sqrt(1 - cz ** 2) - return -beta*sin_1 + gamma*cos_1 - -#calculate the energy loss rate. -@jit(nopython = True) -def evaluate_energy_loss_rate(E, Z, A): - J = (9.76*Z + 58.5/Z**0.19)*10**-3 - return -78500*Z/(A*E)*np.log(1.166*(E+0.85*J)/J) - -#evaluate initial positions -@jit(nopython = True) -def initialise_postions(step, d): - z0 = 10**-2 + step #10**-2 is to ensure all electrons are incident approximately normally on the surface - - x0 = d*RND(a = -1, b = 1) - y0 = d*RND(a = -1, b = 1) - vector_length = math.sqrt(x0**2 + y0**2 + z0**2) - cx = x0/vector_length - cy = y0/vector_length - cz = z0/vector_length - return np.array([cx, cy, cz, z0, y0, x0, vector_length]) +import math +import random +import numpy as np +from numba import jit, prange, cuda +from numba.typed import List +from skimage import io + +def opendatfile(image): + datfile = np.fromfile(image, + dtype='float32') + image_shape = int(math.sqrt(datfile.shape[0])) # obtains the square dimensions for the image from the one dimensional input file + image_shift = int(image_shape / 2) + datfile = datfile.reshape(image_shape, image_shape) + datfile = np.roll(datfile, shift=0, axis=1) #change shift to shape/2 for diff patterns + datfile = np.roll(datfile, shift=0, axis=0) + #datfile = (datfile )/ (np.max(datfile) - np.min(datfile)) #scaling for probability map + #datfile = datfile / np.sum(datfile) + return datfile +#get information about the pixel: counts, i, j coords +@jit(nopython = True) +def get_pixel_info(image): + pixel_info = [] + rows, cols = image.shape + for i in prange(rows): + for j in prange(cols): + counts = image[i, j] + pixel_info.append(np.array([counts, i, j])) + return pixel_info + +#A modified version of finding pixel information to scale the input image based on initial intensity. +@jit(nopython = True) +def get_pixel_info_mod(image): + pixel_info = [] + count_distribution = [] + rows, cols = image.shape + for i in range(rows): + for j in range(cols): + counts = image[i, j] + pixel_info.append([i, j]) + count_distribution.append(counts) + return pixel_info, count_distribution + +#function to distribute a budget of electrons based on probability of a pixel being bright. +def find_distribution(image, dose): + image = image.astype('float64') + image = image/np.sum(image) + p_coordinates, count_distribution = get_pixel_info_mod(image) + p_coordinates1 = np.empty(len(p_coordinates), dtype=object) + p_coordinates1[:] = p_coordinates + return np.random.choice(p_coordinates1, dose, p = count_distribution) +#@jit(nopython = True) +def distribute_electrons(image, chosen_pixels): + + scaled_perfect_image = np.zeros((image.shape[0], image.shape[1])) + for coordinates in chosen_pixels: + i, j = coordinates[0], coordinates[1] + scaled_perfect_image[i, j] = scaled_perfect_image[i, j] + 1 + + return scaled_perfect_image + + +def make_2D_array(lis): + """Funciton to get 2D array from a list of lists + """ + n = len(lis) + lengths = np.array([len(x) for x in lis]) + max_len = np.max(lengths) + arr = np.zeros((n, max_len)) + + for i in range(n): + arr[i, :lengths[i]] = lis[i] + return arr, lengths + + +@jit(nopython = True) +def round_half_down(x, decimals = 0): + + multiplier = 10**decimals + return int(math.ceil(abs(x)*multiplier - 0.5) / multiplier) +#binning +def rebin(arr, new_shape): + shape = (new_shape[0], arr.shape[0] // new_shape[0], + new_shape[1], arr.shape[1] // new_shape[1]) + return arr.reshape(shape).mean(-1).mean(1) + + +#The next set of functions are for Monte Carlo scattering +#generate a random variable +@jit(nopython = True) +def RND(a, b): + return random.uniform(a, b ) +#evaluate cross section and mean free path +@jit(nopython = True) +def evaluate_alpha(E, Z): + return (3.4*10**-3)*(Z**0.67)/E +@jit(nopython = True) +def evaluate_cross_section(E, Z): + # return (((E+511)/(E+1024))**2)*(5.21*10**-21)*((Z/E)**2)*(4*math.pi)/(alpha*(1+alpha)) + u = math.log10(8 * E * Z ** -1.33) + return (4.7 * 10 ** -18) * (Z ** 1.33 + 0.032 * Z ** 2) / ( + (E + (E ** 0.5) * 0.0155 * Z ** 1.33) * (1 - math.exp(-1*u**2) * 0.02 * Z ** 0.5)) +@jit(nopython = True) +def evaluate_path_length(A, N, p, cross): + return A/(N*p*cross) + +#evaluate step and angula changes +@jit(nopython = True) +def evaluate_step(path_length, RND): + return -path_length*np.log(RND) +@jit(nopython = True) +def evaluate_phi(RND, alpha): + cosphi = 1 - (2*alpha*RND**2)/(1+alpha-RND) + return math.acos(cosphi) +@jit(nopython = True) +def evaluate_pho(RND): + return 2*math.pi*RND + +##evaluate direction cosines +##evaluate direction cosines +@jit(nopython = True) +def evaluate_direction_cosine_a(phi, psi, cx, cy, cz): + alpha = math.sin(psi)*math.sin(phi) + beta = math.sin(phi)*math.cos(psi) + gamma = math.cos(phi) + cos_1 = cz + sin_1 = math.sqrt(1 -cz**2) + cos_2 = cy/sin_1 + sin_2 = cx/sin_1 + + return alpha*cos_2 + sin_2*(beta*cos_1 + gamma*sin_1) + +@jit(nopython = True) +def evaluate_direction_cosine_b(phi, psi, cx, cy, cz): + alpha = math.sin(phi) * math.sin(psi) + beta = math.sin(phi) * math.cos(psi) + gamma = math.cos(phi) + cos_1 = cz + sin_1 = math.sqrt(1 - cz ** 2) + cos_2 = cy / sin_1 + sin_2 = cx / sin_1 + return -alpha*sin_2 + cos_2*(beta*cos_1 + gamma*sin_1) + +@jit(nopython = True) +def evaluate_direction_cosine_c(phi, psi, cz): + + beta = math.sin(phi) * math.cos(psi) + gamma = math.cos(phi) + cos_1 = cz + sin_1 = math.sqrt(1 - cz ** 2) + return -beta*sin_1 + gamma*cos_1 + +#calculate the energy loss rate. +@jit(nopython = True) +def evaluate_energy_loss_rate(E, Z, A): + J = (9.76*Z + 58.5/Z**0.19)*10**-3 + return -78500*Z/(A*E)*np.log(1.166*(E+0.85*J)/J) + +#evaluate initial positions +@jit(nopython = True) +def initialise_postions(step, d): + z0 = 10**-2 + step #10**-2 is to ensure all electrons are incident approximately normally on the surface + + x0 = d*RND(a = -1, b = 1) + y0 = d*RND(a = -1, b = 1) + vector_length = math.sqrt(x0**2 + y0**2 + z0**2) + cx = x0/vector_length + cy = y0/vector_length + cz = z0/vector_length + return np.array([cx, cy, cz, z0, y0, x0, vector_length]) \ No newline at end of file diff --git a/Scripts/Tests/parameters.py b/Scripts/Tests/parameters.py new file mode 100644 index 0000000..a567f20 --- /dev/null +++ b/Scripts/Tests/parameters.py @@ -0,0 +1,86 @@ +import os +from pathlib import Path +import configparser + + +class SimulationParameters: + + # Define class variables with default values + E_i = None + minimum_energy = None + t_counting = None + N = None + ProtonNum = None + AtomicMass = None + Density = None + dE_threshold = None + pixel_dimensions = None + dose = None + + def __init__(self): + self.config_path = self.get_config_path() + self.config = self.load_config() + self.refresh_config() + + + def get_config_path(self): + # Get the directory where this Python script resides + current_dir = Path(os.path.dirname(os.path.abspath(__file__))) + + # Define the location of the config.ini relative to the script's location + config_path = current_dir / "config.ini" + return config_path + + def load_config(self): + config = configparser.ConfigParser() + config.read(self.config_path) + return config + + def refresh_config(self): + # Reload the configuration from the file + self.config = self.load_config() + + # Update class variables using the get_ functions + self.E_i = self.get_E_i() + self.minimum_energy = self.get_minimum_energy() + self.t_counting = self.get_t_counting() + self.N = self.get_N() + self.ProtonNum = self.get_ProtonNum() + self.AtomicMass = self.get_AtomicMass() + self.Density = self.get_Density() + self.dE_threshold = self.get_dE_threshold() + self.pixel_dimensions = self.get_pixel_dimensions() + self.dose = self.get_electron_dose() + + def get_E_i(self): + return self.config.getint('Energies', 'e_i') + + def get_minimum_energy(self): + return self.config.getfloat('Energies', 'minimum_energy') + + def get_t_counting(self): + return self.config.getint('Energies', 't_counting') + + def get_N(self): + return self.config.getfloat('Material properties', 'n') + + def get_ProtonNum(self): + return self.config.getint('Material properties', 'ProtonNum') + + def get_AtomicMass(self): + return self.config.getfloat('Material properties', 'AtomicMass') + + def get_Density(self): + return self.config.getfloat('Material properties', 'Density') + + def get_dE_threshold(self): + return self.config.getfloat('Material properties', 'dE_threshold') + + def get_pixel_dimensions(self): + pixel_dimensions_str = self.config.get('Material properties', 'pixel_dimensions') + pixel_dimensions_list = [float(val) for val in pixel_dimensions_str.split(',')] + return pixel_dimensions_list + + + def get_electron_dose(self): + return self.config.getint('Electrons', 'dose') diff --git a/Scripts/Tests/test_HelperFunctions.py b/Scripts/Tests/test_HelperFunctions.py new file mode 100644 index 0000000..53a8562 --- /dev/null +++ b/Scripts/Tests/test_HelperFunctions.py @@ -0,0 +1,180 @@ +import helper_functions as new +import legacy_helper_functions as legacy + + +from parameters import SimulationParameters + +params = SimulationParameters() +params.refresh_config() + + + +import pytest +import numpy as np +from numba import jit +import math + + + +def test_rounding_functions(): + + test_inputs = [(2.5, 0), (10.4, 0), (-10.5555, 0), (-10.49, 0), (0.545, 2), (10.555, 2)] + + for x, decimal in test_inputs: + + result_1 = new.custom_round_down(x, decimal) + result_2 = legacy.round_half_down(x, decimal) + + + assert result_1 == result_2, f"For input ({x}, {decimal}), custom_round_down got {result_1} but round_half_down got {result_2}" + + + +def test_evaluate_alpha(): + + + test_inputs = [(10, 2), (20, 3), (30, 4), (40, 5), (1e-6, 2e-6), (1e-7, 2e-7), (1e-8, 2e-18)] + + for E, Z in test_inputs: + + AlphaMultiplier = (3.4*10**-3)*(Z**0.67) + + result_1 = new.evaluate_alpha(E, AlphaMultiplier) + result_2 = legacy.evaluate_alpha(E, Z) + + assert result_1 == result_2, f"For input ({E}, {Z}), evaluate_alpha in new got {result_1} but evaluate_alpha in legacy got {result_2}" + + +def test_evaluate_path_length(): + + + test_inputs = [(10, 2, 3, 4), (20, 3, 5, 6), (30, 4, 7, 8), (40, 5, 9, 10), (1e-6, 2e-6, 3e-6, 4e-6), (1e-7, 2e-7, 5e-7, 6e-7), (1e-8, 2e-8, 7e-8, 8e-8)] + + for A, N, p, cross in test_inputs: + + + PathLengthMultiplier = A/(N * p) + + result_1 = new.evaluate_path_length(cross, PathLengthMultiplier) + result_2 = legacy.evaluate_path_length(A, N, p, cross) + + + assert result_1 == result_2, f"For input ({A}, {N}, {p}, {cross}), evaluate_path_length in new got {result_1} but evaluate_path_length in legacy got {result_2}" + + +def test_evaluate_phi(): + + test_inputs = [(0.5, 2), (0.4, 3), (0.3, 4), (0.2, 5), (1e-7, 2), (1e-8, 3), (1e-9, 4), (1e-10, 5)] + + for RandomNum, alpha in test_inputs: + + result_1 = new.evaluate_phi(RandomNum, alpha) + result_2 = legacy.evaluate_phi(RandomNum, alpha) + + assert result_1 == result_2, f"For input ({RandomNum}, {alpha}), evaluate_phi in new got {result_1} but evaluate_phi in legacy got {result_2}" + + +def test_evaluate_pho(): + + test_inputs = [0.1, 0.2, 0.3, 0.4, 0.5, 1e-7, 1e-8, 1e-9, 1e-10] + + for RandomNum in test_inputs: + + result_1 = new.evaluate_pho(RandomNum, np.pi) + result_2 = legacy.evaluate_pho(RandomNum) + + assert result_1 == result_2, f"For input ({RandomNum}), evaluate_pho in new got {result_1} but evaluate_pho in legacy got {result_2}" + +def test_evaluate_step(): + + test_inputs = [(1, 0.5), (2, 0.4), (3, 0.3), (4, 0.2), (5, 0.1), (10, 1e-7), (20, 1e-8), (30, 1e-9), (40, 1e-10)] + + for path_length, RandomStep in test_inputs: + + result_1 = new.evaluate_step(path_length, RandomStep) + result_2 = legacy.evaluate_step(path_length, RandomStep) + + assert result_1 == result_2, f"For input ({path_length}, {RandomStep}), evaluate_step in new got {result_1} but evaluate_step in legacy got {result_2}" + +def test_evaluate_cross_section(): + + test_inputs = [(10, 2), (20, 3), (30, 4), (40, 5), (50, 6), (100, 7), (1000, 8), (1e-5, 1), (1e-6, 2), (1e-7, 3)] + + for E, Z in test_inputs: + CrossSectionNumorator = (4.7 * 10 ** -18) * (Z ** 1.33 + 0.032 * Z ** 2) + CrossSectionLogArgMultiplier = 8 * Z ** -1.33 + CrossSectionDenominatorA = 0.0155 * Z ** 1.33 + CrossSectionDenominatorB = 0.02 * Z ** 0.5 + + result_1 = new.evaluate_cross_section_opt(E, CrossSectionLogArgMultiplier, CrossSectionNumorator, CrossSectionDenominatorA, CrossSectionDenominatorB) + result_2 = legacy.evaluate_cross_section(E, Z) + + assert np.isclose(result_1, result_2, atol=1e-10), f"For input ({E}, {Z}), evaluate_cross_section_opt in new got {result_1} but evaluate_cross_section in legacy got {result_2}" + + +def test_evaluate_direction_cosine_a(): + + test_inputs = [(0.1, 0.2, 0.3, 0.4, 0.5), + (0.5, 0.4, 0.3, 0.2, 0.8), # cz or cosineZ is 0.8, not 1.0 + (0.6, 0.7, 0.8, 0.9, 0.99), # cz or cosineZ is 0.99, not 1.0 + (1e-6, 1e-7, 1e-8, 1e-9, 0.5), # cz or cosineZ is 0.5, not 1.0 + (np.pi, np.pi/2, np.pi/3, np.pi/4, np.pi/5)] # cz or cosineZ is np.pi/5, not 1.0 + + for phi, psi, cx, cy, cz in test_inputs: + + # Run the functions with the test inputs. + result_1 = new.evaluate_direction_cosine_a(phi, psi, cx, cy, cz) + result_2 = legacy.evaluate_direction_cosine_a(phi, psi, cx, cy, cz) + + # Check if the results are equal to within a tolerance. + assert math.isclose(result_1, result_2, rel_tol=1e-9), f"For input ({phi}, {psi}, {cx}, {cy}, {cz}), evaluate_direction_cosine_a in new got {result_1} but evaluate_direction_cosine_a in legacy got {result_2}" + + +def test_evaluate_direction_cosine_b(): + # Generating random sets of inputs + test_inputs = [(0.1, 0.2, 0.3, 0.4, 0.5), + (0.6, 0.7, 0.8, 0.9, 0.8), + (0.005, 0.01, 0.015, 0.02, 0.99), + (0.0001, 0.0002, 0.0003, 0.0004, 0.5)] + + for phi, psi, cx, cy, cz in test_inputs: + result_1 = new.evaluate_direction_cosine_b(phi, psi, cx, cy, cz) + result_2 = legacy.evaluate_direction_cosine_b(phi, psi, cx, cy, cz) + + assert math.isclose(result_1, result_2, rel_tol=1e-9), f"For input ({phi}, {psi}, {cx}, {cy}, {cz}), evaluate_direction_cosine_b in new got {result_1} but evaluate_direction_cosine_b in legacy got {result_2}" + +def test_evaluate_direction_cosine_c(): + + test_inputs = [(0.1, 0.2, 0.3), + (0.6, 0.7, 0.8), + (0.005, 0.01, 0.02), + (0.0001, 0.0002, 0.0003)] + + for phi, psi, cz in test_inputs: + result_1 = new.evaluate_direction_cosine_c(phi, psi, cz) + result_2 = legacy.evaluate_direction_cosine_c(phi, psi, cz) + + assert math.isclose(result_1, result_2, rel_tol=1e-9), f"For input ({phi}, {psi}, {cz}), evaluate_direction_cosine_c in new got {result_1} but evaluate_direction_cosine_c in legacy got {result_2}" + + +def test_evaluate_energy_loss_rate(): + # Generating random sets of inputs + test_inputs = [(0.1, 0.2, 0.3), + (0.6, 0.7, 0.8), + (0.005, 0.01, 0.02), + (0.0001, 0.0002, 0.0003)] + + for E, Z, A in test_inputs: + # Compute EnergyLossMultiplierA and EnergyLossMultiplierB for the new function + ProtonNum = Z + AtomicMass = A + EnergyLossMultiplierA = -78500*ProtonNum/AtomicMass + EnergyLossMultiplierB = (9.76*ProtonNum + 58.5/ProtonNum**0.19)*10**-3 + + result_1 = new.evaluate_energy_loss_rate(E, EnergyLossMultiplierA, EnergyLossMultiplierB) + result_2 = legacy.evaluate_energy_loss_rate(E, Z, A) + + assert math.isclose(result_1, result_2, rel_tol=1e-9), f"For input ({E}, {Z}, {A}), evaluate_energy_loss_rate in new got {result_1} but evaluate_energy_loss_rate in legacy got {result_2}" + + + diff --git a/Scripts/Usage_Guide.txt b/Scripts/Usage_Guide.txt deleted file mode 100644 index 3d596ff..0000000 --- a/Scripts/Usage_Guide.txt +++ /dev/null @@ -1,15 +0,0 @@ -The usage of InFluence is as follows: - -Installation: - -1. Download the params.py, common_functions.py, InFluence.py and plot_trajectories.py and requirements.txt files -2. Set up a virtual environment using the requirements.txt file. - -Running the scripts: -The only file that ever needs to heavily modified is the params.py file. Minor changes can be made to the other scripts, but are largely unnecessary. -1. Edit the params.py file to suit your experiment (i.e. change beam energies, counting threshold, material properties). Add the path to the unmodulated image that you wish to modulate. -2. Modulate the image by running InFluence.py. Parallel mode can be enabled by setting parallel = True in the jit decorator. Set parallel = False to disable parallel mode. -3. Run plot_trajectories.py to visualise the trajectories of the electrons and to generate a distribution of their final positions. Changes to the aesthetics of the plot can be made if desired. -Note that InFluence.py and plot_trajectories.py both use the same params.py file, so caution should be taken when using the plot_trajectories.py as Matplotlib can only handle a few thousand trajectories. -Of course, this can be avoided if you make a separate params.py file for each script, but the imports at the top of each script must be adjusted if this is done. - diff --git a/Scripts/params.py b/Scripts/params.py deleted file mode 100644 index a025bb2..0000000 --- a/Scripts/params.py +++ /dev/null @@ -1,61 +0,0 @@ -import scipy.constants as scc -from common_functions import * -import pathlib -import os - -#Energies -E_i = 200 #in keV -minimum_energy = 0.05 #in keV -t_counting = 40 #in keV - -#Material properties -N = scc.physical_constants['Avogadro constant'][0] -Z = 14 #number of protons -A = 28.1 #atomic weight in Daltons -p = 2.33 #density of material in g/cm cubed -dE_threshold = 0.00362 #eh pair generation of material in keV -pixel_dimensions = List(np.around([27.5*10**-4, 27.5*10**-4, 10**-2 + 300*10**-4], decimals=6)) # [x, y, 10**-2 + z] in cm -change, x, y, z only - -#Choose electron dose -dose = 50 #choose dose in number of electrons - -#Output file type -ext = '.png' -ext_2 = '.svg' - -#images -num_samples = 1 #relative precision = 1/root(n) - -#unmodulated image -path_to_image = r"...\unmodulatedimage.npy" - -image_type = 'specimen' #knife_edge, white_noise or specimen - -#No need to change these -save_file_folder = os.path.join(str(pathlib.Path(path_to_image).parent.parent), '{}_keV_HT_and_{}_keV_countingthreshold'.format(E_i, t_counting),str(dose) + '_electrons') -os.makedirs(save_file_folder, exist_ok=True) - - -path_to_unmodulated_image = os.path.join(save_file_folder, 'Unmodulated_{}_{}_electrons.npy'.format(image_type,dose)) - -path_to_modulated_image = os.path.join(save_file_folder, 'Modulated_{}_{}_electrons.npy'.format(image_type,dose)) - -path_to_parameter_file = os.path.join(save_file_folder, 'Modulated_{}_parameter_file_for_{}_electrons.txt'.format(image_type,dose)) - -path_to_trajectory_plot = os.path.join(save_file_folder,'Trajectory_plot_view_1' + ext) -path_to_trajectory_plot_svg = os.path.join(save_file_folder,'Trajectory_plot_view_1' + ext_2) -path_to_trajectory_plot_v2 = os.path.join(save_file_folder, 'Trajectory_plot_view_2' + ext) -path_to_trajectory_plot_v2_svg = os.path.join(save_file_folder,'Trajectory_plot_view_2' + ext_2) -path_to_trajectory_histogram_plot = os.path.join(save_file_folder, 'Trajectory_histogram_plot' + ext) -path_to_trajectory_histogram_plot_svg = os.path.join(save_file_folder,'Trajectory_histogram_plot' + ext_2) - -#Do not change these -print('\nParameters used in simulation: \n \n', ' Incident energy (keV): ', E_i, '\n Mininum energy (keV): ', minimum_energy, '\n Counting threshold (keV): ', t_counting, - '\n Electron-hole pair energy threshold (keV): ', dE_threshold, '\n Z: ', Z, '\n Atomic weight (u): ', A, '\n Density (g/cm\N{SUPERSCRIPT THREE}): ', p, - '\n Pixel dimensions (cm): ', pixel_dimensions, '\n Fluence (e): ', dose, '\n Number of samples: ', num_samples) - -with open(path_to_parameter_file, "w+") as text_file: - print('Parameters used in simulation: \n \n', ' Incident energy (keV): ', E_i, '\n Mininum energy (keV): ', minimum_energy, '\n Counting threshold (keV): ', t_counting, - '\n Electron-hole pair energy threshold (keV): ', dE_threshold, '\n Z: ', Z, '\n Atomic weight (u): ', A, '\n Density (g/cm\N{SUPERSCRIPT THREE}): ', p, - '\n Pixel dimensions (cm): ', pixel_dimensions, '\n Fluence (e): ', dose, '\n Number of samples: ', num_samples, file=text_file) -print('\nParameters used in this experiment are saved to: ', path_to_parameter_file) diff --git a/Scripts/requirements.txt b/requirements.txt similarity index 91% rename from Scripts/requirements.txt rename to requirements.txt index 4c72193..16de630 100644 --- a/Scripts/requirements.txt +++ b/requirements.txt @@ -1,23 +1,23 @@ -colorama==0.4.4 -cycler==0.11.0 -decorator==4.4.2 -imageio==2.15.0 -importlib-resources==5.4.0 -kiwisolver==1.3.1 -llvmlite==0.36.0 -matplotlib==3.3.4 -networkx==2.5.1 -numba==0.53.1 -numpy==1.19.5 -pathlib==1.0.1 -Pillow==8.4.0 -pyparsing==3.0.7 -python-dateutil==2.8.2 -PyWavelets==1.1.1 -scikit-image==0.17.2 -scipy==1.5.4 -simplejson==3.17.6 -six==1.16.0 -tifffile==2020.9.3 -tqdm==4.63.0 -zipp==3.6.0 +colorama==0.4.4 +cycler==0.11.0 +decorator==4.4.2 +imageio==2.15.0 +importlib-resources==5.4.0 +kiwisolver==1.3.1 +llvmlite==0.36.0 +matplotlib==3.3.4 +networkx==2.5.1 +numba==0.53.1 +numpy==1.19.5 +pathlib==1.0.1 +Pillow==8.4.0 +pyparsing==3.0.7 +python-dateutil==2.8.2 +PyWavelets==1.1.1 +scikit-image==0.17.2 +scipy==1.5.4 +simplejson==3.17.6 +six==1.16.0 +tifffile==2020.9.3 +tqdm==4.63.0 +zipp==3.6.0 \ No newline at end of file