From 2bcacf23da1468e7fc820c20550ae0476a701982 Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Wed, 17 Mar 2010 14:53:19 +0000 Subject: [PATCH] dg : oups, 2 bugs in the previous commit --- Solver/dgGroupOfElements.cpp | 4 +--- Solver/dgGroupOfElements.h | 1 - Solver/dgRungeKuttaMultirate.cpp | 21 ++++++++++++++++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Solver/dgGroupOfElements.cpp b/Solver/dgGroupOfElements.cpp index 11e57af596..1d508fd4ac 100644 --- a/Solver/dgGroupOfElements.cpp +++ b/Solver/dgGroupOfElements.cpp @@ -556,7 +556,7 @@ void dgGroupCollection::buildGroupsOfInterfaces() if (!groupStart->isFullGhost(*this)) { std::vector<dgMiniInterface> group(groupStart, groupEnd); if (groupStart->connections.size() == 1) { - _boundaryGroups.push_back (new dgGroupOfFaces (*this, group, pOrder) ); + _faceGroups.push_back (new dgGroupOfFaces (*this, group, pOrder) ); } else { _faceGroups.push_back (new dgGroupOfFaces (*this, group, pOrder) ); } @@ -1193,8 +1193,6 @@ dgGroupCollection::~dgGroupCollection() delete _elementGroups[i]; for (int i=0; i< _faceGroups.size(); i++) delete _faceGroups[i]; - for (int i=0; i< _boundaryGroups.size(); i++) - delete _boundaryGroups[i]; for (int i=0; i< _ghostGroups.size(); i++) delete _ghostGroups[i]; } diff --git a/Solver/dgGroupOfElements.h b/Solver/dgGroupOfElements.h index 9c3e5a2506..58c08665b7 100644 --- a/Solver/dgGroupOfElements.h +++ b/Solver/dgGroupOfElements.h @@ -219,7 +219,6 @@ class dgGroupCollection { GModel *_model; std::vector<dgGroupOfElements*> _elementGroups; //volume std::vector<dgGroupOfFaces*> _faceGroups; //interface - std::vector<dgGroupOfFaces*> _boundaryGroups; //boundary std::vector<dgGroupOfElements*> _ghostGroups; //ghost volume //{group,id} of the elements to send to each partition for a scatter operation diff --git a/Solver/dgRungeKuttaMultirate.cpp b/Solver/dgRungeKuttaMultirate.cpp index 204eb10d70..ece9287147 100644 --- a/Solver/dgRungeKuttaMultirate.cpp +++ b/Solver/dgRungeKuttaMultirate.cpp @@ -112,8 +112,10 @@ dgRungeKuttaMultirate::dgRungeKuttaMultirate(dgGroupCollection* gc,dgConservatio } for(int iGroup=0;iGroup<gc->getNbFaceGroups();iGroup++){ dgGroupOfFaces *gf=gc->getFaceGroup(iGroup); + /*if(gf->getNbGroupOfConnections()!=2) + continue;*/ for(int i=0;i<gf->getNbGroupOfConnections();i++){ - const dgGroupOfElements *ge = &gf->getGroupOfConnections(0).getGroupOfElements(); + const dgGroupOfElements *ge = &gf->getGroupOfConnections(i).getGroupOfElements(); if(ge->getIsInnerMultirateBuffer()){ _innerBufferGroupsOfElements[ge->getMultirateExponent()].second.push_back(gf); } @@ -124,6 +126,23 @@ dgRungeKuttaMultirate::dgRungeKuttaMultirate(dgGroupCollection* gc,dgConservatio } } } + /*for(int iGroup=0;iGroup<gc->getNbFaceGroups();iGroup++){ + dgGroupOfFaces *gf=gc->getFaceGroup(iGroup); + if(gf->getNbGroupOfConnections()!=1) + continue; + const dgGroupOfElements *ge[1]; + ge[0]=&gf->getGroupOfConnections(0).getGroupOfElements(); + for(int i=0;i<1;i++){ + if(ge[i]->getIsInnerMultirateBuffer()){ + _innerBufferGroupsOfElements[ge[i]->getMultirateExponent()].second.push_back(gf); + } + else if(ge[i]->getIsOuterMultirateBuffer()){ + _outerBufferGroupsOfElements[ge[i]->getMultirateExponent()].second.push_back(gf); + }else{ + _bulkGroupsOfElements[ge[i]->getMultirateExponent()].second.push_back(gf); + } + } + }*/ // Removing duplicate entries for(int iExp=0;iExp<=_maxExponent;iExp++){ std::vector<dgGroupOfFaces*>*v[3]; -- GitLab