Skip to content

Commit f8f9dae

Browse files
make format
1 parent 81db682 commit f8f9dae

File tree

6 files changed

+35
-31
lines changed

6 files changed

+35
-31
lines changed

examples/fluids/src/turb_spanstats.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ typedef struct {
2525
CeedElemRestriction elem_restr_parent_x, elem_restr_parent_stats, elem_restr_parent_qd, elem_restr_parent_colloc, elem_restr_child_colloc;
2626
CeedBasis basis_x, basis_stats;
2727
CeedVector x_coord, q_data;
28-
} * SpanStatsSetupData;
28+
} *SpanStatsSetupData;
2929

3030
PetscErrorCode CreateStatsDM(User user, ProblemData *problem, PetscInt degree, SimpleBC bc) {
3131
user->spanstats.num_comp_stats = TURB_NUM_COMPONENTS;

examples/petsc/bpsraw.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void Split3(PetscInt size, PetscInt m[3], bool reverse) {
6464
static PetscInt Max3(const PetscInt a[3]) { return PetscMax(a[0], PetscMax(a[1], a[2])); }
6565
static PetscInt Min3(const PetscInt a[3]) { return PetscMin(a[0], PetscMin(a[1], a[2])); }
6666
static void GlobalNodes(const PetscInt p[3], const PetscInt i_rank[3], PetscInt degree, const PetscInt mesh_elem[3], PetscInt m_nodes[3]) {
67-
for (int d = 0; d < 3; d++) m_nodes[d] = degree * mesh_elem[d] + (i_rank[d] == p[d] - 1);
67+
for (int d = 0; d < 3; d++) m_nodes[d] = degree * mesh_elem[d] + (i_rank[d] == p[d] - 1);
6868
}
6969
static PetscInt GlobalStart(const PetscInt p[3], const PetscInt i_rank[3], PetscInt degree, const PetscInt mesh_elem[3]) {
7070
PetscInt start = 0;

include/ceed/jit-source/cuda/cuda-ref-operator-assemble-diagonal.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ typedef enum {
1919
CEED_EVAL_INTERP = 1,
2020
/// Evaluate gradients at quadrature points from input in a nodal basis
2121
CEED_EVAL_GRAD = 2,
22-
/// Evaluate divergence at quadrature points from input in a nodal basis
22+
/// Evaluate divergence at quadrature points from input in the basis
2323
CEED_EVAL_DIV = 4,
24-
/// Evaluate curl at quadrature points from input in a nodal basis
24+
/// Evaluate curl at quadrature points from input in the basis
2525
CEED_EVAL_CURL = 8,
2626
/// Using no input, evaluate quadrature weights on the reference element
2727
CEED_EVAL_WEIGHT = 16,

include/ceed/khash.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ static const double __ac_HASH_UPPER = 0.77;
178178
#define __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
179179
SCOPE kh_##name##_t *kh_init_##name(void) { return (kh_##name##_t *)kcalloc(1, sizeof(kh_##name##_t)); } \
180180
SCOPE void kh_destroy_##name(kh_##name##_t *h) { \
181-
if (h) { \
182-
kfree((void *)h->keys); \
183-
kfree(h->flags); \
184-
kfree((void *)h->vals); \
185-
kfree(h); \
181+
if (h) { \
182+
kfree((void *)h->keys); \
183+
kfree(h->flags); \
184+
kfree((void *)h->vals); \
185+
kfree(h); \
186186
} \
187187
} \
188188
SCOPE void kh_clear_##name(kh_##name##_t *h) { \

interface/ceed-basis.c

+22-20
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,8 @@ int CeedBasisCreateHdiv(Ceed ceed, CeedElemTopology topo, CeedInt num_comp, Ceed
845845
@param[in] num_nodes Total number of nodes (dofs per element)
846846
@param[in] num_qpts Total number of quadrature points
847847
@param[in] interp Row-major (dim * num_qpts * num_nodes) matrix expressing the values of basis functions at quadrature points
848-
@param[in] curl Row-major (cdim * num_qpts * num_nodes, cdim = 1 if dim < 3 else dim) matrix expressing curl of basis functions at quadrature points
848+
@param[in] curl Row-major (cdim * num_qpts * num_nodes, cdim = 1 if dim < 3 else dim) matrix expressing curl of basis functions at quadrature
849+
points
849850
@param[in] q_ref Array of length num_qpts * dim holding the locations of quadrature points on the reference element
850851
@param[in] q_weight Array of length num_qpts holding the quadrature weights on the reference element
851852
@param[out] basis Address of the variable where the newly created CeedBasis will be stored.
@@ -1094,7 +1095,7 @@ int CeedBasisApply(CeedBasis basis, CeedInt num_elem, CeedTransposeMode t_mode,
10941095
break;
10951096
case CEED_EVAL_NONE:
10961097
case CEED_EVAL_INTERP:
1097-
qdim = (fe_space == CEED_FE_SPACE_H1) ? 1 : dim;
1098+
qdim = (fe_space == CEED_FE_SPACE_H1) ? 1 : dim;
10981099
bad_dims = ((t_mode == CEED_TRANSPOSE && (u_length < num_elem * num_comp * num_qpts * qdim || v_length < num_elem * num_comp * num_nodes)) ||
10991100
(t_mode == CEED_NOTRANSPOSE && (v_length < num_elem * num_qpts * num_comp * qdim || u_length < num_elem * num_comp * num_nodes)));
11001101
break;
@@ -1107,7 +1108,7 @@ int CeedBasisApply(CeedBasis basis, CeedInt num_elem, CeedTransposeMode t_mode,
11071108
(t_mode == CEED_NOTRANSPOSE && (v_length < num_elem * num_qpts * num_comp || u_length < num_elem * num_comp * num_nodes)));
11081109
break;
11091110
case CEED_EVAL_CURL:
1110-
cdim = (dim < 3) ? 1 : dim;
1111+
cdim = (dim < 3) ? 1 : dim;
11111112
bad_dims = ((t_mode == CEED_TRANSPOSE && (u_length < num_elem * num_comp * num_qpts * cdim || v_length < num_elem * num_comp * num_nodes)) ||
11121113
(t_mode == CEED_NOTRANSPOSE && (v_length < num_elem * num_qpts * num_comp * cdim || u_length < num_elem * num_comp * num_nodes)));
11131114
break;
@@ -1871,26 +1872,27 @@ CeedPragmaOptimizeOn
18711872
}
18721873
CeedPragmaOptimizeOn
18731874

1874-
/**
1875-
@brief Apply Householder Q matrix
1875+
/**
1876+
@brief Apply Householder Q matrix
18761877
1877-
Compute A = Q A, where Q is mxm and A is mxn.
1878+
Compute A = Q A, where Q is mxm and A is mxn.
18781879
1879-
@param[in,out] A Matrix to apply Householder Q to, in place
1880-
@param[in] Q Householder Q matrix
1881-
@param[in] tau Householder scaling factors
1882-
@param[in] t_mode Transpose mode for application
1883-
@param[in] m Number of rows in A
1884-
@param[in] n Number of columns in A
1885-
@param[in] k Number of elementary reflectors in Q, k<m
1886-
@param[in] row Row stride in A
1887-
@param[in] col Col stride in A
1880+
@param[in,out] A Matrix to apply Householder Q to, in place
1881+
@param[in] Q Householder Q matrix
1882+
@param[in] tau Householder scaling factors
1883+
@param[in] t_mode Transpose mode for application
1884+
@param[in] m Number of rows in A
1885+
@param[in] n Number of columns in A
1886+
@param[in] k Number of elementary reflectors in Q, k<m
1887+
@param[in] row Row stride in A
1888+
@param[in] col Col stride in A
18881889
1889-
@return An error code: 0 - success, otherwise - failure
1890+
@return An error code: 0 - success, otherwise - failure
18901891
1891-
@ref Developer
1892-
**/
1893-
int CeedHouseholderApplyQ(CeedScalar *A, const CeedScalar *Q, const CeedScalar *tau, CeedTransposeMode t_mode, CeedInt m, CeedInt n, CeedInt k,
1892+
@ref Developer
1893+
**/
1894+
int
1895+
CeedHouseholderApplyQ(CeedScalar *A, const CeedScalar *Q, const CeedScalar *tau, CeedTransposeMode t_mode, CeedInt m, CeedInt n, CeedInt k,
18941896
CeedInt row, CeedInt col) {
18951897
CeedScalar *v;
18961898
CeedCall(CeedMalloc(m, &v));
@@ -1931,4 +1933,4 @@ int CeedMatrixMatrixMultiply(Ceed ceed, const CeedScalar *mat_A, const CeedScala
19311933
return CEED_ERROR_SUCCESS;
19321934
}
19331935

1934-
/// @}
1936+
/// @}

interface/ceed.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ static struct {
2727
} backends[32];
2828
static size_t num_backends;
2929

30-
#define CEED_FTABLE_ENTRY(class, method) \
31-
{ #class #method, offsetof(struct class##_private, method) }
30+
#define CEED_FTABLE_ENTRY(class, method) \
31+
{ \
32+
#class #method, offsetof(struct class##_private, method) \
33+
}
3234
/// @endcond
3335

3436
/// @file

0 commit comments

Comments
 (0)