16 #ifndef dealii_error_estimator_h 17 #define dealii_error_estimator_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/function.h> 23 #include <deal.II/dofs/function_map.h> 24 #include <deal.II/fe/component_mask.h> 27 DEAL_II_NAMESPACE_OPEN
30 template <
int,
int>
class Mapping;
35 template <
int>
class QCollection;
250 template <
int dim,
int spacedim=dim>
328 template <
typename InputVector,
typename DoFHandlerType>
331 const DoFHandlerType &dof,
334 const InputVector &solution,
335 Vector<float> &error,
347 template <
typename InputVector,
typename DoFHandlerType>
349 (
const DoFHandlerType &dof,
352 const InputVector &solution,
353 Vector<float> &error,
374 template <
typename InputVector,
typename DoFHandlerType>
377 const DoFHandlerType &dof,
380 const std::vector<const InputVector *> &solutions,
381 std::vector<Vector<float>*> &errors,
393 template <
typename InputVector,
typename DoFHandlerType>
395 (
const DoFHandlerType &dof,
398 const std::vector<const InputVector *> &solutions,
399 std::vector<Vector<float>*> &errors,
412 template <
typename InputVector,
typename DoFHandlerType>
415 const DoFHandlerType &dof,
418 const InputVector &solution,
419 Vector<float> &error,
432 template <
typename InputVector,
typename DoFHandlerType>
434 (
const DoFHandlerType &dof,
437 const InputVector &solution,
438 Vector<float> &error,
451 template <
typename InputVector,
typename DoFHandlerType>
454 const DoFHandlerType &dof,
457 const std::vector<const InputVector *> &solutions,
458 std::vector<Vector<float>*> &errors,
471 template <
typename InputVector,
typename DoFHandlerType>
473 (
const DoFHandlerType &dof,
476 const std::vector<const InputVector *> &solutions,
477 std::vector<Vector<float>*> &errors,
489 "You provided a ComponentMask argument that is invalid. " 490 "Component masks need to be either default constructed " 491 "(in which case they indicate that every component is " 492 "selected) or need to have a length equal to the number " 493 "of vector components of the finite element in use " 494 "by the DoFHandler object. In the latter case, at " 495 "least one component needs to be selected.");
500 "If you do specify the argument for a (possibly " 501 "spatially variable) coefficient function for this function, " 502 "then it needs to refer to a coefficient that is either " 503 "scalar (has one vector component) or has as many vector " 504 "components as there are in the finite element used by " 505 "the DoFHandler argument.");
513 <<
"You provided a function map that for boundary indicator " 514 << arg1 <<
" specifies a function with " 515 << arg2 <<
" vector components. However, the finite " 516 "element in use has " 517 << arg2 <<
" components, and these two numbers need to match.");
523 <<
"The number of input vectors, " << arg1
524 <<
" needs to be equal to the number of output vectors, " 526 <<
". This is not the case in your call of this function.");
531 "You need to specify at least one solution vector as " 548 template <
int spacedim>
588 template <
typename InputVector,
typename DoFHandlerType>
591 const DoFHandlerType &dof,
594 const InputVector &solution,
595 Vector<float> &error,
607 template <
typename InputVector,
typename DoFHandlerType>
609 (
const DoFHandlerType &dof,
612 const InputVector &solution,
613 Vector<float> &error,
634 template <
typename InputVector,
typename DoFHandlerType>
637 const DoFHandlerType &dof,
640 const std::vector<const InputVector *> &solutions,
641 std::vector<Vector<float>*> &errors,
653 template <
typename InputVector,
typename DoFHandlerType>
655 (
const DoFHandlerType &dof,
658 const std::vector<const InputVector *> &solutions,
659 std::vector<Vector<float>*> &errors,
672 template <
typename InputVector,
typename DoFHandlerType>
675 const DoFHandlerType &dof,
678 const InputVector &solution,
679 Vector<float> &error,
692 template <
typename InputVector,
typename DoFHandlerType>
694 (
const DoFHandlerType &dof,
697 const InputVector &solution,
698 Vector<float> &error,
711 template <
typename InputVector,
typename DoFHandlerType>
714 const DoFHandlerType &dof,
717 const std::vector<const InputVector *> &solutions,
718 std::vector<Vector<float>*> &errors,
731 template <
typename InputVector,
typename DoFHandlerType>
733 (
const DoFHandlerType &dof,
736 const std::vector<const InputVector *> &solutions,
737 std::vector<Vector<float>*> &errors,
749 "You provided a ComponentMask argument that is invalid. " 750 "Component masks need to be either default constructed " 751 "(in which case they indicate that every component is " 752 "selected) or need to have a length equal to the number " 753 "of vector components of the finite element in use " 754 "by the DoFHandler object. In the latter case, at " 755 "least one component needs to be selected.");
760 "If you do specify the argument for a (possibly " 761 "spatially variable) coefficient function for this function, " 762 "then it needs to refer to a coefficient that is either " 763 "scalar (has one vector component) or has as many vector " 764 "components as there are in the finite element used by " 765 "the DoFHandler argument.");
773 <<
"You provided a function map that for boundary indicator " 774 << arg1 <<
" specifies a function with " 775 << arg2 <<
" vector components. However, the finite " 776 "element in use has " 777 << arg3 <<
" components, and these two numbers need to match.");
783 <<
"The number of input vectors, " << arg1
784 <<
" needs to be equal to the number of output vectors, " 786 <<
". This is not the case in your call of this function.");
791 "You need to specify at least one solution vector as " 797 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInvalidBoundaryFunction(types::boundary_id arg1, int arg2, int arg3)
static const unsigned int invalid_unsigned_int
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcInvalidCoefficient()
the boundary residual estimator with the factor .
const types::subdomain_id invalid_subdomain_id
static ::ExceptionBase & ExcInvalidComponentMask()
Abstract base class for mapping classes.
#define DeclExceptionMsg(Exception, defaulttext)
static void estimate(const Mapping< dim, spacedim > &mapping, const DoFHandlerType &dof, const Quadrature< dim-1 > &quadrature, const typename FunctionMap< spacedim, typename InputVector::value_type >::type &neumann_bc, const InputVector &solution, Vector< float > &error, const ComponentMask &component_mask=ComponentMask(), const Function< spacedim > *coefficients=nullptr, const unsigned int n_threads=numbers::invalid_unsigned_int, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id, const types::material_id material_id=numbers::invalid_material_id, const Strategy strategy=cell_diameter_over_24)
std::map< types::boundary_id, const Function< dim, Number > * > type
static ::ExceptionBase & ExcIncompatibleNumberOfElements(int arg1, int arg2)
unsigned int subdomain_id
the boundary residual estimator with the factor .
Kelly error estimator with the factor .
#define DeclException3(Exception3, type1, type2, type3, outsequence)
Kelly error estimator with the factor .
const types::material_id invalid_material_id
static ::ExceptionBase & ExcNoSolutions()