diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c2126e --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Latex +*.aux +*.log +*.out +*.bib +*.synctex.gz +*.bbl + +# C++ specifics +src/* +!src/Makefile +!src/*.cpp +!src/*.hpp +!src/*.py diff --git a/README.md b/README.md index 3b5f497..95ac081 100644 --- a/README.md +++ b/README.md @@ -1 +1,30 @@ -# Project-2 \ No newline at end of file +# Project 2 + +## Practical information + +- [Project](https://anderkve.github.io/FYS3150/book/projects/project2.html) + +## Compile and run + +Compiling and linking is done using Make, make sure you are in the root folder. To create executable files, run shell commands + +```shell +cd src/ +make +``` +To run `script-name` + +```shell +./main +``` + + +## Generate plots + +To generate plots, the Python scripts is run using + +```shell +python3 +``` + +The plots will be saved inside [latex/images](../blob/main/latex/images). diff --git a/compile_flags.txt b/compile_flags.txt new file mode 100644 index 0000000..3e86a99 --- /dev/null +++ b/compile_flags.txt @@ -0,0 +1,2 @@ +-I +./include diff --git a/include/utils.hpp b/include/utils.hpp new file mode 100644 index 0000000..e69de29 diff --git a/latex/assignment-2.pdf b/latex/assignment-2.pdf new file mode 100644 index 0000000..a5c8109 Binary files /dev/null and b/latex/assignment-2.pdf differ diff --git a/latex/assignment-2.tex b/latex/assignment-2.tex new file mode 100644 index 0000000..51cba7a --- /dev/null +++ b/latex/assignment-2.tex @@ -0,0 +1,105 @@ +\documentclass[english,notitlepage]{revtex4-1} % defines the basic parameters of the document +%For preview: skriv i terminal: latexmk -pdf -pvc filnavn + +% Silence warning of revtex4-1 +\usepackage{silence} +\WarningFilter{revtex4-1}{Repair the float} + +% if you want a single-column, remove reprint + +% allows special characters (including æøå) +\usepackage[utf8]{inputenc} +%\usepackage[english]{babel} + +%% note that you may need to download some of these packages manually, it depends on your setup. +%% I recommend downloading TeXMaker, because it includes a large library of the most common packages. + +\usepackage{physics,amssymb} % mathematical symbols (physics imports amsmath) +\usepackage{amsmath} +\usepackage{graphicx} % include graphics such as plots +\usepackage{xcolor} % set colors +\usepackage{hyperref} % automagic cross-referencing (this is GODLIKE) +\usepackage{listings} % display code +\usepackage{subfigure} % imports a lot of cool and useful figure commands +\usepackage{float} +%\usepackage[section]{placeins} +\usepackage{algorithm} +\usepackage[noend]{algpseudocode} +\usepackage{subfigure} +\usepackage{tikz} +\usetikzlibrary{quantikz} +% defines the color of hyperref objects +% Blending two colors: blue!80!black = 80% blue and 20% black +\hypersetup{ % this is just my personal choice, feel free to change things + colorlinks, + linkcolor={red!50!black}, + citecolor={blue!50!black}, + urlcolor={blue!80!black}} + +%% Defines the style of the programming listing +%% This is actually my personal template, go ahead and change stuff if you want + + + +%% USEFUL LINKS: +%% +%% UiO LaTeX guides: https://www.mn.uio.no/ifi/tjenester/it/hjelp/latex/ +%% mathematics: https://en.wikibooks.org/wiki/LaTeX/Mathematics + +%% PHYSICS ! https://mirror.hmc.edu/ctan/macros/latex/contrib/physics/physics.pdf + +%% the basics of Tikz: https://en.wikibooks.org/wiki/LaTeX/PGF/Tikz +%% all the colors!: https://en.wikibooks.org/wiki/LaTeX/Colors +%% how to draw tables: https://en.wikibooks.org/wiki/LaTeX/Tables +%% code listing styles: https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings +%% \includegraphics https://en.wikibooks.org/wiki/LaTeX/Importing_Graphics +%% learn more about figures https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions +%% automagic bibliography: https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management (this one is kinda difficult the first time) +%% REVTeX Guide: http://www.physics.csbsju.edu/370/papers/Journal_Style_Manuals/auguide4-1.pdf +%% +%% (this document is of class "revtex4-1", the REVTeX Guide explains how the class works) + + +%% CREATING THE .pdf FILE USING LINUX IN THE TERMINAL +%% +%% [terminal]$ pdflatex template.tex +%% +%% Run the command twice, always. +%% If you want to use \footnote, you need to run these commands (IN THIS SPECIFIC ORDER) +%% +%% [terminal]$ pdflatex template.tex +%% [terminal]$ bibtex template +%% [terminal]$ pdflatex template.tex +%% [terminal]$ pdflatex template.tex +%% +%% Don't ask me why, I don't know. + +% custom stuff +\graphicspath{{./images/}} + +\begin{document} + +\title{Project 2} % self-explanatory +\author{Cory Alexander Balaton \& Janita Ovidie Sandtrøen Willumsen} % self-explanatory +\date{\today} % self-explanatory +\noaffiliation % ignore this, but keep it. + + +\maketitle + +\textit{https://github.uio.no/FYS3150-G2-2023/Project-2} + +% \input{problems/problem-1} + +% \input{problems/problem-2} + +% \input{problems/problem-3} + +% \input{problems/problem-4} + +% \input{problems/problem-5} + +% \input{problems/problem-6} + + +\end{document} diff --git a/latex/problems/problem-1.tex b/latex/problems/problem-1.tex new file mode 100644 index 0000000..e69de29 diff --git a/latex/problems/problem-2.tex b/latex/problems/problem-2.tex new file mode 100644 index 0000000..e69de29 diff --git a/latex/problems/problem-3.tex b/latex/problems/problem-3.tex new file mode 100644 index 0000000..e69de29 diff --git a/latex/problems/problem-4.tex b/latex/problems/problem-4.tex new file mode 100644 index 0000000..e69de29 diff --git a/latex/problems/problem-5.tex b/latex/problems/problem-5.tex new file mode 100644 index 0000000..e69de29 diff --git a/latex/problems/problem-6.tex b/latex/problems/problem-6.tex new file mode 100644 index 0000000..e69de29 diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/utils.cpp b/src/utils.cpp new file mode 100644 index 0000000..e69de29