Skip to content

Commit

Permalink
Fix the undefined behavior in sph_bessel_recursive (#5158)
Browse files Browse the repository at this point in the history
* fix the undefined behavior in sph_bessel_recursive

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
maki49 and pre-commit-ci-lite[bot] committed Sep 23, 2024
1 parent 7c8a4da commit 81f2541
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/module_base/sph_bessel_recursive.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define SPH_BESSEL_RECURSIVE_H

#include <vector>
#include"stddef.h"
#include<cstddef>

namespace ModuleBase
{
Expand All @@ -32,7 +32,7 @@ class Sph_Bessel_Recursive::D1

private:
std::vector<std::vector<double>> jlx; // jlx[l][x]
double dx;
double dx = 0.0;
bool finish_set_dx = false;

void cal_jlx_0( const int l_size );
Expand All @@ -56,7 +56,7 @@ class Sph_Bessel_Recursive::D2

private:
std::vector<std::vector<std::vector<double>>> jlx; // jlx[l][x1][x2]
double dx;
double dx = 0.0;
bool finish_set_dx = false;

void cal_jlx_0( const int l_size, const size_t ix1_size, const size_t ix2_size );
Expand Down

0 comments on commit 81f2541

Please sign in to comment.