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

FEniCS / ffcx / 20003395181

07 Dec 2025 11:15AM UTC coverage: 78.511% (-5.9%) from 84.457%
20003395181

Pull #803

github

schnellerhase
Reactivate check
Pull Request #803: Add `C++` backend

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

4059 of 5170 relevant lines covered (78.51%)

0.79 hits per line

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

0.0
/ffcx/codegeneration/cpp/form_template.py
1
# Copyright (C) 2025 Chris Richardson and Paul T. Kühner
2
#
3
# This file is part of FFCx.(https://www.fenicsproject.org)
4
#
5
# SPDX-License-Identifier:    LGPL-3.0-or-later
6
"""Templates for C++ form output."""
7

NEW
8
declaration = """
×
9
extern ufcx_form {factory_name};
10

11
// Helper used to create form using name which was given to the
12
// form in the UFL file.
13
// This helper is called in user c++ code.
14
//
15
extern ufcx_form* {name_from_uflfile};
16

17
"""
18

NEW
19
factory = """
×
20
// Code for form {factory_name}
21

22
// TODO: that correct?
23
{original_coefficient_position_init}
24
{finite_element_hashes_init}
25
{form_integral_offsets_init}
26
{form_integrals_init}
27
{form_integral_ids_init}
28

29
{coefficient_names_init}
30
{constant_names_init}
31
{constant_ranks_init}
32
{constant_shapes_init}
33

34
{name_from_uflfile}::signature ={signature};
35
{name_from_uflfile}::rank = {rank};
36

37
{name_from_uflfile}::num_coefficients = {num_coefficients};
38
{name_from_uflfile}::original_coefficient_positions = {original_coefficient_positions};
39
{name_from_uflfile}::coefficient_name_map = {coefficient_names};
40

41
{name_from_uflfile}::num_constants = {num_constants};
42
{name_from_uflfile}::constant_ranks = {constant_ranks};
43
{name_from_uflfile}::constant_shapes = {constant_shapes};
44
{name_from_uflfile}::constant_name_map = {constant_names};
45

46
{name_from_uflfile}::finite_element_hashes = {finite_element_hashes},
47

48
{name_from_uflfile}::form_integrals = {form_integrals};
49
{name_from_uflfile}::form_integral_ids = {form_integral_ids};
50
{name_from_uflfile}::form_integral_offsets = form_integral_offsets_{factory_name};
51

52
// Alias name
53
using {name_from_uflfile} = {factory_name};
54

55
// End of code for form {factory_name}
56
"""
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