Skip to content

Commit b30d84c

Browse files
committed
Revert "resolved clang tidy?"
This reverts commit 858ba08.
1 parent 858ba08 commit b30d84c

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

src/diffusion_thomas_algorithm.h

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,31 @@
1919
* for the compiler-research.org organization.
2020
*/
2121

22-
#ifndef HOME_USUARIO_DESKTOP_VASSIL_CARTOPIAX_SRC_DIFFUSION_THOMAS_ALGORITHM_H_
23-
#define HOME_USUARIO_DESKTOP_VASSIL_CARTOPIAX_SRC_DIFFUSION_THOMAS_ALGORITHM_H_
22+
#ifndef DIFFUSION_THOMAS_ALGORITHM_H_
23+
#define DIFFUSION_THOMAS_ALGORITHM_H_
2424

2525
#include <string>
2626
#include <vector>
27-
27+
#include "biodynamo.h"
2828
#include "core/diffusion/diffusion_grid.h"
2929

3030
namespace bdm {
3131

32-
// Forward declarations
33-
using real_t = double;
34-
3532
/// Continuum model for the 3D heat equation with exponential decay
3633
///
3734
/// Implements the diffusion equation, solved implicitly: ∂t u = ∇D∇u - μu
3835
/// Uses the Thomas algorithm for solving tridiagonal systems efficiently.
3936
class DiffusionThomasAlgorithm : public DiffusionGrid {
4037
public:
41-
DiffusionThomasAlgorithm()
42-
: resolution_(0),
43-
d_space_(0.0),
44-
thomas_denom_x_(),
45-
thomas_c_x_(),
46-
thomas_denom_y_(),
47-
thomas_c_y_(),
48-
thomas_denom_z_(),
49-
thomas_c_z_(),
50-
jump_i_(0),
51-
jump_j_(0),
52-
jump_k_(0),
53-
constant1_(0.0),
54-
constant1a_(0.0),
55-
constant2_(0.0),
56-
constant3_(0.0),
57-
constant3a_(0.0),
58-
dirichlet_border_(false) {}
38+
DiffusionThomasAlgorithm() = default;
5939

6040
DiffusionThomasAlgorithm(int substance_id, std::string substance_name,
6141
real_t dc, real_t mu, int resolution, real_t dt,
6242
bool dirichlet_border);
6343

6444
/// Concentration setters
6545
void SetConcentration(real_t x, real_t y, real_t z, real_t amount) {
66-
SetConcentration(GetBoxIndex(static_cast<size_t>(x), static_cast<size_t>(y), static_cast<size_t>(z)), amount);
46+
SetConcentration(GetBoxIndex(x, y, z), amount);
6747
};
6848

6949
void SetConcentration(size_t idx, real_t amount);
@@ -204,11 +184,11 @@ class DiffusionThomasAlgorithm : public DiffusionGrid {
204184
/// @param y Y-coordinate in voxel space
205185
/// @param z Z-coordinate in voxel space
206186
/// @return Linear index in the flattened 3D array
207-
[[nodiscard]] size_t GetBoxIndex(size_t x, size_t y, size_t z) const;
187+
size_t GetBoxIndex(size_t x, size_t y, size_t z) const;
208188

209189
BDM_CLASS_DEF_OVERRIDE(DiffusionThomasAlgorithm, 1);
210190
};
211191

212192
} // namespace bdm
213193

214-
#endif // HOME_USUARIO_DESKTOP_VASSIL_CARTOPIAX_SRC_DIFFUSION_THOMAS_ALGORITHM_H_
194+
#endif // DIFFUSION_THOMAS_ALGORITHM_H_

0 commit comments

Comments
 (0)