16 #include <deal.II/hp/fe_values.h> 17 #include <deal.II/fe/mapping_q1.h> 19 DEAL_II_NAMESPACE_OPEN
28 template <
int dim,
int q_dim,
class FEValuesType>
30 (const ::hp::MappingCollection<dim,FEValuesType::space_dimension> &mapping_collection,
31 const ::hp::FECollection<dim,FEValuesType::space_dimension> &fe_collection,
32 const ::hp::QCollection<q_dim> &q_collection,
35 fe_collection (&fe_collection),
36 mapping_collection (&mapping_collection),
37 q_collection (q_collection),
38 fe_values_table (fe_collection.size(),
39 mapping_collection.size(),
41 present_fe_values_index (
numbers::invalid_unsigned_int,
44 update_flags (update_flags)
48 template <
int dim,
int q_dim,
class FEValuesType>
50 (const ::hp::FECollection<dim,FEValuesType::space_dimension> &fe_collection,
51 const ::hp::QCollection<q_dim> &q_collection,
54 fe_collection (&fe_collection),
57 q_collection (q_collection),
58 fe_values_table (fe_collection.size(),
64 update_flags (update_flags)
69 template <
int dim,
int q_dim,
class FEValuesType>
72 (
const unsigned int fe_index,
73 const unsigned int mapping_index,
74 const unsigned int q_index)
76 Assert (fe_index < fe_collection->size(),
78 Assert (mapping_index < mapping_collection->size(),
79 ExcIndexRange (mapping_index, 0, mapping_collection->size()));
80 Assert (q_index < q_collection.size(),
94 if (fe_values_table(present_fe_values_index).get() == 0)
95 fe_values_table(present_fe_values_index)
97 std_cxx11::shared_ptr<FEValuesType>
98 (
new FEValuesType ((*mapping_collection)[mapping_index],
99 (*fe_collection)[fe_index],
100 q_collection[q_index],
104 return *fe_values_table(present_fe_values_index);
117 template <
int dim,
int spacedim>
130 template <
int dim,
int spacedim>
141 template <
int dim,
int spacedim>
142 template <
typename DoFHandlerType,
bool lda>
145 const unsigned int q_index,
146 const unsigned int mapping_index,
147 const unsigned int fe_index)
151 unsigned int real_q_index = q_index,
152 real_mapping_index = mapping_index,
153 real_fe_index = fe_index;
157 if (this->q_collection.size() > 1)
158 real_q_index = cell->active_fe_index();
165 if (this->mapping_collection->size() > 1)
166 real_mapping_index = cell->active_fe_index();
168 real_mapping_index = 0;
172 real_fe_index = cell->active_fe_index();
175 Assert (real_q_index < this->q_collection.size(),
177 Assert (real_mapping_index < this->mapping_collection->size(),
178 ExcIndexRange (real_mapping_index, 0, this->mapping_collection->size()));
179 Assert (real_fe_index < this->fe_collection->size(),
180 ExcIndexRange (real_fe_index, 0, this->fe_collection->size()));
185 this->select_fe_values (real_fe_index,
187 real_q_index).reinit (cell);
192 template <
int dim,
int spacedim>
195 const unsigned int q_index,
196 const unsigned int mapping_index,
197 const unsigned int fe_index)
201 unsigned int real_q_index = q_index,
202 real_mapping_index = mapping_index,
203 real_fe_index = fe_index;
209 real_mapping_index = 0;
215 Assert (real_q_index < this->q_collection.size(),
217 Assert (real_mapping_index < this->mapping_collection->size(),
218 ExcIndexRange (real_mapping_index, 0, this->mapping_collection->size()));
219 Assert (real_fe_index < this->fe_collection->size(),
220 ExcIndexRange (real_fe_index, 0, this->fe_collection->size()));
225 this->select_fe_values (real_fe_index,
227 real_q_index).reinit (cell);
234 template <
int dim,
int spacedim>
247 template <
int dim,
int spacedim>
258 template <
int dim,
int spacedim>
259 template <
typename DoFHandlerType,
bool lda>
262 const unsigned int face_no,
263 const unsigned int q_index,
264 const unsigned int mapping_index,
265 const unsigned int fe_index)
269 unsigned int real_q_index = q_index,
270 real_mapping_index = mapping_index,
271 real_fe_index = fe_index;
275 if (this->q_collection.size() > 1)
276 real_q_index = cell->active_fe_index();
283 if (this->mapping_collection->size() > 1)
284 real_mapping_index = cell->active_fe_index();
286 real_mapping_index = 0;
290 real_fe_index = cell->active_fe_index();
293 Assert (real_q_index < this->q_collection.size(),
295 Assert (real_mapping_index < this->mapping_collection->size(),
296 ExcIndexRange (real_mapping_index, 0, this->mapping_collection->size()));
297 Assert (real_fe_index < this->fe_collection->size(),
298 ExcIndexRange (real_fe_index, 0, this->fe_collection->size()));
303 this->select_fe_values (real_fe_index,
305 real_q_index).reinit (cell, face_no);
310 template <
int dim,
int spacedim>
313 const unsigned int face_no,
314 const unsigned int q_index,
315 const unsigned int mapping_index,
316 const unsigned int fe_index)
320 unsigned int real_q_index = q_index,
321 real_mapping_index = mapping_index,
322 real_fe_index = fe_index;
328 real_mapping_index = 0;
334 Assert (real_q_index < this->q_collection.size(),
336 Assert (real_mapping_index < this->mapping_collection->size(),
337 ExcIndexRange (real_mapping_index, 0, this->mapping_collection->size()));
338 Assert (real_fe_index < this->fe_collection->size(),
339 ExcIndexRange (real_fe_index, 0, this->fe_collection->size()));
344 this->select_fe_values (real_fe_index,
346 real_q_index).reinit (cell, face_no);
353 template <
int dim,
int spacedim>
366 template <
int dim,
int spacedim>
377 template <
int dim,
int spacedim>
378 template <
typename DoFHandlerType,
bool lda>
381 const unsigned int face_no,
382 const unsigned int subface_no,
383 const unsigned int q_index,
384 const unsigned int mapping_index,
385 const unsigned int fe_index)
389 unsigned int real_q_index = q_index,
390 real_mapping_index = mapping_index,
391 real_fe_index = fe_index;
395 if (this->q_collection.size() > 1)
396 real_q_index = cell->active_fe_index();
403 if (this->mapping_collection->size() > 1)
404 real_mapping_index = cell->active_fe_index();
406 real_mapping_index = 0;
410 real_fe_index = cell->active_fe_index();
413 Assert (real_q_index < this->q_collection.size(),
415 Assert (real_mapping_index < this->mapping_collection->size(),
416 ExcIndexRange (real_mapping_index, 0, this->mapping_collection->size()));
417 Assert (real_fe_index < this->fe_collection->size(),
418 ExcIndexRange (real_fe_index, 0, this->fe_collection->size()));
423 this->select_fe_values (real_fe_index,
425 real_q_index).reinit (cell, face_no, subface_no);
430 template <
int dim,
int spacedim>
433 const unsigned int face_no,
434 const unsigned int subface_no,
435 const unsigned int q_index,
436 const unsigned int mapping_index,
437 const unsigned int fe_index)
441 unsigned int real_q_index = q_index,
442 real_mapping_index = mapping_index,
443 real_fe_index = fe_index;
449 real_mapping_index = 0;
455 Assert (real_q_index < this->q_collection.size(),
457 Assert (real_mapping_index < this->mapping_collection->size(),
458 ExcIndexRange (real_mapping_index, 0, this->mapping_collection->size()));
459 Assert (real_fe_index < this->fe_collection->size(),
460 ExcIndexRange (real_fe_index, 0, this->fe_collection->size()));
465 this->select_fe_values (real_fe_index,
467 real_q_index).reinit (cell, face_no, subface_no);
473 #include "fe_values.inst" 476 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
FEValuesBase(const unsigned int n_q_points, const unsigned int dofs_per_cell, const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
FEValuesBase(const ::hp::MappingCollection< dim, FEValuesType::space_dimension > &mapping_collection, const ::hp::FECollection< dim, FEValuesType::space_dimension > &fe_collection, const ::hp::QCollection< q_dim > &q_collection, const ::UpdateFlags update_flags)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, lda > > cell, const unsigned int face_no, const unsigned int subface_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, lda > > cell, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
FEFaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim-1 > &q_collection, const UpdateFlags update_flags)
#define Assert(cond, exc)
FESubfaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim-1 > &q_collection, const UpdateFlags update_flags)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, lda > > cell, const unsigned int face_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
FEValues(const ::hp::MappingCollection< dim, spacedim > &mapping_collection, const ::hp::FECollection< dim, spacedim > &fe_collection, const ::hp::QCollection< dim > &q_collection, const UpdateFlags update_flags)
FEValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim > &quadrature, const UpdateFlags update_flags)