GEOSX
ChomboCoupler.hpp
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 Total, S.A
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
15 #ifndef GEOSX_FILEIO_COUPLING_CHOMBOCOUPLER_HPP_
16 #define GEOSX_FILEIO_COUPLING_CHOMBOCOUPLER_HPP_
17 
18 #include "common/DataTypes.hpp"
19 #include "mesh/MeshLevel.hpp"
20 
21 #include <string>
22 
23 namespace geosx
24 {
25 
32 {
33 public:
34 
42  ChomboCoupler( MPI_Comm const comm, const std::string & outputPath, const std::string & inputPath, MeshLevel & mesh );
43 
48  void write( double dt );
49 
54  void read( bool usePressures );
55 
56 private:
63  void copyNodalData();
64 
66  MPI_Comm const m_comm;
68  std::string const m_outputPath;
70  std::string const m_inputPath;
72  std::int64_t m_face_offset;
74  std::int64_t m_n_faces_written;
76  std::int64_t m_node_offset;
78  std::int64_t m_n_nodes_written;
80  MeshLevel & m_mesh;
82  int m_counter;
84  array2d< real64 > m_referencePositionCopy;
86  array2d< real64 > m_displacementCopy;
88  array2d< real64 > m_velocityCopy;
89 };
90 
91 } /* namespace geosx */
92 
93 #endif /* GEOSX_FILEIO_COUPLING_CHOMBOCOUPLER_HPP_ */
void read(bool usePressures)
Read data from file.
void write(double dt)
Write data to file.
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:38
A class managing data exchange with CHOMBO.
ChomboCoupler(MPI_Comm const comm, const std::string &outputPath, const std::string &inputPath, MeshLevel &mesh)
Construct a new ChomboCoupler.
std::string string
String type.
Definition: DataTypes.hpp:131
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
Definition: Array.hpp:55