EIT2DProblem

class nrv.eit.EIT2DProblem(nervefile: str, res_dname: str | None = None, label: str = '2deit_1', **parameters)[source]

End-used class for Electrical Impedance Tomography (EIT) forward simulation in neural contexts solved with a 2D approximation.

This class extends eit_forward to provide specialized methods for setting up, meshing, and solving EIT problems in a 2D (Oyz) plan. It supports:
  • mesh generation with axons

  • physical domain assignment

  • finite element method (FEM) initialization

  • conductivity updates during the simulation.

Warning

For now the 2D approximation isn’t well documented. Further explaination will be added to the doc in the future.

Note

  • Mesh generation and FEM setup rely on GMSH and FEniCS/Dolfinx libraries with interface integrated into this class classes.

  • Conductivity calculations support various methods, including myelinated and unmyelinated axons.

Attributes

EIT2DProblem.dim

Spatial dimension number of the problem.

EIT2DProblem.fem_res_file

File where the fem results are saved

EIT2DProblem.i_drive_A

Injected current in A

EIT2DProblem.inj_protocol

Injection protocole.

EIT2DProblem.is_multi_patern

Check if the injection protocol contains more than one pattern.

EIT2DProblem.n_e

Number of electrodes.

EIT2DProblem.n_f

Number of frequency step in the EIT simulation.

EIT2DProblem.n_p

Number of injection paterns in the protocol.

EIT2DProblem.n_t

Number of time step in the EIT simulation.

EIT2DProblem.nerve_mesh_file

File where the nerve mesh is saved

EIT2DProblem.nerve_res_file

File where the nerve simulation results are saved

EIT2DProblem.timers_dict

Duration of all the simulations

EIT2DProblem.x_bounds_fem

x bounds of the nerve section over which FEM is simulated

EIT2DProblem.i_drive

current amplitude injected in uA.

EIT2DProblem.use_backup

if true simulation resutls are save on the fligth

Methods

EIT2DProblem.__init__(nervefile[, ...])

Initialize the EIT forward simulation class.

EIT2DProblem.build_mesh([with_axons])

creation of mesh file

EIT2DProblem.clear()

Clear all simulations outputs.

EIT2DProblem.clear_fem_res()

Clear FEM results and reset result file.

EIT2DProblem.get_info([verbose])

EIT2DProblem.get_nproc([which])

return the number of process of a given simualtion step

EIT2DProblem.get_parameters()

Generic method returning all the atributes of an NRV_class instance

EIT2DProblem.load(data[, blacklist])

Generic loading method for NRV_class instance

EIT2DProblem.rerun_failed_steps([...])

Rerun failed FEM simulation steps.

EIT2DProblem.run_all_fem(task_info)

Run the FEM simulation for all time step of a given task (process).

EIT2DProblem.run_and_savefem(sfile[, ...])

Compute only a few time step of the EIT simulation and save the computed electric field in the whole domain

EIT2DProblem.run_fem(task_info)

Run the FEM simulation for all time step of a given task (process).

EIT2DProblem.run_fem_1core(task_info)

EIT2DProblem.save([save, fname, blacklist])

Generic saving method for NRV_class instance.

EIT2DProblem.set_ncore_gmsh(ncore_meshing)

EIT2DProblem.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

EIT2DProblem.simulate_eit([save, sim_list])

Run the eit problem for all time steps

EIT2DProblem.simulate_nerve([t_start, ...])

Simulate the neural context: fibres conductivity and extracellular context.

EIT2DProblem.simulate_recording([t_start, ...])

Simulate the neural context: fibres conductivity and extracelullar context.

EIT2DProblem.v_shape()

Get the shape of the voltage results array.