• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FEniCS / ffcx / 19989046719

06 Dec 2025 01:17PM UTC coverage: 73.753% (-4.2%) from 77.933%
19989046719

Pull #803

github

schnellerhase
xdist and I/O seems to be buggy (noted in other occassions as well)
Pull Request #803: Add `C++` backend

0 of 272 new or added lines in 10 files covered. (0.0%)

3740 of 5071 relevant lines covered (73.75%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/ffcx/codegeneration/cpp/file.py
1
# Copyright (C) 2009-2018 Anders Logg, Martin Sandve Alnæs and Garth N. Wells
2
#
3
# This file is part of FFCx.(https://www.fenicsproject.org)
4
#
5
# SPDX-License-Identifier:    LGPL-3.0-or-later
6
#
7
# Note: Most of the code in this file is a direct translation from the
8
# old implementation in FFC
9
"""Generate code for file output."""
10

NEW
11
import logging
×
NEW
12
import pprint
×
NEW
13
import textwrap
×
14

NEW
15
from ffcx import __version__ as FFCX_VERSION
×
NEW
16
from ffcx.codegeneration import __version__ as UFC_VERSION
×
NEW
17
from ffcx.codegeneration.cpp import file_template
×
18

NEW
19
logger = logging.getLogger("ffcx")
×
20

21

NEW
22
def generator(options):
×
23
    """Generate UFC code for file output."""
NEW
24
    logger.info("Generating code for file")
×
25

26
    # Attributes
NEW
27
    d = {"ffcx_version": FFCX_VERSION, "ufcx_version": UFC_VERSION}
×
NEW
28
    d["options"] = textwrap.indent(pprint.pformat(options), "//  ")
×
NEW
29
    extra_includes = []
×
NEW
30
    if "_Complex" in options["scalar_type"]:
×
NEW
31
        extra_includes += ["complex"]
×
NEW
32
    d["extra_includes"] = "\n".join(f"#include <{header}>" for header in extra_includes)
×
33

34
    # Format declaration code
NEW
35
    code_pre = (
×
36
        file_template.declaration_pre.format_map(d),
37
        file_template.implementation_pre.format_map(d),
38
    )
39

40
    # Format implementation code
NEW
41
    code_post = (
×
42
        file_template.declaration_post.format_map(d),
43
        file_template.implementation_post.format_map(d),
44
    )
45

NEW
46
    return code_pre, code_post
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc