update dump styles to use Compute::is_initialized()
This commit is contained in:
@ -297,9 +297,10 @@ int DumpVTK::count()
|
||||
// cannot invoke before first run, otherwise invoke if necessary
|
||||
|
||||
if (ncompute) {
|
||||
if (update->first_update == 0)
|
||||
error->all(FLERR,"Dump compute cannot be invoked before first run");
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute[i]->compute_peratom();
|
||||
compute[i]->invoked_flag |= Compute::INVOKED_PERATOM;
|
||||
|
||||
@ -562,9 +562,10 @@ int DumpCustom::count()
|
||||
// cannot invoke before first run, otherwise invoke if necessary
|
||||
|
||||
if (ncompute) {
|
||||
if (update->first_update == 0)
|
||||
error->all(FLERR,"Dump compute cannot be invoked before first run");
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_PERATOM)) {
|
||||
compute[i]->compute_peratom();
|
||||
compute[i]->invoked_flag |= Compute::INVOKED_PERATOM;
|
||||
|
||||
@ -527,9 +527,10 @@ int DumpGrid::count()
|
||||
// cannot invoke before first run, otherwise invoke if necessary
|
||||
|
||||
if (ncompute) {
|
||||
if (update->first_update == 0)
|
||||
error->all(FLERR,"Dump compute cannot be invoked before first run");
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_PERGRID)) {
|
||||
compute[i]->compute_pergrid();
|
||||
compute[i]->invoked_flag |= Compute::INVOKED_PERGRID;
|
||||
|
||||
@ -667,8 +667,9 @@ void DumpImage::write()
|
||||
// cannot invoke before first run, otherwise invoke if necessary
|
||||
|
||||
if (grid_compute) {
|
||||
if (update->first_update == 0)
|
||||
error->all(FLERR,"Grid compute used in dump image cannot be invoked before first run");
|
||||
if (!grid_compute->is_initialized())
|
||||
error->all(FLERR,"Grid compute ID {} used in dump image cannot be invoked "
|
||||
"before initialized by a run", grid_compute->id);
|
||||
if (!(grid_compute->invoked_flag & Compute::INVOKED_PERGRID)) {
|
||||
grid_compute->compute_pergrid();
|
||||
grid_compute->invoked_flag |= Compute::INVOKED_PERGRID;
|
||||
|
||||
@ -328,9 +328,10 @@ int DumpLocal::count()
|
||||
// cannot invoke before first run, otherwise invoke if necessary
|
||||
|
||||
if (ncompute) {
|
||||
if (update->first_update == 0)
|
||||
error->all(FLERR,"Dump compute cannot be invoked before first run");
|
||||
for (i = 0; i < ncompute; i++) {
|
||||
if (!compute[i]->is_initialized())
|
||||
error->all(FLERR,"Dump compute ID {} cannot be invoked before initialized by a run",
|
||||
compute[i]->id);
|
||||
if (!(compute[i]->invoked_flag & Compute::INVOKED_LOCAL)) {
|
||||
compute[i]->compute_local();
|
||||
compute[i]->invoked_flag |= Compute::INVOKED_LOCAL;
|
||||
|
||||
Reference in New Issue
Block a user