General initialization/termination functions.
More...
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "cstream.h"
#include "parameters.h"
#include "proto.h"
#include "species.h"
Go to the source code of this file.
|
void | init_parameters (void) |
| Initializes the parameters.
|
|
static void | init_gridsizes_a (void) |
| Initializes the grid sizes. The parameters dr_root and dz_root specify the grid size at level 0 (dz_root = dz[0], dr_root[0] = dr[0])
|
|
static void | init_wk_a (void) |
| Initializes the vector of wk's for the Helmholtz equation.
|
|
static void | free_gridsizes (void) |
| Frees the space allocated for dr and dz.
|
|
static void | free_wk (void) |
| Frees the allocated space for .
|
|
void | cstream_init (void) |
| Here all the initialization calls.
|
|
void | cstream_end (void) |
| Here all the cleaning and finishing calls.
|
|
void | cstream_set_field_at_time (double t) |
| When we use a time-varying external field, we update the field components at each timesteps.
|
|
double | e0_r (double r, double z, double theta) |
| Functions for a constant external electric field given in (x, y, z) components.
|
|
double | e0_z (double r, double z, double theta) |
| Functions for a constant external electric field given in (x, y, z) components.
|
|
double | e0_theta (double r, double z, double theta) |
| Functions for a constant external electric field given in (x, y, z) components.
|
|
| decl_field_comp (r) |
|
| decl_field_comp (z) |
|
| decl_field_comp (theta) |
|
General initialization/termination functions.
Definition in file cstream.c.
void init_parameters |
( |
void |
| ) |
|
Initializes the parameters.
The global parameters will get their default values. These values correspond with the values in input/defaults.cfg
Definition at line 54 of file cstream.c.
static void init_gridsizes_a |
( |
void |
| ) |
|
|
static |
Initializes the grid sizes. The parameters dr_root and dz_root specify the grid size at level 0 (dz_root = dz[0], dr_root[0] = dr[0])
Definition at line 276 of file cstream.c.
static void init_wk_a |
( |
void |
| ) |
|
|
static |
Initializes the vector of wk's for the Helmholtz equation.
Definition at line 310 of file cstream.c.
static void free_gridsizes |
( |
void |
| ) |
|
|
static |
Frees the space allocated for dr and dz.
Definition at line 348 of file cstream.c.
static void free_wk |
( |
void |
| ) |
|
|
static |
Frees the allocated space for
.
Definition at line 356 of file cstream.c.
void cstream_init |
( |
void |
| ) |
|
Here all the initialization calls.
Definition at line 364 of file cstream.c.
void cstream_end |
( |
void |
| ) |
|
Here all the cleaning and finishing calls.
Definition at line 388 of file cstream.c.
void cstream_set_field_at_time |
( |
double |
t | ) |
|
When we use a time-varying external field, we update the field components at each timesteps.
Definition at line 400 of file cstream.c.
double e0_r |
( |
double |
r, |
|
|
double |
z, |
|
|
double |
theta |
|
) |
| |
Functions for a constant external electric field given in (x, y, z) components.
Definition at line 435 of file cstream.c.
double e0_z |
( |
double |
r, |
|
|
double |
z, |
|
|
double |
theta |
|
) |
| |
Functions for a constant external electric field given in (x, y, z) components.
Definition at line 442 of file cstream.c.
double e0_theta |
( |
double |
r, |
|
|
double |
z, |
|
|
double |
theta |
|
) |
| |
Functions for a constant external electric field given in (x, y, z) components.
Definition at line 449 of file cstream.c.
Initializes the component of the external electric field in
-direction.
Initializes the component of the external electric field in
-direction.
decl_field_comp |
( |
theta |
| ) |
|
Initializes the component of the external electric field in
-direction.
For time-dependent electric fields E_x, E_y, E_z there is a difference between E0 (the highest field) and E (the field at a given time).
Definition at line 16 of file cstream.c.
double pois_inhom_fixed_q_t |
The same is true for time-dependent fixed charges (useful to model the charging of a cloud in modeling sprites.
Time-dependent fixed charge for the inhomogeneous poisson code It is updated in cstream_set_field_at_time acording to the parameter rise_time.
Definition at line 55 of file poisson.c.
dr[i] and dz[i] represent the grid size at level i. Note that i can go from -extra_pois_levels...max_levels.
Definition at line 24 of file cstream.c.
w2k[k] = 2 / dtheta^2 (1 - cos(k dtheta)). This numbers appear due to the finite-differences derivatives of a Fourier transform. If we would make a continuous fourier transform, they will approach k^2.
Definition at line 29 of file cstream.c.
char* invok_name = "cstream" |
Name of this program.
Definition at line 36 of file cstream.c.
const double twopi = 6.283185307179586477L |
const double invfourpi = 0.079577471545947667884441882L |
const double invpi32 = 0.179587122125166561689081L |