pytessel 1.1.1__cp38-cp38-musllinux_1_1_i686.whl → 1.2.4__cp38-cp38-musllinux_1_1_i686.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 pytessel might be problematic. Click here for more details.
- pytessel/_version.py +1 -1
- pytessel/pytessel.cpython-38-i386-linux-gnu.so +0 -0
- pytessel/scalar_field.cpp +38 -9
- pytessel/scalar_field.h +8 -0
- {pytessel-1.1.1.dist-info → pytessel-1.2.4.dist-info}/METADATA +1 -1
- {pytessel-1.1.1.dist-info → pytessel-1.2.4.dist-info}/RECORD +15 -15
- {pytessel-1.1.1.dist-info → pytessel-1.2.4.dist-info}/WHEEL +1 -1
- {pytessel-1.1.1.dist-info → pytessel-1.2.4.dist-info}/LICENSE +0 -0
- {pytessel-1.1.1.dist-info → pytessel-1.2.4.dist-info}/top_level.txt +0 -0
pytessel/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.
|
|
1
|
+
__version__ = "1.2.4"
|
|
Binary file
|
pytessel/scalar_field.cpp
CHANGED
|
@@ -60,6 +60,11 @@ float ScalarField::get_value_interp(float x, float y, float z) const {
|
|
|
60
60
|
// cast the input to the nearest grid point
|
|
61
61
|
Vec3 r = this->realspace_to_grid(x,y,z);
|
|
62
62
|
|
|
63
|
+
// recast
|
|
64
|
+
if(r.x < 0.0) r.x += (float)this->grid_dimensions[0];
|
|
65
|
+
if(r.y < 0.0) r.y += (float)this->grid_dimensions[1];
|
|
66
|
+
if(r.z < 0.0) r.z += (float)this->grid_dimensions[2];
|
|
67
|
+
|
|
63
68
|
// calculate value using trilinear interpolation
|
|
64
69
|
float xd = remainderf(r.x, 1.0);
|
|
65
70
|
float yd = remainderf(r.y, 1.0);
|
|
@@ -69,12 +74,12 @@ float ScalarField::get_value_interp(float x, float y, float z) const {
|
|
|
69
74
|
if(yd < 0) yd += 1.0;
|
|
70
75
|
if(zd < 0) zd += 1.0;
|
|
71
76
|
|
|
72
|
-
float x0 = floor(r.x);
|
|
73
|
-
float x1 = ceil(r.x);
|
|
74
|
-
float y0 = floor(r.y);
|
|
75
|
-
float y1 = ceil(r.y);
|
|
76
|
-
float z0 = floor(r.z);
|
|
77
|
-
float z1 = ceil(r.z);
|
|
77
|
+
float x0 = fmod(floor(r.x), this->grid_dimensions[0]);
|
|
78
|
+
float x1 = fmod(ceil(r.x), this->grid_dimensions[0]);
|
|
79
|
+
float y0 = fmod(floor(r.y), this->grid_dimensions[1]);
|
|
80
|
+
float y1 = fmod(ceil(r.y), this->grid_dimensions[1]);
|
|
81
|
+
float z0 = fmod(floor(r.z), this->grid_dimensions[2]);
|
|
82
|
+
float z1 = fmod(ceil(r.z), this->grid_dimensions[2]);
|
|
78
83
|
|
|
79
84
|
return
|
|
80
85
|
this->get_value(x0, y0, z0) * (1.0 - xd) * (1.0 - yd) * (1.0 - zd) +
|
|
@@ -169,9 +174,9 @@ Vec3 ScalarField::realspace_to_direct(float x, float y, float z) const {
|
|
|
169
174
|
Vec3 ScalarField::realspace_to_grid(float i, float j, float k) const {
|
|
170
175
|
Vec3 g = this->realspace_to_direct(i, j, k);
|
|
171
176
|
|
|
172
|
-
g.x *= float(this->grid_dimensions[0]
|
|
173
|
-
g.y *= float(this->grid_dimensions[1]
|
|
174
|
-
g.z *= float(this->grid_dimensions[2]
|
|
177
|
+
g.x *= float(this->grid_dimensions[0]);
|
|
178
|
+
g.y *= float(this->grid_dimensions[1]);
|
|
179
|
+
g.z *= float(this->grid_dimensions[2]);
|
|
175
180
|
|
|
176
181
|
return g;
|
|
177
182
|
}
|
|
@@ -208,3 +213,27 @@ void ScalarField::inverse(const mat33& mat, mat33* invmat) {
|
|
|
208
213
|
(*invmat)[2][1] = (mat[2][0] * mat[0][1] - mat[0][0] * mat[2][1]) * invdet;
|
|
209
214
|
(*invmat)[2][2] = (mat[0][0] * mat[1][1] - mat[1][0] * mat[0][1]) * invdet;
|
|
210
215
|
}
|
|
216
|
+
|
|
217
|
+
std::vector<float> ScalarField::get_unitcell_vf() const {
|
|
218
|
+
std::vector<float> ans(9,0.0);
|
|
219
|
+
|
|
220
|
+
for(unsigned int i=0; i<3; i++) {
|
|
221
|
+
for(unsigned int j=0; j<3; j++) {
|
|
222
|
+
ans[i*3 + j] = this->unitcell[i][j];
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return ans;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
std::vector<float> ScalarField::get_unitcell_inverse() const {
|
|
230
|
+
std::vector<float> ans(9,0.0);
|
|
231
|
+
|
|
232
|
+
for(unsigned int i=0; i<3; i++) {
|
|
233
|
+
for(unsigned int j=0; j<3; j++) {
|
|
234
|
+
ans[i*3 + j] = this->unitcell_inverse[i][j];
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return ans;
|
|
239
|
+
}
|
pytessel/scalar_field.h
CHANGED
|
@@ -92,5 +92,13 @@ public:
|
|
|
92
92
|
return this->unitcell;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
inline const mat33& get_mat_inverse() const {
|
|
96
|
+
return this->unitcell_inverse;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
std::vector<float> get_unitcell_vf() const;
|
|
100
|
+
|
|
101
|
+
std::vector<float> get_unitcell_inverse() const;
|
|
102
|
+
|
|
95
103
|
private:
|
|
96
104
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
pytessel/pytessel.cpython-38-i386-linux-gnu.so,sha256=-1ntxB6uk5Z3R05XJwGlQZwjRGrZnAlgd1iR1iMHQrE,1492461
|
|
2
|
-
pytessel/_version.py,sha256=q8_5C0f-8mHWNb6mMw02zlYPnEGXBqvOmP3z0CEwZKM,22
|
|
3
|
-
pytessel/__init__.py,sha256=vro51HMaT-ePmW0CgIsDkOgTzutYGB2UgmyV7elT09A,66
|
|
4
|
-
pytessel/isosurface.cpp,sha256=Q4a3lqrgnWGfwyZEdUnC6uSCQ46izSO-8SMWrcGTqWg,20664
|
|
5
|
-
pytessel/isosurface_mesh.h,sha256=5n0TJDDlQBcJu9SOxTmW21_g8YEP5Jq9GVrVwMh7IH0,3458
|
|
6
|
-
pytessel/isosurface.h,sha256=dpenMn9T2KuiYw112HuEdIkuh7fqp12FaVJE-00vMsY,5570
|
|
7
|
-
pytessel/isosurface_mesh.cpp,sha256=zoahovBodabqx2zfHkW5xIGBvU84n15tUlsy0yyexp8,6387
|
|
8
|
-
pytessel/scalar_field.cpp,sha256=W5VNLGpK7PYSDUEWqf3tDtIEZnPML5v7ygkiyxUE38c,7913
|
|
9
|
-
pytessel/scalar_field.h,sha256=dgkcMtIQzEITCx8QcqcHCbkCNu_KbAWuoJ0zcY1k_zs,3394
|
|
10
|
-
pytessel-1.1.1.dist-info/LICENSE,sha256=4cCtcomD2KVzNeUs8QZPGv_R1FQXPYzr0-2LSnK0hwQ,35121
|
|
11
|
-
pytessel-1.1.1.dist-info/METADATA,sha256=4k4IJyrsDvo_5lY6yrhE2tVE7TeHL4P-TD9CngNsrNA,5009
|
|
12
|
-
pytessel-1.1.1.dist-info/RECORD,,
|
|
13
|
-
pytessel-1.1.1.dist-info/top_level.txt,sha256=QDauMEeJ6MuBmtCTV4HZAr1XodXsUesXTlcImp5LE54,9
|
|
14
|
-
pytessel-1.1.1.dist-info/WHEEL,sha256=A6_DtUiDgMgD1W-StqbuJJbxCfEJTq71CSHdtaevATE,109
|
|
15
|
-
pytessel.libs/libstdc++-8baf04f9.so.6.0.28,sha256=yrzOxg1heyJ9Y-43YCLLn04Cpl_A68FN0D2Q1iBTMcY,2428961
|
|
16
1
|
pytessel.libs/libgcc_s-8b50eaaa.so.1,sha256=WXj_FYQE1MDIyb-nN8siUALdxit6NHma0p9UxemQV8o,101649
|
|
17
2
|
pytessel.libs/libgomp-41890ef0.so.1.0.0,sha256=jd7-sH43bW1ihDQz3ii-r6QHE1xQftc6Rgs89QCHj7k,195209
|
|
3
|
+
pytessel.libs/libstdc++-8baf04f9.so.6.0.28,sha256=yrzOxg1heyJ9Y-43YCLLn04Cpl_A68FN0D2Q1iBTMcY,2428961
|
|
4
|
+
pytessel/scalar_field.cpp,sha256=Ey1LxTnU_Ul40eIZvZZWgTnhJ8P-dP3aK16nEiOEOsk,8818
|
|
5
|
+
pytessel/_version.py,sha256=XBKH8E1LmDxv06U39yqMBbXZapOERFgICEDYZs_kRso,22
|
|
6
|
+
pytessel/isosurface_mesh.h,sha256=5n0TJDDlQBcJu9SOxTmW21_g8YEP5Jq9GVrVwMh7IH0,3458
|
|
7
|
+
pytessel/isosurface_mesh.cpp,sha256=zoahovBodabqx2zfHkW5xIGBvU84n15tUlsy0yyexp8,6387
|
|
8
|
+
pytessel/isosurface.h,sha256=dpenMn9T2KuiYw112HuEdIkuh7fqp12FaVJE-00vMsY,5570
|
|
9
|
+
pytessel/pytessel.cpython-38-i386-linux-gnu.so,sha256=32OqamQ9iI63nXAq2SlwRdjEZfGxeZKErVGwYpDE3rk,1517181
|
|
10
|
+
pytessel/isosurface.cpp,sha256=Q4a3lqrgnWGfwyZEdUnC6uSCQ46izSO-8SMWrcGTqWg,20664
|
|
11
|
+
pytessel/scalar_field.h,sha256=sfGoX7VtbA6V99dMqLDpYq79xCFFJAKXL1UXd5QBxWs,3593
|
|
12
|
+
pytessel/__init__.py,sha256=vro51HMaT-ePmW0CgIsDkOgTzutYGB2UgmyV7elT09A,66
|
|
13
|
+
pytessel-1.2.4.dist-info/LICENSE,sha256=4cCtcomD2KVzNeUs8QZPGv_R1FQXPYzr0-2LSnK0hwQ,35121
|
|
14
|
+
pytessel-1.2.4.dist-info/WHEEL,sha256=x3J_FeIp2R0uC39FfyS8XQQxIg2ybNpnezPp89yL-20,108
|
|
15
|
+
pytessel-1.2.4.dist-info/RECORD,,
|
|
16
|
+
pytessel-1.2.4.dist-info/top_level.txt,sha256=QDauMEeJ6MuBmtCTV4HZAr1XodXsUesXTlcImp5LE54,9
|
|
17
|
+
pytessel-1.2.4.dist-info/METADATA,sha256=Td_69V4krFF8epMbV-l6PAiTlxyaLvvi-_ev5Iy3iaU,5009
|
|
File without changes
|
|
File without changes
|