Flow123d
JS_before_hm-1830-gb19ac973c
|
Go to the documentation of this file.
18 #ifndef OUTPUT_ELEMENT_HH_
19 #define OUTPUT_ELEMENT_HH_
24 template <
int spacedim>
50 OutputElement(
unsigned int ele_idx, std::shared_ptr<OutputMeshBase> output_mesh);
54 unsigned int idx()
const;
56 unsigned int dim()
const;
59 unsigned int node_index(
unsigned int loc_idx)
const;
94 : ele_idx_(ele_idx), output_mesh_(output_mesh)
145 return (*
output_mesh_->connectivity_)[con_off - n + loc_idx];
155 auto &d = *(
output_mesh_->nodes_->get_component_data(0).get() );
156 Point point({d[off], d[off+1], d[off+2]});
163 const unsigned int n =
n_nodes();
167 auto &d = *(
output_mesh_->nodes_->get_component_data(0).get() );
168 for(
unsigned int i=0; i<n; i++) {
170 vertices[i] = {d[off], d[off+1], d[off+2]};
182 for(
unsigned int i=0; i<n; i++) {
183 indices[i] = (*
output_mesh_->connectivity_)[con_off - n + i];
196 #endif // OUTPUT_ELEMENT_HH_
Armor::ArmaVec< double, spacedim > Point
unsigned int n_nodes() const
Returns number of nodes.
unsigned int idx() const
Returns index of the output element.
Represents an element of the output mesh. Provides element access on the data of the output mesh (nod...
unsigned int ele_idx_
index of the output element
unsigned int node_index(unsigned int loc_idx) const
Returns global index of the node.
std::vector< Point > vertex_list() const
Returns vector of nodes coordinates.
OutputElement()
Default constructor.
unsigned int orig_element_idx() const
Returns index of the master element in the computational mesh.
ElementAccessor< spacedim > element_accessor() const
Gets ElementAccessor of this element.
bool operator==(const OutputElement &other)
Space< spacedim >::Point Point
unsigned int dim() const
Returns dim of the output element.
static const unsigned int spacedim
Element space dimension = 3.
Classes for auxiliary output mesh.
Point centre() const
Computes the barycenter.
Mesh * orig_mesh() const
Returns pointer to the computational mesh.
Point vertex(unsigned int loc_idx) const
Returns coordinates of node loc_idx.
std::shared_ptr< OutputMeshBase > output_mesh_
pointer to the output mesh
std::vector< unsigned int > node_list() const
Returns global indices of the nodes.