Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97127158
update_epot.c
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
Thu, Jan 2, 18:11
Size
960 B
Mime Type
text/x-c
Expires
Sat, Jan 4, 18:11 (2 d)
Engine
blob
Format
Raw Data
Handle
23260819
Attached To
R1448 Lenstool-HPC
update_epot.c
View Options
#include<math.h>
#include<structure.h>
/****************************************************************/
/* nom: update_epot */
/* auteur: Eric Jullo */
/* date: 4/2007 */
/* place: ESO, Chile */
/****************************************************************/
void update_epot(int i, double *epot)
{
const extern struct pot lens[];
if ( lens[i].type == 8 ||
lens[i].type == -2 ||
( lens[i].type > 80 && lens[i].type < 90 ) )
*epot = (1. - sqrt(1 - lens[i].emass * lens[i].emass)) / lens[i].emass;
else
*epot = lens[i].emass / 3.;
}
void update_epot_ptr(struct pot *ilens, double *epot)
{
if ( ilens->type == 8 ||
ilens->type == -2 ||
( ilens->type > 80 && ilens->type < 90 ) )
*epot = (1. - sqrt(1 - ilens->emass * ilens->emass)) / ilens->emass;
else
*epot = ilens->emass / 3.;
}
Event Timeline
Log In to Comment