1 //////////////////////////////////////////////////////////////////////////////// 2 // 3 // Copyright (c) 2018 The Regents of the University of California 4 // 5 // This file is part of Qbox 6 // 7 // Qbox is distributed under the terms of the GNU General Public License 8 // as published by the Free Software Foundation, either version 2 of 9 // the License, or (at your option) any later version. 10 // See the file COPYING in the root directory of this distribution 11 // or <http://www.gnu.org/licenses/>. 12 // 13 //////////////////////////////////////////////////////////////////////////////// 14 // 15 // Function3d.h 16 // 17 //////////////////////////////////////////////////////////////////////////////// 18 19 #ifndef FUNCTION3D_H 20 #define FUNCTION3D_H 21 22 #include "D3vector.h" 23 #include <vector> 24 #include <string> 25 #include <map> 26 27 class Function3d 28 { 29 public: 30 31 D3vector a, b, c; // domain size 32 int nx, ny, nz; // grid size 33 std::string name; 34 std::vector<double> val; 35 void read(std::string filename); 36 void write(std::string filename) const; 37 void print(std::ostream& os) const; 38 }; 39 std::ostream& operator << ( std::ostream& os, const Function3d& f ); 40 #endif 41