How to use the deepxde.legacy.fractional.FractionalTime function in DeepXDE

To help you get started, we’ve selected a few DeepXDE examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lululxvi / deepxde / deepxde / legacy / data.py View on Github external
def get_x(self, size):
        if self.disc.meshtype == 'static':
            self.nt = int(round(size / self.disc.resolution[0]))
            self.nbc = self.disc.resolution[0] + 2*self.nt - 2
            discreteop = FractionalTime(
                self.alpha, self.geom, self.t_min, self.t_max, self.disc, self.nt, None)
            x = discreteop.get_x()
        elif self.disc.meshtype == 'dynamic':
            self.nbc = 0
            # x = np.random.rand(size, 2)
            x = sobol_sequence.sample(size + 1, 2)[1:]
            x = x * [self.geom.diam, self.t_max-self.t_min] - [self.geom.l, self.t_min]
            discreteop = FractionalTime(
                self.alpha, self.geom, self.t_min, self.t_max, self.disc, None, x)
            x = discreteop.get_x()
        y = self.func(x)
        return x, y, discreteop
github lululxvi / deepxde / deepxde / legacy / data.py View on Github external
def get_x(self, size):
        if self.disc.meshtype == 'static':
            self.nt = int(round(size / self.disc.resolution[0]))
            self.nbc = self.disc.resolution[0] + 2*self.nt - 2
            discreteop = FractionalTime(
                self.alpha, self.geom, self.t_min, self.t_max, self.disc, self.nt, None)
            x = discreteop.get_x()
        elif self.disc.meshtype == 'dynamic':
            self.nbc = 0
            # x = np.random.rand(size, 2)
            x = sobol_sequence.sample(size + 1, 2)[1:]
            x = x * [self.geom.diam, self.t_max-self.t_min] - [self.geom.l, self.t_min]
            discreteop = FractionalTime(
                self.alpha, self.geom, self.t_min, self.t_max, self.disc, None, x)
            x = discreteop.get_x()
        y = self.func(x)
        return x, y, discreteop