Skip to content

Commit e39def8

Browse files
committed
Apply clang-format to regulatory_networks demo sources
1 parent b416a79 commit e39def8

4 files changed

Lines changed: 15 additions & 16 deletions

File tree

demo/regulatory_networks/src/bdm_ex1.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ struct ODE_jacobian {
7474
struct ODE_output {
7575
void operator()(const b_vector_t& x, real_t t, const Agent* agent) {
7676
auto& xyz = agent->GetPosition();
77-
std::clog << agent->GetUid()
78-
<< ',' << xyz[0] << ',' << xyz[1] << ',' << xyz[2]
79-
<< ',' << t << ',' << x[0] << ',' << x[1] << ',' << x[2];
77+
std::clog << agent->GetUid() << ',' << xyz[0] << ',' << xyz[1] << ','
78+
<< xyz[2] << ',' << t << ',' << x[0] << ',' << x[1] << ','
79+
<< x[2];
8080
std::clog << std::endl;
8181
}
8282
};
@@ -103,7 +103,8 @@ inline int Simulate(int argc, const char** argv) {
103103
param->visualize_agents["Cell"] = {"diameter_", "volume_"};
104104
param->statistics = false;
105105
param->simulation_time_step = 1.0;
106-
param->visualize_diffusion = {Param::VisualizeDiffusion{"cytokine", true, true}};
106+
param->visualize_diffusion = {
107+
Param::VisualizeDiffusion{"cytokine", true, true}};
107108
param->calculate_gradients = false;
108109
param->diffusion_method = "euler";
109110
};
@@ -138,10 +139,8 @@ inline int Simulate(int argc, const char** argv) {
138139
dt_RN, 1000, {1., 5., 7.},
139140
// ODE_solver::Euler,
140141
// ODE_solver::Rosenbrock,
141-
ODE_solver::RungeKutta,
142-
ODE_system(dg_map,{0.2,0.1,3.0}),
143-
ODE_jacobian(dg_map,{0.2,0.1,3.0}),
144-
ODE_output()));
142+
ODE_solver::RungeKutta, ODE_system(dg_map, {0.2, 0.1, 3.0}),
143+
ODE_jacobian(dg_map, {0.2, 0.1, 3.0}), ODE_output()));
145144
#endif
146145
return c;
147146
};

demo/regulatory_networks/src/bdm_ex2.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ struct Lorenz_jac_ {
8585
struct Lorenz_out_ {
8686
void operator()(const b_vector_t& x, real_t t, const Agent* agent) {
8787
auto& xyz = agent->GetPosition();
88-
std::clog << agent->GetUid()
89-
<< ',' << xyz[0] << ',' << xyz[1] << ',' << xyz[2]
90-
<< ',' << t << ',' << x[0] << ',' << x[1] << ',' << x[2];
88+
std::clog << agent->GetUid() << ',' << xyz[0] << ',' << xyz[1] << ','
89+
<< xyz[2] << ',' << t << ',' << x[0] << ',' << x[1] << ','
90+
<< x[2];
9191
std::clog << std::endl;
9292
}
9393
};
@@ -100,8 +100,8 @@ class Trajectory : public RegulatoryNetwork {
100100
Trajectory() { AlwaysCopyToNew(); }
101101
#ifndef __ROOTCLING__
102102
Trajectory(real_t dt, int n_dt, const std::vector<real_t>& x)
103-
: RegulatoryNetwork(dt, n_dt, x, ODE_solver::Rosenbrock,
104-
Lorenz_rhs_(), Lorenz_jac_(), Lorenz_out_()) {}
103+
: RegulatoryNetwork(dt, n_dt, x, ODE_solver::Rosenbrock, Lorenz_rhs_(),
104+
Lorenz_jac_(), Lorenz_out_()) {}
105105
#endif
106106
virtual ~Trajectory() = default;
107107

demo/regulatory_networks/src/regulatory_networks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
#include "biodynamo.h"
2222

23-
#include "sine.h"
2423
#include "lorenz.h"
2524
#include "oscillator.h"
25+
#include "sine.h"
2626

2727
#include "bdm_ex1.h"
2828
#include "bdm_ex2.h"

demo/regulatory_networks/src/sine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ inline int Simulate(int argc, const char** argv) {
6565
auto stepper = boost::numeric::odeint::make_dense_output<ode_int>(1e-6, 1e-6);
6666

6767
// perform the time-integration
68-
integrate_const(stepper, ODE_system(), x,
69-
0.0, 12.5663706144, 0.001, ODE_output());
68+
integrate_const(stepper, ODE_system(), x, 0.0, 12.5663706144, 0.001,
69+
ODE_output());
7070
#endif
7171

7272
// restore the original buffer of std::clog

0 commit comments

Comments
 (0)