|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_packaged_operation_h
17 #define dealii_packaged_operation_h
31 template <
typename Number>
33 template <
typename Range,
typename Domain,
typename Payload>
35 template <
typename Range = Vector<
double>>
105 template <
typename Range>
116 apply = [](Range &) {
119 "Uninitialized PackagedOperation<Range>::apply called"));
125 "Uninitialized PackagedOperation<Range>::apply_add called"));
130 ExcMessage(
"Uninitialized PackagedOperation<Range>::reinit_vector "
172 apply = [&u](Range &v) { v = u; };
177 v.reinit(u, omit_zeroing_entries);
189 operator Range()
const
194 apply(result_vector);
196 return result_vector;
210 *
this = *
this + second_comp;
221 *
this = *
this - second_comp;
253 *
this = *
this * number;
262 std::function<void(Range &v)>
apply;
294 template <
typename Range>
306 return_comp.
apply = [first_comp, second_comp](Range &v) {
311 return_comp.
apply_add = [first_comp, second_comp](Range &v) {
327 template <
typename Range>
339 return_comp.
apply = [first_comp, second_comp](Range &v) {
340 second_comp.
apply(v);
345 return_comp.
apply_add = [first_comp, second_comp](Range &v) {
363 template <
typename Range>
365 typename Range::value_type number)
374 return_comp.
apply = [](Range &v) { v = 0.; };
380 return_comp.
apply = [comp, number](Range &v) {
385 return_comp.
apply_add = [comp, number](Range &v) {
403 template <
typename Range>
407 return comp * number;
418 template <
typename Range>
433 template <
typename Range>
448 template <
typename Range>
465 template <
typename Range>
482 namespace PackagedOperationImplementation
488 template <
typename T>
491 template <
typename C>
492 static std::false_type
495 template <
typename C>
496 static std::true_type
497 test(decltype(&C::operator+=),
498 decltype(&C::operator-=),
505 using type = decltype(test<T>(
nullptr,
nullptr,
nullptr));
525 template <
typename Range,
526 typename =
typename std::enable_if<
537 return_comp.
reinit_vector = [&u](Range &x,
bool omit_zeroing_entries) {
538 x.reinit(u, omit_zeroing_entries);
541 return_comp.
apply = [&u, &v](Range &x) {
546 return_comp.
apply_add = [&u, &v](Range &x) {
570 template <
typename Range,
571 typename =
typename std::enable_if<
582 return_comp.
reinit_vector = [&u](Range &x,
bool omit_zeroing_entries) {
583 x.reinit(u, omit_zeroing_entries);
586 return_comp.
apply = [&u, &v](Range &x) {
591 return_comp.
apply_add = [&u, &v](Range &x) {
614 template <
typename Range,
615 typename =
typename std::enable_if<
619 typename Range::value_type number)
639 template <
typename Range,
640 typename =
typename std::enable_if<
666 template <
typename Range,
typename Domain,
typename Payload>
677 return_comp.
apply = [op, &u](Range &v) { op.
vmult(v, u); };
701 template <
typename Range,
typename Domain,
typename Payload>
712 return_comp.
apply = [op, &u](Domain &v) { op.
Tvmult(v, u); };
728 template <
typename Range,
typename Domain,
typename Payload>
740 return_comp.
apply = [op, comp](Domain &v) {
750 return_comp.
apply_add = [op, comp](Domain &v) {
772 template <
typename Range,
typename Domain,
typename Payload>
784 return_comp.
apply = [op, comp](Domain &v) {
794 return_comp.
apply_add = [op, comp](Domain &v) {
PackagedOperation< Range > & operator-=(const Range &offset)
constexpr SymmetricTensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > operator+(const SymmetricTensor< rank_, dim, Number > &left, const SymmetricTensor< rank_, dim, OtherNumber > &right)
PackagedOperation(const Range &u)
std::function< void(Range &v, bool omit_zeroing_entries)> reinit_vector
std::function< void(Range &v, const Domain &u)> vmult_add
std::function< void(Range &v, const Domain &u)> vmult
std::function< void(Domain &v, bool omit_zeroing_entries)> reinit_domain_vector
decltype(test< T >(nullptr, nullptr, nullptr)) type
PackagedOperation< Range > & operator-=(const PackagedOperation< Range > &second_comp)
std::function< void(Range &v, bool omit_zeroing_entries)> reinit_range_vector
std::function< void(Domain &v, const Range &u)> Tvmult_add
static std::false_type test(...)
Point< dim, typename ProductType< Number, typename EnableIfScalar< OtherNumber >::type >::type > operator*(const OtherNumber) const
PackagedOperation< Range > & operator=(const PackagedOperation< Range > &)=default
static ::ExceptionBase & ExcMessage(std::string arg1)
std::function< void(Range &v)> apply_add
#define DEAL_II_NAMESPACE_OPEN
PackagedOperation< Range > & operator=(const Range &u)
std::function< void(Domain &v, const Range &u)> Tvmult
constexpr SymmetricTensor< rank_, dim, typename ProductType< Number, OtherNumber >::type > operator-(const SymmetricTensor< rank_, dim, Number > &left, const SymmetricTensor< rank_, dim, OtherNumber > &right)
std::vector< value_type > l2_norm(const typename ::Triangulation< dim, spacedim >::cell_iterator &parent, const value_type parent_value)
PackagedOperation< Range > & operator*=(typename Range::value_type number)
#define Assert(cond, exc)
PackagedOperation< Range > & operator+=(const Range &offset)
PackagedOperation< Range > & operator+=(const PackagedOperation< Range > &second_comp)
#define DEAL_II_NAMESPACE_CLOSE
std::function< void(Range &v)> apply