Lectures / exercises¶
Lectures:
Monday 8:15 V/2: Prof. Janko Slavič, PhD (DS-P3, 01 4771 226, janko
.slavic@fs .uni -lj .si)
Exercises:
| Time | Asst. Domen Gorjup, PhD | Asst. Marko Zupan | Asst. Gal Stanovnik |
|---|---|---|---|
| Thursday | |||
| 8:00 | T1 (I/4b) | T2 (RU SP-24) | |
| 10:00 | T3 (I/4b) | T4 (RU SP-24) | |
| Friday | |||
| 8:00 | F1 (I/4b) | F2 (RU SP-24) | |
| 12:00 | F3 (I/4b) | F4 (RU SP-24) |
Office hours:
Thursday 11:30 - 12:00 in classroom I/4b, by prior arrangement with the assistant.
Assistants:
Asst. Domen Gorjup, PhD (DS-P5, 01 4771 228, domen
.gorjup@fs .uni -lj .si) Asst. Marko Zupan (DS-P5, 01 4771 230, marko
.zupan@fs .uni -lj .si) Asst. Gal Stanovnik (DS-P5, 01 4771 230, gal
.stanovnik@fs .uni -lj .si)
Tracking continuous study, announcements, etc.
We will run continuous study with the help of: moj.ladisk.si. To log in, use the email you have in VIS: video walkthrough of logging in.
Course-related materials can also be found in the online classroom.
Continuous study¶

