Skip to content

Namespace ae108::assembly::utilities

Namespace List > ae108 > assembly > utilities

Classes

Type Name
struct DeriveUniquely <Args>
Derives each of its template arguments once.
struct DeriveUniquely< Arg, Args... > <class Arg, Args>
struct DeriveUniquely<> <>
struct HasUniqueTypeTrait <TypeTrait, Assemblers>
This type trait compares "TypeTrait<Assembler>::type" for all types "Assembler" in Assemblers. If they are all the same, then HasUniqueTypeTrait contains a typedef "type" equal to "TypeTrait<Assembler>::type" and inherits from std::true_type. If this is not the case, thenHasUniqueTypeTrait does not contain such a typedef and inherits from std::false_type.
struct IsSingleUniqueType <Args>
Inherits std::true_type if Args contains exactly one type, disregarding duplicates.
struct IsSingleUniqueType< A > <class A>
struct IsSingleUniqueType< A, B, Args... > <class A, class B, Args>
struct IsSingleUniqueType<> <>

Public Functions

Type Name
InputIterator deserialize (InputIterator bufferBegin, std::array< ValueType, ArraySize > *const array)
Deserialize a buffer to an array by copying the buffer to the array.
InputIterator deserialize (InputIterator bufferBegin, std::vector< ValueType > *const vector)
Deserialize a buffer to a vector by copying the buffer to the vector.
InputIterator deserialize (InputIterator bufferBegin, Eigen::Matrix< ValueType, Rows, Cols > * vector)
Deserialize a buffer to an Eigen::Matrix by copying the buffer to the matrix (row major format).
InputIterator deserializeRange (InputIterator bufferBegin, InputIterator bufferEnd, OutputIterator outputBegin)
Iterates through the input range and deserializes chunks of buffer.
void groupElementDataPerVertex (const MeshView & meshView, const cpppetsc::local< VectorType > & from, PerVertexData *const to)
Copies the data from the input vector to the output, grouped by vertex.
void resizeIfPossible (std::vector< T > *const container, const typename std::vector< T >::size_type size)
Resizes the vector to size.
void resizeIfPossible (std::array< T, Size > *const container, const typename std::array< T, Size >::size_type size)
Asserts that the array has the correct size.
OutputIterator serialize (const std::array< ValueType, ArraySize > & array, OutputIterator bufferBegin)
Serializes an array to a buffer by copying the array to the buffer.
OutputIterator serialize (const std::vector< ValueType > & vector, OutputIterator bufferBegin)
Serializes a vector to a buffer by copying the vector to the buffer.
OutputIterator serialize (const Eigen::Matrix< ValueType, Rows, Cols, Options > & vector, OutputIterator bufferBegin)
Serializes an Eigen::Matrix to a buffer by copying the vector to the buffer (row major format).
OutputIterator serializeRange (InputIterator vectorsBegin, InputIterator vectorsEnd, OutputIterator bufferBegin)
Iterates through the input range serializing every vector to the output buffer.
void ungroupElementDataPerVertex (const MeshView & meshView, const PerVertexData & from, cpppetsc::local< VectorType > *const to)
Copies the data from the input vector to the output, ungrouped by vertex.

Public Functions Documentation

function deserialize

Deserialize a buffer to an array by copying the buffer to the array.

template<class InputIterator, class ValueType, std::size_t ArraySize>
InputIterator ae108::assembly::utilities::deserialize (
    InputIterator bufferBegin,
    std::array< ValueType, ArraySize > *const array
) 

Template parameters:

  • InputIterator Forward iterator.

Parameters:

  • bufferBegin Data source iterator.
  • array Data target.

Returns:

The end of the used input buffer.


function deserialize

Deserialize a buffer to a vector by copying the buffer to the vector.

template<class InputIterator, class ValueType>
InputIterator ae108::assembly::utilities::deserialize (
    InputIterator bufferBegin,
    std::vector< ValueType > *const vector
) 

Template parameters:

  • InputIterator Forward iterator.

Parameters:

  • bufferBegin Data source iterator.
  • vector Data target.

Returns:

The end of the used input buffer.


function deserialize

Deserialize a buffer to an Eigen::Matrix by copying the buffer to the matrix (row major format).

template<class InputIterator, class ValueType, int Rows, int Cols>
InputIterator ae108::assembly::utilities::deserialize (
    InputIterator bufferBegin,
    Eigen::Matrix< ValueType, Rows, Cols > * vector
) 

