https://github.com/geodynamics/aspect
Tip revision: 3373d2f5ebd7d9852dc55db7b00375f8a48cf6a4 authored by Timo Heister on 10 May 2018, 08:11:03 UTC
version 2.0.0
version 2.0.0
Tip revision: 3373d2f
function.h
/*
Copyright (C) 2014 - 2017 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
<http://www.gnu.org/licenses/>.
*/
#ifndef _aspect_boundary_temperature_function_h
#define _aspect_boundary_temperature_function_h
#include <aspect/boundary_temperature/interface.h>
#include <aspect/simulator_access.h>
#include <aspect/utilities.h>
#include <deal.II/base/parsed_function.h>
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 <int dim>
class Function : public Interface<dim>, public SimulatorAccess<dim>
{
public:
/**
* Constructor.
*/
Function ();
/**
* Return the boundary temperature as a function of position and time.
*
* @copydoc aspect::BoundaryTemperature::Interface::boundary_temperature()
*/
virtual
double
boundary_temperature (const types::boundary_id boundary_indicator,
const Point<dim> &position) const;
/**
* 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.
*/
virtual
void
update ();
/**
* 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.
*/
virtual
double minimal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const;
/**
* 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.
*/
virtual
double maximal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const;
/**
* 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.
*/
virtual
void
parse_parameters (ParameterHandler &prm);
private:
/**
* A function object representing the temperature.
*/
Functions::ParsedFunction<dim> 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