1#ifndef _RHEOLEF_FIELD_WDOF_SLICED_H
2#define _RHEOLEF_FIELD_WDOF_SLICED_H
33#include "rheolef/field_wdof.h"
34#include "rheolef/space_component.h"
36namespace rheolef {
namespace details {
40template <
class OutputIterator>
class field_sliced_iterator;
42template <
class InputIterator>
50 using value_type =
typename std::iterator_traits<InputIterator>::value_type;
60 template<
class OutputIterator>
85template <
class OutputIterator>
114template<
class FieldRdof>
136 std::string name()
const {
return _Vi.name(); }
154template<
class FieldRdof>
159 if (! uh.get_space().get_constitution().is_hierarchical()) {
161 size_type n_comp = uh.get_space().get_constitution().get_basis().size();
163 "field sliced index "<<
_i_comp<<
" is out of range [0:"<<n_comp<<
"[");
166 size_type n_comp = uh.get_space().get_constitution().size();
168 "field sliced index "<<
_i_comp<<
" is out of range [0:"<<n_comp<<
"[");
171template<
class FieldRdof>
175 if (! uh.get_space().get_constitution().is_hierarchical()) {
179 for (
size_type j_comp = 0; j_comp < _i_comp; j_comp++) {
180 s += uh.get_space().get_constitution()[j_comp].ndof();
185template<
class FieldRdof>
189 if (! uh.get_space().get_constitution().is_hierarchical()) {
190 return uh.get_space().get_constitution().get_basis().size();
200template<
class FieldRdof>
235template<
class FieldRdof>
238template<
class FieldRdof>
247template<
class FieldRdof>
254template<
class FieldRdof>
264template<
class FieldWdof>
293 template<
class Sfinae
294 =
typename std::enable_if<
301 template <
class Value>
302 typename std::enable_if<
308 template <
class FieldRdof>
309 typename std::enable_if<
315 template<
class FieldLazy>
316 typename std::enable_if<
329 template <
class SetOp = details::
generic_set_op>
339 template<
class Iterator>
352template<
class FieldWdof>
355template<
class FieldWdof>
362template<
class FieldWdof>
370template<
class FieldWdof>
371template<
class Sfinae>
378template<
class FieldWdof>
385template<
class FieldWdof>
390 size_type dis_dof = _uh.
get_space().get_constitution().comp_dis_idof2dis_idof (base::_i_comp, comp_dis_idof);
391 return _uh.dis_dof (dis_dof);
393template<
class FieldWdof>
398 size_type dis_dof = _uh.get_space().get_constitution().comp_dis_idof2dis_idof (base::_i_comp, comp_dis_idof);
399 return _uh.dis_dof_entry (dis_dof);
401template<
class FieldWdof>
402template <
class SetOp>
406 _uh.dis_dof_update (set_op);
field::size_type size_type
typename FieldRdof::scalar_type scalar_type
typename FieldRdof::geo_type geo_type
const space_constitution_type & get_constitution() const
size_type dis_ndof() const
size_type _increment(const FieldRdof &uh) const
typename FieldRdof::size_type size_type
space_constitution< float_type, memory_type > space_constitution_type
typename float_traits< scalar_type >::type float_type
typename FieldRdof::memory_type memory_type
typename FieldRdof::space_type space_type
size_type _shift(const FieldRdof &uh) const
const geo_type & get_geo() const
const space_type & get_space() const
const distributor & ownership() const
const communicator & comm() const
field_rdof_sliced_base(const FieldRdof &uh, size_type i_comp)
typename FieldRdof::scalar_type scalar_type
field_rdof_sliced_const< FieldRdof > & operator=(const field_rdof_sliced_const< FieldRdof > &uh_comp)=delete
typename FieldRdof::geo_type geo_type
const_iterator end_dof() const
field_rdof_sliced_const()=delete
const scalar_type & dof(size_type idof) const
const_iterator begin_dof() const
field_rdof_sliced_base< FieldRdof > base
typename FieldRdof::size_type size_type
space_constitution< float_type, memory_type > space_constitution_type
typename float_traits< scalar_type >::type float_type
typename FieldRdof::memory_type memory_type
typename FieldRdof::space_type space_type
field_sliced_const_iterator(InputIterator iter, size_type incr)
typename std::iterator_traits< InputIterator >::value_type value_type
const value_type * pointer
self_type operator++(int)
bool operator==(const self_type &j) const
reference operator[](size_type n) const
std::forward_iterator_tag iterator_category
self_type & operator+=(difference_type n)
field_sliced_const_iterator< InputIterator > self_type
field_sliced_const_iterator()=delete
bool operator!=(const self_type &j) const
field_sliced_const_iterator(field_sliced_iterator< OutputIterator > i)
reference operator*() const
const value_type & reference
std::ptrdiff_t difference_type
self_type operator+(difference_type n) const
typename base::value_type value_type
value_type & operator[](size_type n)
self_type operator++(int)
field_sliced_iterator< OutputIterator > self_type
field_sliced_iterator()=delete
self_type & operator+=(difference_type n)
typename base::size_type size_type
std::ptrdiff_t difference_type
field_sliced_iterator(OutputIterator iter, size_type incr)
self_type operator+(difference_type n) const
std::enable_if< details::is_rheolef_arithmetic< Value >::value, field_wdof_base< field_wdof_sliced< FieldWdof > > & >::type operator=(const Value &)
typename FieldWdof::size_type size_type
field_wdof_sliced(const field_wdof_sliced< FieldWdof > &)=delete
void dis_dof_update(const SetOp &set_op=SetOp()) const
field_sliced_const_iterator< typename FieldWdof::const_iterator > const_iterator
const_iterator end_dof() const
typename FieldWdof::space_type space_type
const scalar_type & dof(size_type idof) const
const_iterator begin_dof() const
typename FieldWdof::scalar_type scalar_type
typename FieldWdof::dis_reference dis_reference
space_constitution< float_type, memory_type > space_constitution_type
field_wdof_sliced()=delete
typename FieldWdof::geo_type geo_type
typename float_traits< scalar_type >::type float_type
dis_reference dis_dof_entry(size_type dis_idof)
static void _initialize(const space_constitution_type &sup_constit, size_type i_comp, space_constitution_type &constit, Iterator &start, Iterator &last)
field_wdof_sliced< FieldWdof > self_type
typename FieldWdof::memory_type memory_type
scalar_type & dof(size_type idof)
const scalar_type & dis_dof(size_type dis_idof) const
field_wdof_sliced< FieldWdof > & operator=(const field_wdof_sliced< FieldWdof > &expr)
see the distributor page for the full documentation
size_type dis_size() const
global and local sizes
size_type size(size_type iproc) const
const communicator_type & comm() const
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
This file is part of Rheolef.
const_iterator begin_dof() const
bool have_homogeneous_space(space_basic< scalar_type, memory_type > &Vh) const
typename FieldRdof::scalar_type scalar_type
typename FieldRdof::size_type size_type
typename FieldRdof::memory_type memory_type
typename FieldWdof::size_type size_type
typename FieldWdof::scalar_type scalar_type
typename FieldWdof::memory_type memory_type