DART can be readily used through python because SWIG has been used to generate wrappers. More specifically, SWIG produces a shared library `_modulew.[so|pyd]` and a python module `modulew.py`. Additionally, the repository is organized such that the folder `module` automatically imports the modules it depends on. Consequently, users only need to import the required modules, as they would do for any package written in pure python.
**External modules**
`math` or `numpy` modules contain useful mathematics constant/functions. Since `math` is a default module of python while `numpy` needs to be installed, this documentation will use `math`.
```python
importmath# or import numpy
```
DART can be readily used through python because SWIG has been used to generate wrappers. More specifically, SWIG produces a shared library `_modulew.[so|pyd]` and a python module `modulew.py`. Additionally, the repository is organized such that the folder `module` automatically imports the modules it depends on. Consequently, users only need to import the required modules, as they would do for any package written in pure python. It is highly recommended to import the DART modules before any other external module, so as to avoid potential conflicts with backend libraries.
**DART modules**
`fwk` contains some common and useful features, such as the timers. `tbox` contains the basic features of a finite element framework. Finally, `dart` contains all the features required to solve the full potential equation. If DART is used for development, users can import using,
`dart` contains all the features required to solve the full potential equation. `tbox` contains the basic features of a finite element framework. Finally, `fwk` contains some common and useful features, such as the timers. If DART is used for development, users can import using,
```python
importfwk
importdart
importtbox
importtbox.gmshasgmsh
importdart
importfwk
```
If DART has been installed, users need to import using,
```python
fromdartfloimportfwk
fromdartfloimportdart
fromdartfloimporttbox
fromdartflo.tboximportgmsh
fromdartfloimportdart
fromdartfloimportfwk
```
**External modules**
`math` or `numpy` modules contain useful mathematics constant/functions. Since `math` is a default module of python while `numpy` needs to be installed, this documentation will use `math`.