From d7d594a87e0419e0694ca9fe04c813d506025185 Mon Sep 17 00:00:00 2001 From: dmitry-ganyushin Date: Thu, 7 Jan 2021 14:44:22 -0500 Subject: [PATCH] Added a description of the Group API and step selection. --- docs/user_guide/source/api_full/cxx11.rst | 67 +++++++++++++++++++++++ docs/user_guide/source/engines/bp4.rst | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/docs/user_guide/source/api_full/cxx11.rst b/docs/user_guide/source/api_full/cxx11.rst index d86db960e0..b9e3b8fe1e 100644 --- a/docs/user_guide/source/api_full/cxx11.rst +++ b/docs/user_guide/source/api_full/cxx11.rst @@ -114,3 +114,70 @@ Example: // will throw exception like this: // C++ exception with description "can't handle ShapeID::GlobalValue // in Variable(Name: "myVar")" thrown + +**Group API** + + +.. doxygenclass:: adios2::Group + :project: CXX11 + :path: ../../bindings/CXX11/adios2/cxx11/ + :members: + +The Group API can be used for inquiring other group objects, variables, and attributes +by reading, provided that variable and attribute names were written in a tree-like +way similar that is used in a file system: + +.. code-block:: bash + + "group1/group2/group3/variable1" + "group1/group2/group3/attribute1" + +A group object containing the tree structure is obtained by the +``InquireGroup`` function of the ``IO`` object. + +.. code-block:: c++ + + Group g = io.InquireGroup("group1"); + +Another group object can be generated by the predecessor group object. + +.. code-block:: c++ + + Group g1 = g.InquireGroup("group2"); + +The absolute path can be inquired or set explicitly + +.. code-block:: c++ + + std::string path = g.InquirePath(); + g.setPath("group1/group2/group3"); + +Names of available groups, variables and attributes could be inquired: + +.. code-block:: c++ + + std::vector groups = g.AvailableGroups(); + std::vector variables = g.AvailableVariables(); + std::vector attributes = g.AvailableVariables(); + +Finally, variables can be inquired + +.. code-block:: c++ + + auto var = g.InquireVariable("variable1"); + +An extra function is provided that returns a type of a variable + +.. code-block:: c++ + + DataType varType = g.VariableType("variable1"); + + +**Step selection** + +Steps for reading can be selected using a pre-set parameter with as a file name +as a key and a list of selected steps separated by comma as a value. + +.. code-block:: c++ + + io.SetParameter(filename, "1,3"); diff --git a/docs/user_guide/source/engines/bp4.rst b/docs/user_guide/source/engines/bp4.rst index 9391476123..0c216091db 100644 --- a/docs/user_guide/source/engines/bp4.rst +++ b/docs/user_guide/source/engines/bp4.rst @@ -120,5 +120,5 @@ buffer using the IME native API. To use the IME transport, IME must be avaiable on the target system and ADIOS2 needs to be configured with ``ADIOS2_USE_IME``. By default, data written to the IME is automatically flushed to the parallel filesystem at every ``EndStep()`` call. You can -disable this automaic flush by setting the transport parameter ``SyncToPFS`` +disable this automatic flush by setting the transport parameter ``SyncToPFS`` to ``OFF``.