Skip to content
Snippets Groups Projects
Select Git revision
  • d43e17bebc7aae74d128c2c14f3ab6162e124226
  • master default protected
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 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

frameSolver.cpp

Blame
  • FunctionSpaceVector.cpp 1.29 KiB
    #include "Mapper.h"
    #include "FunctionSpaceVector.h"
    
    FunctionSpaceVector::FunctionSpaceVector(GroupOfElement& goe,
                                             const Basis& basis){
      scalar = false;
      build(goe, basis);
    }
    
    FunctionSpaceVector::~FunctionSpaceVector(void){
      // Done by FunctionSpace
    }
    
    fullVector<double> FunctionSpaceVector::
    interpolateInABC(const MElement& element,
                     const std::vector<double>& coef,
                     double abc[3]) const{
    
      // Get Jacobian //
      fullMatrix<double> invJac(3, 3);
      (*basis)[0]->getReferenceSpace().getJacobian(element,
                                                   abc[0], abc[1], abc[2],
                                                   invJac);
      invJac.invertInPlace();
    
      // Get Basis Functions //
      const size_t nFun = (*basis)[0]->getNFunction();
      fullMatrix<double> fun(nFun, 3);
    
      (*basis)[0]->getFunctions(fun, element, abc[0], abc[1], abc[2]);
    
      // Interpolate (in Reference Place) //
      fullMatrix<double> val(1, 3);
      val(0, 0) = 0;
      val(0, 1) = 0;
      val(0, 2) = 0;
    
      for(size_t i = 0; i < nFun; i++){
        val(0, 0) += fun(i, 0) * coef[i];
        val(0, 1) += fun(i, 1) * coef[i];
        val(0, 2) += fun(i, 2) * coef[i];
      }
    
      // Return Interpolated Value //
      fullVector<double> map(3);
      Mapper::hCurl(val, 0, 0, invJac, map);
      return map;
    }