18 #ifndef OUTPUT_ELEMENT_HH_ 19 #define OUTPUT_ELEMENT_HH_ 24 template <
int spacedim>
47 OutputElement(
unsigned int ele_idx, std::shared_ptr<OutputMeshBase> output_mesh);
51 unsigned int idx()
const;
53 unsigned int dim()
const;
56 unsigned int node_index(
unsigned int loc_idx)
const;
59 Point
vertex(
unsigned int loc_idx)
const;
143 return (*
output_mesh_->connectivity_)[con_off - n + loc_idx];
153 auto &d = *(
output_mesh_->nodes_->get_component_data(0).get() );
161 const unsigned int n =
n_nodes();
165 auto &d = *(
output_mesh_->nodes_->get_component_data(0).get() );
166 for(
unsigned int i=0; i<n; i++) {
168 vertices[i] = {d[off], d[off+1], d[off+2]};
180 for(
unsigned int i=0; i<n; i++) {
181 indices[i] = (*
output_mesh_->connectivity_)[con_off - n + i];
194 #endif // OUTPUT_ELEMENT_HH_ OutputElement(unsigned int ele_idx, std::shared_ptr< OutputMeshBase > output_mesh)
Constructor.
Classes for auxiliary output mesh.
Point vertex(unsigned int loc_idx) const
Returns coordinates of node loc_idx.
unsigned int n_nodes() const
Returns number of nodes.
Represents an element of the output mesh. Provides element access on the data of the output mesh (nod...
std::vector< Point > vertex_list() const
Returns vector of nodes coordinates.
ElementAccessor< spacedim > element_accessor() const
Gets ElementAccessor of this element.
unsigned int idx() const
Returns index of the output element.
unsigned int orig_element_idx() const
Returns index of the master element in the computational mesh.
unsigned int ele_idx_
index of the output element
Point centre() const
Computes the barycenter.
Space< spacedim >::Point Point
std::shared_ptr< OutputMeshBase > output_mesh_
pointer to the output mesh
arma::vec::fixed< spacedim > Point
unsigned int dim() const
Returns dim of the output element.
unsigned int node_index(unsigned int loc_idx) const
Returns global index of the node.
bool operator==(const OutputElement &other)
std::vector< unsigned int > node_list() const
Returns global indices of the nodes.
static const unsigned int spacedim
Element space dimension = 3.
Mesh * orig_mesh() const
Returns pointer to the computational mesh.