diff --git a/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp b/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp index c6a0234000e56e419770a5cee8224dac78863ccc..fe747dc0bcb9c2202068ad1ef6baddb18eab76da 100644 --- a/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp +++ b/Applications/DataExplorer/DataView/DiagramView/DiagramList.cpp @@ -30,16 +30,12 @@ DiagramList::~DiagramList() = default; float DiagramList::calcMinXValue() { - float min = std::numeric_limits<float>::max(); - std::size_t nCoords = _coords.size(); - for (std::size_t i = 0; i < nCoords; i++) - { - if (_coords[i].first < min) - { - min = _coords[i].first; - } - } - return min; + auto min = std::min_element( + _coords.begin(), _coords.end(), + [](auto const& c0, auto const& c1) { return c0.first < c1.first; }); + if (min != _coords.end()) + return min->first; + return std::numeric_limits<float>::max(); } float DiagramList::calcMaxXValue() @@ -355,16 +351,13 @@ void DiagramList::setList( return; } - this->_startDate = coords[0].first; - _coords.emplace_back(0.0f, coords[0].second); - - std::size_t nCoords = coords.size(); - for (std::size_t i = 1; i < nCoords; i++) - { - _coords.emplace_back( - static_cast<float>(_startDate.daysTo(coords[i].first)), - coords[i].second); - } + _startDate = coords[0].first; + std::transform(coords.begin(), coords.end(), std::back_inserter(_coords), + [this](auto const& p) { + return std::make_pair( + static_cast<float>(_startDate.daysTo(p.first)), + p.second); + }); update(); } diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp index 562a297c4adfc207cb11de54f77cffcb49ccff0e..5f6541789116e48ca3fcdd34cd6bccd2235d4a73 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp +++ b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp @@ -174,10 +174,9 @@ int main(int argc, char* argv[]) { std::unique_ptr<MeshLib::Mesh> mesh( MeshLib::IO::readMeshFromFile(filename)); - INFO("Mesh '%s' read: %d nodes, %d elements.", - mesh->getName().c_str(), - mesh->getNumberOfNodes(), - mesh->getNumberOfElements()); + INFO("Mesh '%s' from file '%s' read: %d nodes, %d elements.", + mesh->getName().c_str(), filename.c_str(), + mesh->getNumberOfNodes(), mesh->getNumberOfElements()); std::string const other_mesh_output_file_name_wo_extension = BaseLib::joinPaths( diff --git a/Documentation/ProjectFile/prj/parameters/parameter/TimeDependentHeterogeneousParameter/c_TimeDependentHeterogeneousParameter.md b/Documentation/ProjectFile/prj/parameters/parameter/TimeDependentHeterogeneousParameter/c_TimeDependentHeterogeneousParameter.md new file mode 100644 index 0000000000000000000000000000000000000000..8e23d9fe0c56713f142f7d976d19e885b05d9fe9 --- /dev/null +++ b/Documentation/ProjectFile/prj/parameters/parameter/TimeDependentHeterogeneousParameter/c_TimeDependentHeterogeneousParameter.md @@ -0,0 +1 @@ +A parameter defined through a number of ordered pairs consisting of time and a referenced parameter. diff --git a/MaterialLib/MPL/Properties/ExponentialProperty.h b/MaterialLib/MPL/Properties/ExponentialProperty.h index d275145b88acf147dbbc041449346d76dded29a4..ae9c4c384a4579d99f14ae5d903fca7f80e6a6d6 100644 --- a/MaterialLib/MPL/Properties/ExponentialProperty.h +++ b/MaterialLib/MPL/Properties/ExponentialProperty.h @@ -24,8 +24,10 @@ struct ExponentData }; /// The exponential property class. This property calculates the exponential -/// relationship. The current implementation accepts only the double datatype -/// defined in PropertyDataType. +/// relationship \f$ \alpha(\beta) = +/// \alpha_{\mathrm{ref}} \cdot \exp (-s (\beta - \beta_{\mathrm{ref}})\f$. +/// The current implementation accepts only the double datatype defined in +/// PropertyDataType. class ExponentialProperty final : public Property { public: @@ -34,8 +36,8 @@ public: /// of the base class Property to that value. ExponentialProperty(PropertyDataType const& property_reference_value, ExponentData const& v); - /// This method computes the value of a property depending linearly on - /// the value of the given primary variable. + /// This method computes the value of a property \f$\alpha\f$ depending + /// exponentialy on the value of the given primary variable \f$\beta\f$. PropertyDataType value(VariableArray const& variable_array) const override; /// This method will compute the derivative of a property with respect to /// the given primary variable. diff --git a/ParameterLib/Parameter.cpp b/ParameterLib/Parameter.cpp index fcd185c339dfeb341c61e7d08c044898745d2218..21c17893b3c5e40536a032b18b1bdc8fb0422e09 100644 --- a/ParameterLib/Parameter.cpp +++ b/ParameterLib/Parameter.cpp @@ -48,38 +48,32 @@ std::unique_ptr<ParameterBase> createParameter( if (type == "Constant") { INFO("ConstantParameter: %s", name.c_str()); - auto param = createConstantParameter(name, config); - return param; + return createConstantParameter(name, config); } if (type == "CurveScaled") { INFO("CurveScaledParameter: %s", name.c_str()); - auto param = createCurveScaledParameter(name, config, curves); - return param; + return createCurveScaledParameter(name, config, curves); } if (type == "Function") { INFO("FunctionParameter: %s", name.c_str()); - auto param = createFunctionParameter(name, config, mesh); - return param; + return createFunctionParameter(name, config, mesh); } if (type == "Group") { INFO("GroupBasedParameter: %s", name.c_str()); - auto param = createGroupBasedParameter(name, config, mesh); - return param; + return createGroupBasedParameter(name, config, mesh); } if (type == "MeshElement") { INFO("MeshElementParameter: %s", name.c_str()); - auto param = createMeshElementParameter(name, config, mesh); - return param; + return createMeshElementParameter(name, config, mesh); } if (type == "MeshNode") { INFO("MeshNodeParameter: %s", name.c_str()); - auto param = createMeshNodeParameter(name, config, mesh); - return param; + return createMeshNodeParameter(name, config, mesh); } if (type == "TimeDependentHeterogeneousParameter") { @@ -107,6 +101,11 @@ boost::optional<std::string> isDefinedOnSameMesh(ParameterBase const& parameter, return "The parameter's domain of definition mesh '" + parameter.mesh()->getName() + "' differs from the used mesh '" + - mesh.getName() + "'. Both meshes must be equal."; + mesh.getName() + + "'. The same mesh (the same name) has to be referenced in the " + "project file. Possible reasons are:\n - the parameter used for the " + "initial condition is not defined on the bulk mesh,\n - the " + "parameter's domain of definition mesh differs from the boundary " + "condition or source term domain of definition mesh."; } } // namespace ParameterLib diff --git a/ParameterLib/TimeDependentHeterogeneousParameter.h b/ParameterLib/TimeDependentHeterogeneousParameter.h index 314de291c5035d4b2bd39bbcb4d6ce4a0e2e5cab..0dfaf60f94280abc0ba7dfab6af7a6cf92690cbf 100644 --- a/ParameterLib/TimeDependentHeterogeneousParameter.h +++ b/ParameterLib/TimeDependentHeterogeneousParameter.h @@ -33,7 +33,7 @@ public: bool isTimeDependent() const override; - /// @copydoc Parameter::operator() + /// @copydoc Parameter::operator()() std::vector<double> operator()(double const t, SpatialPosition const& pos) const override; diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index bfd1d077be7dd40dedbb28d34a3e3a27b18c17e6..2a28cc6c3cf99d10298d2cd9159ad6ead64c3273 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -238,23 +238,22 @@ protected: /** This function is for general cases, in which all equations of the coupled processes have the same number of unknowns. For the general cases with the staggered scheme, all equations of the coupled processes share one - DOF table hold by \verb{_local_to_global_index_map}. Other cases can be - considered by overloading this member function in the - derived class. + DOF table hold by @c _local_to_global_index_map. Other cases can be + considered by overloading this member function in the derived class. */ virtual void constructDofTable(); /** * Construct the DOF table for the monolithic scheme, * which is stored in the - * member of this class, \verb{_local_to_global_index_map}. + * member of this class, @c _local_to_global_index_map. */ void constructMonolithicProcessDofTable(); /** * Construct the DOF table for a specified process in the staggered scheme, * which is stored in the - * member of this class, \verb{_local_to_global_index_map}. + * member of this class, @c _local_to_global_index_map. */ void constructDofTableOfSpecifiedProsessStaggerdScheme( const int specified_prosess_id); diff --git a/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/TimeIntervalDirichletBC.prj b/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/TimeIntervalDirichletBC.prj index b924823b69af8d6fd9b1a17f1ce0f6822195cf6d..74fbaf4d1c0b71ab1ec29fe536eb4e5e6c3e5324 100644 --- a/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/TimeIntervalDirichletBC.prj +++ b/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/TimeIntervalDirichletBC.prj @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <OpenGeoSysProject> - <mesh>mesh2D.vtu</mesh> - <geometry>square.gml</geometry> + <meshes> + <mesh>mesh2D.vtu</mesh> + <mesh>top.vtu</mesh> + <mesh>bottom.vtu</mesh> + </meshes> <processes> <process> <name>LiquidFlow</name> @@ -124,14 +127,12 @@ <initial_condition>p0</initial_condition> <boundary_conditions> <boundary_condition> - <geometrical_set>square</geometrical_set> - <geometry>top</geometry> + <mesh>top</mesh> <type>Dirichlet</type> <parameter>bc_top</parameter> </boundary_condition> <boundary_condition> - <geometrical_set>square</geometrical_set> - <geometry>bottom</geometry> + <mesh>bottom</mesh> <type>DirichletWithinTimeInterval</type> <parameter>bc_bottom</parameter> <time_interval> diff --git a/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/bottom.vtu b/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/bottom.vtu new file mode 100644 index 0000000000000000000000000000000000000000..bd4f30a5b3fb50821ed7778de078800a82867676 --- /dev/null +++ b/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/bottom.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf66ba8fead0d324400a16878a782772b271445cb1693f0af1305d38bff62c97 +size 3287 diff --git a/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/square.gml b/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/square.gml deleted file mode 100644 index 8875d2339a22bc2eca98a9f867b4103608ae126d..0000000000000000000000000000000000000000 --- a/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/square.gml +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5b81cd7b41c595f99efe1cf828ed9c63bf353582b1ba154f28ec134ce3d01078 -size 703 diff --git a/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/top.vtu b/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/top.vtu new file mode 100644 index 0000000000000000000000000000000000000000..4fc96abb63f6343947002f75111369e9b40c9b9e --- /dev/null +++ b/Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/top.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c62b47d76fb8c74755fe51449daf4620fb2a290d974b011665d1241184548dd4 +size 3287