33 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__SUBSET_ASSEMBLE_UTIL__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__SUBSET_ASSEMBLE_UTIL__
58 template <
typename TElemIn>
61 std::vector<TElemIn*> vElemDisc,
66 vSSGrp.resize(vElemDisc.size());
69 if(vSSGrp.empty()) {unionSSGrp.
clear();
return;}
72 for(
size_t i = 0; i < vSSGrp.size(); ++i)
74 vSSGrp[i].set_subset_handler(pSH);
75 vSSGrp[i].add(vElemDisc[i]->symb_subsets());
82 for(
size_t i = 0; i < vSSGrp.size(); ++i)
86 unionSSGrp.
add(vSSGrp[i]);
87 }
UG_CATCH_THROW(
"Cannot add subsets of the Elem Disc "<<i<<
" to union of Subsets.");
106 template <
typename TElemOut,
typename TElemIn>
108 const std::vector<TElemIn*>& vElemDiscIn,
109 const std::vector<SubsetGroup>& vSSGrp,
110 int si,
bool clearVec=
true)
113 if(clearVec) vSubsetElemDiscOut.clear();
116 for(
size_t i = 0; i < vElemDiscIn.size(); ++i)
120 vSubsetElemDiscOut.push_back(
static_cast<TElemOut*
>(vElemDiscIn[i]));
127 template <
typename TDomain>
129 const std::vector<IElemDisc<TDomain>*>& vElemDisc,
130 const std::vector<SubsetGroup>& vSSGrp,
131 int si,
bool clearVec =
true);
Definition: smart_pointer.h:296
Group of subsets.
Definition: subset_group.h:51
void clear()
clear all subsets
Definition: subset_group.h:116
void set_subset_handler(ConstSmartPtr< ISubsetHandler > sh)
set an underlying subset handler
Definition: subset_group.h:69
void add(int si)
adds a subset by number to this group
Definition: subset_group.cpp:64
function table contains(t, value)
#define UG_CATCH_THROW(msg)
Definition: error.h:64
void GetElemDiscItemOnSubset(std::vector< TElemOut * > &vSubsetElemDiscOut, const std::vector< TElemIn * > &vElemDiscIn, const std::vector< SubsetGroup > &vSSGrp, int si, bool clearVec=true)
Definition: subset_assemble_util.h:107
void GetElemDiscOnSubset(std::vector< IElemDisc< TDomain > * > &vSubsetElemDisc, const std::vector< IElemDisc< TDomain > * > &vElemDisc, const std::vector< SubsetGroup > &vSSGrp, int si, bool clearVec)
Definition: subset_assemble_util.cpp:40
void CreateSubsetGroups(std::vector< SubsetGroup > &vSSGrp, SubsetGroup &unionSSGrp, std::vector< TElemIn * > vElemDisc, ConstSmartPtr< ISubsetHandler > pSH)
Definition: subset_assemble_util.h:59
#define PROFILE_FUNC_GROUP(groups)
Definition: profiler.h:258