Skip to content

Commit 18f07e9

Browse files
simonlegrandprj-
andcommitted
Fix n_name_param for MeshS
Update plugin/seq/iovtk.cpp Co-authored-by: Pierre Jolivet <prj-@users.noreply.github.com> Update plugin/seq/iovtk.cpp Co-authored-by: Pierre Jolivet <prj-@users.noreply.github.com>
1 parent 84600b4 commit 18f07e9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

plugin/seq/iovtk.cpp

+10-6
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ class VTK_LoadMesh_Op : public E_F0mps {
13851385
basicAC_F0::name_and_type VTK_LoadMesh_Op::name_param[] = {{"reft", &typeid(long)},
13861386
{"swap", &typeid(bool)},
13871387
{"refe", &typeid(long)},
1388-
{"namelabel", &typeid(string)},
1388+
{"namelabel", &typeid(string*)},
13891389
{"fields", &typeid( KN<KN<double> >*)}};
13901390

13911391
class VTK_LoadMesh : public OneOperator {
@@ -3235,7 +3235,7 @@ class VTK_LoadMesh3_Op : public E_F0mps {
32353235

32363236
basicAC_F0::name_and_type VTK_LoadMesh3_Op::name_param[] = {
32373237
{"reftet", &typeid(long)}, {"swap", &typeid(bool)},
3238-
{"refface", &typeid(long)}, {"namelabel", &typeid(string)},
3238+
{"refface", &typeid(long)}, {"namelabel", &typeid(string*)},
32393239
{"cleanmesh", &typeid(bool)}, {"removeduplicate", &typeid(bool)},
32403240
{"precisvertice", &typeid(double)},
32413241
{"fields", &typeid( KN<KN<double> >*)}
@@ -5635,9 +5635,9 @@ class VTK_WriteMeshT_Op : public E_F0mps {
56355635

56365636
vector< Expression2 > l;
56375637
#ifndef COMMON_HPDDM_PARALLEL_IO
5638-
static const int n_name_param = 8;
5638+
static const int n_name_param = std::is_same<MMesh, MeshS>::value ? 8 : 7;
56395639
#else
5640-
static const int n_name_param = 9;
5640+
static const int n_name_param = std::is_same<MMesh, MeshS>::value ? 9 : 8;;
56415641
#endif
56425642
static basicAC_F0::name_and_type name_param[];
56435643
Expression nargs[n_name_param];
@@ -5650,6 +5650,9 @@ class VTK_WriteMeshT_Op : public E_F0mps {
56505650
bool arg(int i, Stack stack, bool a) const {
56515651
return nargs[i] ? GetAny< bool >((*nargs[i])(stack)) : a;
56525652
}
5653+
string* arg(int i, Stack stack, string* a) const {
5654+
return nargs[i] ? GetAny< string* >((*nargs[i])(stack)) : a;
5655+
}
56535656
double arg(int i, Stack stack, double a) const {
56545657
return nargs[i] ? GetAny< double >((*nargs[i])(stack)) : a;
56555658
}
@@ -6337,6 +6340,7 @@ class VTK_LoadMeshT_Op : public E_F0mps {
63376340
double arg(int i, Stack stack, double a) const {
63386341
return nargs[i] ? GetAny< double >((*nargs[i])(stack)) : a;
63396342
}
6343+
string* arg(int i, Stack stack, string* a) const { return nargs[i] ? GetAny< string* >((*nargs[i])(stack)) : a;}
63406344
KN<KN<double> >* arg(int i, Stack stack,KN<KN<double> >*p) const {
63416345
return nargs[i] ? GetAny< KN<KN<double> >* >((*nargs[i])(stack)) : p;
63426346
}
@@ -6358,7 +6362,7 @@ basicAC_F0::name_and_type VTK_LoadMeshT_Op< MeshS >::name_param[] = {
63586362
{"reftri", &typeid(long)},
63596363
{"swap", &typeid(bool)},
63606364
{"refedge", &typeid(long)},
6361-
{"namelabel", &typeid(string)},
6365+
{"namelabel", &typeid(string*)},
63626366
{"cleanmesh", &typeid(bool)},
63636367
{"removeduplicate", &typeid(bool)},
63646368
{"precisvertice", &typeid(double)},
@@ -6371,7 +6375,7 @@ basicAC_F0::name_and_type VTK_LoadMeshT_Op< MeshL >::name_param[] = {
63716375
{"refedge", &typeid(long)},
63726376
{"swap", &typeid(bool)},
63736377
{"refbdpoint", &typeid(long)},
6374-
{"namelabel", &typeid(string)},
6378+
{"namelabel", &typeid(string*)},
63756379
{"cleanmesh", &typeid(bool)},
63766380
{"removeduplicate", &typeid(bool)},
63776381
{"precisvertice", &typeid(double)},

0 commit comments

Comments
 (0)