Select Git revision
Callbacks.cpp
Forked from
gmsh / gmsh
Source project has a limited visibility.
Cal_PostQuantity.cpp 17.86 KiB
// GetDP - Copyright (C) 1997-2018 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 <math.h>
#include "ProData.h"
#include "ProDefine.h"
#include "GeoData.h"
#include "Get_DofOfElement.h"
#include "Cal_Quantity.h"
#include "Cal_Value.h"
#include "Get_Geometry.h"
#include "Get_FunctionValue.h"
#include "ExtendedGroup.h"
#include "Pos_Formulation.h"
#include "MallocUtils.h"
#include "Message.h"
extern struct Problem Problem_S ;
extern struct CurrentData Current ;
/* ------------------------------------------------------------------------ */
/* P o s _ L o c a l O r I n t e g r a l Q u a n t i t y */
/* ------------------------------------------------------------------------ */
static int Warning_NoJacobian = 0 ;
void Pos_LocalOrIntegralQuantity(struct PostQuantity *PostQuantity_P,
struct DefineQuantity *DefineQuantity_P0,
struct QuantityStorage *QuantityStorage_P0,
struct PostQuantityTerm *PostQuantityTerm_P,
struct Element *Element,
int Type_Quantity,
double u, double v, double w,
struct Value *Value)
{
struct FunctionSpace *FunctionSpace_P ;
struct DefineQuantity *DefineQuantity_P ;
struct QuantityStorage *QuantityStorage_P ;
struct Value TermValue, tmpValue;
struct JacobianCase *JacobianCase_P0 ;
struct IntegrationCase *IntegrationCase_P ;
struct Quadrature *Quadrature_P ;
List_T *IntegrationCase_L, *JacobianCase_L ;
double ui, vi, wi, weight, Factor ;
int Index_DefineQuantity ;
int i, j, Type_Dimension ;
int CriterionIndex, Nbr_IntPoints, i_IntPoint ;
double (*Get_Jacobian) (struct Element * Element, MATRIX3x3 * Jac) = 0;
void (*Get_IntPoint) (int Nbr_Points, int Num,
double * u, double * v, double * w, double * wght) ;
/* Get the functionspaces
Get the DoF for local quantities */
for (i = 0 ; i < PostQuantityTerm_P->NbrQuantityIndex ; i++) {
Index_DefineQuantity = PostQuantityTerm_P->QuantityIndexTable[i] ;
DefineQuantity_P = DefineQuantity_P0 + Index_DefineQuantity ;
QuantityStorage_P = QuantityStorage_P0 + Index_DefineQuantity ;
if (QuantityStorage_P->NumLastElementForFunctionSpace != Element->Num) {
QuantityStorage_P->NumLastElementForFunctionSpace = Element->Num ;
if (Type_Quantity != INTEGRALQUANTITY){
QuantityStorage_P->FunctionSpace = FunctionSpace_P =
(struct FunctionSpace*)