Module 1 - Mesh

class module1_mesh.electrodes_position(L, per_cober, rotate)

Object that contains the position of the electrodes in boundary. The position is stored in function of angle theta initial and final of each electrode.

Parameters
  • L (int.) – Number electrodes.

  • per_cober (float.) – Percentual covered lenght in boundary by electrodes, between 0 and 1.

  • rotate (float.) – Rotation angle in the original solution for electrodes.

Example
>>> ele_pos=electrodes_position(L=16, per_cober=0.5, rotate=0)
>>> print(ele_pos.position)
[[0.0, 0.19634954084936207],
 [0.39269908169872414, 0.5890486225480862],
 [0.7853981633974483, 0.9817477042468103],
 [1.1780972450961724, 1.3744467859455345],
 [1.5707963267948966, 1.7671458676442586],
 ...,
 [5.890486225480862, 6.086835766330224]]
class module1_mesh.MyMesh(r, n, n_in, n_out, electrodes_obj)

Function that generate the mesh based in the electrodes position

Parameters
  • r (float.) – Circle Radius

  • n (int.) – Refinament parameter

  • n_in (int) – Vertices number in electrodes

  • n_out (int) – Vertices number in gaps.

  • electrodes_obj (electrodes_position()) – Object.

Returns

dolfin.cpp.mesh.Mesh

Example
>>> ele_pos=electrodes_position(L=16, per_cober=0.5, rotate=0)
>>> mesh_inverse=MyMesh(r=1, n=8, n_in=6, n_out=1, electrodes_obj=ele_pos)
>>> mesh_forward=MyMesh(r=1, n=8*3, n_in=6*3, n_out=1*3, electrodes_obj=ele_pos)
../_images/mesh.png