Commit 57f8d918 by Francois Gygi

Switch names of transpose fns in BasisMapping

The name switch makes the function names consistent with fwd and bwd
transforms in FourierTransform
parent a81f266f
......@@ -388,7 +388,7 @@ BasisMapping::BasisMapping (const Basis &basis) : basis_(basis)
}
////////////////////////////////////////////////////////////////////////////////
void BasisMapping::transpose_fwd(const complex<double> *zvec,
void BasisMapping::transpose_bwd(const complex<double> *zvec,
complex<double> *ct)
{
// Transpose zvec to ct
......@@ -475,10 +475,10 @@ void BasisMapping::transpose_fwd(const complex<double> *zvec,
}
////////////////////////////////////////////////////////////////////////////////
void BasisMapping::transpose_bwd(const complex<double> *ct,
void BasisMapping::transpose_fwd(const complex<double> *ct,
complex<double> *zvec)
{
// transpose back distributed array ct into zvec
// transpose ct to zvec
// gather ct into rbuf
#if USE_GATHER_SCATTER
// zgthr: x(i) = y(indx(i))
......
......@@ -61,9 +61,9 @@ class BasisMapping
void zvec_to_vector(const std::complex<double> *zvec,
std::complex<double> *c);
void transpose_fwd(const std::complex<double> *zvec,
void transpose_bwd(const std::complex<double> *zvec,
std::complex<double> *ct);
void transpose_bwd(const std::complex<double> *ct,
void transpose_fwd(const std::complex<double> *ct,
std::complex<double> *zvec);
};
#endif
......@@ -132,7 +132,7 @@ void MLWFTransform::update(void)
// x direction
// map zvec to ct
bm_.transpose_fwd(&zvec[0],&ct[0]);
bm_.transpose_bwd(&zvec[0],&ct[0]);
for ( int iz = 0; iz < np2loc; iz++ )
{
......@@ -142,10 +142,10 @@ void MLWFTransform::update(void)
compute_sincos(np0,&ct[ibase],&ct_cos[ibase],&ct_sin[ibase]);
}
}
// transpose back ct_cos to zvec_cos
bm_.transpose_bwd(&ct_cos[0],&zvec_cos[0]);
// transpose back ct_sin to zvec_sin
bm_.transpose_bwd(&ct_sin[0],&zvec_sin[0]);
// transpose ct_cos to zvec_cos
bm_.transpose_fwd(&ct_cos[0],&zvec_cos[0]);
// transpose ct_sin to zvec_sin
bm_.transpose_fwd(&ct_sin[0],&zvec_sin[0]);
// map back zvec_cos to sdcos and zvec_sin to sdsin
bm_.zvec_to_vector(&zvec_cos[0],&fcx[0]);
......@@ -167,10 +167,10 @@ void MLWFTransform::update(void)
zcopy(&len,&csin_tmp[0],&one,&ct_sin[ibase],&stride);
}
}
// transpose back ct_cos to zvec_cos
bm_.transpose_bwd(&ct_cos[0],&zvec_cos[0]);
// transpose back ct_sin to zvec_sin
bm_.transpose_bwd(&ct_sin[0],&zvec_sin[0]);
// transpose ct_cos to zvec_cos
bm_.transpose_fwd(&ct_cos[0],&zvec_cos[0]);
// transpose ct_sin to zvec_sin
bm_.transpose_fwd(&ct_sin[0],&zvec_sin[0]);
// map back zvec_cos and zvec_sin
bm_.zvec_to_vector(&zvec_cos[0],&fcy[0]);
......
......@@ -80,7 +80,7 @@ int main(int argc, char **argv)
<< f[i] << endl;
}
bmap.vector_to_zvec(&f[0],&zvec[0]);
bmap.transpose_fwd(&zvec[0],&ct[0]);
bmap.transpose_bwd(&zvec[0],&ct[0]);
for ( int k = 0; k < bmap.np2loc(); k++ )
for ( int j = 0; j < bmap.np1(); j++ )
......@@ -94,7 +94,7 @@ int main(int argc, char **argv)
// transpose back to zvec
for ( int i = 0; i < zvec.size(); i++ )
zvec[i] = 0.0;
bmap.transpose_bwd(&ct[0],&zvec[0]);
bmap.transpose_fwd(&ct[0],&zvec[0]);
// transpose back to array f2
vector<complex<double> > f2(basis.localsize());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment