This is a helper class that handles the common task of specifying the set of meshes and arrays rqeuired to perform a specific analysis.
More...
#include <DataRequirements.h>
|
|
using | AssocArrayMapType = std::map< int, std::vector< std::string > > |
| |
|
using | MeshArrayMapType = std::map< std::string, AssocArrayMapType > |
| |
|
using | MeshNamesType = std::map< std::string, bool > |
| |
|
| bool | Empty () const |
| | Returns true if the object is empty. More...
|
| |
| int | Initialize (pugi::xml_node parent) |
| | initialize from XML. More...
|
| |
| int | Initialize (DataAdaptor *adaptor, bool structureOnly) |
| | This is a convenience method that fills in all of data that the data adaptor makes avaialable. More...
|
| |
| int | AddRequirement (const std::string &meshName, bool structureOnly) |
| | Adds a mesh. More...
|
| |
| int | AddRequirement (const std::string &meshName, int association, const std::vector< std::string > &arrays) |
| | Adds a set of arrays on a specific mesh. More...
|
| |
| int | AddRequirement (const std::string &meshName, int association, const std::string &array) |
| | Adds a set of arrays on a specific mesh. More...
|
| |
| int | GetRequiredMeshes (std::vector< std::string > &meshes) const |
| | Get the list of meshes. More...
|
| |
| unsigned int | GetNumberOfRequiredMeshes () const |
| | Get the number of required meshes. More...
|
| |
| int | GetRequiredMesh (unsigned int id, std::string &mesh) const |
| | Get the name of the ith required mesh. More...
|
| |
| int | GetRequiredArrays (const std::string &meshName, int association, std::vector< std::string > &arrays) const |
| | For the named mesh, gets the list of required arrays. More...
|
| |
| int | GetNumberOfRequiredArrays (const std::string &meshName, int association, unsigned int &nArrays) const |
| | For the named mesh, and association, gets the number of required arrays. More...
|
| |
| void | Clear () |
| | Clear the contents of the container. More...
|
| |
| MeshRequirementsIterator | GetMeshRequirementsIterator () const |
| | Get an iterator for the named mesh. More...
|
| |
| ArrayRequirementsIterator | GetArrayRequirementsIterator (const std::string &meshName) const |
| | Get an iterator for the associated arrays. More...
|
| |
|
|
class | ArrayRequirementsIterator |
| |
|
class | MeshRequirementsIterator |
| |
This is a helper class that handles the common task of specifying the set of meshes and arrays rqeuired to perform a specific analysis.
An analysis would typically intialize the data requirement from XML and then probe the requirements during execution to get the minimal set of data required to complete the analysis.
◆ AddRequirement() [1/3]
| int sensei::DataRequirements::AddRequirement |
( |
const std::string & |
meshName, |
|
|
bool |
structureOnly |
|
) |
| |
Adds a mesh.
The requirement consists of a mesh name and weather it is structure only
- Parameters
-
| [in] | meshName | name of the mesh |
| [in] | structureOnly | flag indicating if mesh geometry is needed |
- Returns
- zero if successful
◆ AddRequirement() [2/3]
| int sensei::DataRequirements::AddRequirement |
( |
const std::string & |
meshName, |
|
|
int |
association, |
|
|
const std::vector< std::string > & |
arrays |
|
) |
| |
Adds a set of arrays on a specific mesh.
The requirement consists of a mesh name and a list of arrays
- Parameters
-
| [in] | meshName | name of the mesh |
| [in] | association | type of arrays |
| [in] | arrays | a list of the required arrays |
- Returns
- zero if successful
◆ AddRequirement() [3/3]
| int sensei::DataRequirements::AddRequirement |
( |
const std::string & |
meshName, |
|
|
int |
association, |
|
|
const std::string & |
array |
|
) |
| |
Adds a set of arrays on a specific mesh.
The requirement consists of a mesh name and a list of arrays
- Parameters
-
| [in] | meshName | name of the mesh |
| [in] | association | type of the required array |
| [in] | array | name of the required array |
- Returns
- zero if successful
◆ Clear()
| void sensei::DataRequirements::Clear |
( |
| ) |
|
Clear the contents of the container.
◆ Empty()
| bool sensei::DataRequirements::Empty |
( |
| ) |
const |
|
inline |
Returns true if the object is empty.
◆ GetArrayRequirementsIterator()
Get an iterator for the associated arrays.
◆ GetMeshRequirementsIterator()
Get an iterator for the named mesh.
◆ GetNumberOfRequiredArrays()
| int sensei::DataRequirements::GetNumberOfRequiredArrays |
( |
const std::string & |
meshName, |
|
|
int |
association, |
|
|
unsigned int & |
nArrays |
|
) |
| const |
For the named mesh, and association, gets the number of required arrays.
- Parameters
-
| [in] | meshName | the name of the mesh |
| [in] | association | svtkDataObject::POINT, svtkDataObject::CELL, etc |
| [out] | number | of arrays |
- Returns
- zero if successful
◆ GetNumberOfRequiredMeshes()
| unsigned int sensei::DataRequirements::GetNumberOfRequiredMeshes |
( |
| ) |
const |
Get the number of required meshes.
◆ GetRequiredArrays()
| int sensei::DataRequirements::GetRequiredArrays |
( |
const std::string & |
meshName, |
|
|
int |
association, |
|
|
std::vector< std::string > & |
arrays |
|
) |
| const |
For the named mesh, gets the list of required arrays.
- Parameters
-
| [in] | meshName | the name of the mesh |
| [in] | association | svtkDataObject::POINT, svtkDataObject::CELL, etc |
| [out] | arrays | a vector where the arrays will be stored |
- Returns
- zero if successful
◆ GetRequiredMesh()
| int sensei::DataRequirements::GetRequiredMesh |
( |
unsigned int |
id, |
|
|
std::string & |
mesh |
|
) |
| const |
Get the name of the ith required mesh.
◆ GetRequiredMeshes()
| int sensei::DataRequirements::GetRequiredMeshes |
( |
std::vector< std::string > & |
meshes | ) |
const |
Get the list of meshes.
- Parameters
-
| [out] | meshes | a vector where mesh names will be stored |
- Returns
- zero if successful
◆ Initialize() [1/2]
| int sensei::DataRequirements::Initialize |
( |
pugi::xml_node |
parent | ) |
|
initialize from XML.
the XML should contain one or more mesh elements each with zero or more array groups
<parent>
<mesh name="mesh_1" structure_only="1">
<cell_arrays> array_1, ... array_n </cell_arrays>
<point_arrays> array_1, ... array_n </point_arrays>
</mesh>
.
.
.
<mesh name="mesh_n" structure_only="0">
<cell_arrays> array_1, ... array_n </cell_arrays>
<point_arrays> array_1, ... array_n </point_arrays>
</mesh>
</parent>
- Parameters
-
| [in] | parent | XML node which contains mesh elements |
- Returns
- the number of mesh elements processed.
◆ Initialize() [2/2]
| int sensei::DataRequirements::Initialize |
( |
DataAdaptor * |
adaptor, |
|
|
bool |
structureOnly |
|
) |
| |
This is a convenience method that fills in all of data that the data adaptor makes avaialable.
- Parameters
-
| [in] | adaptor | a DataAdaptor instance |
| [in] | structureOnly | true if mesh geometry and topology are not needed |
- Returns
- zero if successful, non zero if an error occurred
The documentation for this class was generated from the following file: