Niklas Compatibility Layer

Layer between Niklas and us. Niklas codes include cells far awy from volcano for regularization, we want to delete those.

We also want to delete the bottom cells (maybe we shouldnt, lets see later).

To effectively delete the cells, we just put the corresponding elements of the forward to 0, which prevents changing the size of the arrays.

volcapy.compatibility_layer.get_regularization_cells_inds(inverseProblem)[source]

Get the indices of the troublesome cells in Niklas grid that we want to exclude.

Those are the cells at the edge of the grid and (temporarily) the bottom cells.

Parameters
inverseProblem: InverseProblem
Returns
array[int]

Indices (in the grid) of the problematic cells.

volcapy.compatibility_layer.index_in_reg_grid(cell, nx, ny, nz, res_x, res_y, res_z)[source]

Given coordinates, find index in regular array.