Skip to content
Snippets Groups Projects
Select Git revision
  • 2bcacf23da1468e7fc820c20550ae0476a701982
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

dgRungeKuttaMultirate.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    PView.cpp 11.40 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #include <string.h>
    #include <algorithm>
    #include "PView.h"
    #include "PViewDataList.h"
    #include "PViewDataGModel.h"
    #include "PViewOptions.h"
    #include "VertexArray.h"
    #include "SmoothData.h"
    #include "adaptiveData.h"
    #include "GmshMessage.h"
    
    int PView::_globalTag = 0;
    std::vector<PView *> PView::list;
    
    void PView::_init(int tag)
    {
      if(tag >= 0) {
        _tag = tag;
        _globalTag = std::max(_globalTag, _tag) + 1;
      }
      else {
        _tag = _globalTag++;
      }
    
      _changed = true;
      _aliasOf = -1;
      _eye = SPoint3(0., 0., 0.);
      va_points = va_lines = va_triangles = va_vectors = va_ellipses = 0;
      normals = 0;
    
      for(std::size_t i = 0; i < list.size(); i++) {
        if(list[i]->getTag() == _tag) {
          // in normal operation this should not happen, but we allow it when
          // programmatically forcing view tags (e.g. when using the views from
          // within getdp's post-processing operations); this is dangerous, as it
          // breaks aliases
          Msg::Info("Removing existing View[%d] (tag = %d)", i, _tag);
          delete list[i]; // warning: this changes the list
        }
      }
    
      list.push_back(this);
      for(std::size_t i = 0; i < list.size(); i++) list[i]->setIndex(i);
    }
    
    PView::PView(int tag)
    {
      _init(tag);
      _data = new PViewDataList();
      _options = new PViewOptions(*PViewOptions::reference());
      if(_options->adaptVisualizationGrid)
        _data->initAdaptiveData(_options->timeStep, _options->maxRecursionLevel,
                                _options->targetError);
    }
    
    PView::PView(PViewData *data, int tag)
    {
      _init(tag);
      _data = data;
      _options = new PViewOptions(*PViewOptions::reference());
      if(_options->adaptVisualizationGrid)
        _data->initAdaptiveData(_options->timeStep, _options->maxRecursionLevel,
                                _options->targetError);
    }