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

FEniCS / ffcx / 19800646711

30 Nov 2025 02:58PM UTC coverage: 73.811% (-4.1%) from 77.933%
19800646711

Pull #803

github

schnellerhase
Add cpp package
Pull Request #803: Add `C++` backend

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

3740 of 5067 relevant lines covered (73.81%)

0.74 hits per line

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

0.0
/ffcx/codegeneration/cpp/expressions_template.py
1
# Copyright (C) 2019 Michal Habera
2
#
3
# This file is part of FFCx.(https://www.fenicsproject.org)
4
#
5
# SPDX-License-Identifier:    LGPL-3.0-or-later
6
"""Code generation strings for an expression."""
7

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

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

NEW
18
factory = """
×
19
// Code for expression {factory_name}
20

21
void tabulate_tensor_{factory_name}({scalar_type}* restrict A,
22
                                    const {scalar_type}* restrict w,
23
                                    const {scalar_type}* restrict c,
24
                                    const {geom_type}* restrict coordinate_dofs,
25
                                    const int* restrict entity_local_index,
26
                                    const uint8_t* restrict quadrature_permutation)
27
{{
28
{tabulate_expression}
29
}}
30

31
{points_init}
32
{value_shape_init}
33
{original_coefficient_positions_init}
34
{function_spaces_alloc}
35
{function_spaces_init}
36
{coefficient_names_init}
37
{constant_names_init}
38

39

40
ufcx_expression {factory_name} =
41
{{
42
  .tabulate_tensor_{np_scalar_type} = tabulate_tensor_{factory_name},
43
  .num_coefficients = {num_coefficients},
44
  .num_constants = {num_constants},
45
  .original_coefficient_positions = {original_coefficient_positions},
46
  .coefficient_names = {coefficient_names},
47
  .constant_names = {constant_names},
48
  .num_points = {num_points},
49
  .entity_dimension = {entity_dimension},
50
  .points = {points},
51
  .value_shape = {value_shape},
52
  .num_components = {num_components},
53
  .rank = {rank},
54
  .function_spaces = {function_spaces}
55
}};
56

57
// Alias name
58
ufcx_expression* {name_from_uflfile} = &{factory_name};
59

60
// End of code for expression {factory_name}
61
"""
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