Convert currents to current densities in FVM (#381)
Update the FVM formulation to use current densities instead of currents. Modifications to modcc: * Update printers to store and use weights for point process mechanisms, * Scale ion species current contributions by area proportion, similarly to contributions to the accumulated current. Changes to FVM code: * Update weights calculation for density and point processes mechanisms: * density channels use relative proportion of CV area, i.e. "density", * point processes use the reciprocal of the CV area to convert to a density. * Add `cv_area` parameter for matrix constructor, which is used by matrix assembly to convert current densities to currents. * Update stimulus implementations (gpu and cpu backends) to contribute current densities. Other changes: * Update unit tests to use new interfaces. * Update units section in LaTeX docs. Fixes #374.
Showing
- .gitignore 4 additions, 0 deletions.gitignore
- doc/math/model/symbols.tex 3 additions, 2 deletionsdoc/math/model/symbols.tex
- modcc/cprinter.cpp 25 additions, 29 deletionsmodcc/cprinter.cpp
- modcc/cudaprinter.cpp 21 additions, 25 deletionsmodcc/cudaprinter.cpp
- modcc/module.cpp 22 additions, 9 deletionsmodcc/module.cpp
- modcc/parser.cpp 0 additions, 1 deletionmodcc/parser.cpp
- src/backends/gpu/fvm.hpp 0 additions, 1 deletionsrc/backends/gpu/fvm.hpp
- src/backends/gpu/kernels/assemble_matrix.cu 9 additions, 4 deletionssrc/backends/gpu/kernels/assemble_matrix.cu
- src/backends/gpu/kernels/stim_current.cu 7 additions, 5 deletionssrc/backends/gpu/kernels/stim_current.cu
- src/backends/gpu/matrix_state_flat.hpp 11 additions, 5 deletionssrc/backends/gpu/matrix_state_flat.hpp
- src/backends/gpu/matrix_state_interleaved.hpp 13 additions, 7 deletionssrc/backends/gpu/matrix_state_interleaved.hpp
- src/backends/gpu/stim_current.hpp 4 additions, 2 deletionssrc/backends/gpu/stim_current.hpp
- src/backends/gpu/stimulus.hpp 7 additions, 1 deletionsrc/backends/gpu/stimulus.hpp
- src/backends/multicore/matrix_state.hpp 10 additions, 6 deletionssrc/backends/multicore/matrix_state.hpp
- src/backends/multicore/stimulus.hpp 8 additions, 1 deletionsrc/backends/multicore/stimulus.hpp
- src/fvm_multicell.hpp 20 additions, 12 deletionssrc/fvm_multicell.hpp
- src/matrix.hpp 3 additions, 2 deletionssrc/matrix.hpp
- src/model.hpp 1 addition, 2 deletionssrc/model.hpp
- tests/unit/test_fvm_multi.cpp 6 additions, 4 deletionstests/unit/test_fvm_multi.cpp
- tests/unit/test_matrix.cpp 10 additions, 9 deletionstests/unit/test_matrix.cpp
Please register or sign in to comment