diff --git a/doc/src/Developer_updating.rst b/doc/src/Developer_updating.rst index 1913a38cbd..c4831d8db7 100644 --- a/doc/src/Developer_updating.rst +++ b/doc/src/Developer_updating.rst @@ -24,6 +24,7 @@ Available topics in mostly chronological order are: - `Use of "override" instead of "virtual"`_ - `Simplified and more compact neighbor list requests`_ - `Split of fix STORE into fix STORE/GLOBAL and fix STORE/PERATOM`_ +- `Use Output::get_dump_by_id() instead of Output::find_dump()`_ ---- @@ -382,3 +383,43 @@ New: FixStoreGlobal *fix = dynamic_cast(modify->get_fix_by_id(id_fix)); This change is **required** or else the code will not compile. + +Use Output::get_dump_by_id() instead of Output::find_dump() +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionchanged:: TBD + +The accessor function to individual dump style instances has been changed +from ``Output::find_dump()`` returning the index of the dump instance in +the list of dumps to ``Output::get_dump_by_id()`` returning a pointer to +the dump directly. Example: + +Old: + +.. code-block:: C++ + + int idump = output->find_dump(arg[iarg+1]); + if (idump < 0) + error->all(FLERR,"Dump ID in hyper command does not exist"); + memory->grow(dumplist,ndump+1,"hyper:dumplist"); + dumplist[ndump++] = idump; + + [...] + + if (dumpflag) + for (int idump = 0; idump < ndump; idump++) + output->dump[dumplist[idump]]->write(); + +New: + +.. code-block:: C++ + + auto idump = output->get_dump_by_id(arg[iarg+1]); + if (!idump) error->all(FLERR,"Dump ID {} in hyper command does not exist", arg[iarg+1]); + dumplist.emplace_back(idump); + + [...] + + if (dumpflag) for (auto idump : dumplist) idump->write(); + +This change is **required** or else the code will not compile. diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 56fd7a1305..ee225b4a1f 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -13,6 +13,7 @@ Accelrys acceptor Acceptor acceptors +accessor accomx accomy accomz