Mentions légales du service

Skip to content
Snippets Groups Projects
Commit eb2bc23c authored by Olivier COULAUD's avatar Olivier COULAUD
Browse files

Fix bug

parent 4863c9d7
No related branches found
No related tags found
No related merge requests found
Pipeline #426421 passed
// See LICENCE file at project root // See LICENCE file at project root
// Keep in private GIT // Keep in private GIT
#ifndef FUNIFCELL_HPP #ifndef FUNIFCELL_HPP
...@@ -38,13 +38,13 @@ public: ...@@ -38,13 +38,13 @@ public:
/// Multipole expansion in Fourier space /// Multipole expansion in Fourier space
stdComplex<FReal> transformed_exp[N * NVALS * TransformedVectorSize]; stdComplex<FReal> transformed_exp[N * NVALS * TransformedVectorSize];
const FReal* get(const int inRhs) const const FReal* get(const int inRhs) const
{ return this->exp + inRhs*VectorSize; } { return this->exp + inRhs*VectorSize; }
FReal* get(const int inRhs) FReal* get(const int inRhs)
{ return this->exp + inRhs*VectorSize; } { return this->exp + inRhs*VectorSize; }
const stdComplex<FReal>* getTransformed(const int inRhs) const const stdComplex<FReal>* getTransformed(const int inRhs) const
{ return this->transformed_exp + inRhs*TransformedVectorSize; { return this->transformed_exp + inRhs*TransformedVectorSize;
} }
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
FSize getSavedSize() const { FSize getSavedSize() const {
return N * NVALS * VectorSize * (FSize) sizeof(FReal) return N * NVALS * VectorSize * (FSize) sizeof(FReal)
+ N * NVALS * TransformedVectorSize * (FSize) sizeof(stdComplex<FReal>); + N * NVALS * TransformedVectorSize * (FSize) sizeof(stdComplex<FReal>);
} }
}; };
...@@ -100,6 +100,9 @@ public: ...@@ -100,6 +100,9 @@ public:
multipole_t m_data {}; multipole_t m_data {};
local_expansion_t l_data {}; local_expansion_t l_data {};
constexpr int getVectorSize() const {
return VectorSize;
}
bool hasMultipoleData() const noexcept { bool hasMultipoleData() const noexcept {
return true; return true;
} }
...@@ -185,17 +188,17 @@ public: ...@@ -185,17 +188,17 @@ public:
template <class StreamClass> template <class StreamClass>
friend StreamClass& operator<<(StreamClass& output, const FUnifCell<FReal,ORDER, NRHS, NLHS, NVALS>& cell){ friend StreamClass& operator<<(StreamClass& output, const FUnifCell<FReal,ORDER, NRHS, NLHS, NVALS>& cell){
output << "Multipole exp NRHS " << NRHS output << "Multipole exp NRHS " << NRHS
<< " NVALS " << NVALS << " NVALS " << NVALS
<< " VectorSize " << cell.getVectorSize() << " VectorSize " << cell.getVectorSize()
<< '\n'; << '\n';
for (int rhs= 0 ; rhs < NRHS ; ++rhs) { for (int rhs= 0 ; rhs < NRHS ; ++rhs) {
const FReal* pole = cell.getMultipole(rhs); const FReal* pole = cell.getMultipoleData().get(rhs);
for (int val= 0 ; val < NVALS ; ++val) { for (int val= 0 ; val < NVALS ; ++val) {
output<< " val : " << val << " exp: " ; output<< " val : " << val << " exp: " ;
for (int i= 0 ; i < cell.getVectorSize() ; ++i) { for (int i= 0 ; i < cell.getVectorSize() ; ++i) {
output<< pole[i] << " "; output<< pole[i] << " ";
} }
output << std::endl; output << std::endl;
} }
} }
return output; return output;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment