191 std::vector<boost::shared_ptr<RefElement>> shared_ref_fe_vec;
192 shared_ref_fe_vec.reserve(seed_fe_range.size());
194 for (Range::const_pair_iterator pit = seed_fe_range.const_pair_begin();
195 pit != seed_fe_range.const_pair_end(); ++pit) {
196 RefEntity_multiIndex::iterator rit, hi_rit;
198 hi_rit =
refEntsPtr->upper_bound(pit->second);
199 if (
static_cast<int>(std::distance(rit, hi_rit)) !=
200 static_cast<int>(pit->second - pit->first + 1)) {
202 "data inconsistency %d != %d", std::distance(rit, hi_rit),
203 pit->second - pit->first + 1);
205 switch ((*rit)->getEntType()) {
207 boost::shared_ptr<std::vector<RefElement_VERTEX>> ref_fe_vec =
208 boost::make_shared<std::vector<RefElement_VERTEX>>();
209 ref_fe_vec->reserve(pit->second - pit->first + 1);
210 for (; rit != hi_rit; ++rit) {
211 ref_fe_vec->push_back(RefElement_VERTEX(*rit));
212 shared_ref_fe_vec.push_back(
213 boost::shared_ptr<RefElement>(ref_fe_vec, &ref_fe_vec->back()));
217 boost::shared_ptr<std::vector<RefElement_EDGE>> ref_fe_vec =
218 boost::make_shared<std::vector<RefElement_EDGE>>();
219 ref_fe_vec->reserve(pit->second - pit->first + 1);
220 for (; rit != hi_rit; ++rit) {
221 ref_fe_vec->push_back(RefElement_EDGE(*rit));
222 shared_ref_fe_vec.push_back(
223 boost::shared_ptr<RefElement>(ref_fe_vec, &ref_fe_vec->back()));
228 boost::shared_ptr<std::vector<RefElementFace>> ref_fe_vec =
229 boost::make_shared<std::vector<RefElementFace>>();
230 ref_fe_vec->reserve(pit->second - pit->first + 1);
231 for (; rit != hi_rit; ++rit) {
232 ref_fe_vec->push_back(RefElementFace(*rit));
233 shared_ref_fe_vec.push_back(
234 boost::shared_ptr<RefElement>(ref_fe_vec, &ref_fe_vec->back()));
239 boost::shared_ptr<std::vector<RefElementVolume>> ref_fe_vec =
240 boost::make_shared<std::vector<RefElementVolume>>();
241 ref_fe_vec->reserve(pit->second - pit->first + 1);
242 for (; rit != hi_rit; ++rit) {
243 ref_fe_vec->push_back(RefElementVolume(*rit));
244 shared_ref_fe_vec.push_back(
245 boost::shared_ptr<RefElement>(ref_fe_vec, &ref_fe_vec->back()));
249 boost::shared_ptr<std::vector<RefElement_PRISM>> ref_fe_vec =
250 boost::make_shared<std::vector<RefElement_PRISM>>();
251 ref_fe_vec->reserve(pit->second - pit->first + 1);
252 for (; rit != hi_rit; ++rit) {
253 ref_fe_vec->push_back(RefElement_PRISM(*rit));
254 shared_ref_fe_vec.push_back(
255 boost::shared_ptr<RefElement>(ref_fe_vec, &ref_fe_vec->back()));
259 boost::shared_ptr<std::vector<RefElement_MESHSET>> ref_fe_vec =
260 boost::make_shared<std::vector<RefElement_MESHSET>>();
261 ref_fe_vec->reserve(pit->second - pit->first + 1);
262 for (; rit != hi_rit; ++rit) {
263 ref_fe_vec->push_back(RefElement_MESHSET(*rit));
264 shared_ref_fe_vec.push_back(
265 boost::shared_ptr<RefElement>(ref_fe_vec, &ref_fe_vec->back()));
274 ->insert(shared_ref_fe_vec.begin(), shared_ref_fe_vec.end());