18 #ifndef ASSEMBLY_OUTPUT_HH_
19 #define ASSEMBLY_OUTPUT_HH_
21 #include <unordered_map>
38 template <
unsigned int dim,
class TEqData>
72 stream_->update_time(f_acc->time());
95 template <
unsigned int dim,
class TEqData>
102 static constexpr
const char *
name() {
return "Output_ElemData_Assembly"; }
114 unsigned int element_patch_idx, field_value_cache_position, val_idx;
117 for (
unsigned int i=0; i<patch_data.permanent_size(); ++i) {
121 val_idx = this->
stream_->get_output_mesh_ptr()->get_loc_elem_idx(patch_data[i].cell.elm_idx());
122 this->
offsets_[field_value_cache_position] = val_idx;
125 f_acc->fill_data_value(this->
offsets_);
132 template <
template<
IntDim...>
class DimAssembly>
140 template <
unsigned int dim,
class TEqData>
147 static constexpr
const char *
name() {
return "Output_NodeData_Assembly"; }
153 for(
unsigned int i = 0; i<RefElement<dim>::n_nodes; i++)
173 unsigned int element_patch_idx, field_value_cache_position, val_idx;
176 for (
unsigned int i=0; i<patch_data.permanent_size(); ++i) {
178 val_idx = (*offset_vec_)[ this->
stream_->get_output_mesh_ptr()->get_loc_elem_idx(patch_data[i].cell.elm_idx()) ];
181 for (
uint j=0; j<patch_data[i].cell.dim()+1; ++j) {
182 this->
offsets_[field_value_cache_position+j] = val_idx+j;
186 f_acc->fill_data_value(this->
offsets_);
195 template <
template<
IntDim...>
class DimAssembly>
std::shared_ptr< BulkIntegralAcc< dim > > create_bulk_integral(Quadrature *quad)
Quadrature * quad_
Quadrature used in assembling methods.
AssemblyInternals * asm_internals_
Holds shared internals data with GeneriAssembly.
AssemblyOutputBase(unsigned int quad_order, EqData *eq_data, AssemblyInternals *asm_internals)
Constructor.
EqFields * eq_fields_
Data objects shared with EquationOutput.
std::shared_ptr< OutputTime > stream_
Output stream.
AssemblyOutputBase(EqData *eq_data, AssemblyInternals *asm_internals)
Constructor.
FieldSet used_fields_
Sub field set contains fields performed to output.
void end() override
Implements AssemblyBase::end.
void set_output_data(const FieldSet &used, std::shared_ptr< OutputTime > stream)
Sets output data members.
std::vector< int > offsets_
Holds indices (offsets) of cached data to output data vector.
void initialize()
Initialize auxiliary vectors and other data members.
void assemble_cell_integrals()
Assembles the cell integrals for the given dimension.
AssemblyOutputElemData(EqData *eq_data, AssemblyInternals *asm_internals)
Constructor.
~AssemblyOutputElemData()
Destructor.
std::shared_ptr< BulkIntegralAcc< dim > > bulk_integral_
static constexpr const char * name()
~AssemblyOutputNodeData()
Destructor.
static constexpr const char * name()
std::shared_ptr< std::vector< unsigned int > > offset_vec_
Holds offsets of individual local elements.
std::shared_ptr< BulkIntegralAcc< dim > > bulk_integral_
void set_output_data(const FieldSet &used, std::shared_ptr< OutputTime > stream)
Sets output data members.
void assemble_cell_integrals()
Assembles the cell integrals for the given dimension.
AssemblyOutputNodeData(EqData *eq_data, AssemblyInternals *asm_internals)
Constructor.
static unsigned int get()
Return number of stored elements.
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.
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.
Holds common data shared between GenericAssemblz and Assembly<dim> classes.
ElementCacheMap element_cache_map_
ElementCacheMap according to EvalPoints.