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{
37{
38 // Struct with pointers on the properties of relevant phases
40 {
41 const Property* liquid = nullptr;
42 const Property* frozen = nullptr;
43 const Property* porous = nullptr;
44 };
45
46public:
47 explicit VolumeFractionAverage(std::string name);
48
49 void checkScale() const override;
50
51 // initialize container with pointers to the phases properties
52 void setProperties(
53 std::vector<std::unique_ptr<Phase>> const& phases) override;
54
55 PropertyDataType value(VariableArray const& variable_array,
57 double const t,
58 double const dt) const override;
59
60 PropertyDataType dValue(VariableArray const& variable_array,
61 Variable const variable,
63 double const t,
64 double const dt) const override;
65
66protected: // order matters!
69};
70} // 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