ug4
|
#include <slicing.h>
Public Types | |
typedef std::vector< int > | slice_desc_set |
typedef TVec::value_type | slice_desc_type |
typedef TVec | slice_desc_type_vector |
Public Member Functions | |
template<class VT > | |
void | add_vector_slice (const VT &full_src, slice_desc_type desc, VT &small_dst, double sigma=1.0) const |
Add: slice of vector -> small vector. More... | |
template<class VT > | |
void | add_vector_slice (const VT &small_src, VT &full_dst, slice_desc_type desc, double sigma=1.0) const |
Add: small vector -> slice of a vector. More... | |
SmartPtr< AlgebraLayouts > | create_slice_layouts (ConstSmartPtr< AlgebraLayouts > fullLayouts, slice_desc_type type) const |
Create new slice layouts (as a subset from full layouts). More... | |
template<class MT > | |
void | get_matrix (const MT &A, slice_desc_type row_type, slice_desc_type col_type, MT &Aslice) const |
size_t | get_num_elems (slice_desc_type type) const |
Number of elements for each type. More... | |
template<class VT > | |
void | get_vector_slice (const VT &full_src, slice_desc_type desc, VT &small_dst) const |
Copy: slice of vector -> small vector. More... | |
bool | is_valid () |
void | set_types (const slice_desc_type_vector &types, bool bClear=false) |
Copy types. More... | |
template<class VT > | |
void | set_vector_slice (const VT &small_src, VT &full_dst, slice_desc_type desc) const |
Copy: small vector -> slice of a vector. More... | |
template<class VT > | |
void | setup_slice_like (const VT &full_src, slice_desc_type type, VT &vectorslice) const |
Sets an existing sliced vector up correctly. More... | |
template<class VT > | |
SmartPtr< VT > | slice_clone (const VT &full_src, slice_desc_type type) const |
Create a (partial) clone. More... | |
template<class VT > | |
SmartPtr< VT > | slice_clone_without_values (const VT &full_src, slice_desc_type type) const |
Create a (partial) clone of the vector, without copying values. More... | |
SlicingData () | |
Constructor. More... | |
SlicingData (const slice_desc_type_vector &types) | |
template<class VT > | |
void | subtract_vector_slice (const VT &full_src, slice_desc_type desc, VT &small_dst) const |
substract: slice of vector -> small vector More... | |
template<class VT > | |
void | subtract_vector_slice (const VT &small_src, VT &full_dst, slice_desc_type desc) const |
substract: small vector -> slice of a vector More... | |
Protected Member Functions | |
void | clear_set_mappings () |
Clear all sets. More... | |
void | fill_set_mappings () |
Auto fill for sets. More... | |
bool | find_index (slice_desc_type type, int gindex, int &index) const |
returns: local index for a global index (if found) or undefined else. More... | |
slice_desc_type | get_type (size_t index) |
returns type for a global index More... | |
void | replace_indices_in_layout (slice_desc_type type, IndexLayout &il) const |
void | reset_set_mappings () |
Clear & auto fill. More... | |
slice_desc_set & | slice (slice_desc_type type) |
const slice_desc_set & | slice (slice_desc_type type) const |
returns the set of global indices for a given type More... | |
Protected Attributes | |
slice_desc_set | m_slice_set [N] |
N mappings: islice(type) -> iglobal. More... | |
slice_desc_type_vector | m_slice_types |
global vector with mappings iglobal -> type(iglobal) More... | |
bool | m_valid |
typedef std::vector<int> ug::SlicingData< TVec, N >::slice_desc_set |
typedef TVec::value_type ug::SlicingData< TVec, N >::slice_desc_type |
typedef TVec ug::SlicingData< TVec, N >::slice_desc_type_vector |
|
inline |
Constructor.
|
inline |
Builds index mappings based on types
References ug::SlicingData< TVec, N >::reset_set_mappings().
|
inline |
Add: slice of vector -> small vector.
References ug::SlicingData< TVec, N >::slice().
Referenced by ug::SlicingData< TVec, N >::subtract_vector_slice().
|
inline |
Add: small vector -> slice of a vector.
References ug::SlicingData< TVec, N >::slice().
|
inlineprotected |
Clear all sets.
References ug::SlicingData< TVec, N >::get_type(), ug::SlicingData< TVec, N >::m_slice_types, and ug::SlicingData< TVec, N >::slice().
Referenced by ug::SlicingData< TVec, N >::reset_set_mappings().
|
inline |
Create new slice layouts (as a subset from full layouts).
References make_sp(), ug::SlicingData< TVec, N >::replace_indices_in_layout(), ug::SchurDebug, and UG_DLOG.
Referenced by ug::SlicingData< TVec, N >::setup_slice_like(), and ug::SlicingData< TVec, N >::slice_clone_without_values().
|
inlineprotected |
Auto fill for sets.
Assigns every index i=0.. m_slice_types.size()-1 to exactly one set.
References ug::SlicingData< TVec, N >::get_type(), ug::SlicingData< TVec, N >::m_slice_set, ug::SlicingData< TVec, N >::m_slice_types, ug::SlicingData< TVec, N >::m_valid, ug::SchurDebug, ug::SlicingData< TVec, N >::slice(), and UG_DLOG.
Referenced by ug::SlicingData< TVec, N >::reset_set_mappings().
|
inlineprotected |
returns: local index for a global index (if found) or undefined else.
References ug::SlicingData< TVec, N >::slice(), and UG_ASSERT.
Referenced by ug::SlicingData< TVec, N >::get_matrix(), and ug::SlicingData< TVec, N >::replace_indices_in_layout().
|
inline |
|
inline |
Number of elements for each type.
References ug::SlicingData< TVec, N >::slice().
Referenced by ug::SchurComplementOperator< TAlgebra >::sub_size().
|
inlineprotected |
returns type for a global index
References ug::SlicingData< TVec, N >::m_slice_types.
Referenced by ug::SlicingData< TVec, N >::clear_set_mappings(), and ug::SlicingData< TVec, N >::fill_set_mappings().
|
inline |
Copy: slice of vector -> small vector.
References ug::SlicingData< TVec, N >::slice().
Referenced by ug::SlicingData< TVec, N >::slice_clone(), and ug::SchurPrecond< TAlgebra >::step().
|
inline |
References ug::SlicingData< TVec, N >::m_valid.
|
inlineprotected |
References pcl::OrderedInterface< TType, TContainer, TAlloc >::begin(), pcl::SingleLevelLayout< TInterface >::begin(), pcl::OrderedInterface< TType, TContainer, TAlloc >::end(), pcl::SingleLevelLayout< TInterface >::end(), pcl::OrderedInterface< TType, TContainer, TAlloc >::erase(), ug::SlicingData< TVec, N >::find_index(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_element(), pcl::SingleLevelLayout< TInterface >::interface(), ug::SchurDebug, and UG_DLOG.
Referenced by ug::SlicingData< TVec, N >::create_slice_layouts().
|
inlineprotected |
Clear & auto fill.
References ug::SlicingData< TVec, N >::clear_set_mappings(), ug::SlicingData< TVec, N >::fill_set_mappings(), ug::SchurDebug, and UG_DLOG.
Referenced by ug::SlicingData< TVec, N >::set_types(), and ug::SlicingData< TVec, N >::SlicingData().
|
inline |
Copy types.
References ug::SlicingData< TVec, N >::m_slice_types, ug::SlicingData< TVec, N >::reset_set_mappings(), ug::SchurDebug, and UG_DLOG.
|
inline |
Copy: small vector -> slice of a vector.
References ug::SlicingData< TVec, N >::slice().
Referenced by ug::SchurPrecond< TAlgebra >::step().
|
inline |
Sets an existing sliced vector up correctly.
References ug::SlicingData< TVec, N >::create_slice_layouts(), and ug::SlicingData< TVec, N >::slice().
|
inlineprotected |
References ug::SlicingData< TVec, N >::m_slice_set.
|
inlineprotected |
returns the set of global indices for a given type
References ug::SlicingData< TVec, N >::m_slice_set.
Referenced by ug::SlicingData< TVec, N >::add_vector_slice(), ug::SlicingData< TVec, N >::clear_set_mappings(), ug::SlicingData< TVec, N >::fill_set_mappings(), ug::SlicingData< TVec, N >::find_index(), ug::SlicingData< TVec, N >::get_matrix(), ug::SlicingData< TVec, N >::get_num_elems(), ug::SlicingData< TVec, N >::get_vector_slice(), ug::SlicingData< TVec, N >::set_vector_slice(), ug::SlicingData< TVec, N >::setup_slice_like(), and ug::SlicingData< TVec, N >::slice_clone_without_values().
|
inline |
Create a (partial) clone.
References ug::SlicingData< TVec, N >::get_vector_slice(), and ug::SlicingData< TVec, N >::slice_clone_without_values().
|
inline |
Create a (partial) clone of the vector, without copying values.
References ug::SlicingData< TVec, N >::create_slice_layouts(), and ug::SlicingData< TVec, N >::slice().
Referenced by ug::SchurPrecond< TAlgebra >::create_aux_vectors(), and ug::SlicingData< TVec, N >::slice_clone().
|
inline |
substract: slice of vector -> small vector
References ug::SlicingData< TVec, N >::add_vector_slice().
Referenced by ug::SchurPrecond< TAlgebra >::step().
|
inline |
substract: small vector -> slice of a vector
References ug::SlicingData< TVec, N >::add_vector_slice().
|
protected |
N mappings: islice(type) -> iglobal.
Referenced by ug::SlicingData< TVec, N >::fill_set_mappings(), and ug::SlicingData< TVec, N >::slice().
|
protected |
global vector with mappings iglobal -> type(iglobal)
Referenced by ug::SlicingData< TVec, N >::clear_set_mappings(), ug::SlicingData< TVec, N >::fill_set_mappings(), ug::SlicingData< TVec, N >::get_type(), and ug::SlicingData< TVec, N >::set_types().
|
protected |