summaryrefslogtreecommitdiff
path: root/lpic/src/diagnostic_spacetime.h
blob: f4fa92cbd3d61fa360d6f965aea865fe69150840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
   This file is part of LPIC++, a particle-in-cell code for
   simulating the interaction of laser light with plasma.

   Copyright (C) 1994-1997 Roland Lichters

   LPIC++ is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifndef DIAGNOSTIC_SPACETIME_H
#define DIAGNOSTIC_SPACETIME_H

#include <diagnostic_stepper.h>
#include <common.h>
#include <error.h>
#include <parameter.h>
#include <domain.h>
#include <matrix.h>
#include <math.h>


class input_spacetime {
private:
  char          errname[filename_size];
  readfile      rf;
  void          save( parameter &p );

public:
  stepper_param stepper_de, stepper_di,
                stepper_jx, stepper_jy, stepper_jz,
                stepper_ex, stepper_ey, stepper_ez,
                stepper_bx, stepper_by, stepper_bz,
                stepper_etx, stepper_ety, stepper_etz,
                stepper_edens;
  int           Q_restart;
  char          restart_file[filename_size];

  input_spacetime( parameter &p );
};

//////////////////////////////////////////////////////////////////////////////////////////

class spacetime {

private:
  char            errname[filename_size];
  readfile        rf;
  input_spacetime input;

public:
  int             output_period_de, output_period_di,
                  output_period_jx, output_period_jy, output_period_jz,
                  output_period_ex, output_period_ey, output_period_ez,
                  output_period_bx, output_period_by, output_period_bz,
                  output_period_etx, output_period_ety, output_period_etz,
                  output_period_edens;

  diagnostic_stepper stepper_de, stepper_di,
                     stepper_jx, stepper_jy, stepper_jz,
                     stepper_ex, stepper_ey, stepper_ez,
                     stepper_bx, stepper_by, stepper_bz,
                     stepper_etx, stepper_ety, stepper_etz,
                     stepper_edens;

  char *name_de, *name_di,
       *name_jx, *name_jy, *name_jz,
       *name_ex, *name_ey, *name_ez,
       *name_bx, *name_by, *name_bz,
       *name_etx, *name_ety, *name_etz,
       *name_edens;

  spacetime            ( parameter &p );
  void boundaries      ( float *x_start, float *x_stop, int *x_steps,
			 diagnostic_stepper *stepper, domain *grid );
  void write_de        ( domain *grid, int time_out_count, parameter &p );
  void write_di        ( domain *grid, int time_out_count, parameter &p );
  void write_jx        ( domain *grid, int time_out_count, parameter &p );
  void write_jy        ( domain *grid, int time_out_count, parameter &p );
  void write_jz        ( domain *grid, int time_out_count, parameter &p );
  void write_ex        ( domain *grid, int time_out_count, parameter &p );
  void write_ey        ( domain *grid, int time_out_count, parameter &p );
  void write_ez        ( domain *grid, int time_out_count, parameter &p );
  void write_bx        ( domain *grid, int time_out_count, parameter &p );
  void write_by        ( domain *grid, int time_out_count, parameter &p );
  void write_bz        ( domain *grid, int time_out_count, parameter &p );
  void write_etx       ( domain *grid, int time_out_count, parameter &p );
  void write_ety       ( domain *grid, int time_out_count, parameter &p );
  void write_etz       ( domain *grid, int time_out_count, parameter &p );
  void write_edens     ( domain *grid, int time_out_count, parameter &p );
};

//////////////////////////////////////////////////////////////////////////////////////////

#endif