- README
- DIRECTORY
- DEMO

## About this code

This code creates the matrices in solving the Stokes equation over 3D domain.

See JSIAM2020_NS.pdf for an introduction of the problem.

Note:

This project does not provide the matrices needed for the a priori error estimation.

Xuefeng LIU, 2020/08/25 Updated: 2022/07/15

## About the structure

There are four folders existing. In each folder, the setting file is prepared for a mesh with different size. But since the matrices will be huge, the matrix is not ready yet.

- Case_2020_08_25_Cube_N_4 (The matrix will be about 0.05G)
- Case_2020_08_25_Cube_N_8 (The matrix will be about 0.5G)
- Case_2020_08_25_Cube_N_16 (The matrix will be about 1.8G)
- Case_2020_08_25_Cube_N_32 (The matrix will be about 10G)

There is also a *bin* folder, which contains the commands to create matrix and solve the equation.

## How to create matrix

Requirement:

- FEniCS package (http://www.fenicsproject.org)
- MATLAB or Octave (The create_matrix.sh use Octave as default. You can customize this as MATLAB.)

To create matrix for each folder, enter the bin folder and run *create_matrix.sh*:

```
cd ./bin/
chmod 755 *
./create_matrix.sh ../Case_2020_08_25_Cube_N_4/
```

## Calculate the approximate solution

If the solution is needed to check the result, run *get_solution.sh*, which applies the Lagrange method to solve the equation.

```
cd ./bin/
./get_solution.sh ../Case_2020_08_25_Cube_N_4/
```

#### About the directory

Folders or files beginning with a dot are not displayed by default.

## Virtual Machine Setting

#### Warning!

You are starting the virtual machine as a **visitor** to current project. As a visitor, you can change files in the booted virtual machine, but the changed files will be aborted when the server is shut down.