Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97487175
o_run.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
Sat, Jan 4, 13:07
Size
1 KB
Mime Type
text/x-c
Expires
Mon, Jan 6, 13:07 (2 d)
Engine
blob
Format
Raw Data
Handle
23413779
Attached To
R1448 Lenstool-HPC
o_run.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/****************************************************************/
/* nom: o_run */
/* auteur: Jean-Paul Kneib */
/* date: 10/02/92 */
/* place: Toulouse */
/****************************************************************/
void o_run()
{
extern struct g_mode M;
extern double chip, chis, chil, chia; //,chix,chiy;
extern int optim_z;
extern int nwarn;
double chi0;
int stop = 0; /* Trigger the end of the iterative optimization process */
int i = 0; /* Number of iterations */
int ntot = 0;
/* Initialize variables for the optimisation */
chi0 = o_prep();
NPRINTF(stderr, "INFO: initial chi %lf\n", chi0);
/* boucle d'optim, jusqu'a atteindre la prec desire sur les parametres */
optim_z = 0;
do
{
/* o_step() return the min chi0 obtained from all the parameters*/
chi0 = o_step(chi0);
if (chi0 < 0.)
{
chi0 = -chi0;
stop = 1;
};
i++;
ntot += nwarn; /* No use */
NPRINTF(stderr, "%d/%d(%d) %.3lf p:%.3lf s:%.3lf l:%.3lf a:%.3lf\n",
i, M.itmax, stop, chi0, chip, chis, chil, chia);
NPRINTF(stderr, "chia=%.3lf chip=%.3lf\n", chia, chip);
NPRINTF(stderr, "n WARNING= %d n_total=%d\n\n", nwarn, ntot);
}
while ((chi0 > M.minchi0) && (stop != 1) && (i < M.itmax));
// Free the structures
}
Event Timeline
Log In to Comment