Skip to content

Commit

Permalink
clang format 17
Browse files Browse the repository at this point in the history
  • Loading branch information
wortiz committed Jun 5, 2024
1 parent 3f448dd commit 6bf6b83
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/bc/rotate_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ goma_corner_coordinate_system(goma_normal **normals, int n_normals, goma_normal

return GOMA_ERROR;

corner_coord_critical_found : {
corner_coord_critical_found: {
// find closest to x for first
int first_crit = -1;
double max_dot = 0;
Expand Down
52 changes: 26 additions & 26 deletions src/mm_fill_rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1967,41 +1967,41 @@ void f_kinematic_displacement_bc(double func[DIM],
}
#endif

if (af->Assemble_Jacobian) {
for (kdir = 0; kdir < pd->Num_Dim; kdir++) {
for (p = 0; p < pd->Num_Dim; p++) {
var = MESH_DISPLACEMENT1 + p;
if (pd->v[pg->imtrx][var]) {
for (j = 0; j < ei[pg->imtrx]->dof[var]; j++) {
phi_j = bf[var]->phi[j];
d_func[0][var][j] += ((fv->d[kdir] - base_displacement[kdir]) -
(fv->d_rs[kdir] - base_displacement_rs[kdir])) *
fv->dsnormal_dx[kdir][p][j] +
(delta(kdir, p) - dns_dX[kdir][p]) * phi_j * fv->snormal[kdir];
if (af->Assemble_Jacobian) {
for (kdir = 0; kdir < pd->Num_Dim; kdir++) {
for (p = 0; p < pd->Num_Dim; p++) {
var = MESH_DISPLACEMENT1 + p;
if (pd->v[pg->imtrx][var]) {
for (j = 0; j < ei[pg->imtrx]->dof[var]; j++) {
phi_j = bf[var]->phi[j];
d_func[0][var][j] += ((fv->d[kdir] - base_displacement[kdir]) -
(fv->d_rs[kdir] - base_displacement_rs[kdir])) *
fv->dsnormal_dx[kdir][p][j] +
(delta(kdir, p) - dns_dX[kdir][p]) * phi_j * fv->snormal[kdir];
}
}
}
}

for (p = 0; p < pd->Num_Dim; p++) {
var = SOLID_DISPLACEMENT1 + p;
if (pd->v[pg->imtrx][var]) {
for (j = 0; j < ei[pg->imtrx]->dof[var]; j++) {
phi_j = bf[var]->phi[j];
d_func[0][var][j] -= (delta(kdir, p) + dns_drs[kdir][p]) * phi_j * fv->snormal[kdir];
for (p = 0; p < pd->Num_Dim; p++) {
var = SOLID_DISPLACEMENT1 + p;
if (pd->v[pg->imtrx][var]) {
for (j = 0; j < ei[pg->imtrx]->dof[var]; j++) {
phi_j = bf[var]->phi[j];
d_func[0][var][j] -= (delta(kdir, p) + dns_drs[kdir][p]) * phi_j * fv->snormal[kdir];
}
}
}
}
}
} /* end of if Assemble_Jacobian */
} /* end of if Assemble_Jacobian */

/* Calculate the residual contribution */
/* Calculate the residual contribution */

for (kdir = 0; kdir < pd->Num_Dim; kdir++) {
*func +=
((fv->d[kdir] - base_displacement[kdir]) - (fv->d_rs[kdir] - base_displacement_rs[kdir])) *
fv->snormal[kdir];
for (kdir = 0; kdir < pd->Num_Dim; kdir++) {
*func += ((fv->d[kdir] - base_displacement[kdir]) -
(fv->d_rs[kdir] - base_displacement_rs[kdir])) *
fv->snormal[kdir];
}
}
}

} /* END of routine f_kinematic_displacement_bc */

Expand Down
24 changes: 12 additions & 12 deletions src/mm_fill_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -3478,7 +3478,7 @@ void apply_surface_viscosity(double cfunc[MDE][DIM],
if (Dolphin[pg->imtrx][I][VELOCITY1] > 0) {
for (a = 0; a < VIM; a++) {
for (q = 0; q < VIM; q++) {
cfunc[ldof][a] -= sgn5 * (surf_shear_visc)*2.000 *
cfunc[ldof][a] -= sgn5 * (surf_shear_visc) * 2.000 *
(fv->surfCurvatureDyadic[a][q] - 2.00 * fv->curv * Is[a][q]) *
fv->grad_v_dot_n[q];
}
Expand Down Expand Up @@ -3733,19 +3733,19 @@ void apply_surface_viscosity(double cfunc[MDE][DIM],
dotdotTmp +=
(fv->surfCurvatureDyadic[p][q] - 2 * fv->curv * Is[p][q]) * grad_s_v[q][p];
d_cfunc[ldof][a][var][j] +=
sgn4 * (surf_shear_visc)*2.0 *
sgn4 * (surf_shear_visc) * 2.0 *
(d_surfCurvatureDyadic_dn[p][q][b][j] * grad_s_v[q][p]) * fv->n[a];
d_cfunc[ldof][a][var][j] +=
sgn4 * (surf_shear_visc)*2.0 *
sgn4 * (surf_shear_visc) * 2.0 *
(-2 * fv->curv * (-fv->n[p] * phi_j * delta(q, b)) * grad_s_v[q][p]) * fv->n[a];
d_cfunc[ldof][a][var][j] +=
sgn4 * (surf_shear_visc)*2.0 *
sgn4 * (surf_shear_visc) * 2.0 *
(-2 * fv->curv * (-fv->n[q] * phi_j * delta(p, b)) * grad_s_v[q][p]) * fv->n[a];
}
}

d_cfunc[ldof][a][var][j] +=
sgn4 * (surf_shear_visc)*2.0 * dotdotTmp * phi_j * delta(a, b);
sgn4 * (surf_shear_visc) * 2.0 * dotdotTmp * phi_j * delta(a, b);
}
}
}
Expand All @@ -3757,7 +3757,7 @@ void apply_surface_viscosity(double cfunc[MDE][DIM],
for (p = 0; p < VIM; p++) {
for (q = 0; q < VIM; q++) {
// curvature dependence to first term
d_cfunc[ldof][a][var][j] += sgn4 * (surf_shear_visc)*2.0 * fv->n[a] *
d_cfunc[ldof][a][var][j] += sgn4 * (surf_shear_visc) * 2.0 * fv->n[a] *
(-2.0 * phi_j * Is[p][q] * grad_s_v[q][p]);
}
}
Expand Down Expand Up @@ -3802,7 +3802,7 @@ void apply_surface_viscosity(double cfunc[MDE][DIM],
// cfunc[ldof][a] -= sgn5 * (surf_shear_visc) * 2.000 * (fv->surfCurvatureDyadic[a][q]
// - 2.00 * fv->curv * Is[a][q]) * fv->grad_v_dot_n[q];
d_cfunc[ldof][a][var][j] -=
sgn5 * (surf_shear_visc)*2.000 *
sgn5 * (surf_shear_visc) * 2.000 *
(fv->surfCurvatureDyadic[a][q] - 2.00 * fv->curv * Is[a][q]) * delta(q, b) *
phi_j;
}
Expand All @@ -3817,7 +3817,7 @@ void apply_surface_viscosity(double cfunc[MDE][DIM],
for (q = 0; q < VIM; q++) {
// cfunc[ldof][a] -= sgn5 * (surf_shear_visc) * 2.000 * (fv->surfCurvatureDyadic[a][q]
// - 2.00 * fv->curv * Is[a][q]) * fv->grad_v_dot_n[q];
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc)*2.000 *
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc) * 2.000 *
(fv->surfCurvatureDyadic[a][q] - 2.00 * phi_j * Is[a][q]) *
fv->grad_v_dot_n[q];
}
Expand All @@ -3830,13 +3830,13 @@ void apply_surface_viscosity(double cfunc[MDE][DIM],
phi_j = bf[var]->phi[j];
for (a = 0; a < VIM; a++) {
for (q = 0; q < VIM; q++) {
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc)*2.000 *
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc) * 2.000 *
(d_surfCurvatureDyadic_dn[a][q][b][j]) *
fv->grad_v_dot_n[q];
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc)*2.000 *
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc) * 2.000 *
(-2 * fv->curv * (-fv->n[a] * phi_j * delta(q, b))) *
fv->grad_v_dot_n[q];
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc)*2.000 *
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc) * 2.000 *
(-2 * fv->curv * (-fv->n[q] * phi_j * delta(a, b))) *
fv->grad_v_dot_n[q];
}
Expand All @@ -3851,7 +3851,7 @@ void apply_surface_viscosity(double cfunc[MDE][DIM],
phi_j = bf[var]->phi[j];
for (a = 0; a < VIM; a++) {
for (q = 0; q < VIM; q++) {
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc)*2.000 *
d_cfunc[ldof][a][var][j] -= sgn5 * (surf_shear_visc) * 2.000 *
(d_surfCurvatureDyadic_dmesh[a][q][b][j]) *
fv->grad_v_dot_n[q];
}
Expand Down
8 changes: 4 additions & 4 deletions src/mm_fill_stabilization.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ void get_metric_tensor(dbl B[DIM][DIM], int dim, int element_type, dbl G[DIM][DI

switch (element_type) {
case LINEAR_TRI:
adjustment[0][0] = (invroot3)*2;
adjustment[0][0] = (invroot3) * 2;
adjustment[0][1] = (invroot3) * -1;
adjustment[1][0] = (invroot3) * -1;
adjustment[1][1] = (invroot3)*2;
adjustment[1][1] = (invroot3) * 2;
break;
case LINEAR_TET:
adjustment[0][0] = tetscale * 2;
Expand Down Expand Up @@ -98,10 +98,10 @@ void get_metric_tensor_deriv(dbl B[DIM][DIM],

switch (element_type) {
case LINEAR_TRI:
adjustment[0][0] = (invroot3)*2;
adjustment[0][0] = (invroot3) * 2;
adjustment[0][1] = (invroot3) * -1;
adjustment[1][0] = (invroot3) * -1;
adjustment[1][1] = (invroot3)*2;
adjustment[1][1] = (invroot3) * 2;
break;
case LINEAR_TET:
adjustment[0][0] = tetscale * 2;
Expand Down
2 changes: 1 addition & 1 deletion src/mm_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -12503,7 +12503,7 @@ int count_datalines(FILE *ifp, char *input, const char *endlist) {
#ifndef tflop
fgetpos(ifp, &file_position); /* OK everybody, remember where we parked */
#else
file_position = ftell(ifp); /* OK everybody, remember where we parked */
file_position = ftell(ifp); /* OK everybody, remember where we parked */
#endif

if (endlist != NULL) /* Table data is in input deck */
Expand Down

0 comments on commit 6bf6b83

Please sign in to comment.