https://github.com/geodynamics/aspect
Tip revision: a8904116eedd2233a5323969cf1b20568495a3e3 authored by Wolfgang Bangerth on 25 January 2015, 20:06:45 UTC
take over db3d963
take over db3d963
Tip revision: a890411
function.h
/*
Copyright (C) 2014 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 doc/COPYING. 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 <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.
*/
virtual
double
temperature (const GeometryModel::Interface<dim> &geometry_model,
const unsigned int 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;
};
}
}
#endif