OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ippl
src
Utility
FieldPrint.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
*
7
* Visit http://people.web.psi.ch/adelmann/ for more details
8
*
9
***************************************************************************/
10
11
#ifndef FIELD_PRINT_H
12
#define FIELD_PRINT_H
13
14
// forward declarations
15
template
<
class
T,
unsigned
Dim>
class
BareField
;
16
template
<
unsigned
Dim>
class
NDIndex
;
17
18
// class FieldPrint
19
//----------------------------------------------------------------------
20
template
<
class
T,
unsigned
Dim>
21
class
FieldPrint
{
22
23
public
:
24
25
// attach a 2D Field to a FieldPrint
26
FieldPrint
(
BareField<T,Dim>
& f,
unsigned
parent = 0,
int
indexWidth = 3,
27
int
dataWidth = 8,
int
dataPrecision = 4,
28
int
carReturn = -1,
bool
scientific =
false
) :
29
MyField
(f),
Parent
(parent),
IndexWidth
(indexWidth),
DataWidth
(dataWidth),
30
DataPrecision
(dataPrecision),
CarReturn
(carReturn),
Scientific
(scientific) { };
31
32
33
~FieldPrint
() { };
34
void
print
(
NDIndex<Dim>
& view);
35
36
// reset values
37
void
set_IndexWidth
(
unsigned
in ) {
IndexWidth
= in; }
38
void
set_DataWidth
(
unsigned
in ) {
DataWidth
= in; }
39
void
set_DataPrecision
(
unsigned
in ) {
DataPrecision
= in; }
40
void
set_CarReturn
(
int
in ) {
CarReturn
= in; }
41
void
set_Scientific
(
bool
in ) {
Scientific
= in; }
42
43
private
:
44
BareField<T,Dim>
&
MyField
;
45
46
unsigned
Parent
;
47
48
// formatting information
49
unsigned
IndexWidth
;
// the width for the Index fields
50
unsigned
DataWidth
;
// the width for the Data fields
51
unsigned
DataPrecision
;
// the precision of the data
52
int
CarReturn
;
// how long before a carriage return
53
bool
Scientific
;
54
55
};
56
//----------------------------------------------------------------------
57
58
#include "
Utility/FieldPrint.hpp
"
59
60
#endif // FIELD_PRINT_H
61
62
/***************************************************************************
63
* $RCSfile: FieldPrint.h,v $ $Author: adelmann $
64
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
65
* IPPL_VERSION_ID: $Id: FieldPrint.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
66
***************************************************************************/
FieldPrint::MyField
BareField< T, Dim > & MyField
Definition:
FieldPrint.h:44
FieldPrint::IndexWidth
unsigned IndexWidth
Definition:
FieldPrint.h:49
FieldPrint::print
void print(NDIndex< Dim > &view)
Definition:
FieldPrint.hpp:39
FieldPrint.hpp
FieldPrint::Scientific
bool Scientific
Definition:
FieldPrint.h:53
FieldPrint::set_CarReturn
void set_CarReturn(int in)
Definition:
FieldPrint.h:40
FieldPrint::set_Scientific
void set_Scientific(bool in)
Definition:
FieldPrint.h:41
NDIndex
Definition:
FieldDataSource.h:40
FieldPrint::~FieldPrint
~FieldPrint()
Definition:
FieldPrint.h:33
FieldPrint::set_IndexWidth
void set_IndexWidth(unsigned in)
Definition:
FieldPrint.h:37
FieldPrint::Parent
unsigned Parent
Definition:
FieldPrint.h:46
FieldPrint::DataWidth
unsigned DataWidth
Definition:
FieldPrint.h:50
FieldPrint::CarReturn
int CarReturn
Definition:
FieldPrint.h:52
FieldPrint::set_DataPrecision
void set_DataPrecision(unsigned in)
Definition:
FieldPrint.h:39
FieldPrint::DataPrecision
unsigned DataPrecision
Definition:
FieldPrint.h:51
BareField
Definition:
FFT.h:26
FieldPrint::FieldPrint
FieldPrint(BareField< T, Dim > &f, unsigned parent=0, int indexWidth=3, int dataWidth=8, int dataPrecision=4, int carReturn=-1, bool scientific=false)
Definition:
FieldPrint.h:26
FieldPrint
Definition:
FieldPrint.h:21
FieldPrint::set_DataWidth
void set_DataWidth(unsigned in)
Definition:
FieldPrint.h:38
Generated on Tue Jul 2 2024 15:05:15 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5