bte.nsr.model_LR#

Module Contents#

Classes#

SplitNet2D

Base class for all neural network modules.

SplitNet_2D_LRNew

Base class for all neural network modules.

SplitNet3D

Base class for all neural network modules.

SplitNet_3D_LRNew

Base class for all neural network modules.

NoSplitNet2D

Base class for all neural network modules.

Functions#

maxwellian_1D(v, rho, u, T)

v [nv]

maxwellian_LR(vtuple, rho, u, T)

vx [nvx]

maxwellian(v, rho, u, T)

fsum_LR(ftuple, wtuple)

_m0_LR(ft, vt, wt)

_m1_LR(ft, vt, wt)

_m2_LR(ft, vt, wt)

rho_u_theta_LR(ft, vt, wt)

_m012_LR(f, v, w)

Attributes#

bte.nsr.model_LR.maxwellian_1D(v, rho, u, T)[source]#

v [nv] rho [nx,1] u [nx,1] T [nx,1]

bte.nsr.model_LR.maxwellian_LR(vtuple, rho, u, T)[source]#

vx [nvx] vy [nvy] rho [nx,1] u [nx,3] T [nx,1]

bte.nsr.model_LR.maxwellian(v, rho, u, T)[source]#
bte.nsr.model_LR.fsum_LR(ftuple, wtuple)[source]#
bte.nsr.model_LR._m0_LR(ft, vt, wt)[source]#
bte.nsr.model_LR._m1_LR(ft, vt, wt)[source]#
bte.nsr.model_LR._m2_LR(ft, vt, wt)[source]#
bte.nsr.model_LR.epsT = 0.01[source]#
bte.nsr.model_LR.epsR = 0.01[source]#
bte.nsr.model_LR.rho_u_theta_LR(ft, vt, wt)[source]#
bte.nsr.model_LR._m012_LR(f, v, w)[source]#
class bte.nsr.model_LR.SplitNet2D(neurons, rank, VT, xdim=1)[source]#

Bases: torch.nn.Module

Base class for all neural network modules.

Your models should also subclass this class.

Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:

import torch.nn as nn
import torch.nn.functional as F

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 20, 5)
        self.conv2 = nn.Conv2d(20, 20, 5)

    def forward(self, x):
        x = F.relu(self.conv1(x))
        return F.relu(self.conv2(x))

Submodules assigned in this way will be registered, and will have their parameters converted too when you call to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:

training (bool) – Boolean represents whether this module is in training or evaluation mode.

forward(x)[source]#
class bte.nsr.model_LR.SplitNet_2D_LRNew(neurons, rank, VT, xdim=1)[source]#

Bases: torch.nn.Module

Base class for all neural network modules.

Your models should also subclass this class.

Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:

import torch.nn as nn
import torch.nn.functional as F

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 20, 5)
        self.conv2 = nn.Conv2d(20, 20, 5)

    def forward(self, x):
        x = F.relu(self.conv1(x))
        return F.relu(self.conv2(x))

Submodules assigned in this way will be registered, and will have their parameters converted too when you call to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:

training (bool) – Boolean represents whether this module is in training or evaluation mode.

forward(x)[source]#
class bte.nsr.model_LR.SplitNet3D(neurons, rank, VT, multires, xdim=1)[source]#

Bases: torch.nn.Module

Base class for all neural network modules.

Your models should also subclass this class.

Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:

import torch.nn as nn
import torch.nn.functional as F

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 20, 5)
        self.conv2 = nn.Conv2d(20, 20, 5)

    def forward(self, x):
        x = F.relu(self.conv1(x))
        return F.relu(self.conv2(x))

Submodules assigned in this way will be registered, and will have their parameters converted too when you call to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:

training (bool) – Boolean represents whether this module is in training or evaluation mode.

forward(x)[source]#
class bte.nsr.model_LR.SplitNet_3D_LRNew(neurons, rank, VT, xdim=1)[source]#

Bases: torch.nn.Module

Base class for all neural network modules.

Your models should also subclass this class.

Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:

import torch.nn as nn
import torch.nn.functional as F

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 20, 5)
        self.conv2 = nn.Conv2d(20, 20, 5)

    def forward(self, x):
        x = F.relu(self.conv1(x))
        return F.relu(self.conv2(x))

Submodules assigned in this way will be registered, and will have their parameters converted too when you call to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:

training (bool) – Boolean represents whether this module is in training or evaluation mode.

forward(x)[source]#
class bte.nsr.model_LR.NoSplitNet2D(neurons, rank, VT)[source]#

Bases: torch.nn.Module

Base class for all neural network modules.

Your models should also subclass this class.

Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:

import torch.nn as nn
import torch.nn.functional as F

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 20, 5)
        self.conv2 = nn.Conv2d(20, 20, 5)

    def forward(self, x):
        x = F.relu(self.conv1(x))
        return F.relu(self.conv2(x))

Submodules assigned in this way will be registered, and will have their parameters converted too when you call to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:

training (bool) – Boolean represents whether this module is in training or evaluation mode.