zoomy-core 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of zoomy-core might be problematic. Click here for more details.
- zoomy_core/decorators/decorators.py +25 -0
- zoomy_core/fvm/flux.py +97 -0
- zoomy_core/fvm/nonconservative_flux.py +97 -0
- zoomy_core/fvm/ode.py +55 -0
- zoomy_core/fvm/solver_numpy.py +305 -0
- zoomy_core/fvm/timestepping.py +13 -0
- zoomy_core/mesh/gmsh_loader.py +301 -0
- zoomy_core/mesh/mesh.py +1192 -0
- zoomy_core/mesh/mesh_extrude.py +168 -0
- zoomy_core/mesh/mesh_util.py +487 -0
- zoomy_core/misc/custom_types.py +6 -0
- zoomy_core/misc/gui.py +61 -0
- zoomy_core/misc/interpolation.py +140 -0
- zoomy_core/misc/io.py +401 -0
- zoomy_core/misc/logger_config.py +18 -0
- zoomy_core/misc/misc.py +216 -0
- zoomy_core/misc/static_class.py +94 -0
- zoomy_core/model/analysis.py +147 -0
- zoomy_core/model/basefunction.py +113 -0
- zoomy_core/model/basemodel.py +512 -0
- zoomy_core/model/boundary_conditions.py +193 -0
- zoomy_core/model/initial_conditions.py +171 -0
- zoomy_core/model/model.py +63 -0
- zoomy_core/model/models/GN.py +70 -0
- zoomy_core/model/models/advection.py +53 -0
- zoomy_core/model/models/basisfunctions.py +181 -0
- zoomy_core/model/models/basismatrices.py +377 -0
- zoomy_core/model/models/core.py +564 -0
- zoomy_core/model/models/coupled_constrained.py +60 -0
- zoomy_core/model/models/old_smm copy.py +867 -0
- zoomy_core/model/models/poisson.py +41 -0
- zoomy_core/model/models/shallow_moments.py +757 -0
- zoomy_core/model/models/shallow_moments_sediment.py +378 -0
- zoomy_core/model/models/shallow_moments_topo.py +423 -0
- zoomy_core/model/models/shallow_moments_variants.py +1509 -0
- zoomy_core/model/models/shallow_water.py +266 -0
- zoomy_core/model/models/shallow_water_topo.py +111 -0
- zoomy_core/model/models/shear_shallow_flow.py +594 -0
- zoomy_core/model/models/sme_turbulent.py +613 -0
- zoomy_core/model/models/swe_old.py +1018 -0
- zoomy_core/model/models/vam.py +455 -0
- zoomy_core/postprocessing/postprocessing.py +72 -0
- zoomy_core/preprocessing/openfoam_moments.py +452 -0
- zoomy_core/transformation/helpers.py +25 -0
- zoomy_core/transformation/to_amrex.py +238 -0
- zoomy_core/transformation/to_c.py +181 -0
- zoomy_core/transformation/to_jax.py +14 -0
- zoomy_core/transformation/to_numpy.py +115 -0
- zoomy_core/transformation/to_openfoam.py +254 -0
- zoomy_core/transformation/to_ufl.py +67 -0
- {zoomy_core-0.1.1.dist-info → zoomy_core-0.1.2.dist-info}/METADATA +1 -1
- zoomy_core-0.1.2.dist-info/RECORD +55 -0
- zoomy_core-0.1.2.dist-info/top_level.txt +1 -0
- zoomy_core-0.1.1.dist-info/RECORD +0 -5
- zoomy_core-0.1.1.dist-info/top_level.txt +0 -1
- {zoomy_core-0.1.1.dist-info → zoomy_core-0.1.2.dist-info}/WHEEL +0 -0
- {zoomy_core-0.1.1.dist-info → zoomy_core-0.1.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import numpy.polynomial.legendre as L
|
|
3
|
+
import numpy.polynomial.chebyshev as C
|
|
4
|
+
from scipy.optimize import least_squares as lsq
|
|
5
|
+
import sympy
|
|
6
|
+
from sympy import Matrix, sqrt
|
|
7
|
+
from sympy.abc import x
|
|
8
|
+
from attr import define, field
|
|
9
|
+
|
|
10
|
+
from sympy import integrate, diff
|
|
11
|
+
from sympy import legendre
|
|
12
|
+
from sympy import lambdify
|
|
13
|
+
|
|
14
|
+
from library.zoomy_core.misc.misc import Zstruct
|
|
15
|
+
from library.zoomy_core.model.basemodel import (
|
|
16
|
+
register_sympy_attribute,
|
|
17
|
+
eigenvalue_dict_to_matrix,
|
|
18
|
+
)
|
|
19
|
+
from library.zoomy_core.model.basemodel import Model
|
|
20
|
+
import library.zoomy_core.model.initial_conditions as IC
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@define(kw_only=True, slots=True, frozen=True)
|
|
24
|
+
class Poisson(Model):
|
|
25
|
+
dimension: int = 1
|
|
26
|
+
variables: Zstruct = field(init=False, default=1)
|
|
27
|
+
aux_variables: Zstruct = field(factory = lambda: ['ddTdxx', 'ddTdyy', 'ddTdzz'])
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def residual(self):
|
|
31
|
+
R = Matrix([0 for i in range(self.n_variables)])
|
|
32
|
+
T = self.variables[0]
|
|
33
|
+
ddTdxx = self.aux_variables.ddTdxx
|
|
34
|
+
param = self.parameters
|
|
35
|
+
|
|
36
|
+
R[0] = - ddTdxx + 2
|
|
37
|
+
return R
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|