How eugenio95/2d_hetero_san_parallel_models works
Main Components
• MATLAB Environment: This is the central environment where the simulation scripts reside, organized into separate subdirectories (FWS model, ML model, and SDiF model). Each of these represents a different simulation approach or model of the sinoatrial node tissues.
• Data and Initialization Files: Various .mat files (such as OriginalSeed.mat, initCond mat files, etc.) serve as initial conditions or parameter sets for the simulations.
• External Dependencies: Although the README is brief, it implies that besides GPU frameworks (CUDA), the system relies on MATLAB’s numerical and simulation capabilities.
Relationships and Interactions
• The MATLAB components serve as the orchestrators for simulation runs. They set up the simulation using input data, constants, and initial conditions, then interact with GPU kernels (through CUDA codes or MEX interfaces) to perform intensive computations.
• Each simulation model (FWS, ML, SDiF) has its own dedicated scripts and configuration files. They share a similar structure – including constant definitions, model-specific parameters, and specific GPU kernel calls.
• The CUDA components are integrated with MATLAB (either by direct CUDA coding or through precompiled MEX files), hence, indicating a clear dependency flow: MATLAB calls trigger GPU parallel computations via the CUDA modules.
• Data flows from the initialization files through MATLAB, into the CUDA kernels, and then the results are processed back in MATLAB for further analysis or visualization.
Architectural Patterns and Design Principles
• Modularity: The clear separation into directories for different simulation models reflects a modular design. Each model can be seen as an independent module that adheres to a similar template structure.
• Separation of Concerns: Computation-heavy parts are offloaded to GPU kernels, keeping MATLAB scripts for orchestration, data management, and possibly visualization. This separation aids maintainability and scalability.
• Integration of Heterogeneous Technologies: The system design blends MATLAB’s high-level scripting with low-level GPU code (CUDA), demonstrating a hybrid approach that leverages specialized technologies for different tasks.