Exemple #1
0
    def etafft_from_aqfft(self, a_fft, q_fft, params=None):
        """Compute eta in Fourier space."""
        if params is None:
            params = self.params
            Kappa2_not0 = self.Kappa2_not0
        else:
            Kappa2_not0 = self.K2_not0 + params.kd2

        if params.f == 0:
            eta_fft = invlaplacian_fft(a_fft, self.K2_not0, rank)
        else:
            eta_fft = invlaplacian_fft(
                (a_fft - params.f / params.c2 * q_fft), Kappa2_not0, rank
            )
        return eta_fft
Exemple #2
0
    def etafft_from_afft(self, a_fft, params=None):
        """Compute eta in Fourier space."""
        if params is None:
            params = self.params
            Kappa2_not0 = self.Kappa2_not0
        else:
            Kappa2_not0 = self.K2_not0 + params.kd2

        eta_fft = invlaplacian_fft(a_fft, Kappa2_not0, rank)
        return eta_fft
Exemple #3
0
    def rotfft_from_qfft(self, q_fft, params=None):
        """Compute ux, uy and eta in Fourier space."""
        if params is None:
            params = self.params
            Kappa2_not0 = self.Kappa2_not0
        else:
            Kappa2_not0 = self.K2_not0 + params.kd2

        rot_fft = laplacian_fft(
            invlaplacian_fft(q_fft, Kappa2_not0, rank), self.K2
        )
        return rot_fft
Exemple #4
0
    def etafft_from_qfft(self, q_fft, params=None):
        """Compute eta in Fourier space."""
        if params is None:
            params = self.params
            Kappa2_not0 = self.Kappa2_not0
        else:
            Kappa2_not0 = self.K2_not0 + params.kd2

        if params.f == 0:
            eta_fft = self.create_arrayK(value=0)
        else:
            eta_fft = (
                -params.f / params.c2 * invlaplacian_fft(q_fft, Kappa2_not0, rank)
            )
        return eta_fft
Exemple #5
0
    def uxuyetafft_from_qfft(self, q_fft, params=None):
        """Compute ux, uy and eta in Fourier space."""
        if params is None:
            params = self.params
            Kappa2_not0 = self.Kappa2_not0
        else:
            Kappa2_not0 = self.K2_not0 + params.kd2

        ilq_fft = invlaplacian_fft(q_fft, Kappa2_not0, rank)
        rot_fft = laplacian_fft(ilq_fft, self.K2)
        ux_fft, uy_fft = self.vecfft_from_rotfft(rot_fft)

        if params.f == 0:
            eta_fft = self.create_arrayK(value=0)
        else:
            eta_fft = -params.f * ilq_fft / params.c2
        return ux_fft, uy_fft, eta_fft