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
Loading
Checking pipeline status
// See LICENCE file at project root
// See LICENCE file at project root
// Keep in private GIT
#ifndef FUNIFCELL_HPP
......@@ -38,13 +38,13 @@ public:
/// Multipole expansion in Fourier space
stdComplex<FReal> transformed_exp[N * NVALS * TransformedVectorSize];
const FReal* get(const int inRhs) const
{ return this->exp + inRhs*VectorSize; }
FReal* get(const int inRhs)
{ return this->exp + inRhs*VectorSize; }
const stdComplex<FReal>* getTransformed(const int inRhs) const
{ return this->transformed_exp + inRhs*TransformedVectorSize;
}
......@@ -90,7 +90,7 @@ public:
FSize getSavedSize() const {
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:
multipole_t m_data {};
local_expansion_t l_data {};
constexpr int getVectorSize() const {
return VectorSize;
}
bool hasMultipoleData() const noexcept {
return true;
}
......@@ -185,17 +188,17 @@ public:
template <class StreamClass>
friend StreamClass& operator<<(StreamClass& output, const FUnifCell<FReal,ORDER, NRHS, NLHS, NVALS>& cell){
output << "Multipole exp NRHS " << NRHS
<< " NVALS " << NVALS
<< " VectorSize " << cell.getVectorSize()
<< '\n';
<< " NVALS " << NVALS
<< " VectorSize " << cell.getVectorSize()
<< '\n';
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) {
output<< " val : " << val << " exp: " ;
for (int i= 0 ; i < cell.getVectorSize() ; ++i) {
output<< pole[i] << " ";
}
output << std::endl;
output<< " val : " << val << " exp: " ;
for (int i= 0 ; i < cell.getVectorSize() ; ++i) {
output<< pole[i] << " ";
}
output << std::endl;
}
}
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