From 88a20db49d0ec15d46c23af627a45cc6300b5968 Mon Sep 17 00:00:00 2001 From: dyzheng Date: Thu, 12 Jun 2025 21:04:23 +0800 Subject: [PATCH 1/2] fix: psi error --- source/source_psi/psi.cpp | 2 +- source/source_psi/psi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/source_psi/psi.cpp b/source/source_psi/psi.cpp index 9a2f9f1d79..549ad47842 100644 --- a/source/source_psi/psi.cpp +++ b/source/source_psi/psi.cpp @@ -301,7 +301,7 @@ const int* Psi::get_ngk_pointer() const } template -const int& Psi::get_psi_bias() const +const size_t& Psi::get_psi_bias() const { return this->psi_bias; } diff --git a/source/source_psi/psi.h b/source/source_psi/psi.h index 17354ba2f8..6093e4d5df 100644 --- a/source/source_psi/psi.h +++ b/source/source_psi/psi.h @@ -130,7 +130,7 @@ class Psi const Device* get_device() const; // return psi_bias - const int& get_psi_bias() const; + const size_t& get_psi_bias() const; const int& get_current_ngk() const; From e847ce049c70c5991375aca07a120feaa3dfca40 Mon Sep 17 00:00:00 2001 From: dyzheng Date: Mon, 15 Sep 2025 15:06:18 +0800 Subject: [PATCH 2/2] fix: type of psi_bias --- source/source_psi/psi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/source_psi/psi.h b/source/source_psi/psi.h index 6093e4d5df..1aed4f46f6 100644 --- a/source/source_psi/psi.h +++ b/source/source_psi/psi.h @@ -156,7 +156,7 @@ class Psi // current pointer for getting the psi mutable T* psi_current = nullptr; // psi_current = psi + psi_bias; - mutable int psi_bias = 0; + mutable size_t psi_bias = 0; const int* ngk = nullptr;