Skip to content

Commit

Permalink
Document function and remove unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasdreyer committed Sep 13, 2024
1 parent a179fb8 commit 37b835c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/t8_cmesh/t8_cmesh_trees.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,9 @@ t8_cmesh_trees_add_attribute (const t8_cmesh_trees_t trees, const int proc, cons
}

void
t8_cmesh_trees_add_ghost_attribute (const t8_cmesh_trees_t trees, const int proc,
const t8_stash_attribute_struct_t *attr, const t8_locidx_t local_ghost_id,
const t8_locidx_t ghosts_inserted, const size_t index)
t8_cmesh_trees_add_ghost_attribute (const t8_cmesh_trees_t trees, const t8_stash_attribute_struct_t *attr,
const t8_locidx_t local_ghost_id, const t8_locidx_t ghosts_inserted,
const size_t index)
{
t8_part_tree_t part;
t8_cghost_t ghost;
Expand All @@ -769,7 +769,7 @@ t8_cmesh_trees_add_ghost_attribute (const t8_cmesh_trees_t trees, const int proc
T8_ASSERT (attr->attr_data != NULL || attr->attr_size == 0);
T8_ASSERT (attr->id >= 0);

part = t8_cmesh_trees_get_part (trees, proc);
part = t8_cmesh_trees_get_part (trees, 0);
ghost = t8_part_tree_get_ghost (part, local_ghost_id);

attr_info = T8_GHOST_ATTR_INFO (ghost, index);
Expand Down
14 changes: 10 additions & 4 deletions src/t8_cmesh/t8_cmesh_trees.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,18 @@ void
t8_cmesh_trees_add_attribute (const t8_cmesh_trees_t trees, int proc, const t8_stash_attribute_struct_t *attr,
t8_locidx_t tree_id, size_t index);

/**
*
* TODO: Document
/** Add the next ghost attribute from stash to the correct position in the char pointer structure
* Since it is created from stash, all attributes are added to part 0.
* The following attribute offset gets updated already.
* \param [in,out] trees The trees structure, whose char array is updated.
* \param [in] attr The stash attribute that is added.
* \param [in] local_ghost_id The local ghost id.
* \param [in] ghosts_inserted The number of ghost that were already inserted, so that we do not write over the end.
* \param [in] index The attribute index of the attribute to be added.
*/

void
t8_cmesh_trees_add_ghost_attribute (const t8_cmesh_trees_t trees, int proc, const t8_stash_attribute_struct_t *attr,
t8_cmesh_trees_add_ghost_attribute (const t8_cmesh_trees_t trees, const t8_stash_attribute_struct_t *attr,
t8_locidx_t local_ghost_id, t8_locidx_t ghosts_inserted, size_t index);

/** Return the number of parts of a trees structure.
Expand Down

0 comments on commit 37b835c

Please sign in to comment.