Skip to content

Commit

Permalink
apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Ulrich committed Sep 28, 2023
1 parent 701c5a4 commit 130e7f1
Show file tree
Hide file tree
Showing 20 changed files with 1,370 additions and 985 deletions.
2 changes: 1 addition & 1 deletion app/common/PetscUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
} \
} while (false)

#define HASH_DEF(def) ::tndm::fnv1a((def), sizeof(def)-1)
#define HASH_DEF(def) ::tndm::fnv1a((def), sizeof(def) - 1)

namespace tndm {

Expand Down
2 changes: 1 addition & 1 deletion app/localoperator/DieterichRuinaAgeing.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class DieterichRuinaAgeing {
V = Finv(index, snAbs, tauAbs, psi);
} else {
if (snAbs <= 0.0) { /* Implies the fault is experiencing tension / opening */
snAbs = 0.0; /* Just to illustrate what we are doing */
snAbs = 0.0; /* Just to illustrate what we are doing */
/* Solve R(V) = T - sigma_n F(V,psi) - eta V with sigma_n = 0.0 */
V = tauAbs / eta;
} else {
Expand Down
12 changes: 6 additions & 6 deletions app/localoperator/RateAndState.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ template <class Law> class RateAndState : public RateAndStateBase {
std::function<std::array<double, 1>(std::array<double, DomainDimension + 1> const&)>;
using delta_tau_fun_t = std::function<std::array<double, TangentialComponents>(
std::array<double, DomainDimension + 1> const&)>;
using delta_sn_fun_t = std::function<std::array<double, 1>(std::array<double, DomainDimension + 1> const&)>;
using delta_sn_fun_t =
std::function<std::array<double, 1>(std::array<double, DomainDimension + 1> const&)>;

void set_constant_params(typename Law::ConstantParams const& cps) {
law_.set_constant_params(cps);
Expand Down Expand Up @@ -98,7 +99,6 @@ template <class Law> class RateAndState : public RateAndStateBase {
return (*delta_sn_)(xt)[0];
}


Law law_;
std::optional<source_fun_t> source_;
std::optional<delta_tau_fun_t> delta_tau_;
Expand Down Expand Up @@ -157,9 +157,9 @@ double RateAndState<Law>::rhs(double time, std::size_t faultNo,
auto t_mat = traction_mat(traction);
for (std::size_t node = 0; node < nbf; ++node) {
auto sn = t_mat(node, 0);
if (delta_sn_) {
if (delta_sn_) {
sn = sn + get_delta_sn(time, faultNo, node);
}
}
auto psi = s_mat(node, PsiIndex);
auto tau = get_tau(node, t_mat);
if (delta_tau_) {
Expand Down Expand Up @@ -218,9 +218,9 @@ void RateAndState<Law>::state(double time, std::size_t faultNo,
std::size_t index = faultNo * nbf;
for (std::size_t node = 0; node < nbf; ++node) {
auto sn = t_mat(node, 0);
if (delta_sn_) {
if (delta_sn_) {
sn = sn + get_delta_sn(time, faultNo, node);
}
}
auto tau = get_tau(node, t_mat);
if (delta_tau_) {
tau = tau + get_delta_tau(time, faultNo, node);
Expand Down
2 changes: 1 addition & 1 deletion app/pc/lspoly.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <petsc/private/kspimpl.h>
#include <petsc/private/pcimpl.h>
#include <petscksp.h>
#include <petscsys.h>
#include <petscpc.h>
#include <petscsys.h>

typedef struct {
PetscReal alpha, beta; /* Coefficients of w(x) = (1-x)^\alpha (1+x)^\beta */
Expand Down
2 changes: 1 addition & 1 deletion app/pc/register.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ namespace tndm {

PetscErrorCode register_PCs();
PetscErrorCode register_KSPs();
}
} // namespace tndm

#endif // REGISTER_20210208_H
Loading

0 comments on commit 130e7f1

Please sign in to comment.