mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: fftw needs int (not long) for its dimensionality (issue #175)
- explicitly use List<int> instead List<label> for API compatibility, even when 64-bit labels are in use.
This commit is contained in:
@ -35,7 +35,7 @@ inline Foam::label Foam::Kmesh::index
|
||||
const label i,
|
||||
const label j,
|
||||
const label k,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
)
|
||||
{
|
||||
return (k + j*nn[2] + i*nn[1]*nn[2]);
|
||||
|
||||
@ -57,7 +57,7 @@ class Kmesh
|
||||
vector l_;
|
||||
|
||||
//- Multi-dimensional addressing array
|
||||
labelList nn_;
|
||||
List<int> nn_;
|
||||
|
||||
//- Maximum wavenumber
|
||||
scalar kmax_;
|
||||
@ -71,7 +71,7 @@ class Kmesh
|
||||
const label i,
|
||||
const label j,
|
||||
const label k,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
);
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ public:
|
||||
return l_;
|
||||
}
|
||||
|
||||
const labelList& nn() const
|
||||
const List<int>& nn() const
|
||||
{
|
||||
return nn_;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Foam
|
||||
void fft::transform
|
||||
(
|
||||
complexField& field,
|
||||
const labelList& nn,
|
||||
const UList<int>& nn,
|
||||
transformDirection dir
|
||||
)
|
||||
{
|
||||
@ -112,7 +112,7 @@ void fft::transform
|
||||
tmp<complexField> fft::forwardTransform
|
||||
(
|
||||
const tmp<complexField>& tfield,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
)
|
||||
{
|
||||
tmp<complexField> tfftField(new complexField(tfield));
|
||||
@ -128,7 +128,7 @@ tmp<complexField> fft::forwardTransform
|
||||
tmp<complexField> fft::reverseTransform
|
||||
(
|
||||
const tmp<complexField>& tfield,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
)
|
||||
{
|
||||
tmp<complexField> tifftField(new complexField(tfield));
|
||||
@ -144,7 +144,7 @@ tmp<complexField> fft::reverseTransform
|
||||
tmp<complexVectorField> fft::forwardTransform
|
||||
(
|
||||
const tmp<complexVectorField>& tfield,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
)
|
||||
{
|
||||
tmp<complexVectorField> tfftVectorField
|
||||
@ -173,7 +173,7 @@ tmp<complexVectorField> fft::forwardTransform
|
||||
tmp<complexVectorField> fft::reverseTransform
|
||||
(
|
||||
const tmp<complexVectorField>& tfield,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
)
|
||||
{
|
||||
tmp<complexVectorField> tifftVectorField
|
||||
|
||||
@ -32,6 +32,9 @@ Description
|
||||
reverse). The dimensionality and organisation of the array of values
|
||||
in space is supplied in the nn indexing array.
|
||||
|
||||
Note
|
||||
The fftw library uses int only (no longs) for its dimensionality.
|
||||
|
||||
SourceFiles
|
||||
fft.C
|
||||
|
||||
@ -41,7 +44,7 @@ SourceFiles
|
||||
#define fft_H
|
||||
|
||||
#include "complexFields.H"
|
||||
#include "labelList.H"
|
||||
#include "UList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -63,7 +66,7 @@ public:
|
||||
static void transform
|
||||
(
|
||||
complexField& field,
|
||||
const labelList& nn,
|
||||
const UList<int>& nn,
|
||||
transformDirection fftDirection
|
||||
);
|
||||
|
||||
@ -71,28 +74,28 @@ public:
|
||||
static tmp<complexField> forwardTransform
|
||||
(
|
||||
const tmp<complexField>& field,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
);
|
||||
|
||||
|
||||
static tmp<complexField> reverseTransform
|
||||
(
|
||||
const tmp<complexField>& field,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
);
|
||||
|
||||
|
||||
static tmp<complexVectorField> forwardTransform
|
||||
(
|
||||
const tmp<complexVectorField>& field,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
);
|
||||
|
||||
|
||||
static tmp<complexVectorField> reverseTransform
|
||||
(
|
||||
const tmp<complexVectorField>& field,
|
||||
const labelList& nn
|
||||
const UList<int>& nn
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -246,7 +246,7 @@ Foam::tmp<Foam::scalarField> Foam::noiseFFT::Pf
|
||||
fft::reverseTransform
|
||||
(
|
||||
ReComplexField(tpn),
|
||||
labelList(1, tpn().size())
|
||||
List<int>(1, tpn().size())
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user