83 template<
int spacedim,
class Value>
90 for (
unsigned long index=0; index < multi_field.
size(); index++)
92 if (flags & (1 << ids))
98 template<
int spacedim,
class Value>
106 if (flags & (1 << ids))
111 template<
int spacedim,
class Value>
115 if( this->
rank != 0) {
130 auto it=std::find_if(od_vec.begin(), od_vec.end(),
132 if (
it == od_vec.end() ) {
133 od_vec.push_back( std::make_shared<
OutputData<Value> >(field, size[space_type]) );
144 for(
unsigned int idx=0; idx < output_data.
n_values; idx++)
145 output_data.
zero(idx);
150 for(
unsigned int i=0; i < ele.n_nodes(); i++)
152 unsigned int node_index = ele.node_index(i);
153 const Value &node_value =
154 Value( const_cast<typename Value::return_type &>(
155 field.
value(vertices[i],
158 output_data.
add(node_index, node_value);
164 for(
unsigned int idx=0; idx < output_data.
n_values; idx++)
172 for(
unsigned int i=0; i < ele.n_nodes(); i++)
174 unsigned int node_index = ele.node_index(i);
175 const Value &node_value =
176 Value( const_cast<typename Value::return_type &>(
177 field.
value(vertices[i],
188 unsigned int ele_index = ele.idx();
189 const Value &ele_value =
190 Value( const_cast<typename Value::return_type &>(
191 field.
value(ele.centre(),
Classes for auxiliary output mesh.
std::shared_ptr< OutputMesh > output_mesh_
Output mesh.
std::shared_ptr< OutputMeshDiscontinuous > output_mesh_discont_
Discontinuous (non-conforming) mesh. Used for CORNER_DATA.
unsigned int size() const
Number of subfields that compose the multi-field.
Class template representing a field with values dependent on: point, element, and region...
void register_data(const DiscreteSpace type, MultiField< spacedim, Value > &multi_field)
Generic method for registering output data stored in MultiField.
This class is used for storing data that are copied from field.
void zero(unsigned int idx)
unsigned int DiscreteSpaceFlags
void add(unsigned int idx, const Value &value)
void normalize(unsigned int idx, unsigned int divisor)
static const unsigned int N_DISCRETE_SPACES
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
void compute_field_data(DiscreteSpace type, Field< spacedim, Value > &field)
void compute_discontinuous_output_mesh()
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than)
Class OutputElement and its iterator OutputElementIterator on the output mesh.
OutputDataFieldVec output_data_vec_[N_DISCRETE_SPACES]
FieldCommon & name(const string &name)
std::shared_ptr< OutputDataBase > OutputDataPtr
Class for representation of a vector of fields of the same physical quantity.
void store_value(unsigned int idx, const Value &value)