18 #ifndef ASSEMBLY_OUTPUT_HH_
19 #define ASSEMBLY_OUTPUT_HH_
21 #include <unordered_map>
39 template <
unsigned int dim>
76 stream_->update_time(f_acc->time());
99 template <
unsigned int dim>
107 static constexpr
const char *
name() {
return "AssemblyOutputElemData"; }
119 unsigned int element_patch_idx, field_value_cache_position, val_idx;
121 for (
unsigned int i=0; i<bulk_integral_data.
permanent_size(); ++i) {
123 auto p = *( this->
bulk_points(element_patch_idx).begin() );
125 val_idx = this->
stream_->get_output_mesh_ptr()->get_loc_elem_idx(bulk_integral_data[i].cell.elm_idx());
126 this->
offsets_[field_value_cache_position] = val_idx;
129 f_acc->fill_data_value(this->
offsets_);
133 template <
template<
IntDim...>
class DimAssembly>
141 template <
unsigned int dim>
149 static constexpr
const char *
name() {
return "AssemblyOutputNodeData"; }
155 for(
unsigned int i = 0; i<RefElement<dim>::n_nodes; i++)
175 unsigned int element_patch_idx, field_value_cache_position, val_idx;
177 for (
unsigned int i=0; i<bulk_integral_data.
permanent_size(); ++i) {
179 val_idx = (*offset_vec_)[ this->
stream_->get_output_mesh_ptr()->get_loc_elem_idx(bulk_integral_data[i].cell.elm_idx()) ];
180 auto p = *( this->
bulk_points(element_patch_idx).begin() );
182 for (
uint j=0; j<bulk_integral_data[i].cell.dim()+1; ++j) {
183 this->
offsets_[field_value_cache_position+j] = val_idx+j;
187 f_acc->fill_data_value(this->
offsets_);
194 template <
template<
IntDim...>
class DimAssembly>
Range< BulkPoint > bulk_points(unsigned int element_patch_idx) const
Return BulkPoint range of appropriate dimension.
Quadrature * quad_
Quadrature used in assembling methods.
int active_integrals_
Holds mask of active integrals.
ElementCacheMap * element_cache_map_
ElementCacheMap shared with GenericAssembly object.
AssemblyOutputBase(unsigned int quad_order, EqFields *eq_fields, EqData *eq_data)
Constructor.
EqFields * eq_fields_
Data objects shared with EquationOutput.
std::shared_ptr< OutputTime > stream_
Output stream.
std::vector< int > offsets_
Holds indices (offsets) of cached data to output data vector.
AssemblyOutputBase(EqFields *eq_fields, EqData *eq_data)
Constructor.
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
void end() override
Implements AssemblyBase::end.
void set_output_data(const FieldSet &used, std::shared_ptr< OutputTime > stream)
Sets output data members.
FieldSet used_fields_
Sub field set contains fields performed to output.
GenericAssemblyBase::BulkIntegralData BulkIntegralData
~AssemblyOutputElemData()
Destructor.
void assemble_cell_integrals(const RevertableList< BulkIntegralData > &bulk_integral_data)
Assembles the cell integrals for the given dimension.
AssemblyOutputElemData(EqFields *eq_fields, EqData *eq_data)
Constructor.
static constexpr const char * name()
void assemble_cell_integrals(const RevertableList< BulkIntegralData > &bulk_integral_data)
Assembles the cell integrals for the given dimension.
AssemblyOutputNodeData(EqFields *eq_fields, EqData *eq_data)
Constructor.
static constexpr const char * name()
std::shared_ptr< std::vector< unsigned int > > offset_vec_
Holds offsets of individual local elements.
void set_output_data(const FieldSet &used, std::shared_ptr< OutputTime > stream)
Sets output data members.
~AssemblyOutputNodeData()
Destructor.
GenericAssemblyBase::BulkIntegralData BulkIntegralData
static unsigned int get()
Return number of stored elements.
Directing class of FieldValueCache.
int element_eval_point(unsigned int i_elem_in_cache, unsigned int i_eval_point) const
unsigned int position_in_cache(unsigned mesh_elm_idx, bool bdr=false) const
Return position of element stored in ElementCacheMap.
Container for various descendants of FieldCommonBase.
Range< FieldListAccessor > fields_range() const
Returns range of Fields held in field_list.
Generic class of assemblation.
Base class for quadrature rules on simplices in arbitrary dimensions.
Armor::Array< double >::ArrayMatSet set(uint i)
double weight(unsigned int i) const
Returns the ith weight.
static LocalPoint node_coords(unsigned int nid)
Definitions of basic Lagrangean finite elements with polynomial shape functions.
Class FEValues calculates finite element data on the actual cells such as shape function values,...
unsigned int IntDim
A dimension index type.
Definitions of particular quadrature rules on simplices.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.
std::size_t permanent_size() const
Return permanent size of list.