// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM 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 of the License, or
(at your option) any later version.
OPM 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 OPM. If not, see .
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
/*!
* \file
*
* \brief Defines a type tags and some fundamental properties all models.
*/
#ifndef EWOMS_BASIC_PROPERTIES_HH
#define EWOMS_BASIC_PROPERTIES_HH
#include
#include
#include
#if HAVE_DUNE_FEM
#include
#endif
#include
namespace Opm::Properties {
///////////////////////////////////
// Type tag definitions:
//
// NumericModel
// |
// +-> ImplicitModel
///////////////////////////////////
// Create new type tags
namespace TTag {
//! Type tag for all models.
struct NumericModel { using InheritsFrom = std::tuple; };
//! Type tag for all fully coupled models.
struct ImplicitModel { using InheritsFrom = std::tuple; };
} // end namespace TTag
///////////////////////////////////
// Property names which are always available:
//
// Scalar
///////////////////////////////////
//! Property to specify the type of scalar values.
template
struct Scalar { using type = UndefinedProperty; };
//! Number of equations in the system of PDEs
template
struct NumEq { using type = UndefinedProperty; };
//! Property which provides a Dune::ParameterTree.
template
struct ParameterTree { using type = UndefinedProperty; };
//! The type of the model
template
struct Model { using type = UndefinedProperty; };
//! Property which defines the group that is queried for parameters by default
template
struct ModelParameterGroup { using type = UndefinedProperty; };
//! Property which provides a Vanguard (manages grids)
template
struct Vanguard { using type = UndefinedProperty; };
//! The type of the DUNE grid
template
struct Grid { using type = UndefinedProperty; };
template
struct GridView { using type = UndefinedProperty; };
#if HAVE_DUNE_FEM
template
struct GridPart { using type = UndefinedProperty; };
#endif
//! Property which tells the Vanguard how often the grid should be refined
//! after creation.
template
struct GridGlobalRefinements { using type = UndefinedProperty; };
//! Property provides the name of the file from which the additional runtime
//! parameters should to be loaded from
template
struct ParameterFile { using type = UndefinedProperty; };
/*!
* \brief Print all properties on startup?
*
* 0 means 'no', 1 means 'yes', 2 means 'print only to logfiles'. The
* default is 2.
*/
template
struct PrintProperties { using type = UndefinedProperty; };
/*!
* \brief Print all parameters on startup?
*
* 0 means 'no', 1 means 'yes', 2 means 'print only to logfiles'. The
* default is 2.
*/
template
struct PrintParameters { using type = UndefinedProperty; };
//! The default value for the simulation's end time
template
struct EndTime { using type = UndefinedProperty; };
//! The default value for the simulation's initial time step size
template
struct InitialTimeStepSize { using type = UndefinedProperty; };
//! The default value for the simulation's restart time
template
struct RestartTime { using type = UndefinedProperty; };
//! The name of the file with a number of forced time step lengths
template
struct PredeterminedTimeStepsFile { using type = UndefinedProperty; };
//! domain size
template
struct DomainSizeX { using type = UndefinedProperty; };
template
struct DomainSizeY { using type = UndefinedProperty; };
template
struct DomainSizeZ { using type = UndefinedProperty; };
//! grid resolution
template
struct CellsX { using type = UndefinedProperty; };
template
struct CellsY { using type = UndefinedProperty; };
template
struct CellsZ { using type = UndefinedProperty; };
//! name of the grid file
template
struct GridFile { using type = UndefinedProperty; };
//! level of the grid view
template
struct GridViewLevel { using type = UndefinedProperty; };
//! Manages the simulation time
template
struct Simulator { using type = UndefinedProperty; };
/*!
* \brief The class which marks the border indices associated with the
* degrees of freedom on a process boundary.
*
* This is required for the algebraic overlap stuff.
*/
template
struct BorderListCreator { using type = UndefinedProperty; };
///////////////////////////////////
// Values for the properties
///////////////////////////////////
//! Set the default type of scalar values to double
template
struct Scalar { using type = double; };
//! Set the ParameterTree property
template
struct ParameterTree
{
using type = Dune::ParameterTree;
static Dune::ParameterTree& tree()
{
static Dune::ParameterTree obj_;
return obj_;
}
};
//! use the global group as default for the model's parameter group
template
struct ModelParameterGroup { static constexpr auto value = ""; };
//! Set a value for the GridFile property
template
struct GridFile { static constexpr auto value = ""; };
#if HAVE_DUNE_FEM
template
struct GridPart
{
using Grid = GetPropType;
using type = Dune::Fem::AdaptiveLeafGridPart;
};
template
struct GridView { using type = typename GetPropType::GridViewType; };
#else
//! Use the leaf grid view by default.
//!
//! Except for spatial refinement, there is rarly a reason to use
//! anything else...
template
struct GridView { using type = typename GetPropType::LeafGridView; };
#endif
//! Set a value for the ParameterFile property
template
struct ParameterFile { static constexpr auto value = ""; };
//! Set the number of refinement levels of the grid to 0. This does not belong
//! here, strictly speaking.
template
struct GridGlobalRefinements { static constexpr int value = 0; };
//! By default, print the properties on startup
template
struct PrintProperties { static constexpr int value = 2; };
//! By default, print the values of the run-time parameters on startup
template
struct PrintParameters { static constexpr int value = 2; };
//! The default value for the simulation's end time
template
struct EndTime
{
using type = GetPropType;
static constexpr type value = -1e35;
};
//! The default value for the simulation's initial time step size
template
struct InitialTimeStepSize
{
using type = GetPropType;
static constexpr type value = -1e35;
};
//! The default value for the simulation's restart time
template
struct RestartTime
{
using type = GetPropType;
static constexpr type value = -1e35;
};
//! By default, do not force any time steps
template
struct PredeterminedTimeStepsFile { static constexpr auto value = ""; };
} // namespace Opm::Properties
#endif