Diaphragm (optics) by Ciro Santilli 35 Updated +Created
gcc CLI option by Ciro Santilli 35 Updated +Created
C by Ciro Santilli 35 Updated +Created
FreeFem by Ciro Santilli 35 Updated +Created
Started in 1987 and written in Pascal, by the French from Pierre and Marie Curie University, the French are really strong in numerical analysis.
Ciro wasn't expecting it to be as old. Ported to C++ in 1992.
The fact that French wrote it can be seen in the documentation, for example doc.freefem.org/tutorials/index.html uses file extension mycode.edp instead of mycode.pde where dep stands for "Équation aux dérivées partielles".
Besides the painful build, using FreeFem is relatively simple, as can be seen from the examples on the website.
They do use a domain-specific language on the examples, which appears to be the main/only interface, which is a bad thing, Ciro would rather have a Python API as the "main API", which is more the approach taken by the FEniCS Project, but so be it. This domain-specific language business means that you always stumble upon basic stuff you want to do but can't, and then you have to think about how to share data between the simulation and the plotting. The plotting notably is super complex and they can't implement all of what people want, upstream examples often offload that to gnuplot. This is potentially a big advantage of FEniCS Project.
It nice though that they do have some graphics out of the box, as that allows to quickly debug common problems.
Uses variational formulation of a partial differential equation, which is not immediately obvious to beginners? The introduction doc.freefem.org/tutorials/poisson.html gives an ultra quick example, but your are mostly on your own with that.
On Ubuntu 20.04, the freefem is a bit out-of-date (3.5.8, there isn't even a tag for that in the GitHub repo, and refs/tags/release_3_10 is from 2010!) and fails to run the examples from the website. It did work with the example package though, but the output does not have color, which makes me sad :-)
sudo apt install freefem freefem-examples
freefem /usr/share/doc/freefem-examples/heat.pde
So let's just compile the latest v4.6 it from source, on Ubuntu 20.04:
sudo apt build-dep freefem
git clone https://github.com/FreeFem/FreeFem-sources
cd FreeFem-sources
# Post v4.6 with some fixes.
git checkout 3df0e2370d9752801ac744b11307b14e16743a44

# Won't apply automatically due to tab hell.
# https://superuser.com/questions/607410/how-to-copy-paste-tab-characters-via-the-clipboard-into-terminal-session-on-gnom
git apply <<'EOS'
diff --git a/3rdparty/ff-petsc/Makefile b/3rdparty/ff-petsc/Makefile
index dc62ab06..13cd3253 100644
--- a/3rdparty/ff-petsc/Makefile
+++ b/3rdparty/ff-petsc/Makefile
@@ -204,7 +204,7 @@ $(SRCDIR)/tag-make-real:$(SRCDIR)/tag-conf-real
 $(SRCDIR)/tag-install-real :$(SRCDIR)/tag-make-real
     cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr install
     -test -x "`type -p otool`" && make changer
-    cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr check
+    #cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr check
     test -e $(DIR_INSTALL_REAL)/include/petsc.h
     test -e $(DIR_INSTALL_REAL)/lib/petsc/conf/petscvariables
     touch $@
@@ -293,7 +293,6 @@ $(SRCDIR)/tag-tar:$(PACKAGE)
     -tar xzf $(PACKAGE)
     patch -p1 < petsc-hpddm.patch
 ifeq ($(WIN32DLLTARGET),)
-    patch -p1 < petsc-metis.patch
 endif
     touch $@
 $(PACKAGE):
EOS

autoreconf -i
./configure --enable-download --enable-optim --prefix="$(pwd)/../FreeFem-install"
./3rdparty/getall -a
cd 3rdparty/ff-petsc
make petsc-slepc
cd -
./reconfigure
make -j`nproc`
make install
cd ../FreeFem-install
PATH="${PATH}:$(pwd)/bin" ./bin/FreeFem++ ../FreeFem-sources/examples/tutorial/
Ciro's initial build experience was a bit painful, possibly because it was done on a relatively new Ubuntu 20.04 as of June 2020, but in the end it worked: github.com/FreeFem/FreeFem-sources/issues/141
The main/only dependency appears to be PETSc which is used by default, which is a good sign, as that library appears to automatically parallelize a single input to several backends (single CPU, MPI, GPU) so you know things will scale up as you reach simulations.
The problem is that it compiling such a complex dependency opens up much more room for hard to solve compilation errors, and takes a lot more time.
Advanced Encryption Standard by Ciro Santilli 35 Updated +Created
Free by Ciro Santilli 35 Updated +Created
Change of basis matrix by Ciro Santilli 35 Updated +Created
The change of basis matrix is the matrix that allows us to express the new basis in an old basis:
Mnemonic is as follows: consider we have an initial basis . Now, we define the new basis in terms of the old basis, e.g.:
which can be written in matrix form as:
and so if we set:
we have:
The usual question then is: given a vector in the new basis, how do we represent it in the old basis?
The answer is that we simply have to calculate the matrix inverse of :
That is the matrix inverse.
Browser MMORPG by Ciro Santilli 35 Updated +Created
Comedy show by Ciro Santilli 35 Updated +Created
Unicellular and multicellular organisms by Ciro Santilli 35 Updated +Created
Engineer by Ciro Santilli 35 Updated +Created
Delft University of Technology by Ciro Santilli 35 Updated +Created
JPEG by Ciro Santilli 35 Updated +Created
Platform as a service by Ciro Santilli 35 Updated +Created
Highly managed, you don't even see the Docker images, only some higher level JSON configuration file.
These setups are really convenient and cheap, and form a decent way to try out a new website with simple requirements.
Lagrangian mechanics by Ciro Santilli 35 Updated +Created
Originally it was likely created to study constrained mechanical systems where you want to use some "custom convenient" variables to parametrize things instead of global x, y, z. Classical examples that you must have in mind include:
  • compound Atwood machine. Here, we can use the coordinates as the heights of masses relative to the axles rather than absolute heights relative to the ground
  • double pendulum, using two angles. The Lagrangian approach is simpler than using Newton's laws
  • two-body problem, use the distance between the bodies
lagrangian mechanics lectures by Michel van Biezen (2017) is a good starting point.
When doing lagrangian mechanics, we just lump together all generalized coordinates into a single vector that maps time to the full state:
where each component can be anything, either the x/y/z coordinates relative to the ground of different particles, or angles, or nay other crazy thing we want.
The Lagrangian is a function that maps:
to a real number.
Then, the stationary action principle says that the actual path taken obeys the Euler-Lagrange equation:
This produces a system of partial differential equations with:
  • equations
  • unknown functions
  • at most second order derivatives of . Those appear because of the chain rule on the second term.
The mixture of so many derivatives is a bit mind mending, so we can clarify them a bit further. At:
the is just identifying which argument of the Lagrangian we are differentiating by: the i-th according to the order of our definition of the Lagrangian. It is not the actual function, just a mnemonic.
Then at:
  • the part is just like the previous term, just identifies the argument with index ( because we have the non derivative arguments)
  • after the partial derivative is taken and returns a new function , then the multivariable chain rule comes in and expands everything into terms
However, people later noticed that the Lagrangian had some nice properties related to Lie group continuous symmetries.
Basically it seems that the easiest way to come up with new quantum field theory models is to first find the Lagrangian, and then derive the equations of motion from them.
For every continuous symmetry in the system (modelled by a Lie group), there is a corresponding conservation law: local symmetries of the Lagrangian imply conserved currents.
Genius: Richard Feynman and Modern Physics by James Gleick (1994) chapter "The Best Path" mentions that Richard Feynman didn't like the Lagrangian mechanics approach when he started university at MIT, because he felt it was too magical. The reason is that the Lagrangian approach basically starts from the principle that "nature minimizes the action across time globally". This implies that things that will happen in the future are also taken into consideration when deciding what has to happen before them! Much like the lifeguard in the lifegard problem making global decisions about the future. However, chapter "Least Action in Quantum Mechanics" comments that Feynman later notice that this was indeed necessary while developping Wheeler-Feynman absorber theory into quantum electrodynamics, because they felt that it would make more sense to consider things that way while playing with ideas such as positrons are electrons travelling back in time. This is in contrast with Hamiltonian mechanics, where the idea of time moving foward is more directly present, e.g. as in the Schrödinger equation.
Furthermore, given the symmetry, we can calculate the derived conservation law, and vice versa.
And partly due to the above observations, it was noticed that the easiest way to describe the fundamental laws of particle physics and make calculations with them is to first formulate their Lagrangian somehow: why do symmetries such as SU(3), SU(2) and U(1) matter in particle physics?s.
Bibliography:
Video 1.
Euler-Lagrange equation explained intuitively - Lagrangian Mechanics by Physics Videos by Eugene Khutoryansky (2018)
Source. Well, unsurprisingly, it is exactly what you can expect from an Eugene Khutoryansky video.
Local server by Ciro Santilli 35 Updated +Created
Server run on the current machine. That's how all websites are developed and born!
Matrix multiplication by Ciro Santilli 35 Updated +Created
Since a matrix can be seen as a linear map , the product of two matrices can be seen as the composition of two linear maps:
One cool thing about linear functions is that we can easily pre-calculate this product only once to obtain a new matrix, and so we don't have to do both multiplications separately each time.
Conjecture by Ciro Santilli 35 Updated +Created
A conjecture is an open problem in mathematics for which some famous dude gave heuristic arguments which indicate if the theorem is true or false.
List of command line utilities by Ciro Santilli 35 Updated +Created
Open source oscilloscope by Ciro Santilli 35 Updated +Created
Pinned article: ourbigbook/introduction-to-the-ourbigbook-project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
Video 1.
Intro to OurBigBook
. Source.
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
    Video 2.
    OurBigBook Web topics demo
    . Source.
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    • to OurBigBook.com to get awesome multi-user features like topics and likes
    • as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
    Video 4.
    OurBigBook Visual Studio Code extension editing and navigation demo
    . Source.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact