Generators
torchfsm.operator.generic._conservative_convection._ConservativeConvectionGenerator
¤
Bases: CoreGenerator
Generator of the Conservative Convection operator. It ensures that the operator is only applied to vector fields with the same dimension as the mesh.
Source code in torchfsm/operator/generic/_conservative_convection.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> Union[LinearCoef, NonlinearFunc]
Source code in torchfsm/operator/generic/_conservative_convection.py
36 37 38 39 40 41 42 43 |
|
torchfsm.operator.generic._convection._ConvectionGenerator
¤
Bases: CoreGenerator
Generator of the Convection operator. It ensures that the operator is only applied to vector fields with the same dimension as the mesh.
Source code in torchfsm/operator/generic/_convection.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> Union[LinearCoef, NonlinearFunc]
Source code in torchfsm/operator/generic/_convection.py
60 61 62 63 64 65 66 67 |
|
torchfsm.operator.generic._curl._CurlGenerator
¤
Bases: CoreGenerator
Generator of the Curl operator. It ensure that curl only works for 2D or 3D vector field with the same dimension as the mesh.
Source code in torchfsm/operator/generic/_curl.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> Union[LinearCoef, NonlinearFunc]
Source code in torchfsm/operator/generic/_curl.py
64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
torchfsm.operator.generic._div._DivGenerator
¤
Bases: CoreGenerator
Generator of the Divergence operator. It ensures that divergence only works for vector fields with the same dimension as the mesh.
Source code in torchfsm/operator/generic/_div.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> Union[LinearCoef, NonlinearFunc]
Source code in torchfsm/operator/generic/_div.py
37 38 39 40 41 42 43 44 |
|
torchfsm.operator.generic._grad._GradGenerator
¤
Bases: CoreGenerator
Generator of the Grad operator. It ensures that grad only works for scalar field.
Source code in torchfsm/operator/generic/_grad.py
18 19 20 21 22 23 24 25 26 27 |
|
__call__
¤
__call__(f_mesh: FourierMesh, n_channel: int) -> LinearCoef
Source code in torchfsm/operator/generic/_grad.py
24 25 26 27 |
|
torchfsm.operator.generic._spatial_derivative._SpatialDerivativeGenerator
¤
Bases: CoreGenerator
Generator of the SpatialDerivative operator. It ensures that spatial derivative only works for scalar field.
Source code in torchfsm/operator/generic/_spatial_derivative.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
__init__
¤
__init__(dim_index, order) -> None
Source code in torchfsm/operator/generic/_spatial_derivative.py
30 31 32 33 |
|
__call__
¤
__call__(f_mesh: FourierMesh, n_channel: int) -> LinearCoef
Source code in torchfsm/operator/generic/_spatial_derivative.py
35 36 37 38 39 40 |
|
torchfsm.operator.dedicated._ks_convection._KSConvectionGenerator
¤
Bases: CoreGenerator
Generator of the KSConvection operator. It ensures that the operator is only applied to scalar fields.
Source code in torchfsm/operator/dedicated/_ks_convection.py
41 42 43 44 45 46 47 48 49 50 51 52 |
|
__init__
¤
__init__(remove_mean: bool) -> None
Source code in torchfsm/operator/dedicated/_ks_convection.py
46 47 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> NonlinearFunc
Source code in torchfsm/operator/dedicated/_ks_convection.py
49 50 51 52 |
|
torchfsm.operator.dedicated._navier_stokes._vorticity_convection._VorticityConvectionGenerator
¤
Bases: CoreGenerator
Generator of the VorticityConvection operator. It ensures that the operator is only applied to scalar vorticity fields in 2D.
Source code in torchfsm/operator/dedicated/_navier_stokes/_vorticity_convection.py
44 45 46 47 48 49 50 51 52 53 54 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> NonlinearFunc
Source code in torchfsm/operator/dedicated/_navier_stokes/_vorticity_convection.py
51 52 53 54 |
|
torchfsm.operator.dedicated._navier_stokes._value_transformation._Vorticity2VelocityGenerator
¤
Bases: CoreGenerator
Generator of the Vorticity2Velocity operator. It ensures that the operator is only applied to scalar vorticity fields in 2D.
Source code in torchfsm/operator/dedicated/_navier_stokes/_value_transformation.py
37 38 39 40 41 42 43 44 45 46 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> NonlinearFunc
Source code in torchfsm/operator/dedicated/_navier_stokes/_value_transformation.py
43 44 45 46 |
|
torchfsm.operator.dedicated._navier_stokes._value_transformation._Vorticity2PressureGenerator
¤
Bases: CoreGenerator
Generator of the Vorticity2Pressure operator. It ensures that the operator is only applied to scalar vorticity fields in 2D.
Source code in torchfsm/operator/dedicated/_navier_stokes/_value_transformation.py
90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
__init__
¤
__init__(
external_force: Optional[OperatorLike] = None,
) -> None
Source code in torchfsm/operator/dedicated/_navier_stokes/_value_transformation.py
96 97 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> NonlinearFunc
Source code in torchfsm/operator/dedicated/_navier_stokes/_value_transformation.py
99 100 101 102 |
|
torchfsm.operator.dedicated._navier_stokes._leray._LerayGenerator
¤
Bases: CoreGenerator
Generator of the Leray peojection operator. It ensures that the operator only works for vector fields with the same dimension as the mesh.
Source code in torchfsm/operator/dedicated/_navier_stokes/_leray.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> Union[LinearCoef, NonlinearFunc]
Source code in torchfsm/operator/dedicated/_navier_stokes/_leray.py
33 34 35 36 37 38 39 40 |
|
torchfsm.operator.dedicated._gray_scott._ChannelWisedDiffusionGenerator
¤
Bases: CoreGenerator
Generator of the ChannelWisedDiffusion operator. It ensures that the operator is only applied to fields with the same number of channels as the number of viscosities.
Source code in torchfsm/operator/dedicated/_gray_scott.py
24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
__init__
¤
__init__(
viscosities: Sequence[Union[Tensor, float]],
) -> None
Source code in torchfsm/operator/dedicated/_gray_scott.py
30 31 |
|
__call__
¤
__call__(f_mesh: FourierMesh, n_channel: int) -> LinearCoef
Source code in torchfsm/operator/dedicated/_gray_scott.py
33 34 35 36 |
|
torchfsm.operator.dedicated._gray_scott._GrayScottSourceGenerator
¤
Bases: CoreGenerator
Generator of the GrayScottSource operator. It ensures that the operator is only applied to fields with exactly
Source code in torchfsm/operator/dedicated/_gray_scott.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
__init__
¤
__init__(
feed_rate: Union[Tensor, float],
kill_rate: Union[Tensor, float],
) -> None
Source code in torchfsm/operator/dedicated/_gray_scott.py
83 84 85 86 87 |
|
__call__
¤
__call__(
f_mesh: FourierMesh, n_channel: int
) -> NonlinearFunc
Source code in torchfsm/operator/dedicated/_gray_scott.py
89 90 91 92 |
|