Commit 5ad671b0 authored by Kevin Jacques's avatar Kevin Jacques

up RunTimeNLIterVar branch from master branch cause error with -bin option

parent 0e58ca2d
Pipeline #463 passed with stage
in 51 seconds
bin*
lib*
build*
bin/
bin_*/
build/
build_*/
lib/
lib_*/
contrib/NR
contrib/NX
contrib/ZITSOL_1
......
ubuntu16.04:
image : onelab/ubuntu16.04
linux64_gcc:
image: onelab/ubuntu16.04
tags:
- linux
script:
- mkdir build
- cd build
- cmake ..
- make -j 4
- ctest --output-on-failure
- ctest -j 4 --output-on-failure
......@@ -76,8 +76,12 @@ set(GETDP_API
Kernel/GetDP.h
)
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${CMAKE_MAJOR_VERSION} GREATER 2)
string(TIMESTAMP DATE "%Y%m%d")
else(${CMAKE_MAJOR_VERSION} GREATER 2)
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(${CMAKE_MAJOR_VERSION} GREATER 2)
execute_process(COMMAND hostname OUTPUT_VARIABLE HOSTNAME
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND whoami OUTPUT_VARIABLE PACKAGER
......@@ -321,13 +325,11 @@ if(ENABLE_MPI)
find_package(MPI)
if(MPI_FOUND)
set_config_option(HAVE_MPI "MPI")
list(APPEND EXTERNAL_INCLUDES ${MPI_INCLUDE_DIR})
list(APPEND EXTERNAL_LIBRARIES ${MPI_LIBRARIES})
include(CMakeForceCompiler)
# Warning: this actually requires cmake >= 2.8.5
cmake_force_c_compiler(${MPI_C_COMPILER} "MPI C Compiler")
cmake_force_cxx_compiler(${MPI_CXX_COMPILER} "MPI C++ Compiler")
cmake_force_fortran_compiler(${MPI_Fortran_COMPILER} "MPI Fortran Compiler")
list(APPEND EXTERNAL_INCLUDES ${MPI_CXX_INCLUDE_PATH})
list(APPEND EXTERNAL_LIBRARIES ${MPI_CXX_LIBRARIES})
set(CMAKE_C_COMPILER ${MPI_C_COMPILER})
set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER})
endif(MPI_FOUND)
endif(ENABLE_MPI)
......@@ -786,6 +788,7 @@ if(ENABLE_BUILD_IOS)
if(NOT CMAKE_TOOLCHAIN_FILE)
message(FATAL_ERROR "Cannot compile GetDP for iOS without a toolchain")
endif(NOT CMAKE_TOOLCHAIN_FILE)
add_definitions(-DBUILD_IOS)
endif(ENABLE_BUILD_IOS)
if(ENABLE_BUILD_ANDROID)
......
// Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
// Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
......@@ -104,10 +104,10 @@ class GmshSocket{
int _SendData(const void *buffer, int bytes)
{
const char *buf = (const char *)buffer;
int sofar = 0;
int remaining = bytes;
long int sofar = 0;
long int remaining = bytes;
do {
int len = send(_sock, buf + sofar, remaining, 0);
long int len = send(_sock, buf + sofar, remaining, 0);
if(len < 0) return -1; // error
sofar += len;
remaining -= len;
......@@ -119,10 +119,10 @@ class GmshSocket{
int _ReceiveData(void *buffer, int bytes)
{
char *buf = (char *)buffer;
int sofar = 0;
int remaining = bytes;
long int sofar = 0;
long int remaining = bytes;
do {
int len = recv(_sock, buf + sofar, remaining, 0);
long int len = recv(_sock, buf + sofar, remaining, 0);
if(len == 0) break; // we're done!
if(len < 0) return -1; // error
sofar += len;
......
......@@ -795,29 +795,12 @@ void Message::InitializeOnelab(std::string name, std::string sockname)
}
void Message::AddOnelabNumberChoice(std::string name, const std::vector<double> &value,
const char *color, const char *units)
const char *color, const char *units,
const char *label, bool visible, bool closed)
{
if(_onelabClient){
std::vector<onelab::number> ps;
#if 0 // full exchange
std::vector<double> choices;
_onelabClient->get(ps, name);
if(ps.size()){
choices = ps[0].getChoices();
}
else{
ps.resize(1);
ps[0].setName(name);
ps[0].setReadOnly(true);
}
if(color) ps[0].setAttribute("Highlight", color);
if(units) ps[0].setAttribute("Units", units);
ps[0].setValues(value);
choices.insert(choices.end(), value.begin(), value.end());
ps[0].setChoices(choices);
_onelabClient->set(ps[0]);
#else // optimized exchange (without growing choice vector)
// optimized exchange (without growing choice vector)
_onelabClient->getWithoutChoices(ps, name);
if(ps.empty()){
ps.resize(1);
......@@ -826,9 +809,11 @@ void Message::AddOnelabNumberChoice(std::string name, const std::vector<double>
}
if(color) ps[0].setAttribute("Highlight", color);
if(units) ps[0].setAttribute("Units", units);
if(label) ps[0].setLabel(label);
ps[0].setAttribute("Closed", closed ? "1" : "0");
ps[0].setValues(value);
ps[0].setVisible(visible);
_onelabClient->setAndAppendChoices(ps[0]);
#endif
#if !defined(BUILD_ANDROID) // FIXME: understand why this leads to crashes
// ask Gmsh to refresh
......
......@@ -109,7 +109,9 @@ class Message {
bool errorIfMissing=false);
static std::string GetOnelabAction();
static void AddOnelabNumberChoice(std::string name, const std::vector<double> &value,
const char *color=0, const char *units=0);
const char *color=0, const char *units=0,
const char *label=0, bool visible=true,
bool closed=false);
static void AddOnelabStringChoice(std::string name, std::string kind,
std::string value, bool updateValue=true,
bool readOnly=false);
......
......@@ -332,6 +332,8 @@ int BlockingSystemCall(const char *command)
CloseHandle(prInfo.hProcess);
CloseHandle(prInfo.hThread);
return 0;
#elif(BUILD_IOS)
Message::Warning("SystemCall is not supported on iOS");
#else
if(!system(NULL)) {
Message::Error("Could not find /bin/sh: aborting system call");
......
This diff is collapsed.
......@@ -505,12 +505,14 @@ void Print_WholeQuantity(List_T *WholeQuantity, List_T *DQ_L)
Message::Check(" %.8g", (WQ+k)->Case.Constant);
break;
case WQ_MHTRANSFORM : //****
case WQ_MHTRANSFORM :
Message::Check(" MHTransform[ ");
Message::Check("%s",
Get_ExpressionName((WQ+k)->Case.MHTransform.Index));
Message::Check("%s", Get_ExpressionName((WQ+k)->Case.MHTransform.Index));
Message::Check("[");
Print_WholeQuantity((WQ+k)->Case.MHTransform.WholeQuantity, DQ_L);
for(int i = 0; i < List_Nbr((WQ+k)->Case.MHTransform.WholeQuantity_L); i++){
List_T *wq; List_Read((WQ+k)->Case.MHTransform.WholeQuantity_L, i, &wq);
Print_WholeQuantity(wq, DQ_L);
}
Message::Check(" ] ]{ %d }", (WQ+k)->Case.MHTransform.NbrPoints);
break;
......@@ -518,9 +520,6 @@ void Print_WholeQuantity(List_T *WholeQuantity, List_T *DQ_L)
Message::Check(" MHJacNL[ ");
Message::Check("%s",
Get_ExpressionName((WQ+k)->Case.MHJacNL.Index));
//Message::Check("[");
//Print_WholeQuantity((WQ+k)->Case.MHTransform.WholeQuantity, DQ_L);
//Message::Check("] ]{ %d, %d}", (WQ+k)->Case.MHJacNL.NbrPoints, (WQ+k)->Case.MHJacNL.FreqOffSet);
Message::Check("]{ %d, %d}", (WQ+k)->Case.MHJacNL.NbrPoints, (WQ+k)->Case.MHJacNL.FreqOffSet);
break;
......@@ -1564,12 +1563,20 @@ void Print_Operation(struct Resolution *RE, List_T *Operation_L)
List_Pointer(RE->DefineSystem, OPE->DefineSystemIndex))->Name);
break;
case OPERATION_DEFORMEMESH :
Message::Check(" DeformeMesh [%s, %s, '%s']; \n",
((struct DefineSystem *)
List_Pointer(RE->DefineSystem, OPE->DefineSystemIndex))->Name,
OPE->Case.DeformeMesh.Quantity,
OPE->Case.DeformeMesh.Name_MshFile);
case OPERATION_DEFORMMESH :
if(OPE->Case.DeformMesh.Quantity && OPE->Case.DeformMesh.Quantity2 &&
OPE->Case.DeformMesh.Quantity3)
Message::Check(" DeformMesh [%s, {%s, %s, %s}, '%s']; \n",
((struct DefineSystem *)
List_Pointer(RE->DefineSystem, OPE->DefineSystemIndex))->Name,
OPE->Case.DeformMesh.Quantity, OPE->Case.DeformMesh.Quantity2,
OPE->Case.DeformMesh.Quantity3, OPE->Case.DeformMesh.Name_MshFile);
else
Message::Check(" DeformMesh [%s, %s, '%s']; \n",
((struct DefineSystem *)
List_Pointer(RE->DefineSystem, OPE->DefineSystemIndex))->Name,
OPE->Case.DeformMesh.Quantity,
OPE->Case.DeformMesh.Name_MshFile);
break;
case OPERATION_GMSHREAD :
......
......@@ -848,10 +848,8 @@ struct WholeQuantity {
int InIndex, DofIndexInWholeQuantity; } Trace;
struct { char *SystemName; int DefineSystemIndex;
int DofNumber; } DofValue;
struct { List_T *WholeQuantity; // I think this is not used...
int Index, FunctionType, NbrArguments, NbrParameters, NbrPoints; } MHTransform;
struct { List_T *WholeQuantity; // I think this is not used...
int Index, FunctionType, NbrArguments, NbrParameters, NbrPoints, FreqOffSet; } MHJacNL;
struct { List_T *WholeQuantity_L; int Index, NbrPoints; } MHTransform;
struct { int Index, FunctionType, NbrArguments, NbrParameters, NbrPoints, FreqOffSet; } MHJacNL;
} Case;
};
......@@ -1142,12 +1140,12 @@ struct Operation {
int ExprIndex;
} SaveMesh;
struct {
char *Quantity;
char *Quantity, *Quantity2, *Quantity3;
char *Name_MshFile;
int GeoDataIndex;
double Factor;
int GroupIndex;
} DeformeMesh;
} DeformMesh;
struct {
char *String;
} SetGlobalSolverOptions;
......@@ -1212,7 +1210,7 @@ struct IterativeLoopSystem {
#define OPERATION_CHANGEOFCOORDINATES 8
#define OPERATION_CHANGEOFCOORDINATES2 9
#define OPERATION_CREATEDIR 10
#define OPERATION_DEFORMEMESH 11
#define OPERATION_DEFORMMESH 11
#define OPERATION_DELETEFILE 12
#define OPERATION_DOFSFREQUENCYSPECTRUM 13
#define OPERATION_EIGENSOLVE 14
......@@ -1415,6 +1413,7 @@ struct PostSubOperation {
int StoreMinYinRegister, StoreMinZinRegister, StoreMaxInRegister;
int StoreMaxXinRegister, StoreMaxYinRegister, StoreMaxZinRegister;
char *SendToServer, *Color, *Units;
bool Visible, Closed;
List_T *SendToServerList;
int StoreInField, StoreInMeshBasedField;
int Legend, FrozenTimeStepList;
......
......@@ -1158,6 +1158,7 @@ struct StringXFunction2Nbr F_Function[] = { /* #Par #Arg */
// F_PeWe
{"ElastodynamicsCylinderCavity", (CAST)F_ElastodynamicsCylinderCavity, 5, 1},
{"ElastodynamicsCylinderWall", (CAST)F_ElastodynamicsCylinderWall, 5, 1},
{"ElastodynamicsCylinderWallS", (CAST)F_ElastodynamicsCylinderWallS, 5, 1},
// F_Raytracing: ray tracing functions
{"CylinderPhase", (CAST)F_CylinderPhase, 0, 1 },
......
......@@ -210,6 +210,7 @@ FourierTransformJ return tFourierTransformJ;
Frequency return tFrequency;
FrequencyLegend return tFrequencyLegend;
FrequencySpectrum return tFrequencySpectrum;
DummyFrequencies return tFrequencySpectrum;
Full_Matrix return tFull_Matrix;
Function return tFunction;
FunctionSpace return tFunctionSpace;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1108,16 +1108,20 @@ void Cal_WholeQuantity(struct Element * Element,
Multi[Index] = 0 ;
Index++ ;
}
Index -= NbrArguments ;
Cal_WholeQuantity(Element, QuantityStorage_P0,
WholeQuantity_P->Case.MHTransform.WholeQuantity,
u, v, w, -1, 0, &Stack[0][Index], NbrArguments, ExpressionName) ;
MHTransform(Element, QuantityStorage_P0, u, v, w, &Stack[0][Index],
(struct Expression *)List_Pointer(Problem_S.Expression,
WholeQuantity_P->Case.MHTransform.Index),
WholeQuantity_P->Case.MHTransform.NbrPoints) ;
{
int N = List_Nbr(WholeQuantity_P->Case.MHTransform.WholeQuantity_L);
std::vector<struct Value> MH_Values(N);
for(int j = 0; j < N; j++){
List_T *WQ; List_Read(WholeQuantity_P->Case.MHTransform.WholeQuantity_L, j, &WQ);
Cal_WholeQuantity(Element, QuantityStorage_P0, WQ, u, v, w, -1, 0,
&MH_Values[j], NbrArguments, ExpressionName) ;
}
MHTransform(Element, QuantityStorage_P0, u, v, w, MH_Values,
(struct Expression *)List_Pointer(Problem_S.Expression,
WholeQuantity_P->Case.MHTransform.Index),
WholeQuantity_P->Case.MHTransform.NbrPoints, Stack[0][Index]) ;
}
Multi[Index] = 0 ;
Index++ ;
break ;
......
......@@ -6,6 +6,7 @@
#ifndef _F_H_
#define _F_H_
#include <vector>
#include "ProData.h"
/* ------------------------------------------------------------------------ */
......@@ -72,6 +73,7 @@ void F_CurlDyadGreenHom (F_ARG) ;
void F_ElastodynamicsCylinderCavity(F_ARG);
void F_ElastodynamicsCylinderWall(F_ARG);
void F_ElastodynamicsCylinderWallS(F_ARG);
/* F_Geometry */
......@@ -271,12 +273,19 @@ void F_dbdh_Jiles (F_ARG) ;
void F_h_Jiles (F_ARG) ;
void F_b_Jiles (F_ARG) ;
void F_dhdb_Ducharne (F_ARG) ;
void F_h_Ducharne (F_ARG) ;
void F_nu_Ducharne (F_ARG) ;
void F_dhdb_Ducharne(F_ARG) ;
void F_h_Ducharne (F_ARG) ;
void F_nu_Ducharne(F_ARG) ;
double Fi_h_Ducharne (double *hi, double *bi, double *M, int NL,
int NC, double h0, double b0, double b);
void F_nu_Vinch (F_ARG) ; // NOT USED FOR NOW (26/06/2016)
void F_mu_Vinch (F_ARG) ; // NOT USED FOR NOW (26/06/2016)
void F_h_Vinch (F_ARG) ; // NOT USED FOR NOW (26/06/2016)
void F_dhdb_Vinch(F_ARG) ; // NOT USED FOR NOW (26/06/2016)
void F_dbdh_Vinch(F_ARG) ; // NOT USED FOR NOW (26/06/2016)
// kj+++
//Usefull Mathematical functions:
double Mul_VecVec_K(const double *v1, const double *v2);
......@@ -410,9 +419,9 @@ void Fi_MHTimeIntegration(int TypePsi, int NbrTimePoint,
struct Value *ValueOut) ;
void F_MHToTime0 (int init, struct Value * A, struct Value * V,
int iTime, int NbrTimePoint, double * TimeMH) ;/* OJO!!! int *init */
void MHTransform(struct Element * Element, struct QuantityStorage * QuantityStorage_P0,
double u, double v, double w, struct Value *MH_Value,
struct Expression * Expression_P, int NbrPoints);
void MHTransform(struct Element * Element, struct QuantityStorage * QuantityStorage_P0,
double u, double v, double w, std::vector<struct Value> &MH_Inputs,
struct Expression * Expression_P, int NbrPoints, struct Value &MH_Output);
/* F_BiotSavart */
void F_BiotSavart (F_ARG) ;
......
......@@ -132,7 +132,7 @@ void F_GetNumberRunTime (F_ARG)
void F_SetVariable (F_ARG)
{
if(!Fct->String){
Message::Error("Missing runtime variable name: use SetVariableR[...]{$name}");
Message::Error("Missing runtime variable name: use SetVariable[...]{$name}");
return;
}
......
......@@ -317,52 +317,49 @@ void F_MHToTime (struct Function * Fct, struct Value * A, struct Value * V) {
/* ------------------------------------------------------------------------ */
void MHTransform(struct Element * Element, struct QuantityStorage * QuantityStorage_P0,
double u, double v, double w, struct Value *MH_Value,
struct Expression * Expression_P, int NbrPoints)
double u, double v, double w, std::vector<struct Value> &MH_Inputs,
struct Expression * Expression_P, int NbrPoints, struct Value &MH_Output)
{
double **H, ***HH, *t, *weight ;
int NbrHar;
struct Value t_Value, MH_Value_Tr;
int NbrPointsX, iVal, nVal1, nVal2 = 0, iHar, iTime;
int NbrPointsX;
MH_Get_InitData(1, NbrPoints, &NbrPointsX, &H, &HH, &t, &weight);
nVal1 = NbrValues_Type (MH_Value->Type) ;
t_Value.Type = MH_Value_Tr.Type = MH_Value->Type;
NbrHar = Current.NbrHar; /* save NbrHar */
Current.NbrHar = 1; /* evaluation in time domain ! */
for (iVal = 0 ; iVal < MAX_DIM ; iVal++) for (iHar = 0 ; iHar < NbrHar ; iHar++)
MH_Value_Tr.Val[iHar*MAX_DIM+iVal] = 0. ;
for (iTime = 0 ; iTime < NbrPointsX ; iTime++) {
for (iVal = 0 ; iVal < nVal1 ; iVal++){ /* evaluation of MH_Value at iTime-th time point */
t_Value.Val[iVal] = 0;
for (iHar = 0 ; iHar < NbrHar ; iHar++)
t_Value.Val[iVal] += H[iTime][iHar] * MH_Value->Val[iHar*MAX_DIM+iVal] ;
int NbrHar = Current.NbrHar; // save NbrHar
Current.NbrHar = 1; // evaluation in time domain!
for (int iVal = 0 ; iVal < MAX_DIM ; iVal++)
for (int iHar = 0 ; iHar < NbrHar ; iHar++)
MH_Output.Val[iHar*MAX_DIM+iVal] = 0. ;
int N = MH_Inputs.size(), nVal2 = 0;
std::vector<struct Value> t_Values(N + 1); // in case N==0
for (int iTime = 0 ; iTime < NbrPointsX ; iTime++) {
// evaluate MH_Inputs at iTime-th time point
for(int j = 0; j < N; j++){
int nVal1 = NbrValues_Type(MH_Inputs[j].Type);
t_Values[j].Type = MH_Inputs[j].Type;
for (int iVal = 0 ; iVal < nVal1 ; iVal++){
t_Values[j].Val[iVal] = 0.;
for (int iHar = 0 ; iHar < NbrHar ; iHar++)
t_Values[j].Val[iVal] += H[iTime][iHar] * MH_Inputs[j].Val[iHar*MAX_DIM+iVal] ;
}
}
/* evaluation of the function */
Get_ValueOfExpression(Expression_P, QuantityStorage_P0, u, v, w, &t_Value, 1);
//To generalize: Function in MHTransform (e.g. h[{d a}]) has 1 argument
// evaluate the function, passing the N time-domain values as arguments
Get_ValueOfExpression(Expression_P, QuantityStorage_P0, u, v, w, &t_Values[0], N);
if (!iTime) nVal2 = NbrValues_Type (t_Value.Type) ;
for (iVal = 0 ; iVal < nVal2 ; iVal++)
for (iHar = 0 ; iHar < NbrHar ; iHar++)
MH_Value_Tr.Val[iHar*MAX_DIM+iVal] +=
weight[iHar] * H[iTime][iHar] * t_Value.Val[iVal] ;
/* weight[iTime] * H[iTime][iHar] * t_Value.Val[iVal] ; */
} /* for iTime */
for (iVal = 0 ; iVal < nVal2 ; iVal++) for (iHar = 0 ; iHar < NbrHar ; iHar++)
MH_Value->Val[iHar*MAX_DIM+iVal] = MH_Value_Tr.Val[iHar*MAX_DIM+iVal] ;
MH_Value->Type = t_Value.Type ;
if(!iTime){
nVal2 = NbrValues_Type(t_Values[0].Type) ;
MH_Output.Type = t_Values[0].Type;
}
for (int iVal = 0 ; iVal < nVal2 ; iVal++)
for (int iHar = 0 ; iHar < NbrHar ; iHar++)
MH_Output.Val[iHar*MAX_DIM+iVal] +=
weight[iHar] * H[iTime][iHar] * t_Values[0].Val[iVal] ;
}
Current.NbrHar = NbrHar ;
Current.NbrHar = NbrHar ; // reset NbrHar
}
/* ----------------------------------------------------------------------------------- */
......
......@@ -16,6 +16,9 @@ extern "C" {
extern void cylindrical_wall_(double *du, double *dv, double *dut, double *dvt,
double *X, double *Y, double *t, double *omega,
double *lambda, double *mu, double *rho, double *a);
extern void cylindrical_walls_(double *du, double *dv, double *dut, double *dvt,
double *X, double *Y, double *t, double *omega,
double *lambda, double *mu, double *rho, double *a);
}
void F_ElastodynamicsCylinderCavity(F_ARG)
......@@ -64,4 +67,28 @@ void F_ElastodynamicsCylinderWall(F_ARG)
V->Type = VECTOR ;
}
void F_ElastodynamicsCylinderWallS(F_ARG)
{
double du_re = 0., dv_re = 0., du_im = 0., dv_im = 0.;
#if defined(HAVE_PEWE)
double X = A->Val[0];
double Y = A->Val[1];
double t = 0.;
double omega = Fct->Para[0];
double lambda = Fct->Para[1];
double mu = Fct->Para[2];
double rho = Fct->Para[3];
double a = Fct->Para[4];
cylindrical_walls_(&du_re,&dv_re,&du_im,&dv_im,&X,&Y,&t,&omega,&lambda,&mu,&rho,&a);
#else
Message::Error("ElastodynamicsCylinderWallS requires PeWe");
#endif
V->Val[0] = du_re;
V->Val[1] = dv_re;
V->Val[MAX_DIM] = du_im;
V->Val[MAX_DIM+1] = dv_im;
V->Type = VECTOR ;
}
#undef F_ARG
......@@ -483,6 +483,8 @@ void LinAlg_AddMatrixMatrix(gMatrix *M1, gMatrix *M2, gMatrix *M3)
{
if(M3 == M1)
add_matrix_matrix(&M1->M, &M2->M) ;
else if(M3 == M2)
add_matrix_matrix(&M2->M, &M1->M) ;
else
Message::Error("Wrong arguments in 'LinAlg_AddMatrixMatrix'");
}
......
......@@ -103,106 +103,144 @@ void Operation_ChangeOfCoordinates(struct Resolution * Resolution_P,
/* O p e r a t i o n _ D e f o r m e M e s h */
/* ------------------------------------------------------------------------ */
void Operation_DeformeMesh(struct Resolution * Resolution_P,
struct Operation * Operation_P,
struct DofData * DofData_P0,
struct GeoData * GeoData_P0)
void Operation_DeformMesh(struct Resolution * Resolution_P,
struct Operation * Operation_P,
struct DofData * DofData_P0,
struct GeoData * GeoData_P0)
{
int i, Num_Node, NumBF_X=-1, NumBF_Y=-1, NumBF_Z=-1 ;
int Num_Node, NumBF_X=-1, NumBF_Y=-1, NumBF_Z=-1 ;
double Value, un_x = 0., un_y = 0., un_z = 0. ;
struct DefineSystem * DS ;
struct Formulation * FO ;
struct DefineQuantity * DQ_P ;
struct FunctionSpace * FunctionSpace_P ;
struct DofData * DofData_P ;
struct Group * Group_P ;
Group_P = (Operation_P->Case.DeformeMesh.GroupIndex >=0)?
(struct Group *)List_Pointer(Problem_S.Group, Operation_P->Case.DeformeMesh.GroupIndex)
struct Group *Group_P = (Operation_P->Case.DeformMesh.GroupIndex >=0) ?
(struct Group *)List_Pointer(Problem_S.Group, Operation_P->Case.DeformMesh.GroupIndex)
: NULL;
if (Group_P && Group_P->FunctionType != NODESOF)
Message::Error("DeformeMesh: Group must be of NodesOf function type") ;
Message::Error("DeformMesh: Group must be of NodesOf function type") ;
DS = (struct DefineSystem*)List_Pointer(Resolution_P->DefineSystem,
Operation_P->DefineSystemIndex) ;
struct DefineSystem *DS = (struct DefineSystem*)List_Pointer
(Resolution_P->DefineSystem, Operation_P->DefineSystemIndex) ;
if( List_Nbr(DS->FormulationIndex) > 1 )
Message::Error("DeformeMesh: Only one formulation must be associated to the system %s",
if(List_Nbr(DS->FormulationIndex) > 1)
Message::Error("DeformMesh: Only one formulation must be associated to the system %s",
DS->Name) ;
FO = (struct Formulation *) List_Pointer(Problem_S.Formulation,
*((int *)List_Pointer(DS->FormulationIndex, 0))) ;
struct Formulation *FO = (struct Formulation *) List_Pointer
(Problem_S.Formulation, *((int *)List_Pointer(DS->FormulationIndex, 0))) ;
if((i = List_ISearchSeq(FO->DefineQuantity, Operation_P->Case.DeformeMesh.Quantity,
struct DofData *DofData_P = DofData_P0 + Operation_P->DefineSystemIndex ;
int i;
struct DefineQuantity *DQ_P = 0, *DQ2_P = 0, *DQ3_P = 0;
if((i = List_ISearchSeq(FO->DefineQuantity, Operation_P->Case.DeformMesh.Quantity,
fcmp_DefineQuantity_Name)) < 0)
Message::Error("Unknown Quantity '%s' in Formulation %s",
Operation_P->Case.DeformeMesh.Quantity, FO->Name ) ;
DQ_P = (struct DefineQuantity *) List_Pointer(FO->DefineQuantity, i) ;
Operation_P->Case.DeformMesh.Quantity, FO->Name) ;
else
DQ_P = (struct DefineQuantity *) List_Pointer(FO->DefineQuantity, i) ;
DofData_P = DofData_P0 + Operation_P->DefineSystemIndex ;
if(Operation_P->Case.DeformMesh.Quantity2 &&
(i = List_ISearchSeq(FO->DefineQuantity, Operation_P->Case.DeformMesh.Quantity2,
fcmp_DefineQuantity_Name)) < 0)
Message::Error("Unknown Quantity '%s' in Formulation %s",
Operation_P->Case.DeformMesh.Quantity2, FO->Name) ;
else
DQ2_P = (struct DefineQuantity *) List_Pointer(FO->DefineQuantity, i) ;
FunctionSpace_P = (struct FunctionSpace*)List_Pointer(Problem_S.FunctionSpace,
DQ_P->FunctionSpaceIndex) ;
if(Operation_P->Case.DeformMesh.Quantity3 &&
(i = List_ISearchSeq(FO->DefineQuantity, Operation_P->Case.DeformMesh.Quantity3,
fcmp_DefineQuantity_Name)) < 0)
Message::Error("Unknown Quantity '%s' in Formulation %s",
Operation_P->Case.DeformMesh.Quantity3, FO->Name) ;
else
DQ3_P = (struct DefineQuantity *) List_Pointer(FO->DefineQuantity, i) ;
struct FunctionSpace *FunctionSpace_P = 0, *FunctionSpace2_P = 0, *FunctionSpace3_P = 0;
if(DQ_P)
FunctionSpace_P = (struct FunctionSpace*)List_Pointer
(Problem_S.FunctionSpace, DQ_P->FunctionSpaceIndex) ;
if(DQ2_P)
FunctionSpace2_P = (struct FunctionSpace*)List_Pointer
(Problem_S.FunctionSpace, DQ2_P->FunctionSpaceIndex) ;
if(DQ3_P)
FunctionSpace3_P = (struct FunctionSpace*)List_Pointer
(Problem_S.FunctionSpace, DQ3_P->FunctionSpaceIndex) ;
for(i = 0 ; i < List_Nbr(FunctionSpace_P->BasisFunction); i++){
if( (void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction,
i))->Function == (void(*)())BF_NodeX )
if((void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction,
i))->Function == (void(*)())BF_NodeX)
NumBF_X = ((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction, i))->Num;
if( (void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction,
i))->Function == (void(*)())BF_NodeY )
if((void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction,
i))->Function == (void(*)())BF_NodeY)
NumBF_Y = ((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction, i))->Num;
if( (void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction,
i))->Function == (void(*)())BF_NodeZ )
if((void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction,
i))->Function == (void(*)())BF_NodeZ)
NumBF_Z = ((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction, i))->Num;
if((void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction,
i))->Function == (void(*)())BF_Node)
NumBF_X = ((struct BasisFunction*)List_Pointer(FunctionSpace_P->BasisFunction, i))->Num;
}
if(FunctionSpace2_P){
for(i = 0 ; i < List_Nbr(FunctionSpace2_P->BasisFunction); i++){
if((void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace2_P->BasisFunction,
i))->Function == (void(*)())BF_Node)
NumBF_Y = ((struct BasisFunction*)List_Pointer(FunctionSpace2_P->BasisFunction, i))->Num;
}
}
if(FunctionSpace3_P){
for(i = 0 ; i < List_Nbr(FunctionSpace3_P->BasisFunction); i++){
if((void(*)())((struct BasisFunction*)List_Pointer(FunctionSpace3_P->BasisFunction,
i))->Function == (void(*)())BF_Node)
NumBF_Z = ((struct BasisFunction*)List_Pointer(FunctionSpace3_P->BasisFunction, i))->Num;
}
}
for(i = 0 ; i < List_Nbr(FunctionSpace_P->DofData->DofList) ; i++){