From 8c5343b1d608d7cbfd907aebaf9d0f36f8cfec2a Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 7 Dec 2008 19:19:41 +0000 Subject: [PATCH] fix combineTime with adaptive views --- Fltk/classificationEditor.h | 3 +-- Post/PViewDataList.cpp | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Fltk/classificationEditor.h b/Fltk/classificationEditor.h index 29443dd961..439359b7a4 100644 --- a/Fltk/classificationEditor.h +++ b/Fltk/classificationEditor.h @@ -25,8 +25,7 @@ #define CLASSTOGBUTTON_CLOS 1 #define CLASSVALUE_ANGLE 0 -class edge_angle -{ +class edge_angle { public : MVertex *v1, *v2; double angle; diff --git a/Post/PViewDataList.cpp b/Post/PViewDataList.cpp index 962247989e..f30d369c2e 100644 --- a/Post/PViewDataList.cpp +++ b/Post/PViewDataList.cpp @@ -666,8 +666,13 @@ bool PViewDataList::combineSpace(nameData &nd) } // copy interpolation from first merged dataset, if any - if(!i) _interpolation = l->_interpolation; - + if(!i){ + for(std::map<int, std::vector<Double_Matrix*> >::iterator it = + l->_interpolation.begin(); it != l->_interpolation.end(); it++) + for(unsigned int i = 0; i < it->second.size(); i++) + _interpolation[it->first].push_back(new Double_Matrix(*it->second[i])); + } + // merge elememts List_Merge(l->SP, SP); NbSP += l->NbSP; List_Merge(l->VP, VP); NbVP += l->NbVP; List_Merge(l->TP, TP); NbTP += l->NbTP; List_Merge(l->SL, SL); NbSL += l->NbSL; @@ -790,8 +795,11 @@ bool PViewDataList::combineTime(nameData &nd) } NbT2 = data[0]->NbT2; NbT3 = data[0]->NbT3; - _interpolation = data[0]->_interpolation; - + for(std::map<int, std::vector<Double_Matrix*> >::iterator it = + data[0]->_interpolation.begin(); it != data[0]->_interpolation.end(); it++) + for(unsigned int i = 0; i < it->second.size(); i++) + _interpolation[it->first].push_back(new Double_Matrix(*it->second[i])); + // merge values for all element types for(int i = 0; i < 24; i++){ getRawData(i, &list, &nbe, &nbc, &nbn); @@ -807,7 +815,7 @@ bool PViewDataList::combineTime(nameData &nd) List_Add(list, List_Pointer(list2, j * nb2 + l)); } // copy values of elm j - for(int l = 0; l < data[k]->getNumTimeSteps() * nbc2 * nbn2; l++) + for(int l = 0; l < nb2 - 3 * nbn2; l++) List_Add(list, List_Pointer(list2, j * nb2 + 3 * nbn2 + l)); } } -- GitLab