/* Copyright (C) 2014 - 2019 by the authors of the ASPECT code. This file is part of ASPECT. ASPECT is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ASPECT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ASPECT; see the file LICENSE. If not see . */ #ifndef _aspect_boundary_temperature_function_h #define _aspect_boundary_temperature_function_h #include #include #include #include namespace aspect { namespace BoundaryTemperature { using namespace dealii; /** * A class that implements boundary temperature based on a functional * description provided in the input file. * * @ingroup BoundaryTemperatures */ template class Function : public Interface, public SimulatorAccess { public: /** * Constructor. */ Function (); /** * Return the boundary temperature as a function of position and time. * * @copydoc aspect::BoundaryTemperature::Interface::boundary_temperature() */ double boundary_temperature (const types::boundary_id boundary_indicator, const Point &position) const override; /** * A function that is called at the beginning of each time step to * indicate what the model time is for which the boundary values will * next be evaluated. For the current class, the function passes to * the parsed function what the current time is. */ void update () override; /** * Return the minimal temperature on that part of the boundary on * which Dirichlet conditions are posed. * * This value is used in computing dimensionless numbers such as the * Nusselt number indicating heat flux. */ double minimal_temperature (const std::set &fixed_boundary_ids) const override; /** * Return the maximal temperature on that part of the boundary on * which Dirichlet conditions are posed. * * This value is used in computing dimensionless numbers such as the * Nusselt number indicating heat flux. */ double maximal_temperature (const std::set &fixed_boundary_ids) const override; /** * Declare the parameters this class takes through input files. The * default implementation of this function does not describe any * parameters. Consequently, derived classes do not have to overload * this function if they do not take any runtime parameters. */ static void declare_parameters (ParameterHandler &prm); /** * Read the parameters this class declares from the parameter file. * The default implementation of this function does not read any * parameters. Consequently, derived classes do not have to overload * this function if they do not take any runtime parameters. */ void parse_parameters (ParameterHandler &prm) override; private: /** * A function object representing the temperature. */ Functions::ParsedFunction boundary_temperature_function; /** * Temperatures at the inner and outer boundaries. */ double min_temperature; double max_temperature; /** * The coordinate representation to evaluate the function. Possible * choices are depth, cartesian and spherical. */ Utilities::Coordinates::CoordinateSystem coordinate_system; }; } } #endif