OGS
VariableType.cpp File Reference

Detailed Description

Definition in file VariableType.cpp.

#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>
static bool maybeHasSize ( const auto & arg)
static

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

Definition at line 19 of file VariableType.cpp.

20{
21 return std::holds_alternative<std::monostate>(arg) ||
22 std::holds_alternative<Eigen::Matrix<double, Rows, 1>>(arg);
23}

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