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 source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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'");
}
......
This diff is collapsed.
......@@ -1376,7 +1376,8 @@ void Format_PostFooter(struct PostSubOperation *PSO_P, int Store)
GetDPNumbers[CurrentName] = exp;
if(PSO_P->SendToServer && strcmp(PSO_P->SendToServer, "No"))
Message::AddOnelabNumberChoice(PSO_P->SendToServer, exp, PSO_P->Color,
PSO_P->Units);
PSO_P->Units, PSO_P->Label, PSO_P->Visible,
PSO_P->Closed);
}
break;
case FORMAT_LOOP_ERROR :
......@@ -1570,7 +1571,8 @@ void Format_PostElement(struct PostSubOperation *PSO_P, int Contour, int Store,
std::vector<double> v;
Export_Value(&PE->Value[0], v, PSO_P->SendToServerList);
Message::AddOnelabNumberChoice(PSO_P->SendToServer, v, PSO_P->Color,
PSO_P->Units);
PSO_P->Units, PSO_P->Label, PSO_P->Visible,
PSO_P->Closed);
}
}
}
......
......@@ -414,8 +414,9 @@ void Pos_Formulation(struct Formulation *Formulation_P,
}
}
else {
if((PostStream = FOpen(PostFileName,
Flag_BIN ? (FORMAT_NXUNV ? "r+b" : "ab") : "a")))
if((PostStream = FOpen(PostFileName, Flag_BIN ?
(PostSubOperation_P->Format == FORMAT_NXUNV ? "r+b" : "ab") :
"a")))
Message::Direct(4, " >> '%s'", PostFileName) ;
else{
Message::Error("Unable to open file '%s'", PostFileName) ;
......
......@@ -1463,7 +1463,7 @@ void Pos_PrintOnRegion(struct PostQuantity *NCPQ_P,
std::vector<double> v;
Export_Value(&Value, v, PSO_P->SendToServerList);
Message::AddOnelabNumberChoice(PSO_P->SendToServer, v, PSO_P->Color,
PSO_P->Units);
PSO_P->Units, PSO_P->Label);
}
}
......@@ -1497,7 +1497,7 @@ void Pos_PrintOnRegion(struct PostQuantity *NCPQ_P,
std::vector<double> v;
Export_Value(&ValueSummed, v, PSO_P->SendToServerList);
Message::AddOnelabNumberChoice(PSO_P->SendToServer, v, PSO_P->Color,
PSO_P->Units);
PSO_P->Units, PSO_P->Label);
}
}
}
......
......@@ -3099,30 +3099,31 @@ void Treatment_Operation(struct Resolution * Resolution_P,
/* --> D e f o r m e M e s h */
/* ------------------------------------------ */
case OPERATION_DEFORMEMESH :
case OPERATION_DEFORMMESH :
{
if (Operation_P->Case.DeformeMesh.Name_MshFile == NULL)
Operation_P->Case.DeformeMesh.Name_MshFile = Name_MshFile ;
Message::Info("DeformeMesh[%s, %s, '%s']",
if (Operation_P->Case.DeformMesh.Name_MshFile == NULL)
Operation_P->Case.DeformMesh.Name_MshFile = Name_MshFile ;
Message::Info("DeformMesh[%s, %s, '%s']",
((struct DefineSystem *)
List_Pointer(Resolution_P->DefineSystem,
Operation_P->DefineSystemIndex))->Name,
Operation_P->Case.DeformeMesh.Quantity,
Operation_P->Case.DeformeMesh.Name_MshFile) ;
Operation_P->Case.DeformMesh.Quantity,
Operation_P->Case.DeformMesh.Name_MshFile) ;
int i;
if ((i = List_ISearchSeq(GeoData_L, Operation_P->Case.DeformeMesh.Name_MshFile,
if ((i = List_ISearchSeq(GeoData_L, Operation_P->Case.DeformMesh.Name_MshFile,
fcmp_GeoData_Name)) < 0){
Message::Error("DeformeMesh: Wrong NameOfMeshFile %s",
Operation_P->Case.DeformeMesh.Name_MshFile);
Message::Error("DeformMesh: Wrong NameOfMeshFile %s",
Operation_P->Case.DeformMesh.Name_MshFile);
break;
}
Operation_P->Case.DeformeMesh.GeoDataIndex = i ;
Operation_P->Case.DeformMesh.GeoDataIndex = i ;
Operation_DeformeMesh
Operation_DeformMesh
(Resolution_P, Operation_P, DofData_P0, GeoData_P0) ;
}
break;
/* --> P o s t O p e r a t i o n */
/* ------------------------------- */
......
......@@ -60,10 +60,10 @@ void Operation_ChangeOfCoordinates(struct Resolution * Resolution_P,
struct DofData * DofData_P0,
struct GeoData * GeoData_P0);
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);
void Operation_PostOperation(struct Resolution *Resolution_P,
struct DofData *DofData_P0,
......
Function{
// definitions for parallel (MPI) runs:
// this describes a layered (1-d like) decomposition
// +------+------+------+---...---+------+
// field: | 0|1 2|3 4|5 2N-4|2N-3 |
// idom: | 0 | 1 | 2 | | N-1 |
// +------+------+------+---...---+------+
ListOfSubdomains = {} ; // the subdomains that I'm in charge of
ListOfFields = {}; // my fields
myD = {} ; // the domains that I'm in charge of
ListOfFields = {};
ListOfConnectedFields = {};
For idom In {0:N_DOM-1}
myD~{idom} = {};
If (idom % MPI_Size == MPI_Rank)
If(idom == 0)
// my fields
myFieldLeft = {};
myFieldRight = {0};
EndIf
If(idom == N_DOM-1)
myFieldLeft = {2*idom-1};
myFieldRight = {};
EndIf
If(idom > 0 && idom < N_DOM-1)
myFieldLeft = {2*idom-1};
myFieldRight = {2*idom};
EndIf
ListOfSubdomains += idom;
ListOfFields += {myFieldLeft(), myFieldRight()};
myD() += D(idom);
myD~{idom} += D~{idom}();
EndIf
EndFor
ListOfConnectedFields = {}; // fields connected to my fields
For idom In {0:N_DOM-1}
If (idom % MPI_Size == MPI_Rank)