Flow123d
JS_before_hm-2153-g6b139422c
|
Go to the documentation of this file.
18 #ifndef FIELD_COORDS_HH_
19 #define FIELD_COORDS_HH_
52 ASSERT(
false).error(
"This method can't be used for FieldCoords");
60 ASSERT(
false).error(
"This method can't be used for FieldCoords");
79 ASSERT(
false).error(
"Forbidden method for FieldCoords!");
83 ASSERT(
false).error(
"Forbidden method for FieldCoords!");
87 ASSERT(
false).error(
"Forbidden method for FieldCoords!");
95 double limit = std::numeric_limits<double>::max();
96 return fmt::format(
"{{ \"shape\": [ 3, 1 ], \"type\": \"Double\", \"limit\": [ {}, {} ] }}", -limit, +limit);
108 std::shared_ptr<EvalPoints> eval_points = cache_map.
eval_points();
112 unsigned int last_element_idx = -1;
115 unsigned int dim = 0;
121 for (
unsigned int i_data = reg_chunk_begin; i_data < reg_chunk_end; ++i_data) {
123 if (elm_idx != last_element_idx) {
126 last_element_idx = elm_idx;
132 coords = *elm.
node(0);
180 for (
uint i=0; i<point_list.
size(); ++i)
187 return this->
value_cache_.template vec<3>(i_cache_point);
Armor::ArmaVec< double, spacedim > Point
unsigned int i_element_
mesh_idx of ElementAccessor appropriate to element
std::shared_ptr< SharedData > shared_
void value_list(const Armor::array &point_list, const ElementAccessor< 3 > &elm, std::vector< arma::vec3 > &value_list) const
const FieldValueCache< double > * value_cache() const override
Implements FieldCommon::value_cache.
static unsigned int get()
Return number of stored elements.
unsigned int i_eval_point_
index of point in EvalPoint object
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.
FieldValueCache< double > * value_cache() override
Implements FieldCommon::value_cache.
void cache_update(ElementCacheMap &cache_map, unsigned int region_patch_idx) const override
Implements FieldCommon::cache_update.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
void set_shape(uint n_rows, uint n_cols)
std::string get_value_attribute() const override
Directing class of FieldValueCache.
const Mesh * mesh() const
void cache_reallocate(FMT_UNUSED const ElementCacheMap &cache_map, FMT_UNUSED unsigned int region_idx) const override
Implements FieldCommon::cache_allocate.
#define ASSERT_EQ_DBG(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
std::string format(CStringRef format_str, ArgList args)
FieldValueCache< double > value_cache_
const EvalPointData & eval_point_data(unsigned int point_idx) const
Return item of eval_point_data_ specified by its position.
unsigned int region_chunk_end(unsigned int region_patch_idx) const
Return end position of region chunk in FieldValueCache.
static RealPoint project_unit_to_real(const BaryPoint &point, const ElementMap &map)
void set_input_list(FMT_UNUSED const Input::Array &list, FMT_UNUSED const TimeGovernor &tg) override
unsigned int i_reg_
region_idx of element
arma::vec3 operator[](unsigned int i_cache_point) const
Return item of value_cache_ given by i_cache_point.
Representation of one time step..
Basic time management functionality for unsteady (and steady) solvers (class Equation).
ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
std::shared_ptr< EvalPoints > eval_points() const
Getter of eval_points object.
Common abstract parent of all Field<...> classes.
FieldCoords()
Constructor.
void set_mesh(const Mesh &mesh) override
void copy_from(FMT_UNUSED const FieldCommon &other) override
Container for various descendants of FieldCommonBase.
NodeAccessor< 3 > node(unsigned int ni) const
void field_output(FMT_UNUSED std::shared_ptr< OutputTime > stream, FMT_UNUSED OutputTime::DiscreteSpace type) override
unsigned int size() const
unsigned int region_chunk_begin(unsigned int region_patch_idx) const
Return begin position of region chunk in FieldValueCache.
Base class for Mesh and BCMesh.
FieldResult field_result(FMT_UNUSED RegionSet region_set) const override
Affine mapping between reference and actual cell.
const arma::vec3 & value(const Point &p, FMT_UNUSED const ElementAccessor< 3 > &elm) const
Returns one value of coordinates in one given point .
IT::Instance get_input_type() override
IT::Array get_multifield_input_type() override
Class MappingP1 implements the affine transformation of the unit cell onto the actual cell.
std::vector< const FieldCommon * > set_dependency(FMT_UNUSED FieldSet &field_set, FMT_UNUSED unsigned int i_reg) const override
Implements FieldCommon::set_dependency().
bool is_constant(FMT_UNUSED Region reg) override
void observe_output(FMT_UNUSED std::shared_ptr< Observe > observe) override
bool set_time(FMT_UNUSED const TimeStep &time, FMT_UNUSED LimitSide limit_side) override