OGS
VolumeFractionAverage.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <array>
7
10
11namespace MaterialPropertyLib
12{
40{
41 // Struct with pointers on the properties of relevant phases
43 {
44 const Property* liquid = nullptr;
45 const Property* frozen = nullptr;
46 const Property* porous = nullptr;
47 };
48
49public:
50 explicit VolumeFractionAverage(std::string name);
51
52 void checkScale() const override;
53
54 // initialize container with pointers to the phases properties
55 void setProperties(
56 std::vector<std::unique_ptr<Phase>> const& phases) override;
57
58 PropertyDataType value(VariableArray const& variable_array,
60 double const t,
61 double const dt) const override;
62
63 PropertyDataType dValue(VariableArray const& variable_array,
64 Variable const variable,
66 double const t,
67 double const dt) const override;
68
69protected: // order matters!
72};
73} // namespace MaterialPropertyLib
virtual PropertyDataType value() const
void setProperties(std::vector< std::unique_ptr< Phase > > const &phases) override
Default implementation:
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType