Flow123d
JS_before_hm-2198-g122e1f2e2
|
Go to the documentation of this file.
38 ready_to_reading_(false), element_eval_points_map_(nullptr), eval_point_data_(0),
55 for (
unsigned int i=0; i<ep_data_size; ++i)
62 std::sort(eval_point_data_tmp.
begin(), eval_point_data_tmp.
end());
65 unsigned int last_region_idx = -1;
66 unsigned int last_element_idx = -1;
68 bool is_new_reg, is_new_elm;
77 for (
auto it=eval_point_data_tmp.
begin();
it!=eval_point_data_tmp.
end(); ++
it) {
78 is_new_reg = (
it->i_reg_ != last_region_idx);
79 is_new_elm = is_new_reg || (
it->i_element_ != last_element_idx);
82 unsigned int last_eval_point = i_pos-1;
89 last_region_idx =
it->i_reg_;
92 if (
it->i_reg_ % 2 == 1)
97 last_element_idx =
it->i_element_;
103 unsigned int last_eval_point = i_pos-1;
static unsigned int get()
Return number of stored elements.
std::unordered_map< unsigned int, unsigned int > element_to_map_bdr_
Maps boundary element_idx to element index in patch - TODO remove.
void create_patch()
Create patch of cached elements before reading data to cache.
std::size_t make_permanent()
Finalize temporary part of data.
std::vector< Type >::iterator end()
std::size_t emplace_back(Args &&... args)
static const unsigned int simd_size_double
Auxiliary data class holds number of elements in cache and allow to set this value explicitly (e....
Directing class of FieldValueCache.
static const unsigned int undef_elem_idx
Index of invalid element in cache.
void set_element_eval_point(unsigned int i_elem_in_cache, unsigned int i_eval_point, int val) const
Set item of element_eval_points_map_.
void reset()
Clear the list.
int * element_eval_points_map_
Holds data of evaluating points in patch.
RevertableList< unsigned int > regions_starts_
Start positions of elements in regions (size = n_regions+1, last value is end of last region)
RevertableList< EvalPointData > eval_point_data_
void init(std::shared_ptr< EvalPoints > eval_points)
Init cache.
std::size_t temporary_size() const
Return temporary size of list (full size of stored data).
std::shared_ptr< EvalPoints > eval_points_
Pointer to EvalPoints.
std::shared_ptr< EvalPoints > eval_points() const
Getter of eval_points object.
static const int unused_point
Special constant (.
std::unordered_map< unsigned int, unsigned int > element_to_map_
Maps bulk element_idx to element index in patch - TODO remove.
std::vector< unsigned int > elm_idx_
Vector of element indexes stored in cache.
void resize(std::size_t new_size)
void finish_elements_update()
Finish update after reading data to cache.
std::vector< Type >::iterator begin()
~ElementCacheMap()
Destructor.
ElementCacheMap()
Constructor.
void start_elements_update()
Start update of cache.
bool ready_to_reading_
Flag is set down during update of cache when this can't be read.
RevertableList< unsigned int > element_starts_
Start positions of elements in eval_point_data_ (size = n_elements+1)