Skip to content
Snippets Groups Projects
Select Git revision
  • 36e3ee4208ad5791573808c6ae3f847fb31b743f
  • master default protected
  • hierarchical-basis
  • alphashapes
  • bl
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 3023-Fillet2D-Update
  • convert_fdivs
  • tmp_jcjc24
  • fixedMeshIF
  • save_edges
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

linearSystemPETSc.hpp

Blame
    • Gauthier Becker's avatar
      7f3005d8
      Fix bugs in MElement::xyz2uvw and in dgShellPartDomain · 7f3005d8
      Gauthier Becker authored
      Fix PETSc deprecated warnings (since PETSc 3.6 / 3.7)
      Fix BCs containers and their groupOfElement destruction --> need c++11
      (cm3)
      Update CMakeLists (cm3) to support c++11
      Fix cm3 tests, and remove import scipy as unused (+ python3 support)
      Fix DLOPEN warning for msch project
      7f3005d8
      History
      Fix bugs in MElement::xyz2uvw and in dgShellPartDomain
      Gauthier Becker authored
      Fix PETSc deprecated warnings (since PETSc 3.6 / 3.7)
      Fix BCs containers and their groupOfElement destruction --> need c++11
      (cm3)
      Update CMakeLists (cm3) to support c++11
      Fix cm3 tests, and remove import scipy as unused (+ python3 support)
      Fix DLOPEN warning for msch project
    LineEdgeBasis.cpp 1.99 KiB
    #include "LineEdgeBasis.h"
    #include "LineReferenceSpace.h"
    #include "Legendre.h"
    
    using namespace std;
    
    LineEdgeBasis::LineEdgeBasis(size_t order){
      // Reference Space //
      refSpace  = new LineReferenceSpace;
      nRefSpace = getReferenceSpace().getNReferenceSpace();
    
      const vector<vector<vector<size_t> > >&
        edgeIdx = refSpace->getEdgeNodeIndex();
    
      // Set Basis Type //
      this->order = order;
    
      type = 1;
      dim  = 1;
    
      nVertex   = 0;
      nEdge     = (order + 1);
      nFace     = 0;
      nCell     = 0;
      nFunction = nVertex + nEdge + nFace + nCell;
    
      // Alloc Temporary Space //
      const size_t orderPlus = order + 1;
      Polynomial* intLegendre = new Polynomial[orderPlus];
    
      vector<Polynomial> first(3);
      first[0] = Polynomial(-0.5, 0, 0, 0);
      first[1] = Polynomial( 0  , 0, 0, 0);
      first[2] = Polynomial( 0  , 0, 0, 0);
    
      vector<Polynomial> second(3);
      second[0] = Polynomial(+0.5, 0, 0, 0);
      second[1] = Polynomial( 0  , 0, 0, 0);
      second[2] = Polynomial( 0  , 0, 0, 0);
    
      const Polynomial x[2] = {
        Polynomial(-1, 1, 0, 0),
        Polynomial(+1, 1, 0, 0)
      };
    
      // Legendre Polynomial //
      Legendre::integrated(intLegendre, orderPlus);
    
      // Basis //
      basis = new vector<Polynomial>**[nRefSpace];
    
      for(size_t s = 0; s < nRefSpace; s++)
        basis[s] = new vector<Polynomial>*[nFunction];
    
      // Edge Based (Nedelec) //
      basis[0][0] = new vector<Polynomial>(first);
      basis[1][0] = new vector<Polynomial>(second);
    
      // Edge Based (High Order) //
      for(size_t s = 0; s < nRefSpace; s++){
        size_t i = 1;
    
        for(size_t l = 1; l < orderPlus; l++){
          basis[s][i] =
            new vector<Polynomial>((intLegendre[l].compose
                                    (x[edgeIdx[s][0][0]])).gradient());
    
          i++;
        }
      }
    
      // Free Temporary Space //
      delete[] intLegendre;
    }
    
    LineEdgeBasis::~LineEdgeBasis(void){
      // ReferenceSpace //
      delete refSpace;
    
      // Basis //
      for(size_t i = 0; i < nRefSpace; i++){
        for(size_t j = 0; j < nFunction; j++)
          delete basis[i][j];
    
        delete[] basis[i];
      }
    
      delete[] basis;
    }