Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93580096
dumpers.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 29, 21:53
Size
1 KB
Mime Type
text/x-c++
Expires
Sun, Dec 1, 21:53 (2 d)
Engine
blob
Format
Raw Data
Handle
22667101
Attached To
R7871 phys-743-exercises
dumpers.hh
View Options
#include <mpi.h>
#ifndef DUMPERS_HH
#define DUMPERS_HH
/* -------------------------------------------------------------------------- */
class
Grid
;
/* -------------------------------------------------------------------------- */
class
Dumper
{
public
:
explicit
Dumper
(
const
Grid
&
grid
,
MPI_Comm
communicator
)
:
m_grid
(
grid
),
m_min
(
-
1.
),
m_max
(
1.
),
m_communicator
(
communicator
)
{}
virtual
void
dump
(
int
step
)
=
0
;
void
set_min
(
float
min
);
void
set_max
(
float
max
);
float
min
()
const
;
float
max
()
const
;
protected
:
const
Grid
&
m_grid
;
float
m_min
,
m_max
;
MPI_Comm
m_communicator
;
};
/* -------------------------------------------------------------------------- */
class
DumperASCII
:
public
Dumper
{
public
:
explicit
DumperASCII
(
const
Grid
&
grid
,
MPI_Comm
communicator
)
:
Dumper
(
grid
,
communicator
)
{}
virtual
void
dump
(
int
step
);
};
/* -------------------------------------------------------------------------- */
class
DumperBinary
:
public
Dumper
{
public
:
explicit
DumperBinary
(
const
Grid
&
grid
,
MPI_Comm
communicator
)
:
Dumper
(
grid
,
communicator
)
{}
virtual
void
dump
(
int
step
);
};
#endif
/* DUMPERS_HH */
Event Timeline
Log In to Comment