예제 #1
0
파일: base.py 프로젝트: hbcbh1999/fluidsim
 def tendencies_nonlin(self, variables=None, old=None):
     """Return a null SetOfVariables object."""
     if old is None:
         tendencies = SetOfVariables(
             like=self.state.state_phys, info="tendencies_nonlin"
         )
     else:
         tendencies = old
     tendencies.initialize(value=0.0)
     return tendencies
예제 #2
0
    def tendencies_nonlin(self, variables=None, old=None):
        r"""Compute the nonlinear tendencies.

        This function has to be overridden in a child class.

        Returns
        -------

        tendencies_fft : :class:`fluidsim.base.setofvariables.SetOfVariables`
            An array containing only zeros.

        """
        if old is None:
            tendencies = SetOfVariables(like=self.state.state_spect)
        else:
            tendencies = old

        tendencies.initialize(value=0.0)
        return tendencies