add docs, make it more user-friendly

This commit is contained in:
Zsombor Barna 2023-06-24 17:12:56 +02:00
parent 899a5b60d4
commit f1752251d0
6 changed files with 42 additions and 18 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@
/kutinf/root-finder
/modfizlab/221115.tar.xz
/modfizlab/221115/
/kutinf/nagyhazi/results.txt

View File

@ -3,4 +3,32 @@
+ fiznum2/Intel.c -> experiment to apply the rk4 to guess cpu frequencies based on previous models.
+ fiznum2/lapakk.c -> program to benchmark lapack svd against home-grown gauss elimination
+ modfizlab/labor1.scm -> script to generate latex tables from measured values for a laboratory
+ kutinf -> programs for the korszám course
+ kutinf -> programs for the korszám course
+ matrix:
#+begin_src bash
make matrix
./matrix
#+end_src
+ vector:
#+begin_src bash
make vector
./vector
#+end_src
+ newton-cotes:
#+begin_src bash
make newton-cotes
./newton-cotes
#+end_src
+ root-finder:
#+begin_src bash
make root-finder
./root-finder
#+end_src
+ nagyhazi/field:
You'll need GNU parallel to do this
#+begin_src bash
make field
make results.txt
make temp-magnetization.png
make temp-energy.png
#+end_src

View File

@ -19,16 +19,9 @@ HDRS = $(SRCS:.cc=.h)
# Map each object file to a program name (e.g. foo.o -> foo).
PROJECTS = $(basename $(OBJS))
# Necessary here: it's our only target!
all: $(PROJECTS)
# root-finder: root-finder.cc
# $(CXX) $(CXXFLAGS) $@.cc -o $@ $(LDFLAGS)
# newton-cotes: newton-cotes.cc
# $(CXX) $(CXXFLAGS) $@.cc -o $@ $(LDFLAGS)
.PHONY: clean
clean:
rm -fv $(OBJS) $(PROJECTS)

View File

@ -25,6 +25,15 @@ field: $(OBJS)
%.o: %.cc
$(CXX) $(CXXFLAGS) -o $@ -c $< $(LDFLAGS)
results.txt: field
fish run.fish
temp-magnetization.png: results.txt
gnuplot magn.gnuplot
temp-energy.png: results.txt
gnuplot energy.gnuplot
.PHONY: clean
clean:
rm -fv $(OBJS) field

View File

@ -7,8 +7,8 @@
#include <cstdlib>
#define RESY 800
#define RESX 600
#define RESY 100
#define RESX 100
#define MAXITER (RESX*RESY*iter_multiplier)
using namespace std;

View File

@ -2,16 +2,9 @@
set encoding utf8
set terminal png size 800,600 enhanced font 'IBM Plex Sans Text,14'
set xlabel 'Temperature'
set ylabel 'Total energy'
set output "temp-energy.png"
plot "results.txt" using 1:2 title "simulated energies" with points ps 1 pt 2 lw 2 lt rgb "#007faf"
set ylabel 'Magnetization'
set output "temp-magnetization.png"
plot "results.txt" using 1:3 title "simulated magnetizations" with points ps 1 pt 2 lw 2 lt rgb "#af007f"