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

filters.cpp

Blame
  • Cal_Quantity.cpp 43.75 KiB
    // GetDP - Copyright (C) 1997-2017 P. Dular and C. Geuzaine, University of Liege
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <getdp@onelab.info>.
    
    #include <string.h>
    #include <math.h>
    #include <map>
    #include "ProData.h"
    #include "GeoData.h"
    #include "DofData.h"
    #include "F.h"
    #include "Cal_Quantity.h"
    #include "Cal_Value.h"
    #include "Get_Geometry.h"
    #include "Pos_FemInterpolation.h"
    #include "Pos_Search.h"
    #include "Get_FunctionValue.h"
    #include "MallocUtils.h"
    #include "Message.h"
    #include "ProParser.h"
    #include "Pos_Format.h"
    
    extern struct Problem Problem_S ;
    extern struct CurrentData Current ;
    extern int TreatmentStatus ;
    
    /* ------------------------------------------------------------------------ */
    /*  G e t _ V a l u e O f E x p r e s s i o n                               */
    /* ------------------------------------------------------------------------ */
    
    void  Get_ValueOfExpression(struct Expression * Expression_P,
    			    struct QuantityStorage * QuantityStorage_P0,
    			    double u, double v, double w,
    			    struct Value * Value,
    			    int    NbrArguments,
    			    char   *CallingExpressionName)
    {
      static char *Flag_WarningUndefined = NULL ;
    
      switch (Expression_P->Type) {
    
      case CONSTANT :
        if (Current.NbrHar == 1) {
          Value->Val[0] = Expression_P->Case.Constant ;
        }
        else {
          for (int k = 0 ; k < Current.NbrHar ; k += 2) {
    	Value->Val[MAX_DIM* k   ] = Expression_P->Case.Constant ;
    	Value->Val[MAX_DIM*(k+1)] = 0. ;
          }
        }
        Value->Type = SCALAR ;
        break ;
    
      case WHOLEQUANTITY :
        Cal_WholeQuantity(Current.Element, QuantityStorage_P0,
    		      Expression_P->Case.WholeQuantity,
    		      u,v,w, -1, 0, Value, NbrArguments,
    		      CallingExpressionName ?
    		          CallingExpressionName : Expression_P->Name) ;
        break ;
    
      case PIECEWISEFUNCTION :
        struct Expression * NextExpression_P;
        struct ExpressionPerRegion  * ExpressionPerRegion_P ;
    
        if (Current.Region == Expression_P->Case.PieceWiseFunction.NumLastRegion) {
          NextExpression_P = Expression_P->Case.PieceWiseFunction.ExpressionForLastRegion;
        }