MimmoPiercedVector.tpp
1 /*---------------------------------------------------------------------------*\
2  *
3  * mimmo
4  *
5  * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6  *
7  * -------------------------------------------------------------------------
8  * License
9  * This file is part of mimmo.
10  *
11  * mimmo is free software: you can redistribute it and/or modify it
12  * under the terms of the GNU Lesser General Public License v3 (LGPL)
13  * as published by the Free Software Foundation.
14  *
15  * mimmo is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with mimmo. If not, see <http://www.gnu.org/licenses/>.
22  *
23 \*---------------------------------------------------------------------------*/
24 
31 template< typename T>
33 
34  element.clear();
36  buffer >> geo;
37  element.setGeometry(geo);
38  std::string name;
39  buffer>>name;
40  element.setName(name);
41 
42  int loc_;
43  buffer >> loc_;
44  element.setDataLocation(static_cast<mimmo::MPVLocation>(loc_));
45 
46  std::size_t nP;
47  buffer >> nP;
48 
49  T val;
50  long int id;
51  for (std::size_t i = 0; i < nP; ++i) {
52  buffer >> id;
53  buffer >> val;
54  element.insert(id, val);
55  }
56  return buffer;
57 };
58 
65 template<typename T>
67 
68  buffer << element.getGeometry();
69 
70  std::string name = element.getName();
71  buffer << name;
72  buffer << static_cast<int>(element.getConstDataLocation());
73  buffer << (std::size_t)element.size();
74  auto itE = element.cend();
75  for (auto it=element.cbegin(); it!=itE; it++){
76  buffer << it.getId();
77  buffer << *it;
78  }
79  return buffer;
80 };
81 
82 
83 namespace mimmo{
84 
90 template<typename mpv_t>
92  m_geometry = geo;
93  m_loc = loc;
94  m_log = &bitpit::log::cout(MIMMO_LOG_FILE);
95  m_name = "data";
96 }
97 
101 template<typename mpv_t>
103 
108 template<typename mpv_t>
109 MimmoPiercedVector<mpv_t>::MimmoPiercedVector(const MimmoPiercedVector<mpv_t> & other):bitpit::PiercedVector<mpv_t,long int>(other){
110  this->m_geometry = other.m_geometry;
111  this->m_loc = other.m_loc;
112  this->m_name = other.m_name;
113  m_log = &bitpit::log::cout(MIMMO_LOG_FILE);
114 };
115 
120 template<typename mpv_t>
122  this->swap(other);
123  return *this;
124 };
125 
130 template<typename mpv_t>
131 MimmoPiercedVector<mpv_t> & MimmoPiercedVector<mpv_t>::operator =(bitpit::PiercedVector<mpv_t, long int> other){
132 
133  this->bitpit::PiercedVector<mpv_t, long int>::swap(other);
134  return *this;
135 };
136 
142 template<typename mpv_t>
144 {
145  std::swap(this->m_geometry, x.m_geometry);
146  std::swap(this->m_loc, x.m_loc);
147  this->m_name.swap(x.m_name);
148  this->bitpit::PiercedVector<mpv_t, long int>::swap(x);
149 }
150 
151 
155 template<typename mpv_t>
156 void
158  m_geometry = nullptr;
159  m_name = "data";
160  m_loc = MPVLocation::UNDEFINED;
161  bitpit::PiercedVector<mpv_t, long int>::clear();
162 }
163 
168 template<typename mpv_t>
171  return m_geometry;
172 }
173 
178 template<typename mpv_t>
181  return m_loc;
182 }
183 
188 template<typename mpv_t>
191  return m_loc;
192 }
193 
198 template<typename mpv_t>
199 std::string
201  return m_name;
202 }
203 
212 template<typename mpv_t>
213 std::vector<mpv_t>
215  if(getGeometry() == nullptr) return std::vector<mpv_t>();
216  livector1D ids = getGeometryIds(ordered);
217  std::vector<mpv_t> result;
218  result.reserve(this->size());
219  for(long id : ids){
220  if(this->exists(id)){
221  result.push_back(this->at(id));
222  }
223  }
224  result.shrink_to_fit();
225  return result;
226 }
227 
236 template<typename mpv_t>
237 std::vector<mpv_t>
239  if(getGeometry() == nullptr) return std::vector<mpv_t>(0);
240  std::vector<mpv_t> result;
241  livector1D ids;
242  std::unordered_set<long> ids_;
243  switch (getDataLocation())
244  {
245  case MPVLocation::CELL:
246  result.reserve(getGeometry()->getPatch()->getInternalCellCount());
247  ids = getGeometryIds(ordered);
248  for(const auto val: ids){
249  if(this->exists(val) && getGeometry()->getPatch()->getCell(val).isInterior()){
250  result.push_back((*this)[val]);
251  }
252  }
253  break;
254  case MPVLocation::POINT:
255  result.reserve(getGeometry()->getPatch()->getVertexCount());
256  for (auto & cell : getGeometry()->getCells()){
257  if (cell.isInterior()){
258  for (long id : cell.getVertexIds())
259  ids_.insert(id);
260  }
261  }
262  ids = getGeometryIds(ordered);
263  for(const auto val: ids){
264  if(this->exists(val) && ids_.count(val)){
265  result.push_back((*this)[val]);
266  }
267  }
268  break;
269  case MPVLocation::INTERFACE:
270  result.reserve(getGeometry()->getPatch()->getInterfaceCount());
271  //Interfaces ghost/ghost are not stored in bitpit::PathcKernel, so use all the interfaces in the geometry
272  ids = getGeometryIds(ordered);
273  for(const auto val: ids){
274  if(this->exists(val)){
275  result.push_back((*this)[val]);
276  }
277  }
278  break;
279  default:
280  break;
281  }
282  if (squeeze)
283  result.shrink_to_fit();
284  return result;
285 }
286 
295 template<typename mpv_t>
296 std::vector<mpv_t>
298  livector1D ids = this->getIds(ordered);
299  std::vector<mpv_t> result(this->size());
300  int counter= 0;
301  for(const auto val: ids){
302  result[counter] = (*this)[val];
303  ++counter;
304  }
305  return result;
306 }
307 
312 template<typename mpv_t>
313 void
315  m_geometry = geo;
316 }
317 
322 template<typename mpv_t>
323 void
325  m_loc = loc;
326 }
327 
333 template<typename mpv_t>
334 void
336  loc = std::max(0, loc);
337  if (loc > 3) loc =0;
338  setDataLocation(static_cast<MPVLocation>(loc));
339 }
340 
346 template<typename mpv_t>
347 void
348 MimmoPiercedVector<mpv_t>::setData(std::vector<mpv_t>& data){
349  bitpit::PiercedVector<mpv_t, long int>::clear();
350  long int id = 0;
351  this->reserve(data.size());
352  for(const auto val: data){
353  this->insert(id, val);
354  id++;
355  }
356 }
357 
362 template<typename mpv_t>
363 void
365  m_name = name;
366 }
367 
376 template<typename mpv_t>
377 bool
379  if(getGeometry()==nullptr) return false;
380  bool check = false;
381  switch(m_loc){
382  case MPVLocation::CELL:
383  check = (this->size()==m_geometry->getPatch()->getCells().size());
384  break;
385  case MPVLocation::INTERFACE:
386  {
387  size_t sizeInterfaces = m_geometry->getPatch()->getInterfaces().size();
388  check = (this->size()==sizeInterfaces);
389  }
390  break;
391  case MPVLocation::POINT:
392  check = (this->size()==m_geometry->getPatch()->getVertices().size());
393  break;
394  default:
395  check=false;
396  (*m_log)<<"NO suitable location data found to perform data size coherence check"<<std::endl;
397  break;
398  }
399  return check;
400 }
401 
410 template<typename mpv_t>
411 bool
413  if(getGeometry()==nullptr) return false;
414  if (this->isEmpty()) return true;
415  auto ids = this->getIds();
416  bool check = true;
417  switch(m_loc){
418  case MPVLocation::CELL:
419  {
420  auto vcell = m_geometry->getPatch()->getCells();
421  for(auto el : ids){
422  check =check && vcell.exists(el);
423  }
424  }
425  break;
426  case MPVLocation::INTERFACE:
427  {
428  auto vint = m_geometry->getPatch()->getInterfaces();
429  for(auto el : ids){
430  check =check && vint.exists(el);
431  }
432  }
433  break;
434  case MPVLocation::POINT:
435  {
436  auto vvert = m_geometry->getPatch()->getVertices();
437  for(auto el = this->begin(); el != this->end(); el++ ){
438  check =check && vvert.exists(el.getId());
439  }
440  }
441  break;
442  default:
443  check = false;
444  (*m_log)<<"NO suitable location data found to perform ids coherence check"<<std::endl;
445  break;
446  }
447  return check;
448 }
449 
456 template<typename mpv_t>
459 
460  MimmoPiercedVector<mpv_t> result(this->getGeometry(), m_loc);
461  if(!this->getGeometry()) return result;
462 
463  switch(m_loc){
464 
465  case MPVLocation::CELL:
466  {
467  bitpit::PiercedVector<bitpit::Cell> & cells = m_geometry->getCells();
468  result.reserve(cells.size());
469  long id;
470  for(auto it=this->begin(); it!=this->end(); ++it){
471  id = it.getId();
472  if(cells.exists(id)){
473  result.insert(id, *it);
474  }
475  }
476  }
477  break;
478  case MPVLocation::INTERFACE:
479  {
480  bitpit::PiercedVector<bitpit::Interface> & interfaces = m_geometry->getInterfaces();
481  result.reserve(interfaces.size());
482  long id;
483  for(auto it=this->begin(); it!=this->end(); ++it){
484  id = it.getId();
485  if(interfaces.exists(id)){
486  result.insert(id, *it);
487  }
488  }
489  }
490  break;
491  case MPVLocation::POINT:
492  {
493  bitpit::PiercedVector<bitpit::Vertex> & verts = m_geometry->getVertices();
494  result.reserve(verts.size());
495  long id;
496  for(auto it=this->begin(); it!=this->end(); ++it){
497  id = it.getId();
498  if(verts.exists(id)){
499  result.insert(id, *it);
500  }
501  }
502  }
503  break;
504  default:
505  (*m_log)<<"NO suitable location data found to perform ids coherent resizing "<<std::endl;
506  break;
507  }
508  return result;
509 }
510 
511 
516 template<typename mpv_t>
517 bool
519  return !(value<0 && value>3) ;
520 }
521 
528 template<typename mpv_t>
531  if(getGeometry()==nullptr) return livector1D(0);
532  switch(m_loc){
533  case MPVLocation::POINT:
534  return getGeometry()->getVertices().getIds(ordered);
535  break;
536  case MPVLocation::CELL:
537  return getGeometry()->getCells().getIds(ordered);
538  break;
539  case MPVLocation::INTERFACE:
540  return getGeometry()->getInterfaces().getIds(ordered);
541  break;
542  default:
543  return livector1D(0);
544  break;
545  }
546 }
547 
551 template<typename mpv_t>
552 bool
554  return this->size() == size_t(0);
555 }
556 
565 template<typename mpv_t>
566 bool
568 
569  if(!this->checkDataIdsCoherence()) return false;
570  if(!this->checkDataSizeCoherence()){
571 
572  livector1D ids = this->getGeometryIds();
573  this->reserve(ids.size());
574  for(auto id: ids){
575  if(!this->exists(id)) this->insert(id, defValue);
576  }
577  }
578  return true;
579 }
580 
591 template<typename mpv_t>
592 void
594 
595  switch(loc){
596  case MPVLocation::POINT :
597  {
598  this->clear();
599  this->reserve(geo->getNVertices());
600  m_geometry = geo;
601  m_loc = loc;
602  for(const auto & vertex: geo->getVertices()){
603  this->insert(vertex.getId(), data);
604  }
605  }
606  break;
607  case MPVLocation::CELL :
608  {
609  this->clear();
610  this->reserve(geo->getNCells());
611  m_geometry = geo;
612  m_loc = loc;
613  for(const auto & cell: geo->getCells()){
614  this->insert(cell.getId(), data);
615  }
616  }
617  break;
618  case MPVLocation::INTERFACE :
619  if(geo->getInterfacesSyncStatus() != SyncStatus::SYNC){
620  (*m_log)<<"MimmoPiercedVector warning: geometry interfaces are not built"<<std::endl;
621  }
622  {
623  this->clear();
624  this->reserve(geo->getPatch()->getInterfaceCount());
625  m_geometry = geo;
626  m_loc = loc;
627  for(const auto & interf: geo->getInterfaces()){
628  this->insert(interf.getId(), data);
629  }
630  }
631  break;
632  default:
633  //do nothing
634  break;
635  }
636 }
637 
644 template<typename mpv_t>
646  MimmoSharedPointer<MimmoObject> geo = this->getGeometry();
647  MimmoPiercedVector<mpv_t> cellData(geo, MPVLocation::CELL);
648  MimmoPiercedVector<double> sumWeights(geo, MPVLocation::POINT);
649  for (bitpit::Cell & cell : geo->getCells()){
650  long idcell = cell.getId();
651  std::array<double,3> center = geo->getPatch()->evalCellCentroid(idcell);
652  mpv_t data{};
653  bool init = false;
654  for (long idvertex : cell.getVertexIds()){
655  std::array<double,3> point = geo->getPatch()->getVertexCoords(idvertex);
656  double weight = 1. / std::pow(norm2(center-point),p);
657  if (!init){
658  data = this->at(idvertex)*weight;
659  sumWeights.insert(idcell, weight);
660  init = true;
661  }
662  else{
663  data = data + this->at(idvertex)*weight;
664  sumWeights[idcell] = sumWeights[idcell] + weight;
665  }
666  }
667  data = data / sumWeights[idcell];
668  cellData.insert(idcell, data);
669  }
670  return cellData;
671 };
672 
681 template<typename mpv_t>
683  MimmoSharedPointer<MimmoObject> geo = this->getGeometry();
684  MimmoPiercedVector<mpv_t> pointData(geo, MPVLocation::POINT);
685  MimmoPiercedVector<int> countCells(geo, MPVLocation::POINT);
686  MimmoPiercedVector<double> sumWeights(geo, MPVLocation::POINT);
687  for (bitpit::Cell & cell : geo->getCells()){
688  long idcell = cell.getId();
689  if (this->exists(idcell)){
690  std::array<double,3> center = geo->getPatch()->evalCellCentroid(idcell);
691  for (long idvertex : cell.getVertexIds()){
692  std::array<double,3> point = geo->getPatch()->getVertexCoords(idvertex);
693  double weight = 1. / std::pow(norm2(center-point),p);
694  if (!pointData.exists(idvertex)){
695  pointData.insert(idvertex, this->at(idcell)*weight);
696  sumWeights.insert(idvertex, weight);
697  }
698  else{
699  pointData[idvertex] = pointData[idvertex] + this->at(idcell)*weight;
700  sumWeights[idvertex] = sumWeights[idvertex] + weight;
701  }
702  }
703  }
704  }
705  for (bitpit::Vertex & vertex : geo->getVertices()){
706  long idvertex = vertex.getId();
707  if (pointData.exists(idvertex)){
708  pointData[idvertex] = pointData[idvertex] / sumWeights[idvertex];
709  }
710  }
711  return pointData;
712 };
713 
727 template<typename mpv_t>
729  double p = 3.;
730  if (maximum){
731  p = 0.;
732  }
733  MimmoSharedPointer<MimmoObject> geo = this->getGeometry();
734  MimmoPiercedVector<mpv_t> pointData(geo, MPVLocation::POINT);
735  MimmoPiercedVector<double> sumWeights(geo, MPVLocation::POINT);
736  for (bitpit::Cell & cell : geo->getCells()){
737  long idcell = cell.getId();
738  if (this->exists(idcell)){
739  double volume = geo->evalCellVolume(idcell);
740  double weight = 1. / std::pow(volume,p);
741  std::array<double,3> center = geo->getPatch()->evalCellCentroid(idcell);
742  for (long idvertex : cell.getVertexIds()){
743  std::array<double,3> point = geo->getPatch()->getVertexCoords(idvertex);
744  std::array<mpv_t,3> grad({cellGradientsX.at(idcell), cellGradientsY.at(idcell), cellGradientsZ.at(idcell)});
745  mpv_t value;
746  value = this->at(idcell) + this->at(idcell)*(grad[0]*(point-center)[0]);
747  value = value + this->at(idcell)*(grad[1]*(point-center)[1]);
748  value = value + this->at(idcell)*(grad[2]*(point-center)[2]);
749  value = value * weight;
750  if (!pointData.exists(idvertex)){
751  pointData.insert(idvertex, value);
752  sumWeights.insert(idvertex, weight);
753  }
754  else{
755  if (maximum){
756  if (norm2(value) > norm2(pointData[idvertex]))
757  pointData[idvertex] = value;
758  }
759  else{
760  pointData[idvertex] = pointData[idvertex] + value;
761  sumWeights[idvertex] = sumWeights[idvertex] + weight;
762  }
763  }
764  }
765  }
766  }
767  if (!maximum){
768  for (bitpit::Vertex & vertex : geo->getVertices()){
769  long idvertex = vertex.getId();
770  if (pointData.exists(idvertex)){
771  pointData[idvertex] = pointData[idvertex] / sumWeights[idvertex];
772  }
773  }
774  }
775  return pointData;
776 };
777 
784 template<typename mpv_t>
786  MimmoSharedPointer<MimmoObject> geo = this->getGeometry();
787  MimmoPiercedVector<mpv_t> interfaceData(geo, MPVLocation::INTERFACE);
788  MimmoPiercedVector<double> sumWeights(geo, MPVLocation::POINT);
789  for (bitpit::Interface & interface : geo->getInterfaces()){
790  //Check if interface is border
791  if (interface.isBorder()){
792  long idinterface = interface.getId();
793  //Check if interface has at least one node presents in mimmo pierced vector point data
794  std::size_t found = 0;
795  for (long idvertex : interface.getVertexIds()){
796  if (this->exists(idvertex))
797  found++;
798  }
799  if (found == std::size_t(interface.getVertexCount())){
800  //Interpolate value
801  std::array<double,3> center = geo->getPatch()->evalInterfaceCentroid(idinterface);
802  mpv_t data{};
803  bool init = false;
804  for (long idvertex : interface.getVertexIds()){
805  std::array<double,3> point = geo->getPatch()->getVertexCoords(idvertex);
806  double weight = 1. / std::pow(norm2(center-point),p);
807  if (!init){
808  if (this->exists(idvertex)){
809  data = this->at(idvertex)*weight;
810  }
811  sumWeights.insert(idinterface, weight);
812  init = true;
813  }
814  else{
815  if (this->exists(idvertex)){
816  data = data + this->at(idvertex)*weight;
817  }
818  sumWeights[idinterface] = sumWeights[idinterface] + weight;
819  }
820  }
821  data = data / sumWeights[idinterface];
822  interfaceData.insert(idinterface, data);
823  }
824  }
825  }
826  return interfaceData;
827 };
828 
838 template<typename mpv_t>
839 std::size_t
841  long id;
842  std::size_t counter(0);
843  for(auto it= other.begin(); it != other.end(); ++it){
844  id = it.getId();
845  if(this->exists(id)){
846  this->at(id) = *it;
847  counter++;
848  }else if(!strict){
849  this->insert(id, *it);
850  counter++;
851  }
852  }
853  return counter;
854 }
855 
862 template<typename mpv_t>
863 void
864 MimmoPiercedVector<mpv_t>::squeezeOutExcept(const std::vector<long int> & list, bool keepOrder){
865 
866  if(keepOrder){
867  // erase elements in the list then squeeze the piercedvector.
868  std::unordered_set<long> maplist(list.begin(), list.end());
869  MimmoPiercedVector<mpv_t> result (m_geometry, m_loc);
870  result.setName(m_name);
871  result.reserve(maplist.size());
872  for(auto it = this->begin(); it != this->end(); ++it){
873  if(maplist.count(it.getId()) > 0){
874  result.insert(it.getId(), *it);
875  }
876  }
877  this->swap(result);
878  }else{
879  // if the order does not matter, create a new mpv and swap with the current
880  MimmoPiercedVector<mpv_t> result (m_geometry, m_loc);
881  result.setName(m_name);
882  for(long id: list){
883  if(this->exists(id)){
884  result.insert(id, this->at(id));
885  }
886  }
887  this->swap(result);
888  }
889 }
890 
897 template<typename mpv_t>
898 void
899 MimmoPiercedVector<mpv_t>::squeezeOutExcept(const std::unordered_set<long int> & list, bool keepOrder){
900 
901  if(keepOrder){
902  // erase elements in the list then squeeze the piercedvector.
903  MimmoPiercedVector<mpv_t> result (m_geometry, m_loc);
904  result.setName(m_name);
905  result.reserve(list.size());
906  for(auto it = this->begin(); it != this->end(); ++it){
907  if(list.count(it.getId()) > 0){
908  result.insert(it.getId(), *it);
909  }
910  }
911  this->swap(result);
912  }else{
913  // if the order does not matter, create a new mpv and swap with the current
914  MimmoPiercedVector<mpv_t> result (m_geometry, m_loc);
915  result.setName(m_name);
916  for(long id: list){
917  if(this->exists(id)){
918  result.insert(id, this->at(id));
919  }
920  }
921  this->swap(result);
922  }
923 }
924 
925 #if MIMMO_ENABLE_MPI
926 
936 template<typename mpv_t>
937 void
939 
940  // If geometry not linked return
941  if (getGeometry() == nullptr){
942  return;
943  }
944 
945  // Recover geometry
946  MimmoSharedPointer<MimmoObject> geometry = getGeometry();
947 
948  // If geometry not distributed return
949  if (!geometry->isDistributed()){
950  return;
951  }
952 
953  // The linked geometry has to be updated before to call the communication method
954 
955  // Instantiate data communicator
956  std::unique_ptr<bitpit::DataCommunicator> dataCommunicator(new bitpit::DataCommunicator(geometry->getCommunicator()));
957 
958  // Set sources and targets lists
959  MPVLocation location = getDataLocation();
960  std::unordered_map<int, std::vector<long>> sources, targets;
961  switch (location){
962  case MPVLocation::POINT :
963  sources = getGeometry()->getPatch()->getGhostVertexExchangeSources();
964  targets = getGeometry()->getPatch()->getGhostVertexExchangeTargets();
965  break;
966  case MPVLocation::CELL :
967  sources = getGeometry()->getPatch()->getGhostCellExchangeSources();
968  targets = getGeometry()->getPatch()->getGhostCellExchangeTargets();
969  break;
970  default :
971  break;
972  }
973 
974  // Recover data size
975  size_t exchangeDataSize = sizeof(mpv_t);
976 
977  // Set and start the sends
978  for (const auto entry : sources) {
979  const int rank = entry.first;
980  auto &list = entry.second;
981  dataCommunicator->setSend(rank, list.size() * exchangeDataSize);
982  bitpit::SendBuffer &buffer = dataCommunicator->getSendBuffer(rank);
983  for (long id : list) {
984  if (this->count(id)){
985  buffer << this->at(id);
986  }else{
987  // If data id doesn't exist use default constructor value
988  buffer << mpv_t();
989  }
990  }
991  dataCommunicator->startSend(rank);
992  }
993 
994  // Discover & start all the receives
995  dataCommunicator->discoverRecvs();
996  dataCommunicator->startAllRecvs();
997 
998  // Receive the data of the ghosts
999  mpv_t value;
1000  int nCompletedRecvs = 0;
1001  while (nCompletedRecvs < dataCommunicator->getRecvCount()) {
1002  int rank = dataCommunicator->waitAnyRecv();
1003  const auto &list = targets.at(rank);
1004  bitpit::RecvBuffer &buffer = dataCommunicator->getRecvBuffer(rank);
1005  for (long id : list) {
1006  buffer >> value;
1007  if (this->count(id)){
1008  this->at(id) = value;
1009  }
1010  else{
1011  // If element id doesn't exist create it
1012  this->insert(id, value);
1013  }
1014  }
1015  ++nCompletedRecvs;
1016  }
1017 
1018  // Wait for the sends to finish
1019  dataCommunicator->waitAllSends();
1020  dataCommunicator->finalize();
1021 }
1022 #endif
1023 
1024 }
MPVLocation getConstDataLocation() const
MPVLocation
Define data location for the MimmoPiercedVector field.
void setName(std::string name)
std::vector< long > livector1D
mimmo custom derivation of bitpit OBinaryStream (see relative doc)
mimmo::OBinaryStream & operator<<(mimmo::OBinaryStream &buf, const std::string &element)
MimmoPiercedVector is the basic data container for mimmo library.
MimmoSharedPointer< MimmoObject > getGeometry() const
mimmo::IBinaryStream & operator>>(mimmo::IBinaryStream &buffer, mimmo::MimmoPiercedVector< T > &element)
void setGeometry(MimmoSharedPointer< MimmoObject > geo)
void setDataLocation(MPVLocation loc)
mimmo custom derivation of bitpit IBinaryStream (see relative doc)
MimmoPiercedVector(MimmoSharedPointer< MimmoObject > geo=nullptr, MPVLocation loc=MPVLocation::UNDEFINED)