Compile UFL form without associated DOLFINx data. Args: comm: The MPI communicator used when compiling the form form: The UFL form to compile form_compiler_options: See :func:`ffcx_jit ` jit_options: See :func:`ffcx_jit <dolfinx.jit.ffcx_jit
(
comm: MPI.Intracomm,
form: ufl.Form,
form_compiler_options: dict | None = None,
jit_options: dict | None = None,
)
| 550 | |
| 551 | |
| 552 | def compile_form( |
| 553 | comm: MPI.Intracomm, |
| 554 | form: ufl.Form, |
| 555 | form_compiler_options: dict | None = None, |
| 556 | jit_options: dict | None = None, |
| 557 | ) -> CompiledForm: |
| 558 | """Compile UFL form without associated DOLFINx data. |
| 559 | |
| 560 | Args: |
| 561 | comm: The MPI communicator used when compiling the form |
| 562 | form: The UFL form to compile |
| 563 | form_compiler_options: See :func:`ffcx_jit <dolfinx.jit.ffcx_jit>` |
| 564 | jit_options: See :func:`ffcx_jit <dolfinx.jit.ffcx_jit>`. |
| 565 | """ |
| 566 | if form_compiler_options is None: |
| 567 | form_compiler_options = {"scalar_type": default_scalar_type} |
| 568 | p_ffcx = ffcx.get_options(form_compiler_options) |
| 569 | p_jit = jit.get_options(jit_options) |
| 570 | ufcx_form, module, code = jit.ffcx_jit(comm, form, p_ffcx, p_jit) |
| 571 | scalar_type: npt.DTypeLike = p_ffcx["scalar_type"] # type: ignore [assignment] |
| 572 | return CompiledForm(form, ufcx_form, module, code, scalar_type) |
| 573 | |
| 574 | |
| 575 | def form_cpp_creator( |
nothing calls this directly
no test coverage detected