ParMooN
 All Classes Functions Variables Friends Pages
fepc_easy.h
1 #ifndef __FEPCEASY
2 #define __FEPCEASY
3 
4 #include <stdlib.h>
5 #include <stdio.h>
6 #include <math.h>
7 #include "faltung.h"
8 
9 typedef struct {
10  fepc_real_t start;
11  fepc_real_t end;
12 } interval_t;
13 
14 typedef interval_t * interval_p;
15 
16 #ifndef INT_STEPS
17 #define INT_STEPS 10
18 #endif
19 
20 #define SQRT_3 1.7320508075688772935274463415058723669428
21 #define DIV_1_6 0.16666666666666666666666666666666666666666666
22 
23 typedef fepc_real_t (*Funcimpl_step) (int, int, int, fepc_real_t);
24 
25 typedef fepc_real_t (*Funcimpl) (fepc_real_t);
26 
30 void set_gridstructure(func_p0_p function, interval_p* intervals, fepc_real_t stepping);
31 void set_gridstructure(func_p1_p function, interval_p* intervals, fepc_real_t stepping);
32 
36 inline fepc_real_t get_h_l(int step, fepc_real_t& stepping) {
37  return pow(.5, step)*stepping;
38 }
39 
43 inline bool_t is_in_latter_interval(int& v, folge_p0_p folge) {
44  return v >= folge->lang / 2. ? FEPC_FALSE : FEPC_TRUE;
45 }
46 
47 fepc_real_t get_value_at_step(func_p0_p function, fepc_real_t& x, int& step, fepc_real_t& stepping, int* count);
48 
52 inline bool_t is_in_latter_interval(int& v, folge_p1_p folge) {
53  return v >= folge->lang / 2. ? FEPC_FALSE : FEPC_TRUE;
54 }
55 
56 fepc_real_t get_value_at_step(func_p1_p function, fepc_real_t& x, int& step, fepc_real_t& stepping, int* count);
57 
61 fepc_real_t phi_l(int& step, int& v, int p, fepc_real_t& x, fepc_real_t& stepping);
62 
63 #endif
Definition: funktion.h:9
Definition: folge.h:60
Definition: folge.h:12
Definition: fepc_easy.h:9
Definition: funktion.h:80