You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let us construct in our domain $Ω$ a uniform grid consisting of parallelepipeds.
We choose the numbers $Nx, Ny, Nz > 1$ — the number of nodes that will fit along the axis $Ox$, $Oy$ and $Oz$, respectively.
Then we define the grid step $Δx = \frac{1}{(Nx-1)}, Δy = \frac{1}{(Ny-1)}, Δz = \frac{1}{(Nz-1)}. $
We also define the time step $Δt$.
Denote by $V_{ijk}$ the grid node with coordinates $x_i = i Δx, y_j = j Δy, z_k = k Δz.$
We will describe the discrete function $[U]^h$ at time $nΔt$ by its degrees of freedom, which we will place at the grid nodes
and the degree of freedom at the node $V_{ijk}$ will be denoted as:
$$U_{ijk}^n, 0 ⩽ i ⩽ Nx-1, 0 ⩽ j ⩽ Ny-1, 0 ⩽ k ⩽ Nz-1.$$
We discretize our equation in space by the finite difference method, and in time by the explicit Euler scheme.
Note that for such a discretization, the time step must satisfy the Courant condition:
if $(i%(Nx-1)) (j%(Ny-1)) (k%(Nz-1)) = 0$, where $x%y$ is the operation of taking the remainder of division $x$ on $y$.
Start Code
pip install -r requirements.txt
mkdir build
cd build
cmake ..
make
./main
Analytical Solution
Implemented Solution
Error rate — 0.00076.
Computing power (cluster) provided by the Institute of Numerical Mathematics
of the Russian Academy of Sciences, Moscow.
Time of work with the optimizer:
2 processors
32 processors
12.78 s
1.1 s
Parallel version
A parallel version of the solution was implemented using the MPI package.
To do this, the discretization area is divided along the $Ox$ axis into the number of processors,
counting and data transfer between processes is implemented.
At the end, the results are concatenated into the final solution.
The image below shows the solution when parallelized to 4 processors.
Note
To create images, a Python script was written that generates a .vtk file from the available data.
These files are further concatenated using the ParaView software.
The cuts of the resulting cube are also implemented in Paraview.
About
High-perfomance computing Sirius competition in the fastest solving diffusion problem.