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
b8455ea9
authored
Feb 08, 2023
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'szabalyos' into 'master'
Szabalyos, bogfix See merge request
!4
parents
08d6cac9
6ad6141f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
18 deletions
+25
-18
.gitignore
+1
-0
epgpu.cu
+18
-18
genax.py
+6
-0
No files found.
.gitignore
View file @
b8455ea9
...
...
@@ -52,3 +52,4 @@ docs/_build/
.vscode/
*.out
*.full
epgpu.cu
View file @
b8455ea9
...
...
@@ -86,7 +86,7 @@ __device__ inline bool intriangle(const vec3& Q, const vec3& A, const vec3& B, c
__device__ inline int stabil_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(
0, 0, 1
.0);
vec3 A(0, 0, 0), B(
1.0, 0, 0
.0);
// ABC oldal:
vec3 planeNN = normalize(cross(B-A, C-A));
vec3 P = intersection(planeNN, A, S);
...
...
@@ -128,7 +128,7 @@ __device__ inline bool instabil_ell(const vec3& S, const vec3& X, const vec3& A,
__device__ inline int instabil_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(
0, 0, 1
.0);
vec3 A(0, 0, 0), B(
1.0, 0, 0
.0);
// D CSUCSNAL
if (instabil_ell(S, D, A, B, C))
cnt++;
...
...
@@ -166,7 +166,7 @@ __device__ inline bool nyereg_ell(const vec3& S, const vec3& X1, const vec3& X2,
__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);
vec3 A(0, 0, 0), B(
1.0, 0.0, 0
.0);
if (nyereg_ell(S, A, B, C, D))
cnt++;
...
...
@@ -190,13 +190,13 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 AB(1.0/v, 0.0, 0.0);
vec3 AC = C/v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = i*AB + j * AC;
vec3 L = (D - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
@@ -213,17 +213,17 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(
0.0, 0.0, 1
.0);
vec3 A(0.0, 0.0, 0.0), B(
1.0, 0.0, 0
.0);
vec3 BC = (C - B) / v;
vec3 BD = (D - B) / v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = B + i * BC + j * BD;
vec3 L = (A - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
@@ -240,17 +240,17 @@ __device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(
0.0, 0.0, 1
.0);
vec3 A(0.0, 0.0, 0.0), B(
1.0, 0.0, 0
.0);
vec3 CA = (A - C) / v;
vec3 CD = (D - C) / v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = C + i * CA + j * CD;
vec3 L = (B - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
@@ -267,17 +267,17 @@ __device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void DAB_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(
0.0, 0.0, 1
.0);
vec3 A(0.0, 0.0, 0.0), B(
1.0, 0.0, 0
.0);
vec3 DA = (A - D) / v;
vec3 DB = (B - D) / v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = D + i * DA + j * DB;
vec3 L = (C - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
genax.py
View file @
b8455ea9
...
...
@@ -98,7 +98,9 @@ def angles_alap(anglestopick, plot = False):
tCx
=
tCy
/
tgtA
Cx
=
cp
.
concatenate
((
hCx
,
tCx
),
axis
=
None
)
Cx
=
cp
.
append
(
Cx
,
[
0.5
],
axis
=
False
)
Cy
=
cp
.
concatenate
((
hCy
,
tCy
),
axis
=
None
)
Cy
=
cp
.
append
(
Cy
,
[
cp
.
sqrt
(
3.0
)
/
2.0
],
axis
=
False
)
return
Cx
,
Cy
...
...
@@ -140,7 +142,10 @@ def angles_ratet(anglestopick, plot = False):
sin
=
cp
.
sin
(
anglestopick
)
Dx
=
cp
.
outer
(
cp
.
full
(
anglestopick
.
size
,
1.0
,
dtype
=
cp
.
float64
),
Ex
)
.
flatten
()
Dx
=
cp
.
append
(
Dx
,
[
0.5
],
axis
=
False
)
Dy
=
cp
.
outer
(
cos
,
Ey
)
.
flatten
()
Dy
=
cp
.
append
(
Dy
,
[
cp
.
sqrt
(
3.0
)
/
6.0
],
axis
=
False
)
Dz
=
cp
.
outer
(
sin
,
Ey
)
.
flatten
()
Dz
=
cp
.
append
(
Dz
,
[
cp
.
sqrt
(
2.0
/
3.0
)],
axis
=
False
)
return
Dx
,
Dy
,
Dz
\ No newline at end of file
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