https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 734261b3ee2ff9a172b90739f1cf7e2ae9823c25 authored by rinkk on 11 February 2021, 14:52:44 UTC
[utils] added voting mechanic to bridge small discontinuities such as horizon-shifts due to faults, adjusted test to reflect this change
Tip revision: 734261b
ConstantFluidProperty.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 15, 2016, 12:11 PM
 */

#pragma once

#include "FluidProperty.h"

namespace MaterialLib
{
namespace Fluid
{
/// Constant fluid properties
class ConstantFluidProperty final : public FluidProperty
{
public:
    explicit ConstantFluidProperty(const double value) : _value(value) {}

    /// Get model name.
    std::string getName() const override { return "Constant"; }
    /// Get property value.
    /// \param var_vals Variable values in an array. The order of its elements
    ///                 is given in enum class PropertyVariableType.
    double getValue(const ArrayType& var_vals) const override
    {
        (void)var_vals;
        return _value;
    }

    /// Get the partial differential of the property value
    /// \param var_vals  Variable values  in an array. The order of its elements
    ///                  is given in enum class PropertyVariableType.
    /// \param var       Variable type.
    double getdValue(const ArrayType& var_vals,
                     const PropertyVariableType var) const override
    {
        (void)var_vals;
        (void)var;
        return 0.;
    }

private:
    const double _value;
};

}  // namespace Fluid
}  // namespace MaterialLib
back to top