18 #ifndef FIELD_MESH_STEP_HH_
19 #define FIELD_MESH_STEP_HH_
47 ASSERT_PERMANENT(
false).error(
"This method can't be used for FieldMeshStep");
55 ASSERT_PERMANENT(
false).error(
"This method can't be used for FieldMeshStep");
86 double limit = std::numeric_limits<double>::max();
87 return fmt::format(
"{{ \"shape\": [ 1, 1 ], \"type\": \"Double\", \"limit\": [ {}, {} ] }}", -limit, +limit);
103 unsigned int last_element_idx = -1;
111 for (
unsigned int i_data = reg_chunk_begin; i_data < reg_chunk_end; ++i_data) {
113 if (elm_idx != last_element_idx) {
115 double exp = 1.0 / elm.
dim();
116 h_val = pow( (elm.
measure() * meassure_dim_coef[elm.
dim()]), exp );
117 last_element_idx = elm_idx;
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
static unsigned int get()
Return number of stored elements.
double measure() const
Computes the measure of the element.
Directing class of FieldValueCache.
unsigned int region_chunk_end(unsigned int region_patch_idx) const
Return end position of region chunk in FieldValueCache.
unsigned int region_chunk_begin(unsigned int region_patch_idx) const
Return begin position of region chunk in FieldValueCache.
const EvalPointData & eval_point_data(unsigned int point_idx) const
Return item of eval_point_data_ specified by its position.
Common abstract parent of all Field<...> classes.
std::shared_ptr< SharedData > shared_
void set_shape(uint n_rows, uint n_cols)
const Mesh * mesh() const
void copy_from(FMT_UNUSED const FieldCommon &other) override
IT::Array get_multifield_input_type() override
FieldValueCache< double > value_cache_
FieldMeshStep()
Constructor.
FieldResult field_result(FMT_UNUSED RegionSet region_set) const override
void set_input_list(FMT_UNUSED const Input::Array &list, FMT_UNUSED const TimeGovernor &tg) override
bool is_constant(FMT_UNUSED Region reg) override
void set_mesh(const Mesh &mesh) override
std::string get_value_attribute() const override
void cache_update(ElementCacheMap &cache_map, unsigned int region_patch_idx) const override
Implements FieldCommon::cache_update.
bool set_time(FMT_UNUSED const TimeStep &time, FMT_UNUSED LimitSide limit_side) override
FieldValueCache< double > * value_cache() override
Implements FieldCommon::value_cache.
std::vector< const FieldCommon * > set_dependency(FMT_UNUSED unsigned int i_reg) const override
Implements FieldCommon::set_dependency().
const FieldValueCache< double > * value_cache() const override
Implements FieldCommon::value_cache.
void cache_reallocate(FMT_UNUSED const ElementCacheMap &cache_map, FMT_UNUSED unsigned int region_idx) const override
Implements FieldCommon::cache_allocate.
IT::Instance get_input_type() override
void field_output(FMT_UNUSED std::shared_ptr< OutputTime > stream, FMT_UNUSED OutputTime::DiscreteSpace type) override
Base class for Mesh and BCMesh.
ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Representation of one time step..
std::string format(CStringRef format_str, ArgList args)
unsigned int i_element_
mesh_idx of ElementAccessor appropriate to element
unsigned int i_reg_
region_idx of element