Function3d.h 1.11 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2018 The Regents of the University of California
//
// This file is part of Qbox
//
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
// the License, or (at your option) any later version.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
// Function3d.h
//
////////////////////////////////////////////////////////////////////////////////

#ifndef FUNCTION3D_H
#define FUNCTION3D_H

#include "D3vector.h"
#include <vector>
#include <string>
#include <map>

class Function3d
{
  public:

31 32 33 34
  D3vector a, b, c;  // domain size
  int nx, ny, nz;    // grid size
  std::string name;
  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