From 9a48710988cd38a596e3170c34b6608f2a4753d2 Mon Sep 17 00:00:00 2001 From: Christoph Wintersteiger Date: Wed, 29 Mar 2017 11:22:29 +0200 Subject: [PATCH] add implementation of GetBoundaryNeighbouringDomains --- libsrc/include/nginterface_v2.hpp | 4 ++-- libsrc/interface/nginterface_v2.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/libsrc/include/nginterface_v2.hpp b/libsrc/include/nginterface_v2.hpp index d2407ea8..6dd9ff07 100644 --- a/libsrc/include/nginterface_v2.hpp +++ b/libsrc/include/nginterface_v2.hpp @@ -271,8 +271,8 @@ namespace netgen // returns domain numbers of domains next to boundary bnr -> (domin, domout) // 3D only - // std::pair GetBoundaryNeighbouringDomains (int bnr); - + std::pair GetBoundaryNeighbouringDomains (int bnr); + void Refine (NG_REFINEMENT_TYPE reftype, void (*taskmanager)(function) = &DummyTaskManager2); diff --git a/libsrc/interface/nginterface_v2.cpp b/libsrc/interface/nginterface_v2.cpp index d7548127..509d1274 100644 --- a/libsrc/interface/nginterface_v2.cpp +++ b/libsrc/interface/nginterface_v2.cpp @@ -141,6 +141,16 @@ namespace netgen return -1; } + std::pair Ngx_Mesh :: GetBoundaryNeighbouringDomains (int bnr) + { + if ( mesh->GetDimension() == 3 ) + return std::pair(mesh->GetFaceDescriptor(bnr+1).DomainIn(), + mesh->GetFaceDescriptor(bnr+1).DomainOut()); + else + return std::pair(-1,-1); + } + + /* Ng_Point Ngx_Mesh :: GetPoint (int nr) const {