Template parameters:

  • InputIterator Forward iterator.

Parameters:

  • bufferBegin Data source iterator.
  • vector Data target.

Returns:

The end of the used input buffer.


function deserializeRange

Iterates through the input range and deserializes chunks of buffer.

template<class InputIterator, class OutputIterator>
InputIterator ae108::assembly::utilities::deserializeRange (
    InputIterator bufferBegin,
    InputIterator bufferEnd,
    OutputIterator outputBegin
) 

Template parameters:

  • InputIterator Forward iterator.
  • OutputIterator Output iterator.

Parameters:

  • bufferBegin Data source begin iterator.
  • bufferEnd Data source end iterator.
  • outputBegin Data target begin iterator.

Returns:

The end of the used input buffer.


function groupElementDataPerVertex

Copies the data from the input vector to the output, grouped by vertex.

template<class PerVertexData, class MeshView, class VectorType>
void ae108::assembly::utilities::groupElementDataPerVertex (
    const MeshView & meshView,
    const cpppetsc::local < VectorType > & from,
    PerVertexData *const to
) 

Parameters:

  • to Valid nonzero pointer.

function resizeIfPossible

Resizes the vector to size.

template<class T>
void ae108::assembly::utilities::resizeIfPossible (
    std::vector< T > *const container,
    const typename std::vector< T >::size_type size
) 

Parameters:

  • container Valid nonzero pointer.

function resizeIfPossible

Asserts that the array has the correct size.

template<class T, std::size_t Size>
void ae108::assembly::utilities::resizeIfPossible (
    std::array< T, Size > *const container,
    const typename std::array< T, Size >::size_type size
) 

Parameters:

  • container Valid nonzero pointer.

function serialize

Serializes an array to a buffer by copying the array to the buffer.

template<class OutputIterator, class ValueType, std::size_t ArraySize>
OutputIterator ae108::assembly::utilities::serialize (
    const std::array< ValueType, ArraySize > & array,
    OutputIterator bufferBegin
) 

Template parameters:

  • OutputIterator Forward iterator.

Parameters:

  • array Data source.
  • bufferBegin Data target begin iterator.

Returns:

The end of the output buffer.


function serialize

Serializes a vector to a buffer by copying the vector to the buffer.

template<class OutputIterator, class ValueType>
OutputIterator ae108::assembly::utilities::serialize (
    const std::vector< ValueType > & vector,
    OutputIterator bufferBegin
) 

Template parameters:

  • OutputIterator Forward iterator.

Parameters:

  • vector Data source.
  • bufferBegin Data target begin iterator.

Returns:

The end of the output buffer.


function serialize

Serializes an Eigen::Matrix to a buffer by copying the vector to the buffer (row major format).

template<class OutputIterator, class ValueType, int Rows, int Cols, int Options>
OutputIterator ae108::assembly::utilities::serialize (
    const Eigen::Matrix< ValueType, Rows, Cols, Options > & vector,
    OutputIterator bufferBegin
) 

Template parameters:

  • OutputIterator Forward iterator.

Parameters:

  • vector Data source.
  • bufferBegin Data target begin iterator.

Returns:

The end of the output buffer.


function serializeRange

Iterates through the input range serializing every vector to the output buffer.

template<class InputIterator, class OutputIterator>
OutputIterator ae108::assembly::utilities::serializeRange (
    InputIterator vectorsBegin,
    InputIterator vectorsEnd,
    OutputIterator bufferBegin
) 

Template parameters:

  • InputIterator Forward iterator.
  • OutputIterator Random access iterator.

Parameters:

  • vectorsBegin Data source begin iterator.
  • vectorsEnd Data source end iterator.
  • bufferBegin Data target begin iterator.

Returns:

The end of the used output buffer.


function ungroupElementDataPerVertex

Copies the data from the input vector to the output, ungrouped by vertex.

template<class PerVertexData, class MeshView, class VectorType>
void ae108::assembly::utilities::ungroupElementDataPerVertex (
    const MeshView & meshView,
    const PerVertexData & from,
    cpppetsc::local < VectorType > *const to
) 

Parameters:

  • to Valid nonzero pointer.


The documentation for this class was generated from the following file assembly/src/include/ae108/assembly/utilities/DeriveUniquely.h