Return a copy of the merged JIT option values for DOLFINx. Args: priority_options: Take priority over all other option values (see notes). Returns: dict: Merged option values. Note: See :func:`ffcx_jit` for user facing documentation.
(priority_options: dict | None = None)
| 128 | |
| 129 | |
| 130 | def get_options(priority_options: dict | None = None) -> dict: |
| 131 | """Return a copy of the merged JIT option values for DOLFINx. |
| 132 | |
| 133 | Args: |
| 134 | priority_options: Take priority over all other option values |
| 135 | (see notes). |
| 136 | |
| 137 | Returns: |
| 138 | dict: Merged option values. |
| 139 | |
| 140 | Note: |
| 141 | See :func:`ffcx_jit` for user facing documentation. |
| 142 | |
| 143 | """ |
| 144 | options = dict() |
| 145 | for param, (value, _) in DOLFINX_DEFAULT_JIT_OPTIONS.items(): |
| 146 | options[param] = value |
| 147 | |
| 148 | # NOTE: _load_options uses functools.lru_cache |
| 149 | user_options, pwd_options = _load_options() |
| 150 | |
| 151 | options.update(user_options) |
| 152 | options.update(pwd_options) |
| 153 | if priority_options is not None: |
| 154 | options.update(priority_options) |
| 155 | |
| 156 | options["cache_dir"] = Path(str(options["cache_dir"])).expanduser() |
| 157 | |
| 158 | return options |
| 159 | |
| 160 | |
| 161 | @mpi_jit_decorator |
no test coverage detected