OPAL (Object Oriented Parallel Accelerator Library)
2024.2
OPAL
ippl
src
DataSource
FieldDataSource.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_DATA_SOURCE_H
12
#define FIELD_DATA_SOURCE_H
13
14
/***********************************************************************
15
*
16
* class FieldDataSource
17
*
18
* FieldDataSource is a specific version of DataSourceObject which takes
19
* the data for a given Field and formats it properly for use by other
20
* agencies. This initial version collects all the data onto a parent node
21
* and then formats it for the desired agency. This is done by calling a
22
* virtual method 'insert_data' for each LField worth of data collected onto
23
* the master node. Future versions will properly redistribute the data
24
* based on the needs of the recipient.
25
*
26
* Subclasses must provide versions of the DataSourceObject virtual functions,
27
* as well as the insert_data virtual function.
28
*
29
* This is a rewrite of some sections of FieldView.
30
*
31
***********************************************************************/
32
33
// include files
34
#include "
DataSource/DataSourceObject.h
"
35
36
37
// forward declarations
38
template
<
class
T,
unsigned
Dim,
class
Mesh,
class
Centering>
class
Field
;
39
template
<
class
T,
unsigned
Dim>
class
CompressedBrickIterator
;
40
template
<
unsigned
Dim>
class
NDIndex
;
41
42
43
template
<
class
T,
unsigned
Dim,
class
M,
class
C>
44
class
FieldDataSource
:
public
DataSourceObject
{
45
46
public
:
47
// constructor: the name, the connection, the transfer method,
48
// the field to connect, and the parent node
49
FieldDataSource
(
const
char
*,
DataConnect
*,
int
,
Field<T,Dim,M,C>
&);
50
51
// destructor
52
virtual
~FieldDataSource
();
53
54
protected
:
55
// the field to connect
56
Field<T,Dim,M,C>
&
MyField
;
57
58
// the function which performs the work to gather data onto one node
59
void
gather_data
();
60
61
// copy the data out of the given LField iterator (which is occupying the
62
// given domain) and into the library-specific structure
63
virtual
void
insert_data
(
const
NDIndex<Dim>
&,
64
CompressedBrickIterator<T,Dim>
) = 0;
65
};
66
67
#include "
DataSource/FieldDataSource.hpp
"
68
69
#endif
// FIELD_DATA_SOURCE_H
70
71
/***************************************************************************
72
* $RCSfile: FieldDataSource.h,v $ $Author: adelmann $
73
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
74
* IPPL_VERSION_ID: $Id: FieldDataSource.h,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
75
***************************************************************************/
DataSourceObject.h
FieldDataSource.hpp
DataConnect
Definition
DataConnect.h:32
DataSourceObject
Definition
DataSourceObject.h:53
Field
Definition
Field.h:33
CompressedBrickIterator
Definition
CompressedBrickIterator.h:49
NDIndex
Definition
NDIndex.h:74
FieldDataSource
Definition
FieldDataSource.h:44
FieldDataSource::gather_data
void gather_data()
Definition
FieldDataSource.hpp:56
FieldDataSource::insert_data
virtual void insert_data(const NDIndex< Dim > &, CompressedBrickIterator< T, Dim >)=0
FieldDataSource::~FieldDataSource
virtual ~FieldDataSource()
Definition
FieldDataSource.hpp:48
FieldDataSource::MyField
Field< T, Dim, M, C > & MyField
Definition
FieldDataSource.h:56
Generated on Tue Apr 14 2026 07:18:43 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.8