OGS
VariableType.cpp File Reference
#include "VariableType.h"
#include <boost/algorithm/string/predicate.hpp>
#include "BaseLib/Error.h"
Include dependency graph for VariableType.cpp:

Go to the source code of this file.

Namespaces

namespace  MaterialPropertyLib

Functions

template<int Rows>
static bool maybeHasSize (const auto &arg)
 Returns true if the argument is uninitialized or has Rows number of rows.
Variable MaterialPropertyLib::convertStringToVariable (std::string const &string)
static VariableArray::VariablePointer MaterialPropertyLib::dropConst (VariableArray::VariablePointerConst const const_pointer)

Function Documentation

◆ maybeHasSize()

template<int Rows>
bool maybeHasSize ( const auto & arg)
static

Returns true if the argument is uninitialized or has Rows number of rows.

Definition at line 12 of file VariableType.cpp.

13{
14 return std::holds_alternative<std::monostate>(arg) ||
15 std::holds_alternative<Eigen::Matrix<double, Rows, 1>>(arg);
16}

Referenced by MaterialPropertyLib::VariableArray::is2D(), and MaterialPropertyLib::VariableArray::is3D().