Skip to content
Snippets Groups Projects
Commit 9abefeb7 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

add ift and dft methods for fluid_solver

parent 0385ed4f
No related branches found
No related tags found
No related merge requests found
......@@ -250,6 +250,24 @@ void fluid_solver<R>::ift_velocity() \
} \
\
template<> \
void fluid_solver<R>::ift_vorticity() \
{ \
FFTW(execute)(*((FFTW(plan)*)this->c2r_vorticity )); \
} \
\
template<> \
void fluid_solver<R>::dft_velocity() \
{ \
FFTW(execute)(*((FFTW(plan)*)this->r2c_velocity )); \
} \
\
template<> \
void fluid_solver<R>::dft_vorticity() \
{ \
FFTW(execute)(*((FFTW(plan)*)this->r2c_vorticity )); \
} \
\
template<> \
void fluid_solver<R>::add_forcing(\
C *field, R factor) \
{ \
......@@ -437,7 +455,7 @@ int fluid_solver<R>::write(char field, char representation) \
return this->write_base("cvelocity", this->cvelocity); \
if ((field == 'u') && (representation == 'r')) \
{ \
FFTW(execute)(*((FFTW(plan)*)this->c2r_velocity )); \
this->ift_velocity(); \
clip_zero_padding<R>(this->rd, this->rvelocity, 3); \
return this->write_base("rvelocity", this->rvelocity); \
} \
......
......@@ -79,6 +79,9 @@ class fluid_solver:public fluid_solver_base<rnumber>
void compute_vorticity(void);
void compute_velocity(rnumber (*vorticity)[2]);
void ift_velocity();
void dft_velocity();
void ift_vorticity();
void dft_vorticity();
void omega_nonlin(int src);
void step(double dt);
void impose_zero_modes(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment