Skip to content

Commit

Permalink
Reorder in header file
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrichardson committed Aug 10, 2023
1 parent 5d5513b commit 2c0b3f4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions ffcx/codegeneration/dofmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ def generator(ir, options):
entity_dof_offsets.append(len(flattened_entity_dofs))
d["entity_dofs"] = f"entity_dofs_{ir.name}"
d["entity_dofs_init"] = L.ArrayDecl(
"static const int",
"int",
f"entity_dofs_{ir.name}",
values=flattened_entity_dofs,
sizes=len(flattened_entity_dofs),
)
d["entity_dof_offsets"] = f"entity_dof_offsets_{ir.name}"
d["entity_dof_offsets_init"] = L.ArrayDecl(
"static const int",
"int",
f"entity_dof_offsets_{ir.name}",
values=entity_dof_offsets,
sizes=len(entity_dof_offsets),
Expand All @@ -122,14 +122,14 @@ def generator(ir, options):
entity_closure_dof_offsets.append(len(flattened_entity_closure_dofs))
d["entity_closure_dofs"] = f"entity_closure_dofs_{ir.name}"
d["entity_closure_dofs_init"] = L.ArrayDecl(
"static const int",
"int",
f"entity_closure_dofs_{ir.name}",
values=flattened_entity_closure_dofs,
sizes=len(flattened_entity_closure_dofs),
)
d["entity_closure_dof_offsets"] = f"entity_closure_dof_offsets_{ir.name}"
d["entity_closure_dof_offsets_init"] = L.ArrayDecl(
"static const int",
"int",
f"entity_closure_dof_offsets_{ir.name}",
values=entity_closure_dof_offsets,
sizes=len(entity_closure_dof_offsets),
Expand Down
2 changes: 1 addition & 1 deletion ffcx/codegeneration/dofmap_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
.num_global_support_dofs = {num_global_support_dofs},
.num_element_support_dofs = {num_element_support_dofs},
.block_size = {block_size},
.num_entity_dofs = {num_entity_dofs},
.entity_dofs = {entity_dofs},
.entity_dof_offsets = {entity_dof_offsets},
.entity_closure_dofs = {entity_closure_dofs},
.entity_closure_dof_offsets = {entity_closure_dof_offsets},
.num_entity_dofs = {num_entity_dofs},
.tabulate_entity_dofs = tabulate_entity_dofs_{factory_name},
.num_entity_closure_dofs = {num_entity_closure_dofs},
.tabulate_entity_closure_dofs = tabulate_entity_closure_dofs_{factory_name},
Expand Down
14 changes: 10 additions & 4 deletions ffcx/codegeneration/ufcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,21 @@ extern "C"
/// Return the block size for a VectorElement or TensorElement
int block_size;

/// Number of dofs associated with each cell entity of dimension d
int* num_entity_dofs;

/// @brief New interface
/// Flattened list of dofs associated with each entity
int* entity_dofs;

/// Offset for dofs of each entity in entity_dofs
int* entity_dof_offsets;

/// Flattened list of closure dofs associated with each entity
int* entity_closure_dofs;

/// Offset for closure dofs of each entity in entity_closure_dofs
int* entity_closure_dof_offsets;

/// Number of dofs associated with each cell entity of dimension d
int* num_entity_dofs;

/// Tabulate the local-to-local mapping of dofs on entity (d, i)
void (*tabulate_entity_dofs)(int* restrict dofs, int d, int i);

Expand Down

0 comments on commit 2c0b3f4

Please sign in to comment.