PSCF v1.4.0
cFieldIo.h
1#ifndef PRDC_CFIELD_IO_H
2#define PRDC_CFIELD_IO_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/math/IntVec.h> // Template with a default parameter
12
13// Forward class declarations
14namespace Util {
15 template <typename T> class DArray;
16}
17
18namespace Pscf {
19namespace Prdc {
20
21 using namespace Util;
22
23 // Templates for complex field data IO
24
44 template <int D, class AT>
45 void readCFieldsData(std::istream& in,
46 DArray< AT >& fields,
47 IntVec<D> const & dimensions);
48
66 template <int D, class AT>
67 void readCFieldData(std::istream& in,
68 AT& field,
69 IntVec<D> const& dimensions);
70
88 template <int D, class AT, typename CT, typename RT>
89 void writeCFieldsData(std::ostream& out,
90 DArray< AT > const& fields,
91 IntVec<D> const& dimensions);
92
110 template <int D, class AT, typename CT, typename RT>
111 void writeCFieldData(std::ostream& out,
112 AT const& field,
113 IntVec<D> const& dimensions);
114
115} // namespace Prdc
116} // namespace Pscf
117#include "cFieldIo.tpp"
118#endif
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition IntVec.h:27
Dynamically allocatable contiguous array template.
Definition DArray.h:32
void writeCFieldsData(std::ostream &out, DArray< AT > const &fields, IntVec< D > const &dimensions)
Write data for an array of complex fields, with no header section.
Definition cFieldIo.tpp:64
void readCFieldData(std::istream &in, AT &field, IntVec< D > const &dimensions)
Read data for a single complex field, with no header section.
Definition cFieldIo.tpp:45
void writeCFieldData(std::ostream &out, AT const &field, IntVec< D > const &dimensions)
Write data for a single complex field, with no header section.
Definition cFieldIo.tpp:86
void readCFieldsData(std::istream &in, DArray< AT > &fields, IntVec< D > const &dimensions)
Read data for an array of complex fields, with no header section.
Definition cFieldIo.tpp:22
Periodic fields and crystallography.
Definition complex.cpp:11
PSCF package top-level namespace.
Utility classes for scientific computation.