atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
curve.c File Reference

Functions to manage curves. More...

#include <gtk/gtk.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "global.h"
#include "interface.h"
#include "callbacks.h"
#include "project.h"
#include "cedit.h"
#include "curve.h"
+ Include dependency graph for curve.c:

Go to the source code of this file.

Functions

void adjust_tool_model (int calc, int curve, gchar *string_path)
 adjust the content of the tool box tree model
 
curve_dashselectdash (int iddash)
 setup dash pointer
 
double scale (double axe)
 find appropriate major tick spacing based on axis length
 
void prep_plot (project *this_proj, int rid, int cid)
 prepare curve plot (setting up variables for the plot)
 
void clean_this_curve_window (int cid, int rid)
 free curve window data
 
void set_curve_data_zero (int rid, int cid, int interv)
 initialize curve data
 
void save_curve_ (int *interv, double datacurve[*interv], int *cid, int *rid)
 save calculation results from Fortran90
 
void hide_curves (project *this_proj, int c)
 for project hide all curves for a calculation
 
void remove_this_curve_from_extras (int a, int b, int c)
 free all target (a,b,c) curve from other curve(s) extra(s)
 
void erase_curves (project *this_proj, int c)
 free all curve(s) data
 
void update_curves ()
 update all curve(s) rendering for all project(s) in the workspace
 
void update_curve (gpointer data)
 update curve rendering
 

Variables

gint32 etime
 
int resol [2]
 
double XDRAW
 
double YDRAW
 
double DXDRAW
 
double DYDRAW
 
double xmax
 
double ymax
 
double x_min
 
double x_max
 
double y_max
 
double y_min
 
double ax
 
double ay
 
double cxy [2]
 
double mticks
 
int nticks
 
int xlog
 
int ylog
 
int dxlog
 
int dylog
 
char * sca
 
int originp
 
PangoLayout * layout
 
gboolean dogrid
 
int x_shift
 
int y_shift
 
int amint
 
int amajt
 
int tickpos
 
int labpos
 
int xmarge = MARGX
 
int ymarge = MARGY
 
char * curve_image_file = NULL
 
int ndash = NDASHS
 
int nglyph = NGLYPHS
 
const double dashed0 [] = {0.0, 0.0}
 
int len0 = sizeof(dashed0) / sizeof(dashed0[0])
 
const double dashed1 [] = {1.0, 0.0}
 
int len1 = sizeof(dashed1) / sizeof(dashed1[0])
 
const double dashed2 [] = {5.0, 2.5}
 
int len2 = sizeof(dashed2) / sizeof(dashed2[0])
 
const double dashed3 [] = {4.0, 6.0}
 
int len3 = sizeof(dashed3) / sizeof(dashed3[0])
 
const double dashed4 [] = {2.0, 5.0}
 
int len4 = sizeof(dashed4) / sizeof(dashed4[0])
 
const double dashed5 [] = {10.0, 5.0}
 
int len5 = sizeof(dashed5) / sizeof(dashed5[0])
 
const double dashed6 [] = {10.0, 10.0}
 
int len6 = sizeof(dashed6) / sizeof(dashed6[0])
 
const double dashed7 [] = {4.0, 1.0, 4.0}
 
int len7 = sizeof(dashed7) / sizeof(dashed7[0])
 
const double dashed8 [] = {10.0, 2.5, 10.0}
 
int len8 = sizeof(dashed8) / sizeof(dashed8[0])
 
const double dashed9 [] = {10.0, 5.0, 2.0}
 
int len9 = sizeof(dashed9) / sizeof(dashed9[0])
 
const double pdashed [] = {1.0}
 
int lenp = 1
 

Detailed Description

Functions to manage curves.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file curve.c.

Function Documentation

◆ adjust_tool_model()

void adjust_tool_model ( int calc,
int curve,
gchar * string_path )
extern

adjust the content of the tool box tree model

