MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / get_options

Function get_options

python/dolfinx/jit.py:130–158  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

128
129
130def 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

Callers 1

ffcx_jitFunction · 0.85

Calls 2

_load_optionsFunction · 0.85
updateMethod · 0.80

Tested by

no test coverage detected