Lagrange
|
Iterating over mesh attributes. More...
Sequential iteration for read operations | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | seq_foreach_named_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function to each attribute of a mesh. More... | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | seq_foreach_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function to each attribute of a mesh. More... | |
Sequential iteration for write operations | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | seq_foreach_named_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function to each attribute of a mesh. More... | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | seq_foreach_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function to each attribute of a mesh. More... | |
Parallel iteration for read operations | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | par_foreach_named_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function in parallel to each attribute of a mesh. More... | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | par_foreach_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function in parallel to each attribute of a mesh. More... | |
Parallel iteration for write operations | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | par_foreach_named_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function in parallel to each attribute of a mesh. More... | |
template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor , typename Scalar , typename Index > | |
void | par_foreach_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
Applies a function in parallel to each attribute of a mesh. More... | |
Iterating over mesh attributes.
These utility functions use generic lambdas to iterate over mesh attributes of different types. Because a generic lambda is templated, the type of each attribute is accessible at compile type within the lambda function:
To iterate over mesh attributes while accessing their names, use the named_
variants:
There are read and write variants of the functions above, depending on what type of access is needed over the mesh attributes. Finally, the par_*
variants call the visitor function in parallel for each mesh attribute.
void seq_foreach_named_attribute_read | ( | const SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function to each attribute of a mesh.
The visitor function iterates over a pair of (name x attribute).
[in] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |
void seq_foreach_attribute_read | ( | const SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function to each attribute of a mesh.
[in] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |
void seq_foreach_named_attribute_write | ( | SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function to each attribute of a mesh.
The visitor function iterates over a pair of (name x attribute). In this variant, the attribute is passed as a writable reference to the visitor function.
[in] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |
void seq_foreach_attribute_write | ( | SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function to each attribute of a mesh.
In this variant, the attribute is passed as a writable reference to the visitor function.
[in,out] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |
void par_foreach_named_attribute_read | ( | const SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function in parallel to each attribute of a mesh.
The visitor function iterates over a pair of (name x attribute).
[in] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |
void par_foreach_attribute_read | ( | const SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function in parallel to each attribute of a mesh.
[in] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |
void par_foreach_named_attribute_write | ( | SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function in parallel to each attribute of a mesh.
The visitor function iterates over a pair of (name x attribute). In this variant, the attribute is passed as a writable reference to the visitor function.
[in] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |
void par_foreach_attribute_write | ( | SurfaceMesh< Scalar, Index > & | mesh, |
Visitor && | vis | ||
) |
#include <lagrange/foreach_attribute.h>
Applies a function in parallel to each attribute of a mesh.
In this variant, the attribute is passed as a writable reference to the visitor function.
[in,out] | mesh | Mesh on whose attribute to apply the visitor function. |
[in] | vis | Visitor function to apply to each mesh attribute. Typically a generic lambda. |