Parameters
calcthe calculation
curvethe curve
string_paththe path in the tree view

Definition at line 216 of file tools.c.

◆ clean_this_curve_window()

void clean_this_curve_window ( int cid,
int rid )

free curve window data

Parameters
cidthe curve id
ridthe calculation id

Definition at line 338 of file curve.c.

◆ erase_curves()

void erase_curves ( project * this_proj,
int c )

free all curve(s) data

Parameters
this_projthe target project
cthe target calculation

Definition at line 526 of file curve.c.

◆ hide_curves()

void hide_curves ( project * this_proj,
int c )

for project hide all curves for a calculation

Parameters
this_projthe target project
cthe target calculation

Definition at line 451 of file curve.c.

◆ prep_plot()

void prep_plot ( project * this_proj,
int rid,
int cid )

prepare curve plot (setting up variables for the plot)

Parameters
this_projthe target project
ridthe calculation id
cidthe curve id

Definition at line 315 of file curve.c.

◆ remove_this_curve_from_extras()

void remove_this_curve_from_extras ( int a,
int b,
int c )

free all target (a,b,c) curve from other curve(s) extra(s)

Parameters
athe target project
bthe target calculation
cthe target curve

Definition at line 482 of file curve.c.

◆ save_curve_()

void save_curve_ ( int * interv,
double datacurve[ *interv],
int * cid,
int * rid )

save calculation results from Fortran90

Parameters
intervnumber of data point(s)
datacurvecalculation result(s) to save
cidcurve id
ridcalculation id

Definition at line 390 of file curve.c.

◆ scale()

double scale ( double axe)

find appropriate major tick spacing based on axis length

Parameters
axeaxis length

Definition at line 204 of file curve.c.

◆ selectdash()

curve_dash * selectdash ( int iddash)

setup dash pointer

Parameters
iddashthe target dash

Definition at line 134 of file curve.c.

◆ set_curve_data_zero()

void set_curve_data_zero ( int rid,
int cid,
int interv )

initialize curve data

Parameters
ridthe calculation id
cidthe curve id
intervthe number of data point(s)

Definition at line 369 of file curve.c.

◆ update_curve()

void update_curve ( gpointer data)

update curve rendering

Parameters
datathe associated data pointer

Definition at line 589 of file curve.c.

◆ update_curves()

void update_curves ( )

update all curve(s) rendering for all project(s) in the workspace

Definition at line 559 of file curve.c.

Variable Documentation

◆ amajt

int amajt

Definition at line 82 of file curve.c.

◆ amint

int amint

Definition at line 82 of file curve.c.

◆ ax

double ax

Definition at line 70 of file curve.c.

◆ ay

double ay

Definition at line 70 of file curve.c.

◆ curve_image_file

char* curve_image_file = NULL

Definition at line 88 of file curve.c.

◆ cxy

double cxy[2]

Definition at line 71 of file curve.c.

◆ dashed0

const double dashed0[] = {0.0, 0.0}

Definition at line 94 of file curve.c.

◆ dashed1

const double dashed1[] = {1.0, 0.0}

Definition at line 97 of file curve.c.

◆ dashed2

const double dashed2[] = {5.0, 2.5}

Definition at line 100 of file curve.c.

◆ dashed3

const double dashed3[] = {4.0, 6.0}

Definition at line 103 of file curve.c.

◆ dashed4

const double dashed4[] = {2.0, 5.0}

Definition at line 106 of file curve.c.

◆ dashed5

const double dashed5[] = {10.0, 5.0}

Definition at line 109 of file curve.c.

◆ dashed6

const double dashed6[] = {10.0, 10.0}

Definition at line 112 of file curve.c.

◆ dashed7

const double dashed7[] = {4.0, 1.0, 4.0}

Definition at line 115 of file curve.c.

◆ dashed8

const double dashed8[] = {10.0, 2.5, 10.0}

Definition at line 118 of file curve.c.

◆ dashed9

const double dashed9[] = {10.0, 5.0, 2.0}

Definition at line 121 of file curve.c.

◆ dogrid

gboolean dogrid

Definition at line 80 of file curve.c.

◆ DXDRAW

double DXDRAW

Definition at line 66 of file curve.c.

◆ dxlog

int dxlog

Definition at line 75 of file curve.c.

◆ DYDRAW

double DYDRAW

Definition at line 66 of file curve.c.

◆ dylog

int dylog

Definition at line 75 of file curve.c.

◆ etime

gint32 etime

Definition at line 63 of file curve.c.

◆ labpos

int labpos

Definition at line 83 of file curve.c.

◆ layout

PangoLayout* layout

Definition at line 79 of file curve.c.

◆ len0

int len0 = sizeof(dashed0) / sizeof(dashed0[0])

Definition at line 95 of file curve.c.

◆ len1

int len1 = sizeof(dashed1) / sizeof(dashed1[0])

Definition at line 98 of file curve.c.

◆ len2

int len2 = sizeof(dashed2) / sizeof(dashed2[0])

Definition at line 101 of file curve.c.

◆ len3

int len3 = sizeof(dashed3) / sizeof(dashed3[0])

Definition at line 104 of file curve.c.

◆ len4

int len4 = sizeof(dashed4) / sizeof(dashed4[0])

Definition at line 107 of file curve.c.

◆ len5

int len5 = sizeof(dashed5) / sizeof(dashed5[0])

Definition at line 110 of file curve.c.

◆ len6

int len6 = sizeof(dashed6) / sizeof(dashed6[0])

Definition at line 113 of file curve.c.

◆ len7

int len7 = sizeof(dashed7) / sizeof(dashed7[0])

Definition at line 116 of file curve.c.

◆ len8

int len8 = sizeof(dashed8) / sizeof(dashed8[0])

Definition at line 119 of file curve.c.

◆ len9

int len9 = sizeof(dashed9) / sizeof(dashed9[0])

Definition at line 122 of file curve.c.

◆ lenp

int lenp = 1

Definition at line 125 of file curve.c.

◆ mticks

double mticks

Definition at line 72 of file curve.c.

◆ ndash

int ndash = NDASHS

Definition at line 91 of file curve.c.

◆ nglyph

int nglyph = NGLYPHS

Definition at line 92 of file curve.c.

◆ nticks

int nticks

Definition at line 73 of file curve.c.

◆ originp

int originp

Definition at line 77 of file curve.c.

◆ pdashed

const double pdashed[] = {1.0}

Definition at line 124 of file curve.c.

◆ resol

int resol[2]

Definition at line 64 of file curve.c.

◆ sca

char* sca

Definition at line 76 of file curve.c.

◆ tickpos

int tickpos

Definition at line 83 of file curve.c.

◆ x_max

double x_max

Definition at line 68 of file curve.c.

◆ x_min

double x_min

Definition at line 68 of file curve.c.

◆ x_shift

int x_shift

Definition at line 81 of file curve.c.

◆ XDRAW

double XDRAW

Definition at line 65 of file curve.c.

◆ xlog

int xlog

Definition at line 74 of file curve.c.

◆ xmarge

int xmarge = MARGX

Definition at line 86 of file curve.c.

◆ xmax

double xmax

Definition at line 67 of file curve.c.

◆ y_max

double y_max

Definition at line 69 of file curve.c.

◆ y_min

double y_min

Definition at line 69 of file curve.c.

◆ y_shift

int y_shift

Definition at line 81 of file curve.c.

◆ YDRAW

double YDRAW

Definition at line 65 of file curve.c.

◆ ylog

int ylog

Definition at line 74 of file curve.c.

◆ ymarge

int ymarge = MARGY

Definition at line 87 of file curve.c.

◆ ymax

double ymax

Definition at line 67 of file curve.c.