The code for this example is located in `examples/FVDiscr`
## Brief
This example uses simple two-point FVM scheme to solve Poisson's equation in unit cube domain.
## Description
This examples is used to solve the problem _div(K grad U) = f_ with Dirichlet boundary conditions, where _K_ is unit tensor and the right-hand side _f_ is computed from the exact solution: _U = sin(PI·x)·sin(PI·y)·sin(PI·z)_.
This example may run in both serial and parallel modes with `NP` processes.
The code loads the mesh for unit cube domain.
If INMOST is built with `USE_PARTITIONER=ON` and input mesh is a serial mesh, then the `Inner_RCM` partitioner is used to partition the mesh.
One layer of ghost cells is created and exchanged. The simplest two-point FVM scheme is used to assemble local matrices. Using ghost cells effectively links local matrices in global matrix.
Two-point FVM scheme is only valid when cell faces are orthogonal to segments connecting centers of neighboring cells.
Optionally the code saves the generated matrix and right-hand side in user provided files.
The distributed matrix is solved using `INNER_ILU2` solver.
The solution is compared with known exact solution and _C_ and _L₂_ norms are computed.
The result mesh is saved either in `result.vtk`, or `result.pvtk` depending on number of NP.
## Arguments
```
Usage: ./FVDiscr mesh_file [A.mtx b.rhs]
```
- First parameter is the mesh file.
- Two optional parameters – output file names for generated matrix and right-hand side.
## Running example
If you compiled INMOST with `USE_PARTITIONER=OFF` you should provide the prepartitioned mesh, otherwise you can provide either serial mesh, or prepartitioned mesh.
You can generate meshes using [[GridGen|1390-GridGen-Example]] generator. The following line uses `/tmp/grid-32-32-32.pvtk` mesh from [[GridGen example|1390-GridGen-Example#running-example]].