error out on trying to dump strings or variables
This commit is contained in:
@ -73,6 +73,9 @@ NETCDF package. They are only enabled if LAMMPS was built with
|
|||||||
that package. See the :doc:`Build package <Build_package>` doc page for
|
that package. See the :doc:`Build package <Build_package>` doc page for
|
||||||
more info.
|
more info.
|
||||||
|
|
||||||
|
The *netcdf* and *netcdf/mpiio* dump styles currently cannot dump
|
||||||
|
string properties or properties from variables.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
|
|||||||
@ -147,6 +147,9 @@ DumpNetCDF::DumpNetCDF(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
mangled = mangled.substr(0,found);
|
mangled = mangled.substr(0,found);
|
||||||
ndims = THIS_IS_A_FIX;
|
ndims = THIS_IS_A_FIX;
|
||||||
}
|
}
|
||||||
|
} else if (utils::strmatch(mangled, "^v_")) {
|
||||||
|
idim = 0;
|
||||||
|
ndims = THIS_IS_A_VARIABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// find mangled name
|
// find mangled name
|
||||||
@ -257,6 +260,8 @@ void DumpNetCDF::openfile()
|
|||||||
perat[i].dims = fix[j]->size_peratom_cols;
|
perat[i].dims = fix[j]->size_peratom_cols;
|
||||||
if (perat[i].dims > DUMP_NC_MAX_DIMS)
|
if (perat[i].dims > DUMP_NC_MAX_DIMS)
|
||||||
error->all(FLERR,"perat[i].dims > DUMP_NC_MAX_DIMS");
|
error->all(FLERR,"perat[i].dims > DUMP_NC_MAX_DIMS");
|
||||||
|
} else if (perat[i].dims == THIS_IS_A_VARIABLE) {
|
||||||
|
error->all(FLERR,"Dump netcdf currently does not support dumping variables");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,6 +406,8 @@ void DumpNetCDF::openfile()
|
|||||||
xtype = NC_INT;
|
xtype = NC_INT;
|
||||||
} else if (vtype[perat[i].field[0]] == Dump::BIGINT) {
|
} else if (vtype[perat[i].field[0]] == Dump::BIGINT) {
|
||||||
xtype = NC_INT64;
|
xtype = NC_INT64;
|
||||||
|
} else if (vtype[perat[i].field[0]] == Dump::STRING) {
|
||||||
|
error->all(FLERR,"Dump netcdf currently does not support dumping string properties");
|
||||||
} else {
|
} else {
|
||||||
if (double_precision)
|
if (double_precision)
|
||||||
xtype = NC_DOUBLE;
|
xtype = NC_DOUBLE;
|
||||||
|
|||||||
Reference in New Issue
Block a user