Skip to content
Snippets Groups Projects
Select Git revision
  • 294d3cd11ca26ace5c33f23a543a8c805b730b24
  • 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

discreteDiskFace.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    solverAlgorithms.h 11.51 KiB
    // Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <gmsh@onelab.info>.
    //
    // Contributor(s):
    //   Eric Bechet
    //
    
    #ifndef _SOLVERALGORITHMS_H_
    #define _SOLVERALGORITHMS_H_
    
    
    #include "dofManager.h"
    #include "terms.h"
    #include "quadratureRules.h"
    #include "MVertex.h"
    
    
    
    template<class Iterator, class Assembler> void Assemble(BilinearTermBase &term, FunctionSpaceBase &space,
                                                            Iterator itbegin, Iterator itend,
                                                            QuadratureBase &integrator, Assembler &assembler)
      // symmetric
    {
      fullMatrix<typename Assembler::dataMat> localMatrix;
      std::vector<Dof> R;
      for (Iterator it = itbegin; it != itend; ++it){
        MElement *e = *it;
        R.clear();
        IntPt *GP;
        int npts = integrator.getIntPoints(e, &GP);
        term.get(e, npts, GP, localMatrix); //localMatrix.print();
        space.getKeys(e, R);
        assembler.assemble(R, localMatrix);
      }
    }
    
    template<class Iterator, class Assembler> void Assemble(BilinearTermBase &term, FunctionSpaceBase &space,
                                                            Iterator itbegin, Iterator itend,
                                                            QuadratureBase &integrator, Assembler &assembler,
    																												elementFilter& efilter)
      // symmetric
    {
      fullMatrix<typename Assembler::dataMat> localMatrix;
      std::vector<Dof> R;
      for (Iterator it = itbegin; it != itend; ++it){
        MElement *e = *it;
    		if (efilter(e)){
    			R.clear();
    			IntPt *GP;
    			int npts = integrator.getIntPoints(e, &GP);
    			term.get(e, npts, GP, localMatrix); //localMatrix.print();
    			space.getKeys(e, R);
    			assembler.assemble(R, localMatrix);
    		}
      }
    }
    
    template<class Assembler> void Assemble(BilinearTermBase &term, FunctionSpaceBase &space, MElement *e,
                                            QuadratureBase &integrator, Assembler &assembler) // symmetric
    {
      fullMatrix<typename Assembler::dataMat> localMatrix;
      std::vector<Dof> R;
      IntPt *GP;
      int npts = integrator.getIntPoints(e, &GP);
      term.get(e, npts, GP, localMatrix);
      space.getKeys(e, R);
      assembler.assemble(R, localMatrix);
    }