diff options
author | Ilhan Özgen Xian <iozgen@lbl.gov> | 2021-10-20 09:55:36 -0700 |
---|---|---|
committer | Ilhan Özgen Xian <iozgen@lbl.gov> | 2021-10-20 09:55:36 -0700 |
commit | 3d8d8a339af4cd7bec93e7a17de0f090e98cae08 (patch) | |
tree | 9cb247587a8240294e8a48a9c7f3343c9dc55295 | |
parent | ff84ad5b38544156594e83a8347e65463d14c4a2 (diff) | |
parent | d10c0349b032bae0f9086577549beda87cf71e8f (diff) |
Merge branch 'subgrid' of ssh://brewington.uberspace.de/home/zgxn/repositories/work/agent-provocateur into subgridsubgrid
-rw-r--r-- | header.hpp | 7 | ||||
-rw-r--r-- | makefile | 4 | ||||
-rw-r--r-- | mesh.hpp | 16 |
3 files changed, 15 insertions, 12 deletions
@@ -27,8 +27,11 @@ #define INFILTRATE_TRUE 1 #define INFILTRATE_FALSE 2 -#define MESH_MIXED_ELEMENTS "/0/Mesh/MixedElements" -#define MESH_NODES "/0/Mesh/Nodes" +#define SURFACE_MESH_MIXED_ELEMENTS "/0/Mesh/MixedElements" +#define SURFACE_MESH_NODES "/0/Mesh/Nodes" + +#define SUBSURFACE_MESH_MIXED_ELEMENTS "/77/Mesh/MixedElements" +#define SUBSURFACE_MESH_NODES "/77/Mesh/Nodes" #define SURFACE_EXCHANGE_FLUX "surface-surface_subsurface_flux.cell.0" #define SURFACE_WATER_DEPTH "surface-ponded_depth.cell.0" @@ -1,10 +1,10 @@ PRG=ptracker -CC=g++-11 +CC=g++ #CC=mpic++ CXXFLAGS=-Wall -Wextra -pedantic -O0 -fopenmp #LFLAGS=-I/home/iozgen/Documents/software/hdf5/include -L/home/iozgen/Documents/software/hdf5/lib -LFLAGS=-I/opt/hdf5/include -L/opt/hdf5/lib +LFLAGS=-I/global/home/users/iozgen/stuff/hdf5/include -L/global/home/users/iozgen/stuff/hdf5/lib SRC=main.cpp LIB=-lm -lhdf5 -lhdf5_cpp OBJ=$(SRC:.cpp=.o) @@ -65,11 +65,11 @@ public: std::cout << "[msh] surface mesh indexing" << std::endl; std::vector<std::vector<int>> node_indices; - read_node_indices(fp_surface, node_indices); + read_node_indices(fp_surface, node_indices, SURFACE_MESH_MIXED_ELEMENTS); n_vertices = node_indices[0].size(); std::vector<point> nodes; - read_nodes(fp_surface, nodes); + read_nodes(fp_surface, nodes, SURFACE_MESH_NODES); initialise_surface(node_indices, nodes); @@ -82,10 +82,10 @@ public: for (size_t i = 0; i < node_indices.size(); i ++) node_indices[i].clear(); - read_node_indices(fp_subsurface, node_indices); + read_node_indices(fp_subsurface, node_indices, SUBSURFACE_MESH_MIXED_ELEMENTS); nodes.clear(); - read_nodes(fp_subsurface, nodes); + read_nodes(fp_subsurface, nodes, SUBSURFACE_MESH_NODES); // @@ -408,10 +408,10 @@ private: // --- // read the node indices from hdf5 file // --- - void read_node_indices(H5::H5File fp, std::vector<std::vector<int>> &node_indices) + void read_node_indices(H5::H5File fp, std::vector<std::vector<int>> &node_indices, std::string node_index_str) { - H5::DataSet dset = fp.openDataSet(MESH_MIXED_ELEMENTS); + H5::DataSet dset = fp.openDataSet(node_index_str.c_str()); H5::DataType dtype = dset.getDataType(); H5::DataSpace dspace = dset.getSpace(); @@ -455,10 +455,10 @@ private: // --- // read in the coordinates from the hdf5 file // --- - void read_nodes(H5::H5File fp, std::vector<point> &nodes) + void read_nodes(H5::H5File fp, std::vector<point> &nodes, std::string mesh_nodes_str) { - H5::DataSet dset = fp.openDataSet(MESH_NODES); + H5::DataSet dset = fp.openDataSet(mesh_nodes_str.c_str()); H5::DataType dtype = dset.getDataType(); H5::DataSpace dspace = dset.getSpace(); |