swh:1:snp:f521c49ab17ef7db6ec70b2430e1ed203f50383f
Raw File
Tip revision: 1c97e42017990f4ceed1fdad001aeb692b774b32 authored by Lars Bilke on 25 May 2021, 07:18:35 UTC
[ci] Streamlined Docker image selection logic.
Tip revision: 1c97e42
Porosity.h
/**
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 * \file
 *
 * Created on August 16, 2016, 12:53 PM
 */

#pragma once

#include <string>

#include "ParameterLib/Parameter.h"

namespace MaterialLib
{
namespace PorousMedium
{
class Porosity
{
public:
    explicit Porosity(ParameterLib::Parameter<double> const& parameter)
        : _parameter(parameter)
    {
    }
    virtual ~Porosity() = default;

    /**
     *  Get property value.
     *  @param t point in time
     *  @param pos spatial position
     *  @param variable    A variable with any double type value.
     *  @param temperature Temperature with any double type value.
     */
    virtual double getValue(const double t,
                            ParameterLib::SpatialPosition const& pos,
                            const double variable,
                            const double temperature) const
    {
        (void)variable;
        (void)temperature;
        return _parameter(t, pos)[0];
    }

private:
    ParameterLib::Parameter<double> const& _parameter;
};

}  // namespace PorousMedium
}  // namespace MaterialLib
back to top