PSCF v1.3
complex.cpp
1/*
2* PSCF - Polymer Self-Consistent Field
3*
4* Copyright 2015 - 2025, The Regents of the University of Minnesota
5* Distributed under the terms of the GNU General Public License.
6*/
7
8#include "complex.h"
9
10namespace Pscf {
11namespace Prdc {
12namespace Cpu {
13
14 /*
15 * Stream extraction operator for fftw_complex.
16 */
17 std::istream& operator >> (std::istream& is, fftw_complex& z)
18 {
19 is >> z[0] >> z[1];
20 return is;
21 }
22
23 /*
24 * Stream insertion operator for fftw_complex.
25 */
26 std::ostream& operator << (std::ostream& os, fftw_complex const & z)
27 {
28 os << z[0] << " " << z[1];
29 return os;
30 }
31
32}
33}
34}
Fields and FFTs for periodic boundary conditions (CPU)
Definition CField.cpp:12
Periodic fields and crystallography.
Definition CField.cpp:11
PSCF package top-level namespace.
Definition param_pc.dox:1
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
Definition Pair.h:44
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.
Definition Pair.h:57