/* SPDX-FileCopyrightText: Copyright (c) 2020 - 2026, the adamantine authors. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef CUBE_HEAT_SOURCE_HH #define CUBE_HEAT_SOURCE_HH #include namespace adamantine { /** * Cube heat source. This source does not represent a physical source, it is * used for verification purpose. */ template class CubeHeatSource final : public HeatSource { public: /** * Constructor. * \param[in] source_database requires the following entries: * - start_time: double (when the source is turned on) * - end_time: double (when the source is turned off) * - value: double (value of the soruce) * - min_x: double (minimum x coordinate of the cube) * - max_x: double (maximum x coordinate of the cube) * - min_y: double (minimum y coordinate of the cube) * - max_y: double (maximum y coordinate of the cube) * - min_z: double (3D only, minimum z coordinate of the cube) * - max_z: double (3D only, maximum z coordinate of the cube) * \param[in] units_optional_database may have the following entries: * - heat_source.dimension * - heat_source.power */ CubeHeatSource(boost::property_tree::ptree const &source_database, boost::optional const &units_optional_database); /** * Set the time variable. */ void update_time(double time) final; /** * Return the value of the source for a given point and time. */ double value(dealii::Point const &point) const final; /** * Same function as above but it uses vectorized data. */ dealii::VectorizedArray value(dealii::Point> const &points) const final; dealii::BoundingBox get_bounding_box(double const time, double const scaling_factor) const final; private: double _start_time; double _end_time; double _value; dealii::Point _min_point; dealii::Point _max_point; }; } // namespace adamantine #endif