FENICS_model

class nrv.fmod.FEM.FENICS_model(fname=None, Ncore=None, elem=None, comm='default', rank=0)[source]

A class for FENICS Finite Element Models, inherits from FEM_model.

Attributes

Methods

FENICS_model.__init__([fname, Ncore, elem, ...])

Creates a instance of a FENICS Finite Element Model object.

FENICS_model.add_electrode(elec_type[, ID, res])

TO BE WRITTEN

FENICS_model.build_and_mesh()

Build the geometry and perform meshing process

FENICS_model.get_meshes()

Visualize the model mesh WARNING: debbug use only + might not work on all os

FENICS_model.get_parameters()

Get the all the parameters in the model as a python dictionary.

FENICS_model.get_potentials(x, y, z[, E])

Get the potential on a line to get extracellular potential for axons stimulation.

FENICS_model.get_timers([verbose])

Returns the timers of each step of the FEM computation

FENICS_model.load([data])

Load all extracellular context properties from a dictionary or a json file

FENICS_model.load_from_parameters(**param)

FENICS_model.remove_fascicles([ID])

remove a fascicle of the FEM simulation

FENICS_model.reset_parameters()

reset model parameters

FENICS_model.reshape_fascicle(Fascicle_D[, ...])

Reshape a fascicle of the FEM simulation

FENICS_model.reshape_nerve([Nerve_D, ...])

Reshape the nerve of the FEM simulation

FENICS_model.reshape_outerBox(Outer_D[, res])

Reshape the size of the FEM simulation outer box

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

Save the changes to the model file.

FENICS_model.save_results([save, fname])

Save the changes to the model file.

FENICS_model.set_Ncore(N)

Set the number of cores to use for the FEM

FENICS_model.set_materials([Outer_mat, ...])

Set material files for any domain

FENICS_model.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

FENICS_model.setup_simulations([comm, rank])

TO BE WRITTEN

FENICS_model.solve([comm, rank])

Solve the model