Commit cf94c45c authored by Andrea Zanoni's avatar Andrea Zanoni
Browse files

Merge branch 'develop' of public.gitlab.polimi.it:DAER/mbdyn into develop

parents d1866832 6c51aaaf
......@@ -2227,6 +2227,20 @@ if test $ol_with_lapack != no ; then
LIBS="$save_LIBS"
fi
if test $ol_link_lapack = no ; then
case "$ol_with_lapack" in
yes)
AC_MSG_ERROR([Could not locate Lapack])
;;
auto)
AC_MSG_WARN([Lapack not supported])
;;
*)
;;
esac
fi
dnl ----------------------------------------------------------------
dnl
dnl Check for Umfpack
......
......@@ -3305,6 +3305,109 @@ MathParser::bNameValidate(const std::string& s) const
return true;
}
const char *
MathParser::token2str(Token token) const
{
switch (token)
{
case ENDOFFILE:
return "EOF";
case UNKNOWNTOKEN:
return "UNKNOWN";
case MP_INT:
return "INTEGER";
case MP_REAL:
return "REAL";
case MP_STRING:
return "STRING";
case NUM:
return "NUMBER";
case NAME:
return "NAME";
case EXP:
return "EXPONENT";
case MULT:
return "MULTIPLICATION";
case DIV:
return "DIVISION";
case MOD:
return "MODULUS";
case MINUS:
return "MINUS";
case PLUS:
return "PLUS";
case GT:
return "GREATER_THAN";
case GE:
return "GREATER_THAN_OR_EQUAL_TO";
case EQ:
return "EQUAL_TO";
case LE:
return "LESS_THAN_OR_EQUAL_TO";
case LT:
return "LESS_THAN";
case NE:
return "NOT_EQUAL";
case NOT:
return "LOGICAL_NOT";
case AND:
return "LOGICAL_AND";
case OR:
return "LOGICAL_OR";
case XOR:
return "LOGICA_EXCLUSIVE_OR";
case OBR:
return "OPEN_BRACKET";
case CBR:
return "CLOSE_BRACKET";
case OPGIN:
return "OPEN_PLUGIN";
case CPGIN:
return "CLOSE_PLUGIN";
case STMTSEP:
return "STATEMENT_SEPARATOR";
case ARGSEP:
return "ARGUMENT_SEPARATOR";
case NAMESPACESEP:
return "NAMESPACE_SEPARATOR";
case ASSIGN:
return "ASSIGNMENT";
default:
return "unknown token";
};
}
#ifdef DO_NOT_USE_EE
TypedValue
MathParser::logical(void)
......@@ -5022,6 +5125,7 @@ MathParser::expr(void)
return new EE_Value(v->GetVal());
}
#if 0
switch (currtoken) {
case NAME:
throw ErrGeneric(this, MBDYN_EXCEPT_ARGS, std::string("unexpected name \"") + namebuf + "\"");
......@@ -5030,6 +5134,8 @@ MathParser::expr(void)
// TODO: output token!
throw ErrGeneric(this, MBDYN_EXCEPT_ARGS, "unexpected token");
}
#endif
throw ErrGeneric(this, MBDYN_EXCEPT_ARGS, std::string("unexpected name \"") + name + "\" followed by " + token2str(currtoken));
}
throw ErrGeneric(this, MBDYN_EXCEPT_ARGS, std::string("unknown name \"") + name + "\"");
......
......@@ -296,7 +296,7 @@ public:
int GetLineNumber(void) const;
public:
/* i token che il lex riconosce */
enum Token {
ENDOFFILE = -2,
......@@ -507,6 +507,8 @@ public:
/* validates a name */
bool bNameValidate(const std::string& s) const;
const char *token2str(Token token) const;
};
extern std::ostream&
......
......@@ -3219,9 +3219,10 @@ at the sides of the valve body and participate in the force balance.
\bnt{hydr_elem_data} ::=
\bnt{node_1} , \bnt{node_2} ,
\bnt{pipe_diameter} ,
\bnt{orifice_area} ,
[ \kw{area} , \bnt{pipe_area} , ]
[ \kw{reynolds} , \bnt{critical_reynolds_number} , ]
[ \kw{area} , \bnt{pipe_area} , ] # defaults to (\bnt{pipe_diameter}/2)^2*pi
[ \kw{reynolds} , \bnt{critical_reynolds_number} , ] # defaults to 10
\kw{fluid} , (\hty{HydraulicFluid}) \bnt{fluid}
\end{Verbatim}
%\end{verbatim}
......
......@@ -906,7 +906,7 @@ Elem* ReadHydraulicElem(DataManager* pDM,
DEBUGCOUT("Area_diaf: " << area_diaf << std::endl);
/* Area del tubo */
doublereal area_pipe = diameter*diameter*0.785;
doublereal area_pipe = diameter*diameter*M_PI/4.;
if (HP.IsKeyWord("area"))
{
area_pipe = HP.GetReal();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment