Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68970271
setup.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jun 29, 17:22
Size
2 KB
Mime Type
text/x-c
Expires
Mon, Jul 1, 17:22 (2 d)
Engine
blob
Format
Raw Data
Handle
18414455
Attached To
R1448 Lenstool-HPC
setup.hpp
View Options
#include <iostream>
#include <string.h>
//#include <cuda_runtime.h>
#include <math.h>
#include <sys/time.h>
#include <fstream>
#ifndef __xlC__
#include <immintrin.h>
#endif
//#include "simd_math.h"
#ifdef __WITH_LENSTOOL
#include "structure.h"
#include "structure_hpc.hpp"
extern
struct
pot
lens
[
NLMAX
];
extern
struct
g_grille
G
;
void
//setup_jauzac_LT(struct pot** lens, int* nlenses, double* x, double* y, double* sol_grad_x, double* sol_grad_y)
convert_to_LT
(
Potential_SOA
*
lenses
,
int
nlenses
)
{
G
.
xmax
=
50.0
;
G
.
xmin
=
-
50.0
;
G
.
ymax
=
50.0
;
G
.
ymin
=
-
50.0
;
G
.
dx
=
100.
/
1000.
;
G
.
dy
=
100.
/
1000.
;
G
.
nlens
=
6
;
//
//*lens = (struct pot*) malloc(sizeof(struct pot)*(*nlenses));
//
for
(
int
i
=
0
;
i
<
nlenses
;
++
i
)
{
//
lens
[
i
].
C
.
x
=
lenses
->
position_x
[
i
];
lens
[
i
].
C
.
y
=
lenses
->
position_y
[
i
];
//
lens
[
i
].
sigma
=
1.
;
// disp
if
(
lenses
->
type
[
i
]
==
5
)
{
lens
[
i
].
type
=
1
;
}
else
{
lens
[
i
].
type
=
lenses
->
type
[
i
];
}
lens
[
i
].
emass
=
0.11
;
lens
[
i
].
epot
=
lenses
->
ellipticity_potential
[
i
];
//printf("%f %f\n", lenses->ellipticity_potential[i], lenses->ellipticity[i]);
//lens[i].epot = lenses->ellipticity[i];
lens
[
i
].
theta
=
lenses
->
ellipticity_angle
[
i
];
lens
[
i
].
rcut
=
lenses
->
rcut
[
i
];
lens
[
i
].
rc
=
lenses
->
rcore
[
i
];
lens
[
i
].
b0
=
lenses
->
b0
[
i
];
lens
[
i
].
z
=
lenses
->
z
[
i
];
lens
[
i
].
masse
=
0
;
// weight
//lens[i].rc = 0; // rscale
// (&lens)[i].exponent = 0;
lens
[
i
].
alpha
=
0.
;
// (&lens)[i].einasto_kappacritic = 0;
lens
[
i
].
z
=
0.4
;
}
}
#endif
Event Timeline
Log In to Comment