The solution of the non-stationary diffusion equation with unknown U is considered:
where dot
Boundary conditions:
on the boundary of the domain
at the initial time
Let's set the final moment of time as
In the problem, we will use the diagonal tensor
where
Initial-boundary conditions:
The equation being solved has an analytical solution:
Let us construct in our domain
We choose the numbers
We will describe the discrete function
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:
Let us introduce discrete operators of the second spatial derivatives:
Also let
and
Then we have the following numerical scheme:
if
pip install -r requirements.txt
mkdir build
cd build
cmake ..
make
./mainError 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 |
A parallel version of the solution was implemented using the MPI package.
To do this, the discretization area is divided along the
At the end, the results are concatenated into the final solution.
The image below shows the solution when parallelized to 4 processors.
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.


