make clean" must leave only the few files from
which the project is built while deleting all files which were
generated during building of the project.
Check this before submitting, because I do "make clean", look at the files, and then "make" when I check your projects.
PROGmy email is
fedorov@phys.au.dk
86.52.113.82/~fedorov/Prog
x=nvector_get(v,i); /* x=v_i */
nvector_set(v,i,x); /* v_i=x */
ssh
to your account.
cd,
cp,
ls,
mkdir,
mv,
rm.
sudo apt-get install nano
and learn how to create, save, and edit
text files with it (alternatively, install your favourite text editor).
sudo apt-get install build-essential.
printf function;
C math functions, math library (remember -lm); type-generic math
tgmath.h.
less with q.
if, switch) and loops (while, for,
do-while); Scope of variables: file, function, block.
sudo apt-get install manpages-posix manpages-posix-dev
~/.nanorc to show the otherwise invisible tabulator
characters:
syntax "makefile" "[Mm]akefile"
color white,magenta " "
The character in between the quotation marks in the second line should be the tabulator sign.
malloc;
Passing arrays as parameters to functions.
main invocation.
atoi (ascii to integer) and atof (ascii
to double) functions from <stdlib.h>.
printf(...) or fprintf(stderr,...)
debugging amounts to
...inserting printf commands that output more or less carefully chosen status
information at key points in the program flow, observing that information
and deducing what's wrong based on that information.
...Although often looked down on by users of modern debugging software,
printf() debugging continues to prove itself indispensable.
clang compiler
(install it with sudo apt-get install clang). Clang largely takes the same options as GCC.
fprintf(stderr,...) command at the strategic
points of the program and localize the source of the error.
TRACE macro
(read the C
preprocessor chapter)
and use it instead of directly using fprintf function. The
macro can then be simply disabled after debugging. For example:
#ifndef NDEBUG
#define TRACE fprintf
#else
#define TRACE(...)
#endif
or, more elegantly,
#ifndef NDEBUG //#define TRACE(args...) fprintf(stderr,args) #define TRACE(...) fprintf(stderr,__VA_ARGS__) #else #define TRACE(...) #endif
sudo apt-get --yes install gnuplot-x11
sudo apt-get --yes install pyxplot gv
The --yes option automatically answers 'yes' on all questions
apt-get might ask.
Some of you might have managed to install a special version of gnuplot,
called gnuplot-nox where 'nox' means 'no X-window'. This
version, predictably, has no x-window terminal. If you plan to use
gnuplot interactively, you have to install 'gnuplot', not 'gnuplot-nox'.
The two plotting utilities have very similar scripting languages but otherwise are somewhat different. Pyxplot uses LaTeX to render all text on the plot which is rather convenient. Gnuplot has more terminals. Look at their web-pages, gnuplot and pyxplot (specifically, the examples), and choose the one you like most (or both).
apt-cache search libgsl | grep development
It should return either libgsl0-dev or libgls-dev, depending on your system. Install this package,
sudo apt-get install libgsl0-dev
or
sudo apt-get install libgsl-dev
gsl_odeiv2_system with the fields
function, jacobian, dimension, params to hold an
Ordinary Differential Equations Initial Value System.
gsl_odeiv2_step_rk2,
gsl_odeiv2_step_rk4,
gsl_odeiv2_step_rk45, ... ,
gsl_odeiv2_step_bsimp. Note which of the algorithms require the
Jacobian of the system.
gsl_odeiv2_driver_alloc_y_new" and
"gsl_odeiv2_driver_apply"
gsl_integration_qag (adaptive Gauss-Kronrod integrator)
gsl_integration_qags (singular integrand)
gsl_integration_qagi (infinite interval)
gsl_integration_qagiu (infinite upper interval)
gsl_integration_qagil (infinite lower interval)
gsl_integration_cquad (new fashionable algorithm)
gsl_multimin_function
gsl_multimin_fminimizer
gsl_multimin_fminimizer_nmsimplex2
gsl_multimin_fminimizer_alloc|free
gsl_multimin_fminimizer_set
gsl_multimin_fminimizer_iterate
gsl_multimin_fminimizer_size
gsl_multimin_fminimizer_test_size
tar.
gsl_multiroot_function
gsl_multiroot_fsolver_alloc|free
gsl_multiroot_fsolver_set
gsl_multiroot_fsolver_iterate
gsl_multiroot_test_residual
sudo apt-get install texlive texlive-latex-extra
#include<assert.h> and use assertions plentifully:
you can easily disable all assertions by simply
recompiling the code with -DNDEBUG c-flag:
CFLAGS += -DNDEBUG