"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Kernel/Cal_GlobalTermOfFemEquation.cpp" between
getdp-3.4.0-source.tgz and getdp-3.5.0-source.tgz

About: GetDP is a general finite element solver using mixed elements to discretize de Rham-type complexes in one, two and three dimensions.

Cal_GlobalTermOfFemEquation.cpp  (getdp-3.4.0-source.tgz):Cal_GlobalTermOfFemEquation.cpp  (getdp-3.5.0-source.tgz)
// GetDP - Copyright (C) 1997-2021 P. Dular and C. Geuzaine, University of Liege // GetDP - Copyright (C) 1997-2022 P. Dular and C. Geuzaine, University of Liege
// //
// See the LICENSE.txt file for license information. Please report all // See the LICENSE.txt file for license information. Please report all
// issues on https://gitlab.onelab.info/getdp/getdp/issues. // issues on https://gitlab.onelab.info/getdp/getdp/issues.
#include "ProData.h" #include "ProData.h"
#include "GeoData.h" #include "GeoData.h"
#include "DofData.h" #include "DofData.h"
#include "Cal_Quantity.h" #include "Cal_Quantity.h"
#include "Cal_Value.h" #include "Cal_Value.h"
#include "Cal_AssembleTerm.h" #include "Cal_AssembleTerm.h"
#include "Get_DofOfElement.h" #include "Get_DofOfElement.h"
#include "Get_Geometry.h" #include "Get_Geometry.h"
#include "Message.h" #include "Message.h"
extern struct Problem Problem_S ; extern struct Problem Problem_S;
extern struct CurrentData Current ; extern struct CurrentData Current;
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
/* C a l _ G l o b a l T e r m O f F e m F o r m u l a t i o n */ /* C a l _ G l o b a l T e r m O f F e m F o r m u l a t i o n */
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
#define OFFSET (iHar < NbrHar-OffSet)? 0 : iHar-NbrHar+OffSet+2-iHar%2 #define OFFSET \
(iHar < NbrHar - OffSet) ? 0 : iHar - NbrHar + OffSet + 2 - iHar % 2
void MH_Get_InitData(int Case, int NbrPoints, int *NbrPointsX_P, void MH_Get_InitData(int Case, int NbrPoints, int *NbrPointsX_P, double ***H_P,
double ***H_P, double ****HH_P, double **t_P, double **w_P); double ****HH_P, double **t_P, double **w_P);
void Cal_GlobalTermOfFemEquation(int Num_Region, void Cal_GlobalTermOfFemEquation(int Num_Region,
struct EquationTerm * EquationTerm_P, struct EquationTerm *EquationTerm_P,
struct QuantityStorage * QuantityStorage_P0, struct QuantityStorage *QuantityStorage_P0,
struct QuantityStorage * QuantityStorageNoDof, struct QuantityStorage *QuantityStorageNoDof,
struct Dof * DofForNoDof_P) struct Dof *DofForNoDof_P)
{ {
struct FemGlobalTermActive * FI ; struct FemGlobalTermActive *FI;
struct QuantityStorage * QuantityStorageEqu_P, * QuantityStorageDof_P ; struct QuantityStorage *QuantityStorageEqu_P, *QuantityStorageDof_P;
struct Value vBFxDof [1] ; struct Value vBFxDof[1];
struct Element Element ; struct Element Element;
int k ; int k;
double Coefficient [NBR_MAX_HARMONIC] ; double Coefficient[NBR_MAX_HARMONIC];
void (*Function_AssembleTerm)(struct Dof * Equ, struct Dof * Dof, double Val[] void (*Function_AssembleTerm)(struct Dof * Equ, struct Dof * Dof,
)=0 ; double Val[]) = 0;
List_T * WholeQuantity_L; List_T *WholeQuantity_L;
struct WholeQuantity *WholeQuantity_P0 ; struct WholeQuantity *WholeQuantity_P0;
int i_WQ ; int i_WQ;
struct Expression * Expression_P; struct Expression *Expression_P;
int NbrPointsX ; int NbrPointsX;
double **H, ***HH, *time, *weight, Factor=1., plus, plus0; double **H, ***HH, *time, *weight, Factor = 1., plus, plus0;
double one=1.0 ; double one = 1.0;
int j=0,iPul, ZeroHarmonic, DcHarmonic; int j = 0, iPul, ZeroHarmonic, DcHarmonic;
int NbrHar, iTime, iHar, jHar, OffSet=0 ; int NbrHar, iTime, iHar, jHar, OffSet = 0;
double Val_Dof [NBR_MAX_HARMONIC] ; double Val_Dof[NBR_MAX_HARMONIC];
double E_D [NBR_MAX_HARMONIC][NBR_MAX_HARMONIC] ; double E_D[NBR_MAX_HARMONIC][NBR_MAX_HARMONIC];
struct Dof * Dof; struct Dof *Dof;
struct Value t_Value; struct Value t_Value;
gMatrix * Jac; gMatrix *Jac;
struct QuantityStorage * QuantityStorage_P; struct QuantityStorage *QuantityStorage_P;
FI = EquationTerm_P->Case.GlobalTerm.Active ; FI = EquationTerm_P->Case.GlobalTerm.Active;
Element.Num = NO_ELEMENT ; Element.Num = NO_ELEMENT;
switch (EquationTerm_P->Case.GlobalTerm.Term.TypeTimeDerivative) { switch(EquationTerm_P->Case.GlobalTerm.Term.TypeTimeDerivative) {
case NODT_ : Function_AssembleTerm = Cal_AssembleTerm_NoDt ; break ; case NODT_: Function_AssembleTerm = Cal_AssembleTerm_NoDt; break;
case DTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDof ; break ; case DTDOF_: Function_AssembleTerm = Cal_AssembleTerm_DtDof; break;
case DT_ : Function_AssembleTerm = Cal_AssembleTerm_Dt ; break ; case DT_: Function_AssembleTerm = Cal_AssembleTerm_Dt; break;
case DTDTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDtDof ; break case DTDTDOF_: Function_AssembleTerm = Cal_AssembleTerm_DtDtDof; break;
; case DTDT_: Function_AssembleTerm = Cal_AssembleTerm_DtDt; break;
case DTDT_ : Function_AssembleTerm = Cal_AssembleTerm_DtDt ; break ; case DTDTDTDOF_: Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDof; break;
case DTDTDTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDof ; bre case DTDTDTDTDOF_:
ak ; Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDof;
case DTDTDTDTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDof ; b break;
reak ; case DTDTDTDTDTDOF_:
case DTDTDTDTDTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDtDof ; Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDtDof;
break ; break;
case NEVERDT_ : Function_AssembleTerm = Cal_AssembleTerm_NeverDt ; break case NEVERDT_: Function_AssembleTerm = Cal_AssembleTerm_NeverDt; break;
; case JACNL_: Function_AssembleTerm = Cal_AssembleTerm_JacNL; break;
case JACNL_ : Function_AssembleTerm = Cal_AssembleTerm_JacNL ; break ; case DTDOFJACNL_: Function_AssembleTerm = Cal_AssembleTerm_DtDofJacNL; break;
case DTDOFJACNL_ : Function_AssembleTerm = Cal_AssembleTerm_DtDofJacNL ; br
eak ;
// nleigchange // nleigchange
case NLEIG1DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig1Dof ; bre case NLEIG1DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig1Dof; break;
ak ; case NLEIG2DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig2Dof; break;
case NLEIG2DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig2Dof ; bre case NLEIG3DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig3Dof; break;
ak ; case NLEIG4DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig4Dof; break;
case NLEIG3DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig3Dof ; bre case NLEIG5DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig5Dof; break;
ak ; case NLEIG6DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig6Dof; break;
case NLEIG4DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig4Dof ; bre default: Message::Error("Unknown type of operator for Global term"); return;
ak ;
case NLEIG5DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig5Dof ; bre
ak ;
case NLEIG6DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig6Dof ; bre
ak ;
default : Message::Error("Unknown type of operator for Global term"); return;
} }
//+++ Num_Region, QuantityStorage_P0: not used any more //+++ Num_Region, QuantityStorage_P0: not used any more
QuantityStorageEqu_P = FI->QuantityStorageEqu_P; QuantityStorageEqu_P = FI->QuantityStorageEqu_P;
QuantityStorageDof_P = FI->QuantityStorageDof_P; QuantityStorageDof_P = FI->QuantityStorageDof_P;
if (!QuantityStorageDof_P) { if(!QuantityStorageDof_P) {
QuantityStorageDof_P = QuantityStorageNoDof ; QuantityStorageDof_P = QuantityStorageNoDof;
Dof_InitDofForNoDof(DofForNoDof_P, Current.NbrHar) ; Dof_InitDofForNoDof(DofForNoDof_P, Current.NbrHar);
QuantityStorageDof_P->BasisFunction[0].Dof = DofForNoDof_P ; QuantityStorageDof_P->BasisFunction[0].Dof = DofForNoDof_P;
} }
// search for MHBilinear-term(s) // search for MHBilinear-term(s)
WholeQuantity_L = EquationTerm_P->Case.GlobalTerm.Term.WholeQuantity ; WholeQuantity_L = EquationTerm_P->Case.GlobalTerm.Term.WholeQuantity;
WholeQuantity_P0 = (struct WholeQuantity*)List_Pointer(WholeQuantity_L, 0) ; WholeQuantity_P0 = (struct WholeQuantity *)List_Pointer(WholeQuantity_L, 0);
i_WQ = 0 ; while ( i_WQ < List_Nbr(WholeQuantity_L) && i_WQ = 0;
(WholeQuantity_P0 + i_WQ)->Type != WQ_MHBILINEAR) i_WQ++ ; while(i_WQ < List_Nbr(WholeQuantity_L) &&
(WholeQuantity_P0 + i_WQ)->Type != WQ_MHBILINEAR)
i_WQ++;
if (i_WQ < List_Nbr(WholeQuantity_L) ) { // Multi-harmonic case if(i_WQ < List_Nbr(WholeQuantity_L)) { // Multi-harmonic case
if(Message::GetVerbosity() == 10) if(Message::GetVerbosity() == 10)
Message::Info("MHBilinear in Global term"); Message::Info("MHBilinear in Global term");
if (QuantityStorageEqu_P != QuantityStorageDof_P){ if(QuantityStorageEqu_P != QuantityStorageDof_P) {
Message::Error("Global term with MHBilinear is not symmetric ?!"); Message::Error("Global term with MHBilinear is not symmetric ?!");
return; return;
} }
QuantityStorage_P = QuantityStorageEqu_P ; QuantityStorage_P = QuantityStorageEqu_P;
if (List_Nbr(WholeQuantity_L) == 3){ if(List_Nbr(WholeQuantity_L) == 3) {
if (i_WQ != 0 || if(i_WQ != 0 ||
EquationTerm_P->Case.GlobalTerm.Term.DofIndexInWholeQuantity != 1 || EquationTerm_P->Case.GlobalTerm.Term.DofIndexInWholeQuantity != 1 ||
(WholeQuantity_P0 + 2)->Type != WQ_BINARYOPERATOR || (WholeQuantity_P0 + 2)->Type != WQ_BINARYOPERATOR ||
(WholeQuantity_P0 + 2)->Case.Operator.TypeOperator != OP_TIME){ (WholeQuantity_P0 + 2)->Case.Operator.TypeOperator != OP_TIME) {
Message::Error("Not allowed expression in Global term with MHBilinear (ca Message::Error(
se 1)"); "Not allowed expression in Global term with MHBilinear (case 1)");
return; return;
} }
Factor = 1.; Factor = 1.;
} }
else { else {
Message::Error("Not allowed expression in Global term with MHBilinear (%d Message::Error(
terms) ", "Not allowed expression in Global term with MHBilinear (%d terms) ",
List_Nbr(WholeQuantity_L)); List_Nbr(WholeQuantity_L));
return; return;
} }
if (EquationTerm_P->Case.GlobalTerm.Term.TypeTimeDerivative != JACNL_){ if(EquationTerm_P->Case.GlobalTerm.Term.TypeTimeDerivative != JACNL_) {
Message::Error("MHBilinear can only be used with JACNL") ; Message::Error("MHBilinear can only be used with JACNL");
return; return;
} }
Expression_P = (struct Expression *)List_Pointer Expression_P = (struct Expression *)List_Pointer(
(Problem_S.Expression, (WholeQuantity_P0 + i_WQ)->Case.MHBilinear.Index) ; Problem_S.Expression, (WholeQuantity_P0 + i_WQ)->Case.MHBilinear.Index);
MH_Get_InitData(2, (WholeQuantity_P0 + i_WQ)->Case.MHBilinear.NbrPoints, MH_Get_InitData(2, (WholeQuantity_P0 + i_WQ)->Case.MHBilinear.NbrPoints,
&NbrPointsX, &H, &HH, &NbrPointsX, &H, &HH, &time, &weight);
&time, &weight) ;
NbrHar = Current.NbrHar ; NbrHar = Current.NbrHar;
/* special treatment of DC-term and associated dummy sinus-term */ /* special treatment of DC-term and associated dummy sinus-term */
DcHarmonic = NbrHar; DcHarmonic = NbrHar;
ZeroHarmonic = 0; ZeroHarmonic = 0;
for (iPul = 0 ; iPul < NbrHar/2 ; iPul++) for(iPul = 0; iPul < NbrHar / 2; iPul++)
if (!Current.DofData->Val_Pulsation[iPul]){ if(!Current.DofData->Val_Pulsation[iPul]) {
DcHarmonic = 2*iPul ; DcHarmonic = 2 * iPul;
ZeroHarmonic = 2*iPul+1 ; ZeroHarmonic = 2 * iPul + 1;
break; break;
} }
for (k = 0 ; k < Current.NbrHar ; k+=2) for(k = 0; k < Current.NbrHar; k += 2)
Dof_GetComplexDofValue Dof_GetComplexDofValue(QuantityStorage_P->FunctionSpace->DofData,
(QuantityStorage_P->FunctionSpace->DofData, QuantityStorage_P->BasisFunction[j].Dof +
QuantityStorage_P->BasisFunction[j].Dof + k/2*gCOMPLEX_INCREMENT, k / 2 * gCOMPLEX_INCREMENT,
&Val_Dof[k], &Val_Dof[k+1]) ; &Val_Dof[k], &Val_Dof[k + 1]);
/* time integration over fundamental period */ /* time integration over fundamental period */
for (iHar = 0 ; iHar < NbrHar ; iHar++) for(iHar = 0; iHar < NbrHar; iHar++)
for (jHar = OFFSET ; jHar <= iHar ; jHar++) for(jHar = OFFSET; jHar <= iHar; jHar++) E_D[iHar][jHar] = 0.;
E_D[iHar][jHar] = 0. ;
Current.NbrHar = 1; /* evaluation in time domain */ Current.NbrHar = 1; /* evaluation in time domain */
for (iTime = 0 ; iTime < NbrPointsX ; iTime++) {
for(iTime = 0; iTime < NbrPointsX; iTime++) {
t_Value.Type = SCALAR; t_Value.Type = SCALAR;
t_Value.Val[0] = 0; t_Value.Val[0] = 0;
for (iHar = 0 ; iHar < NbrHar ; iHar++) for(iHar = 0; iHar < NbrHar; iHar++)
t_Value.Val[0] += H[iTime][iHar] * Val_Dof[iHar] ; t_Value.Val[0] += H[iTime][iHar] * Val_Dof[iHar];
// To generalize: Function in MHBilinear has 1 argument (e.g. Resistance[{ // To generalize: Function in MHBilinear has 1 argument (e.g.
Iz}]) // Resistance[{Iz}])
Get_ValueOfExpression(Expression_P, QuantityStorage_P0, Get_ValueOfExpression(Expression_P, QuantityStorage_P0, Current.u,
Current.u, Current.v, Current.w, &t_Value, 1); Current.v, Current.w, &t_Value, 1);
for (iHar = 0 ; iHar < NbrHar ; iHar++) for(iHar = 0; iHar < NbrHar; iHar++)
for (jHar = OFFSET ; jHar <= iHar ; jHar++) for(jHar = OFFSET; jHar <= iHar; jHar++)
E_D[iHar][jHar] += HH[iTime][iHar][jHar] * t_Value.Val[0] ; E_D[iHar][jHar] += HH[iTime][iHar][jHar] * t_Value.Val[0];
} // for i_IntPoint... } // for i_IntPoint...
Current.NbrHar = NbrHar ; Current.NbrHar = NbrHar;
Jac = &Current.DofData->Jac; Jac = &Current.DofData->Jac;
Dof = QuantityStorage_P->BasisFunction[0].Dof ; Dof = QuantityStorage_P->BasisFunction[0].Dof;
for (iHar = 0 ; iHar < NbrHar ; iHar++) for(iHar = 0; iHar < NbrHar; iHar++)
for (jHar = OFFSET ; jHar <= iHar ; jHar++){ for(jHar = OFFSET; jHar <= iHar; jHar++) {
plus = plus0 = Factor * E_D[iHar][jHar] ; plus = plus0 = Factor * E_D[iHar][jHar];
if(jHar==DcHarmonic && iHar!=DcHarmonic) { plus0 *= 1. ; plus *= 2. ;} if(jHar == DcHarmonic && iHar != DcHarmonic) {
Dof_AssembleInMat(Dof+iHar, Dof+jHar, 1, &plus, Jac, NULL) ; plus0 *= 1.;
if(iHar != jHar) plus *= 2.;
Dof_AssembleInMat(Dof+jHar, Dof+iHar, 1, &plus0, Jac, NULL) ; }
Dof_AssembleInMat(Dof + iHar, Dof + jHar, 1, &plus, Jac, NULL);
if(iHar != jHar)
Dof_AssembleInMat(Dof + jHar, Dof + iHar, 1, &plus0, Jac, NULL);
} }
/* dummy 1's on the diagonal for sinus-term of dc-component */ /* dummy 1's on the diagonal for sinus-term of dc-component */
if (ZeroHarmonic) { if(ZeroHarmonic) {
Dof = QuantityStorage_P->BasisFunction[0].Dof + ZeroHarmonic ; Dof = QuantityStorage_P->BasisFunction[0].Dof + ZeroHarmonic;
Dof_AssembleInMat(Dof, Dof, 1, &one, Jac, NULL) ; Dof_AssembleInMat(Dof, Dof, 1, &one, Jac, NULL);
} }
} }
else { // standard (non multi-harmonic) bilinear term else { // standard (non multi-harmonic) bilinear term
vBFxDof[0].Type = SCALAR ; vBFxDof[0].Val[0] = 1. ; vBFxDof[0].Type = SCALAR;
if(Current.NbrHar > 1) Cal_SetHarmonicValue(&vBFxDof[0]) ; vBFxDof[0].Val[0] = 1.;
if(Current.NbrHar > 1) Cal_SetHarmonicValue(&vBFxDof[0]);
Cal_WholeQuantity
(Current.Element = &Element, QuantityStorage_P0, Cal_WholeQuantity(
EquationTerm_P->Case.GlobalTerm.Term.WholeQuantity, Current.Element = &Element, QuantityStorage_P0,
Current.u = 0., Current.v = 0., Current.w = 0., EquationTerm_P->Case.GlobalTerm.Term.WholeQuantity, Current.u = 0.,
EquationTerm_P->Case.GlobalTerm.Term.DofIndexInWholeQuantity, Current.v = 0., Current.w = 0.,
1, vBFxDof) ; EquationTerm_P->Case.GlobalTerm.Term.DofIndexInWholeQuantity, 1, vBFxDof);
for (k = 0 ; k < Current.NbrHar ; k++) for(k = 0; k < Current.NbrHar; k++)
Coefficient[k] = vBFxDof[0].Val[MAX_DIM*k] ; Coefficient[k] = vBFxDof[0].Val[MAX_DIM * k];
Function_AssembleTerm Function_AssembleTerm(QuantityStorageEqu_P->BasisFunction[0].Dof,
(QuantityStorageEqu_P->BasisFunction[0].Dof, QuantityStorageDof_P->BasisFunction[0].Dof,
QuantityStorageDof_P->BasisFunction[0].Dof, Coefficient) ; Coefficient);
} }
} }
#undef OFFSET #undef OFFSET
void Cal_GlobalTermOfFemEquation_old(int Num_Region, void Cal_GlobalTermOfFemEquation_old(
struct EquationTerm * EquationTerm_P, int Num_Region, struct EquationTerm *EquationTerm_P,
struct QuantityStorage * QuantityStorage_P struct QuantityStorage *QuantityStorage_P0,
0, struct QuantityStorage *QuantityStorageNoDof, struct Dof *DofForNoDof_P)
struct QuantityStorage * QuantityStorageNo
Dof,
struct Dof * DofForNoDof_P)
{ {
struct QuantityStorage * QuantityStorageEqu_P, * QuantityStorageDof_P ; struct QuantityStorage *QuantityStorageEqu_P, *QuantityStorageDof_P;
struct Value vBFxDof [1] ; struct Value vBFxDof[1];
struct Element Element ; struct Element Element;
int k ; int k;
double Coefficient [NBR_MAX_HARMONIC] ; double Coefficient[NBR_MAX_HARMONIC];
void (*Function_AssembleTerm)(struct Dof * Equ, struct Dof * Dof, double Val[] void (*Function_AssembleTerm)(struct Dof * Equ, struct Dof * Dof,
) = 0; double Val[]) = 0;
Element.Num = NO_ELEMENT ; Element.Num = NO_ELEMENT;
switch (EquationTerm_P->Case.GlobalTerm.Term.TypeTimeDerivative) { switch(EquationTerm_P->Case.GlobalTerm.Term.TypeTimeDerivative) {
case NODT_ : Function_AssembleTerm = Cal_AssembleTerm_NoDt ; case NODT_: Function_AssembleTerm = Cal_AssembleTerm_NoDt; break;
break ; case DTDOF_: Function_AssembleTerm = Cal_AssembleTerm_DtDof; break;
case DTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDof ; case DT_: Function_AssembleTerm = Cal_AssembleTerm_Dt; break;
break ; case DTDTDOF_: Function_AssembleTerm = Cal_AssembleTerm_DtDtDof; break;
case DT_ : Function_AssembleTerm = Cal_AssembleTerm_Dt ; case DTDT_: Function_AssembleTerm = Cal_AssembleTerm_DtDt; break;
break ; case DTDTDTDOF_: Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDof; break;
case DTDTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDtDof ; case DTDTDTDTDOF_:
break ; Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDof;
case DTDT_ : Function_AssembleTerm = Cal_AssembleTerm_DtDt ; break;
break ; case DTDTDTDTDTDOF_:
case DTDTDTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDof ; Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDtDof;
break ; break;
case DTDTDTDTDOF_ : Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDof case NEVERDT_: Function_AssembleTerm = Cal_AssembleTerm_NeverDt; break;
; break ; case JACNL_: Function_AssembleTerm = Cal_AssembleTerm_JacNL; break;
case DTDTDTDTDTDOF_: Function_AssembleTerm = Cal_AssembleTerm_DtDtDtDtDtD case DTDOFJACNL_: Function_AssembleTerm = Cal_AssembleTerm_DtDofJacNL; break;
of ; break ;
case NEVERDT_ : Function_AssembleTerm = Cal_AssembleTerm_NeverDt
; break ;
case JACNL_ : Function_AssembleTerm = Cal_AssembleTerm_JacNL ;
break ;
case DTDOFJACNL_ : Function_AssembleTerm = Cal_AssembleTerm_DtDofJacNL ;
break ;
// nleigchange // nleigchange
case NLEIG1DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig1Dof ; case NLEIG1DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig1Dof; break;
break ; case NLEIG2DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig2Dof; break;
case NLEIG2DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig2Dof ; case NLEIG3DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig3Dof; break;
break ; case NLEIG4DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig4Dof; break;
case NLEIG3DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig3Dof ; case NLEIG5DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig5Dof; break;
break ; case NLEIG6DOF_: Function_AssembleTerm = Cal_AssembleTerm_NLEig6Dof; break;
case NLEIG4DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig4Dof ; default: Message::Error("Unknown type of operator for Global term"); return;
break ;
case NLEIG5DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig5Dof ;
break ;
case NLEIG6DOF_ : Function_AssembleTerm = Cal_AssembleTerm_NLEig6Dof ;
break ;
default : Message::Error("Unknown type of operator for Global term") ;
return ;
} }
QuantityStorageEqu_P = QuantityStorage_P0 + QuantityStorageEqu_P =
EquationTerm_P->Case.GlobalTerm.Term.DefineQuantityIndexEqu ; QuantityStorage_P0 +
EquationTerm_P->Case.GlobalTerm.Term.DefineQuantityIndexEqu;
if (EquationTerm_P->Case.GlobalTerm.Term.DefineQuantityIndexDof >= 0) {
QuantityStorageDof_P = QuantityStorage_P0 + if(EquationTerm_P->Case.GlobalTerm.Term.DefineQuantityIndexDof >= 0) {
EquationTerm_P->Case.GlobalTerm.Term.DefineQuantityIndexDof ; QuantityStorageDof_P =
QuantityStorage_P0 +
EquationTerm_P->Case.GlobalTerm.Term.DefineQuantityIndexDof;
} }
else { else {
QuantityStorageDof_P = QuantityStorageNoDof ; QuantityStorageDof_P = QuantityStorageNoDof;
Dof_InitDofForNoDof(DofForNoDof_P, Current.NbrHar) ; Dof_InitDofForNoDof(DofForNoDof_P, Current.NbrHar);
QuantityStorageDof_P->BasisFunction[0].Dof = DofForNoDof_P ; QuantityStorageDof_P->BasisFunction[0].Dof = DofForNoDof_P;
} }
vBFxDof[0].Type = SCALAR ; vBFxDof[0].Val[0] = 1. ; vBFxDof[0].Type = SCALAR;
if(Current.NbrHar > 1) Cal_SetHarmonicValue(&vBFxDof[0]) ; vBFxDof[0].Val[0] = 1.;
if(Current.NbrHar > 1) Cal_SetHarmonicValue(&vBFxDof[0]);
Cal_WholeQuantity
(Current.Element = &Element, QuantityStorage_P0, Cal_WholeQuantity(
EquationTerm_P->Case.GlobalTerm.Term.WholeQuantity, Current.Element = &Element, QuantityStorage_P0,
Current.u = 0., Current.v = 0., Current.w = 0., EquationTerm_P->Case.GlobalTerm.Term.WholeQuantity, Current.u = 0.,
EquationTerm_P->Case.GlobalTerm.Term.DofIndexInWholeQuantity, Current.v = 0., Current.w = 0.,
1, vBFxDof) ; EquationTerm_P->Case.GlobalTerm.Term.DofIndexInWholeQuantity, 1, vBFxDof);
for (k = 0 ; k < Current.NbrHar ; k++) for(k = 0; k < Current.NbrHar; k++)
Coefficient[k] = vBFxDof[0].Val[MAX_DIM*k] ; Coefficient[k] = vBFxDof[0].Val[MAX_DIM * k];
Function_AssembleTerm Function_AssembleTerm(QuantityStorageEqu_P->BasisFunction[0].Dof,
(QuantityStorageEqu_P->BasisFunction[0].Dof, QuantityStorageDof_P->BasisFunction[0].Dof,
QuantityStorageDof_P->BasisFunction[0].Dof, Coefficient) ; Coefficient);
} }
 End of changes. 42 change blocks. 
235 lines changed or deleted 213 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)