From d533a816a00d202c3a92c06c0fd7e5125d2cb7c7 Mon Sep 17 00:00:00 2001 From: "Halvor M. Nilsen" Date: Thu, 20 Oct 2011 17:26:08 +0200 Subject: [PATCH] compile after changes of calculation of transmissiblities --- src/GridAdapter.hpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/GridAdapter.hpp b/src/GridAdapter.hpp index 2b859284..b4bdfc88 100644 --- a/src/GridAdapter.hpp +++ b/src/GridAdapter.hpp @@ -156,7 +156,24 @@ public: && cell_centroids_ == other.cell_centroids_ && cell_volumes_ == other.cell_volumes_; } - + // make a grid which looks periodic but do not have 2 half faces for each + // periodic boundary + void makeQPeriodic(const std::vector& hf_ind,const std::vector& periodic_cells){ + for(int i=0; i cells; + int& cell0=face_cells_[2*cell_faces_[ hf_ind[i] ]+0]; + int& cell1=face_cells_[2*cell_faces_[ hf_ind[i] ]+1]; + assert(periodic_cells[2*i+1]>=0); + if(periodic_cells[2*i+0] == cell0){ + assert(cell1==-1); + cell1=periodic_cells[2*i+1]; + }else{ + assert(periodic_cells[2*i+0] == cell1); + assert(cell0==-1); + cell0=periodic_cells[2*i+1]; + } + } + } private: grid_t g_; // Topology storage.