Grade composition¶
5% participation in lectures
10% weekly homework (at least 50%)
40% individual project (at least 50%)
45% theory test (at least 50%): see past tests
You must come to lectures and exercises prepared; we will use some flipped-classroom principles!
Exercise templates¶
For each exercise, a template (Jupyter notebook) with problem definitions and prepared code is available. Download the template before the exercise and complete it during the exercise with your own notes and solutions.
The exercise templates are in the Exercise templates folder.
Individual project¶
It relates to any content of any course at the Faculty of Mechanical Engineering and is defined by the student themselves. The project must include the following content:
symbolic computation,
systems of linear equations,
interpolation or approximation,
root finding,
integration or differentiation,
solving differential equations.
Use of artificial intelligence in the project¶
In the individual project, we expect you to use artificial intelligence tools (AI; e.g., Claude, ChatGPT, Copilot): to explain methods, write and review code, find bugs, and format the report. With AI you can achieve considerably more in the available time than without it, so the expectations regarding the scope of the project are adjusted accordingly.
Expected scope of the project
For a grade of 10, we expect a project for which the time invested without AI would substantially exceed the scope of this course. This is a measure of the scope and quality of the result, not of the time you spend on the project: with AI, such a project is feasible within the expected workload of the course.
Such a project typically has:
a real engineering problem (e.g., from another course, from practice, or from a laboratory), not a textbook exercise made up just to use the prescribed methods,
numerical content that is connected into a whole (e.g., interpolated measurements are the input to a differential equation, whose solution is then compared with the measurements),
an analysis of the influence of parameters or a comparison of several methods with an estimate of error and convergence,
verified results (analytical solution, another method, measurements, literature),
a usable software product: a module with tests, a user interface, an animation, a web application, data acquisition, etc.
Approximate project grade by scope:
| Grade | Expected scope |
|---|---|
| 6–7 | All six numerical topics are correctly applied and explained, but they are poorly connected; the problem is simple. |
| 8 | A meaningful whole, results are verified, some analysis of the influence of parameters. |
| 9 | A real problem, connected methods, comparison of methods and error estimates, a well-developed software part (module, tests). |
| 10 | As for 9, with a scope for which the time invested without AI would substantially exceed the scope of this course: e.g., real data or measurements, several connected models, a user interface or application, an in-depth critical analysis. |
Your responsibility when using AI
AI is a tool; you are the author of the project and the person responsible for it.
You must understand and be able to explain everything you submit: every method, every part of the code, and every result. At the defense, we may ask you about any part of the project.
Verify the results. AI often suggests an inappropriate method, a wrong boundary condition, or code that runs but computes the wrong thing. Verifying the results is part of the grade.
Describe your use of AI in the Use of artificial intelligence section at the end of the report (5–10 lines): which tools you used and for what, where the AI was wrong and how you found out, and what you did yourself.
We still check for plagiarism (see below). The fact that the code was written by AI is no excuse for matching another project; if you start from your own problem, matching does not occur.
The use of AI is not allowed at the exam. It therefore makes sense to let AI help you understand the project, not just write the code.
What we grade in the individual project¶
The purpose of the project is to demonstrate the appropriate selection and use of numerical methods, to comment on how they work, and to evaluate the obtained results. We grade four areas:
Numerical methods: 45%
appropriateness and correctness of the methods used: 30%,
reasoning and comments: 15%.
Report and code: 25%.
Personal approach and creative addition: 25%.
Code tests and/or user interface: 5%.
What we look at in each area is described in more detail below.
Grading criteria by area
1. Numerical methods (each of the six prescribed sections is graded separately)
Correctness and appropriateness of the method:
the problem is solved numerically; a purely symbolic solution (
sympy) or just writing down the equations is not enough,the method suits the problem (e.g., solve an overdetermined system with the least-squares method, do not approximate a periodic signal with a polynomial, convert a higher-order differential equation into a system of first-order equations, etc.),
where possible, the result is verified: by comparison with an analytical solution, another numerical method, or an existing function from
numpy/scipy(this also applies to solutions suggested by AI),using existing functions (
numpy,scipy) is encouraged; your own implementation must be justified and compared with an existing function.
Reasoning and comments: for every method you use, explain in writing:
why you chose this method and not another (e.g., Newton’s method or bisection? why LU decomposition? why splines and not a polynomial? etc.),
briefly: what the assumptions of the method are and what its limitations are (accuracy, convergence, order of the method, choice of step size, end points in differentiation ...),
what the result means for your physical problem (interpretation).
Important: in the project, do not repeat derivations or the theoretical background of the methods, etc., unless this is essential for understanding or running your code. Theory is the subject of the written part of the exam.
2. Report and code
Report:
basic information (first and last name, enrollment number, date) and an authorship statement,
problem definition with a description and a figure of the problem, and a list of sources,
sections following the template (see also the example project); the headings make it clear where each numerical topic is covered,
explanations in
markdowncells, equations written in LaTeX,results presented graphically (
matplotlib), with labeled axes and units,a short description of the use of AI in the Use of artificial intelligence section.
Code:
after
Restart\toRun Allthe report runs without errors, file paths are relative (all required files are included, the code works anywhere, not only on your computer),the code is readable and in a sensible order,
functions used more than once are collected in your own module (
.py), which you import into the report,functions have docstrings (description, parameters, return value) and meaningful comments,
additional packages are listed with installation instructions (e.g.,
requirements.txt).
3. Personal approach and creative addition
Scope and ambition: see Expected scope of the project above; for a grade of 10, we expect a scope for which the time invested without AI would substantially exceed the scope of this course.
Personal approach: the problem is a meaningful whole and not a set of unrelated tasks; the numerical content arises from the problem; the analysis is thorough (e.g., influence of parameters, comparison of methods, error estimate); the results are critically evaluated (are they physically meaningful?).
Creative addition: content that was not covered in lectures and exercises (see the list below). We grade the quality of the implementation, not just its presence; for grades 9 and 10, a creative addition is expected.
4. Code tests and/or user interface
At least one test of your own functions (e.g., with numpy.testing or pytest) or a simple user interface. The test must be run in the report and must pass.
The most common shortcomings of past projects that led to lower grades:
a method is used, but it is not explained why this one, how it works, and how accurate the result is,
a section is solved only symbolically,
an own implementation of a method without justification and without comparison with an existing function,
results without interpretation,
the code does not run because of wrong paths or missing packages,
code written by AI that the student cannot explain at the defense,
results that nobody has verified.
Creative addition: examples of content
A creative addition is treated as programming content that was not specifically covered in lectures and exercises. With AI tools, such additions are much more accessible, so we expect them for grades 9 and 10. For example:
animation of results using matplotlib,
other forms of advanced visualization (Plotly, Bokeh, vispy, pyqtgraph, VTK...),
automatic reading of data from the web, sending results by email,
machine-generated reports,
use of the Pandas library, writing results to a database, MS Excel,
use of the Raspberry Pi or Arduino platforms, data acquisition,
building a web application (Flask, Django),
use of modules and libraries such as scikit-learn, TensorFlow, PyOpenCV.
Instructions for submitting the project
The deadline for submitting the project is listed below, among the important dates.
To create the project, use the template; for guidance, see the example project.
Submit the project as a
zipfile named: First and last name, enrollment number.zip. Example:Janez Novak, 23201111.zip.The size of the
zipfile should not exceed 20 MB.Submit the ZIP in the online classroom.
Before submitting:
in the project, comment out (add #) any installation of additional packages and functions such as
%%timeit:
# !pip install package_name
# %%timeitCheck that the paths to images and other files are given in relative form (e.g.,
'image.jpg', not'D:\Numerical methods\project\image.jpg').do
Kernel\toRestartand thenCell\toRun All. Make sure that all cells execute correctly.
Plagiarism in the individual project
All submitted individual projects are checked with a plagiarism-detection system.
The system checks the similarity of submitted documents against all other projects from the current and past academic years. Any matching of text and of procedures in the submitted code is flagged as plagiarism (even if it is used in a different context, a different order, with renamed variables, etc.). The content of the lecture templates published in this repository is excluded from the check.
If a significant part of the content of your project matches another project, we cannot grade it as your own independent work. This means that you have not completed the exercises and do not meet the requirements to take the exam.
Project grading procedure¶
The project is graded in two steps: automated review and oral defense
Automated review of the submitted reports.
All submitted reports are first reviewed automatically: we check whether the report runs without errors and whether it contains all the prescribed content, and we compare it with the other projects (see Plagiarism above).
Oral defense with the course instructor, about 10 minutes per student.
The student briefly presents the project (the problem, the chosen methods, the key results), and the instructor then asks a few questions about the details, e.g.: why you chose a particular method, how your code works, how you verified the result, how you used AI. We may also ask you to make a small change to the code (e.g., change a parameter or a boundary condition) and show its effect.
The final project grade is based on both steps. A project that the student cannot explain at the defense cannot be graded as independent work.
The defense of individual projects will take place approximately 1 week after submission.
Homework (moj.ladisk.si)¶
We assign weekly homework in the moj.ladisk.si system. The homework assignments are Jupyter Notebook documents (.ipynb); you solve them in the Visual Studio Code environment.
The use of AI for homework is allowed, but we advise you to solve it yourself: AI is not available at the exam, and the homework is the main preparation for it.
General instructions for solving
Save the files you download from the web as a
.ziparchive (if your browser does not add the.zipextension to the file, do it yourself).Fully extract the archive of files you download from the web.
In the folder with the extracted files, open a command window and run the command
jupyter notebook.Run the cells in the
.ipynbhomework file in order (including the cells at the very top of the file!).When solving, results are sent to the moj.ladisk.si online system and are automatically checked on the fly. An internet connection is required when solving.
We have also prepared video instructions for solving.
Time limit for solving homework
Homework has a defined solving window time:
Until the solving window opens, early solving of the assignment without a time limit is possible.
During the solving window, the allowed time for solving the assignment is limited. The time limit starts from the moment you first open the assignment within the solving window.
After the window closes, the assignment closes and solving is no longer possible.
We advise you to solve as much of the assignment as possible during the early-solving period, before the solving window opens.
Using a Joker to postpone an obligation
Each student has two Jokers available in the course, which you can use to postpone an obligation to the future.
Using a Joker, you can move the solving window of a homework assignment forward by \leq 14 days.
Using a Joker is not possible if you have already opened the assignment.
Before the start of the solving window, one Joker is needed to move the assignment; during the solving window, two are needed.
Proposed grade based on continuous study¶
Proposed grade:
50 to 60%: 6
60 to 70%: 7
70 to 80%: 8
80 to 90%: 9
90% and above: 10
(Undefined ranges are intermediate grades.)
The individual project and the proposed grade are defended in an oral defense (see Project grading procedure).
In the defense, we also take into account the qualitative assessment of participation in exercises and lectures.
If you meet the continuous-work requirements (homework, project), you have one opportunity to take the test on theory only at the winter exam dates after the end of the semester.
Important dates¶
Submission of the individual project: Jan 12, 2027 by 12:00 *
The theory test is taken on any winter exam date (you have one opportunity).
Defenses: after the exam date.
* If submitted at least 1 week before the deadline, the result is multiplied by 1.1; in the case of a late submission, the result is multiplied by , where is the number of started days of delay.
Exam¶
Meeting the requirements to take the exam: each individual event (except theory and participation in lectures) that makes up the grade must be greater than 40%.
The exam is taken in two parts: 60 min for three theoretical questions (see a sample exam) and 50 min of testing the application of numerical methods on the computer (typically two problems; you may bring any written sources, but there is no internet access).
The use of AI tools is not allowed in either part of the exam.
For a passing grade, both parts must be passed.
References¶
Slavič J.: Programiranje in numerične metode s Pythonom, executable book or online book, 2015-
Petrišič J.: Uvod v Matlab za inženirje, 2011
Demšar J. Python za programerje, 2012 (see the online classroom at FRI)
Nicolas P. Rougier: From Python to Numpy, 2017 online book
Kiusalaas J: Numerical Methods in Engineering with Python 3, 2013
Fangohr H. Python for Computational Science and Engineering, 2014 (available online)
Bucky R. Python Programming Tutorials (videos on YouTube)
Projekt TOMO (more content; see especially the courses at FMF and FRI)
Scientific Python Lectures (formerly Scipy Lecture Notes)
Using the Numpy, Scipy, etc. packages for engineers Mr. P Solver (YouTube)
You can find some online classrooms on the topic of Python at pinm.ladisk.si
Requirements for taking the course in advance?¶
The course cannot be taken in advance.