Despite Fortran being an ancient language, its still comes with its own set of advantages. Recently, while debugging Abaqus subroutines, I have to repeatedly running code for testing. Although the integration with Abaqus is necessary for running the entire code, the individual modules can still be tested separately. The best method for testing modules is to run them as small, standalone programs. However, VS Code does not seem to support running Fortran code directly. A useful plugin for this purpose is Code Runner, but unfortunately, it doesn’t support Fortran by default and requires some adjustments. First, let’s start with a test code.
Calculus of variations I
Here is my notes about the calculus of variations that deals with optimizing functionals, which are mappings from a set of functions to the real numbers. It involves finding a function that minimizes or maximizes a given functional, often subject to certain constraints. This field has applications in various areas, including physics, engineering, and economics, by providing a systematic way to deal with optimization problems where the quantity to be optimized is dependent on a function.
Snippet Mathematica plot format
This snippet demonstrates the polt format that I often used in Wolfram Mathematica.
Simple tensor algebra III
Previously, the vector space $\mathbb{V}$ and three vector product operations were considered in Simple tensor algebra I and Simple tensor algebra II. But we do not talk much about the tensor. Here, the tensor will be introduced.
Simple tensor algebra II
The vector space $ \mathbb{V}$ is introduced in Simple tensor algrbra I, several rules are provided in it. To reduce the abstract, we represent the vectors $ \boldsymbol{x}, \boldsymbol{y}$ with the scalar coefficients $ ({x_1},{x_2},{x_3})$ and $ ({y_1},{y_2},{y_3})$ in $ \mathbb{E}^3$, respectively. The composition of two vectors $ \boldsymbol{x}, \boldsymbol{y} \in\mathbb{E}^3$ is expanded by,
Simple tensor algebra I
The vector space $ \mathbb{V} $ with the operation (+) over a field of real number $ \mathbb{R} $ is an abelian group with a scalar multiplication. So, suppose $ \boldsymbol{x} $, $ \boldsymbol{y} $ and $ \boldsymbol{z} \in \mathbb{V}$, they satisfy the following conditions:
Build VTK 8.1.0 with Qt on a Mac
This marks my second attempt at compiling VTK on a Mac. A month ago, I invested considerable time figuring out how to compile it using CMake and eventually succeeded. However, it’s surprisingly easy to forget the steps involved. To prevent that from happening again, I’m documenting the entire compilation process here.
Snippet Matrix with Euler angles
This snippet posts an Excel to calculate the matrix with Euler angles. To describe the rotation of a crystal frame, commonly, we use three angles: $ \alpha$, $ \beta$, and $ \gamma$. They are also known as Bunge angles.
Abaqus 3D convex hull creation
Convex hull is the smallest envelope that contains the points set. It is used to construct the grain in grain-based model. There are several methods to generate the convex hull data, but it may need some efforts if you want to put it into ABAQUS model. Here, I post a simple method which is suitable for programming.
An example of MD simulation
This is a homework of computational nanomechanics. The basic requirement is to use the Lagrangian function to describe the motion of particles. In homework, it requires 5 particles. As an enhancement, I rewrote the code with Qt and use GNU Scientific Library(GSL) to finish the task.