deal2lkit: A ToolKit library for Deal.II
fe_values_cache.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //
3 // Copyright (C) 2015 by the deal2lkit authors
4 //
5 // This file is part of the deal2lkit library.
6 //
7 // The deal2lkit library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal2lkit distribution.
13 //
14 //-----------------------------------------------------------
15 
16 #ifndef _d2k_fe_values_cache_h_
17 #define _d2k_fe_values_cache_h_
18 
19 #include <deal2lkit/config.h>
20 #include <deal.II/fe/fe_values.h>
21 #include <deal2lkit/any_data.h>
23 #include <deal2lkit/utilities.h>
24 
25 D2K_NAMESPACE_OPEN
26 
27 template <int dim, int spacedim=dim>
29 {
30 public:
36  const Quadrature<dim> &quadrature,
37  const UpdateFlags &update_flags,
38  const Quadrature<dim-1> &face_quadrature,
39  const UpdateFlags &face_update_flags):
40  fe_values (mapping, fe, quadrature, update_flags),
41  fe_face_values (mapping, fe, face_quadrature, face_update_flags),
42  fe_subface_values (mapping, fe, face_quadrature, face_update_flags),
43  local_dof_indices(fe.dofs_per_cell)
44 
45  {};
46 
51  cache (scratch.cache),
52  fe_values ( scratch.fe_values.get_mapping(),
53  scratch.fe_values.get_fe(),
54  scratch.fe_values.get_quadrature(),
55  scratch.fe_values.get_update_flags()),
56  fe_face_values ( scratch.fe_values.get_mapping(),
57  scratch.fe_values.get_fe(),
58  scratch.fe_face_values.get_quadrature(),
59  scratch.fe_face_values.get_update_flags()),
60  fe_subface_values ( scratch.fe_values.get_mapping(),
61  scratch.fe_values.get_fe(),
62  scratch.fe_subface_values.get_quadrature(),
63  scratch.fe_subface_values.get_update_flags()),
64  local_dof_indices(scratch.fe_values.get_fe().dofs_per_cell)
65  {};
66 
67 
72  {
73  fe_values.reinit(cell);
74  cell->get_dof_indices(local_dof_indices);
75  cache.template add_ref<FEValuesBase<dim,spacedim> >(fe_values, "FEValuesBase");
76  };
77 
78 
84  const unsigned int face_no)
85  {
86  fe_face_values.reinit(cell, face_no);
87  cell->get_dof_indices(local_dof_indices);
88  cache.template add_ref<FEValuesBase<dim,spacedim> >(fe_face_values, "FEValuesBase");
89  };
90 
91 
97  const unsigned int face_no, const unsigned int subface_no)
98  {
99  fe_subface_values.reinit(cell, face_no, subface_no);
100  cell->get_dof_indices(local_dof_indices);
101  cache.template add_ref<FEValuesBase<dim,spacedim> >(fe_subface_values, "FEValuesBase");
102  };
103 
110  {
111  return cache;
112  };
113 
122  {
123  Assert(cache.have("FEValuesBase"),
124  ExcMessage("You have to initialize the cache using one of the "
125  "reinit function first!"));
127  cache.template get<FEValuesBase<dim,spacedim> >("FEValuesBase");
128  return fev;
129  }
130 
131 
135  template<typename Number>
136  std::vector<Number> &
137  get_current_independent_local_dofs(const std::string &prefix, Number dummy)
138  {
139 
140  std::string dofs_name = prefix+"_independent_local_dofs_"+type(dummy);
141 
142  Assert(cache.have(dofs_name),
143  ExcMessage("You did not call cache_local_solution_vector with the right types!"));
144 
145  return cache.template get<std::vector<Number> >(dofs_name);
146  }
147 
148 
152  const std::vector<Point<spacedim> > &
154  {
155  return get_current_fe_values().get_quadrature_points();
156  }
157 
158 
162  const std::vector<double > &
164  {
165  return get_current_fe_values().get_JxW_values();
166  }
167 
168 
172  template <class STREAM>
173  void print_info(STREAM &os)
174  {
175  cache.print_info(os);
176  }
177 
178 
196  template<typename VEC, typename Number>
197  void cache_local_solution_vector(const std::string &prefix, const VEC &input_vector, const Number dummy)
198  {
199  const unsigned int n_dofs = get_current_fe_values().get_fe().dofs_per_cell;
200 
201  std::string name = prefix+"_independent_local_dofs_"+type(dummy);
202 
203  if (!cache.have(name))
204  cache.add_copy(std::vector<Number>(n_dofs), name);
205 
206  std::vector<Number> &independent_local_dofs
207  = cache.template get<std::vector<Number> >(name);
208  DOFUtilities::extract_local_dofs(input_vector, local_dof_indices, independent_local_dofs);
209  }
210 
211 
212 
213 
221  template<typename Number>
222  const std::vector <std::vector<Number> > &
223  get_values(const std::string &prefix, const Number dummy)
224  {
225  const std::vector<Number> &independent_local_dofs =
226  get_current_independent_local_dofs(prefix, dummy);
227 
229 
230  const unsigned int n_q_points = fev.n_quadrature_points;
231  const unsigned int n_components = fev.get_fe().n_components();
232 
233  std::string name = prefix+"_all_values_q"+Utilities::int_to_string(n_q_points)+"_"+type(dummy);
234 
235  if (!cache.have(name))
236  {
237  cache.add_copy(std::vector <std::vector<Number> >(n_q_points, std::vector<Number>(n_components)), name);
238  }
239 
240  std::vector <std::vector<Number> > &ret = cache.template get<std::vector <std::vector<Number> > >(name);
241  DOFUtilities::get_values(fev, independent_local_dofs, ret);
242  return ret;
243  }
244 
245 
246 
254  template<typename Number>
255  const std::vector <Number> &
256  get_values(const std::string &prefix,
257  const std::string &additional_prefix,
258  const FEValuesExtractors::Scalar &variable,
259  const Number dummy)
260  {
261  const std::vector<Number> &independent_local_dofs =
262  get_current_independent_local_dofs(prefix, dummy);
263 
265 
266  const unsigned int n_q_points = fev.n_quadrature_points;
267 
268  std::string name = prefix+"_"+additional_prefix+"_scalar_values_q"+
269  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
270 
271  // Now build the return type
272  typedef typename std::vector<Number> RetType;
273 
274 
275  if (!cache.have(name))
276  cache.add_copy(RetType(n_q_points), name);
277 
278  RetType &ret = cache.template get<RetType>(name);
279  DOFUtilities::get_values(fev, independent_local_dofs, variable, ret);
280  return ret;
281  }
282 
283 
284 
292  template<typename Number>
293  const std::vector <Tensor <1, spacedim, Number> > &
294  get_values(const std::string &prefix,
295  const std::string &additional_prefix,
296  const FEValuesExtractors::Vector &vector_variable,
297  const Number dummy)
298  {
299  const std::vector<Number> &independent_local_dofs =
300  get_current_independent_local_dofs(prefix, dummy);
301 
303 
304  const unsigned int n_q_points = fev.n_quadrature_points;
305 
306  std::string name = prefix+"_"+additional_prefix+"_vector_values_q"+
307  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
308 
309 
310  // Now build the return type
311  typedef typename std::vector<Tensor<1, spacedim, Number> > RetType;
312 
313  if (!cache.have(name))
314  cache.add_copy(RetType(n_q_points), name);
315 
316  RetType &ret = cache.template get<RetType>(name);
317  DOFUtilities::get_values(fev, independent_local_dofs, vector_variable, ret);
318  return ret;
319  }
320 
321 
322 
330  template<typename Number>
331  const std::vector <Number> &
332  get_divergences(const std::string &prefix,
333  const std::string &additional_prefix,
334  const FEValuesExtractors::Vector &vector_variable,
335  const Number dummy)
336  {
337  const std::vector<Number> &independent_local_dofs =
338  get_current_independent_local_dofs(prefix, dummy);
339 
341 
342  const unsigned int n_q_points = fev.n_quadrature_points;
343 
344  std::string name = prefix+"_"+additional_prefix+"_div_values_q"+
345  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
346 
347 
348  // Now build the return type
349  typedef typename std::vector<Number> RetType;
350 
351  if (!cache.have(name))
352  cache.add_copy(RetType(n_q_points), name);
353 
354  RetType &ret = cache.template get<RetType>(name);
355  DOFUtilities::get_divergences(fev, independent_local_dofs, vector_variable, ret);
356  return ret;
357  }
358 
359 
360 
368  template<typename Number>
369  const std::vector <Tensor<1, spacedim, Number> > &
370  get_gradients(const std::string &prefix,
371  const std::string &additional_prefix,
372  const FEValuesExtractors::Scalar &variable,
373  const Number dummy)
374  {
375  const std::vector<Number> &independent_local_dofs =
376  get_current_independent_local_dofs(prefix, dummy);
377 
379 
380  const unsigned int n_q_points = fev.n_quadrature_points;
381 
382  std::string name = prefix+"_"+additional_prefix+"_grad_values_q"+
383  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
384 
385  // Now build the return type
386  typedef typename std::vector <Tensor<1, spacedim, Number> > RetType;
387 
388  if (!cache.have(name))
389  cache.add_copy(RetType(n_q_points), name);
390 
391  RetType &ret = cache.template get<RetType>(name);
392  DOFUtilities::get_gradients(fev, independent_local_dofs, variable, ret);
393  return ret;
394  }
395 
396 
397 
405  template<typename Number>
406  const std::vector <Tensor<2, spacedim, Number> > &
407  get_gradients(const std::string &prefix,
408  const std::string &additional_prefix,
409  const FEValuesExtractors::Vector &variable,
410  const Number dummy)
411  {
412  const std::vector<Number> &independent_local_dofs =
413  get_current_independent_local_dofs(prefix, dummy);
414 
416 
417  const unsigned int n_q_points = fev.n_quadrature_points;
418 
419  std::string name = prefix+"_"+additional_prefix+"_grad2_values_q"+
420  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
421 
422  // Now build the return type
423  typedef typename std::vector <Tensor<2, spacedim, Number> > RetType;
424 
425  if (!cache.have(name))
426  cache.add_copy(RetType(n_q_points), name);
427 
428  RetType &ret = cache.template get<RetType>(name);
429  DOFUtilities::get_gradients(fev, independent_local_dofs, variable, ret);
430  return ret;
431  }
432 
440  template<typename Number>
441  const std::vector <Tensor<1, (spacedim > 2 ? spacedim : 1), Number> > &
442  get_curls(const std::string &prefix,
443  const std::string &additional_prefix,
444  const FEValuesExtractors::Vector &variable,
445  const Number dummy)
446  {
447  const std::vector<Number> &independent_local_dofs =
448  get_current_independent_local_dofs(prefix, dummy);
449 
451 
452  const unsigned int n_q_points = fev.n_quadrature_points;
453 
454  std::string name = prefix+"_"+additional_prefix+"_curl_values_q"+
455  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
456 
457  // Now build the return type
458  typedef typename std::vector <Tensor<1, (spacedim > 2 ? spacedim : 1), Number> > RetType;
459 
460  if (!cache.have(name))
461  cache.add_copy(RetType(n_q_points), name);
462 
463  RetType &ret = cache.template get<RetType>(name);
464  DOFUtilities::get_curls(fev, independent_local_dofs, variable, ret);
465  return ret;
466  }
467 
475  template<typename Number>
476  const std::vector <Number> &
477  get_laplacians(const std::string &prefix,
478  const std::string &additional_prefix,
479  const FEValuesExtractors::Scalar &variable,
480  const Number dummy)
481  {
482  const std::vector<Number> &independent_local_dofs =
483  get_current_independent_local_dofs(prefix, dummy);
484 
486 
487  const unsigned int n_q_points = fev.n_quadrature_points;
488 
489  std::string name = prefix+"_"+additional_prefix+"_laplacian_values_q"+
490  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
491 
492  // Now build the return type
493  typedef typename std::vector <Number> RetType;
494 
495  if (!cache.have(name))
496  cache.add_copy(RetType(n_q_points), name);
497 
498  RetType &ret = cache.template get<RetType>(name);
499  DOFUtilities::get_laplacians(fev, independent_local_dofs, variable, ret);
500  return ret;
501  }
502 
503 
511  template<typename Number>
512  const std::vector <Tensor<1,spacedim,Number> > &
513  get_laplacians(const std::string &prefix,
514  const std::string &additional_prefix,
515  const FEValuesExtractors::Vector &variable,
516  const Number dummy)
517  {
518  const std::vector<Number> &independent_local_dofs =
519  get_current_independent_local_dofs(prefix, dummy);
520 
522 
523  const unsigned int n_q_points = fev.n_quadrature_points;
524 
525  std::string name = prefix+"_"+additional_prefix+"_laplacian2_values_q"+
526  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
527 
528  // Now build the return type
529  typedef typename std::vector <Tensor<1,spacedim,Number> > RetType;
530 
531  if (!cache.have(name))
532  cache.add_copy(RetType(n_q_points), name);
533 
534  RetType &ret = cache.template get<RetType>(name);
535  DOFUtilities::get_laplacians(fev, independent_local_dofs, variable, ret);
536  return ret;
537  }
538 
546  template<typename Number>
547  const std::vector <Tensor<2, spacedim, Number> > &
548  get_deformation_gradients(const std::string &prefix,
549  const std::string &additional_prefix,
550  const FEValuesExtractors::Vector &variable,
551  const Number dummy)
552  {
553  const std::vector<Number> &independent_local_dofs =
554  get_current_independent_local_dofs(prefix, dummy);
555 
557 
558  const unsigned int n_q_points = fev.n_quadrature_points;
559 
560  std::string name = prefix+"_"+additional_prefix+"_F_values_q"+
561  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
562 
563  // Now build the return type
564  typedef typename std::vector <Tensor<2, spacedim, Number> > RetType;
565 
566  if (!cache.have(name))
567  cache.add_copy(RetType(n_q_points), name);
568 
569  RetType &ret = cache.template get<RetType>(name);
570  DOFUtilities::get_deformation_gradients(fev, independent_local_dofs, variable, ret);
571  return ret;
572  }
573 
574 
575 
583  template<typename Number>
584  const std::vector <Tensor<2, spacedim, Number> > &
585  get_symmetric_gradients(const std::string &prefix,
586  const std::string &additional_prefix,
587  const FEValuesExtractors::Vector &variable,
588  const Number dummy)
589  {
590  const std::vector<Number> &independent_local_dofs =
591  get_current_independent_local_dofs(prefix, dummy);
592 
594 
595  const unsigned int n_q_points = fev.n_quadrature_points;
596 
597  std::string name = prefix+"_"+additional_prefix+"_sym_grad_values_q"+
598  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
599 
600  // Now build the return type
601  typedef typename std::vector <Tensor<2, spacedim, Number> > RetType;
602 
603  if (!cache.have(name))
604  cache.add_copy(RetType(n_q_points), name);
605 
606  RetType &ret = cache.template get<RetType>(name);
607  DOFUtilities::get_symmetric_gradients(fev, independent_local_dofs, variable, ret);
608  return ret;
609  }
610 
618  template<typename Number>
619  const std::vector <Tensor<2,spacedim,Number> > &
620  get_hessians(const std::string &prefix,
621  const std::string &additional_prefix,
622  const FEValuesExtractors::Scalar &variable,
623  const Number dummy)
624  {
625  const std::vector<Number> &independent_local_dofs =
626  get_current_independent_local_dofs(prefix, dummy);
627 
629 
630  const unsigned int n_q_points = fev.n_quadrature_points;
631 
632  std::string name = prefix+"_"+additional_prefix+"_hessians_values_q"+
633  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
634 
635  // Now build the return type
636  typedef typename std::vector <Tensor<2,spacedim,Number> > RetType;
637 
638  if (!cache.have(name))
639  cache.add_copy(RetType(n_q_points), name);
640 
641  RetType &ret = cache.template get<RetType>(name);
642  DOFUtilities::get_hessians(fev, independent_local_dofs, variable, ret);
643  return ret;
644  }
645 
653  template<typename Number>
654  const std::vector <Tensor<3,spacedim,Number> > &
655  get_hessians(const std::string &prefix,
656  const std::string &additional_prefix,
657  const FEValuesExtractors::Vector &variable,
658  const Number dummy)
659  {
660  const std::vector<Number> &independent_local_dofs =
661  get_current_independent_local_dofs(prefix, dummy);
662 
664 
665  const unsigned int n_q_points = fev.n_quadrature_points;
666 
667  std::string name = prefix+"_"+additional_prefix+"_hessians2_values_q"+
668  Utilities::int_to_string(n_q_points)+"_"+type(dummy);
669 
670  // Now build the return type
671  typedef typename std::vector <Tensor<3,spacedim,Number> > RetType;
672 
673  if (!cache.have(name))
674  cache.add_copy(RetType(n_q_points), name);
675 
676  RetType &ret = cache.template get<RetType>(name);
677  DOFUtilities::get_hessians(fev, independent_local_dofs, variable, ret);
678  return ret;
679  }
680 
681 private:
682 
687  std::vector<types::global_dof_index> local_dof_indices;
688 };
689 
690 D2K_NAMESPACE_CLOSE
691 
692 #endif
693 
void reinit(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int face_no)
Initialize the internal FEFaceValues to use the given on the given cell.
const std::vector< Tensor< 2, spacedim, Number > > & get_symmetric_gradients(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
Return the symmetric gradient of the named cached solution vector.
void print_info(STREAM &os)
Print the content of the internal cache.
void reinit(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell)
Initialize the internal FEValues to use the given cell.
void cache_local_solution_vector(const std::string &prefix, const VEC &input_vector, const Number dummy)
Store internally the independent local dof values associated with the internally initialized cell...
const std::vector< Tensor< 2, spacedim, Number > > & get_hessians(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
Return the hessian of the named cached solution vector.
const std::vector< Number > & get_laplacians(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
Return the laplacian of the named cached solution vector.
const std::vector< Tensor< 2, spacedim, Number > > & get_gradients(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
Return the gradient of the named cached solution vector.
void get_values(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, std::vector< std::vector< Number > > &us)
Extract independent local dofs values in a cell and store them in std::vector <std::vector<Number> > ...
ActiveSelector::active_cell_iterator active_cell_iterator
std::vector< types::global_dof_index > local_dof_indices
std::vector< Number > & get_current_independent_local_dofs(const std::string &prefix, Number dummy)
const std::vector< Tensor< 1, spacedim, Number > > & get_gradients(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
Return the gradient of the named cached solution vector.
const std::vector< Tensor< 2, spacedim, Number > > & get_deformation_gradients(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
Return the deformation gradient of the named cached solution vector.
void extract_local_dofs(const VEC &global_vector, const std::vector< types::global_dof_index > &local_dof_indices, std::vector< Number > &independent_local_dofs)
Extract local dofs values and initialize the number of independent variables up to the second order d...
Definition: dof_utilities.h:59
static::ExceptionBase & ExcMessage(std::string arg1)
AnyData & get_cache()
Get the reference to cache.
void get_divergences(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, const FEValuesExtractors::Vector &vector_variable, std::vector< Number > &us)
Extract divergence values of a vector_variable on face of a cell and store them in std::vector <Numbe...
const std::vector< Tensor< 1, spacedim, Number > > & get_laplacians(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
Return the laplacian of the named cached solution vector.
std::string type(const T &t)
Return a human readable name of the type passed as argument.
Definition: utilities.h:461
#define Assert(cond, exc)
UpdateFlags
void get_deformation_gradients(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, const FEValuesExtractors::Vector &vector_variable, std::vector< Tensor< 2, spacedim, Number > > &Fs)
Compute the deformation gradient in each quadrature point of a cell and it is stored in std::vector <...
void get_symmetric_gradients(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, const FEValuesExtractors::Vector &vector_variable, std::vector< Tensor< 2, spacedim, Number > > &grad_us)
Extract symmetric gradient values of a vector_variable on face of a cell and store them in std::vecto...
void get_curls(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, const FEValuesExtractors::Vector &vector_variable, std::vector< Tensor< 1,(spacedim > 2 ? spacedim :1), Number > > &curl_us)
Extract curl values of a vector_variable on face or cell and store them in std::vector <Tensor <1...
void get_hessians(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, const FEValuesExtractors::Scalar &variable, std::vector< Tensor< 2, spacedim, Number > > &us)
Extract hessians local dofs values of a scalar variable in a cell and store them in std::vector <Tens...
FESubfaceValues< dim, spacedim > fe_subface_values
const std::vector< Tensor< 1,(spacedim > 2 ? spacedim :1), Number > > & get_curls(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
Return the curl of the named cached solution vector.
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
const unsigned int n_quadrature_points
const std::vector< std::vector< Number > > & get_values(const std::string &prefix, const Number dummy)
Return the values of the named cached solution vector.
void reinit(const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no)
Initialize the internal FESubFaceValues to use the given , on , on the given cell.
void get_laplacians(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, const FEValuesExtractors::Scalar &variable, std::vector< Number > &us)
Extract laplacians local dofs values of a scalar variable in a cell and store them in std::vector <Nu...
const std::vector< Number > & get_divergences(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &vector_variable, const Number dummy)
Return the divergence of the named cached solution vector.
const std::vector< Tensor< 3, spacedim, Number > > & get_hessians(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
Return the hessian of the named cached solution vector.
const FEValuesBase< dim, spacedim > & get_current_fe_values()
Get the currently initialized FEValues.
const std::vector< Tensor< 1, spacedim, Number > > & get_values(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &vector_variable, const Number dummy)
Return the values of the named cached solution vector.
FEValuesCache(const FEValuesCache< dim, spacedim > &scratch)
Deep copy constructor.
Store any amount of any type of data accessible by an identifier string.
Definition: any_data.h:65
const FiniteElement< dim, spacedim > & get_fe() const
const std::vector< Point< spacedim > > & get_quadrature_points()
Return the quadrature points of the internal FEValues object.
FEFaceValues< dim, spacedim > fe_face_values
void get_gradients(const FEValuesBase< dim, spacedim > &fe_values, const std::vector< Number > &independent_local_dof_values, const FEValuesExtractors::Vector &vector_variable, std::vector< Tensor< 2, spacedim, Number > > &grad_us)
Extract gradient values of a vector_variable on face of a cell and store them in std::vector <Tensor ...
FEValuesCache(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim > &quadrature, const UpdateFlags &update_flags, const Quadrature< dim-1 > &face_quadrature, const UpdateFlags &face_update_flags)
Explicit constructor.
const std::vector< double > & get_JxW_values()
Return the JxW values of the internal FEValues object.
FEValues< dim, spacedim > fe_values
const std::vector< Number > & get_values(const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
Return the values of the named cached solution vector.