Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Karsa Zoltán István
/
politopok
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a761b3f9
authored
2 years ago
by
Zoltan Karsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyereg pont + poincare-hopf
parent
96937110
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
epgpu.cu
+30
-2
tetrarun.py
+2
-1
No files found.
epgpu.cu
View file @
a761b3f9
...
...
@@ -148,10 +148,38 @@ __device__ inline vec3 lineintersect(const vec3& S, const vec3& A, const vec3& B
return A + (dot(S - A, B - A) * (B - A)) / dot(B - A, B - A);
}
__device__ inline bool nyereg_ell(const vec3& S, const vec3& X1, const vec3& X2, const vec3& A, const vec3& B) {
vec3 intersect = lineintersect(S, X1, X2);
double KAC = dot(X2 - X1, S - X1);
double KAB = dot(X2 - X1, X2 - X1);
if (0.0 < KAC && KAC < KAB) {
vec3 planeN = normalize(intersect - S);
double signDistanceA = signeddistance(planeN, intersect, A);
double signDistanceB = signeddistance(planeN, intersect, B);
if (signDistanceA <= 0.0 && signDistanceB <= 0.0)
return true;
if (signDistanceA > 0.0 && signDistanceB > 0.0)
return true;
}
return false;
}
__device__ inline int nyereg_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(0, 0, 1.0);
if (nyereg_ell(S, A, B, C, D))
cnt++;
if (nyereg_ell(S, B, C, D, A))
cnt++;
if (nyereg_ell(S, C, D, A, B))
cnt++;
if (nyereg_ell(S, A, D, C, A))
cnt++;
if (nyereg_ell(S, A, C, B, D))
cnt++;
if (nyereg_ell(S, D, B, C, A))
cnt++;
return cnt;
}
...
...
@@ -173,9 +201,9 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
int U = instabil_ep(Sv, C, D);
int H =
0
;
int H =
nyereg_ep(Sv, C, D);
;
if (S > 0 && U > 0)
if (S > 0 && U > 0
&& S + U - H == 2
)
egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1;
}
}
...
...
This diff is collapsed.
Click to expand it.
tetrarun.py
View file @
a761b3f9
...
...
@@ -40,7 +40,7 @@ def main(argv):
res
=
start_kernel
(
Cx
,
Cy
,
Dx
,
Dy
,
Dz
,
v
,
w
)
print
(
res
)
#
print(res)
if
__name__
==
"__main__"
:
main
(
sys
.
argv
[
1
:])
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment