nec2++ 2.1.1
c_plot_card.h
1/*
2 Copyright (C) 2004 Timothy C.A. Molteno
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18#pragma once
19
20
21#include "math_util.h"
22#include <memory>
23#include <string>
24#include <stdio.h>
25
45{
46public:
48 c_plot_card(const c_plot_card& p);
49 c_plot_card(int itmp1, int itmp2, int itmp3, int itmp4, std::string& filename);
50
51 virtual ~c_plot_card();
52
53 c_plot_card& operator=(const c_plot_card&) = default;
54
55 bool is_valid() const;
56
57 bool storing() const;
58 bool currents() const;
59 bool near_field() const ;
60 bool patterns() const;
61
62 bool realimag() const;
63 bool magphase() const;
64
65 void set_plot_real_imag_currents();
66
67 void plot_endl() const;
68
69 void plot_double(nec_float x) const;
70
71 void plot_complex(nec_complex x) const;
72
73 void plot_complex_2d(nec_complex x, nec_complex y, nec_complex z) const;
74
75 void plot_currents(nec_complex ex, nec_complex ey, nec_complex ez) const;
76
77 void plot_segments(int i,
79 nec_float xw2, nec_float yw2,
80 real_array& bi, int_array& icon1, int_array& icon2) const;
81
82 void plot_fields(
83 nec_complex ex, nec_complex ey, nec_complex ez,
84 nec_float xob, nec_float yob, nec_float zob);
85
86 void plot_patterns(nec_float theta, nec_float phi,
87 nec_complex e_theta, nec_complex e_phi,
88 nec_float g_vert, nec_float g_horiz, nec_float g_tot);
89private:
90 int p1, p2, p3, p4;
91 std::shared_ptr<FILE> plot_fp;
92};
Definition c_plot_card.h:45