Merge pull request #2160 from jalvestad/iudq1-rev

Revision of AggregateUDQData plus some improvements to SWEL and XCON
This commit is contained in:
Bård Skaflestad
2020-12-17 21:31:36 +01:00
committed by GitHub
10 changed files with 632 additions and 36 deletions

View File

@@ -781,6 +781,7 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQToken.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp
opm/parser/eclipse/Deck/DeckItem.hpp

View File

@@ -31,6 +31,7 @@
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQContext.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
#include <opm/common/OpmLog/KeywordLocation.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQToken.hpp>
namespace Opm {
@@ -76,6 +77,7 @@ public:
void required_summary(std::unordered_set<std::string>& summary_keys) const;
void update_status(UDQUpdate update_status, std::size_t report_step);
std::pair<UDQUpdate, std::size_t> status() const;
const std::vector<Opm::UDQToken> tokens() const;
bool operator==(const UDQDefine& data) const;
@@ -93,6 +95,7 @@ public:
private:
std::string m_keyword;
std::vector<Opm::UDQToken> m_tokens;
std::shared_ptr<UDQASTNode> ast;
UDQVarType m_var_type;
KeywordLocation m_location;

View File

@@ -76,6 +76,7 @@ enum class UDQTokenType{
number = 1,
open_paren = 2,
close_paren = 3,
comp_expr = 6,
ecl_expr = 7,
//
binary_op_add = 8,
@@ -125,7 +126,6 @@ enum class UDQTokenType{
end = 100
};
enum class UDQAction {
ASSIGN,
DEFINE,

View File

@@ -64,30 +64,343 @@ namespace {
return inteHead[163];
}
// Categorize function in terms of which token-types are used in formula
int define_type(const std::set<Opm::UDQTokenType> tokens) {
int type = -4;
std::vector <Opm::UDQTokenType> type_1 = {
Opm::UDQTokenType::elemental_func_sorta,
Opm::UDQTokenType::elemental_func_sortd,
Opm::UDQTokenType::elemental_func_undef,
Opm::UDQTokenType::scalar_func_sum,
Opm::UDQTokenType::scalar_func_avea,
Opm::UDQTokenType::scalar_func_aveg,
Opm::UDQTokenType::scalar_func_aveh,
Opm::UDQTokenType::scalar_func_max,
Opm::UDQTokenType::scalar_func_min,
Opm::UDQTokenType::binary_op_div
};
int num_type_1 = 0;
for (const auto& tok_type : type_1) {
num_type_1 += tokens.count(tok_type);
// function to return true if token is a function
bool tokenTypeFunc(const Opm::UDQTokenType& token) {
bool type = false;
if (Opm::UDQ::scalarFunc(token) ||
Opm::UDQ::elementalUnaryFunc(token) ||
(token == Opm::UDQTokenType::table_lookup)) {
type = true;
}
type = (num_type_1 > 0) ? -1 : -4;
return type;
}
// function to return true if token is a binary operator: type power (exponentiation)
bool tokenTypeBinaryPowOp(const Opm::UDQTokenType& token) {
return (token == Opm::UDQTokenType::binary_op_pow) ? true: false;
}
// function to return true if token is a binary operator: type multiply or divide
bool tokenTypeBinaryMulDivOp(const Opm::UDQTokenType& token) {
bool type = false;
std::vector <Opm::UDQTokenType> type_1 = {
Opm::UDQTokenType::binary_op_div,
Opm::UDQTokenType::binary_op_mul
};
for (const auto& tok_type : type_1) {
if (token == tok_type) {
type = true;
break;
}
}
return type;
}
// function to return true if token is a binary operator: type add or subtract
bool tokenTypeBinaryAddSubOp(const Opm::UDQTokenType& token) {
bool type = false;
std::vector <Opm::UDQTokenType> type_1 = {
Opm::UDQTokenType::binary_op_add,
Opm::UDQTokenType::binary_op_sub
};
for (const auto& tok_type : type_1) {
if (token == tok_type) {
type = true;
break;
}
}
return type;
}
// function to return true if token is a binary union operator
bool tokenTypeBinaryUnionOp(const Opm::UDQTokenType& token) {
bool type = false;
std::vector <Opm::UDQTokenType> type_1 = {
Opm::UDQTokenType::binary_op_uadd,
Opm::UDQTokenType::binary_op_umul,
Opm::UDQTokenType::binary_op_umin,
Opm::UDQTokenType::binary_op_umax
};
for (const auto& tok_type : type_1) {
if (token == tok_type) {
type = true;
break;
}
}
return type;
}
// function to return true if token is an open or close parenthesis token
bool tokenTypeParen(const Opm::UDQTokenType& token) {
bool type = false;
std::vector <Opm::UDQTokenType> type_1 = {
Opm::UDQTokenType::open_paren,
Opm::UDQTokenType::close_paren,
};
for (const auto& tok_type : type_1) {
if (token == tok_type) {
type = true;
break;
}
}
return type;
}
// A function to return true if the token is an operator
bool operatorToken(const Opm::UDQTokenType& token) {
bool opTok = false;
if (Opm::UDQ::scalarFunc(token) ||
Opm::UDQ::elementalUnaryFunc(token) ||
Opm::UDQ::binaryFunc(token) ||
Opm::UDQ::setFunc(token)) {
opTok = true;
}
return opTok;
}
// function to return index number of last binary token not inside bracket that is ending the expression
int noOperators(const std::vector<Opm::UDQToken>& modTokens) {
int noOp = 0;
for (const auto& modToken : modTokens) {
if (operatorToken(modToken.type()) || tokenTypeParen(modToken.type())) {
noOp +=1;
}
}
return noOp;
}
// function to return the precedence of the current operator/function
int opFuncPrec(const Opm::UDQTokenType& token) {
int prec = 0;
if (tokenTypeFunc(token)) prec = 6;
if (Opm::UDQ::cmpFunc(token)) prec = 5;
if (tokenTypeBinaryPowOp(token)) prec = 4;
if (tokenTypeBinaryMulDivOp(token)) prec = 3;
if (tokenTypeBinaryAddSubOp(token)) prec = 2;
if (tokenTypeBinaryUnionOp(token)) prec = 1;
return prec;
}
struct substOuterParentheses {
std::vector<Opm::UDQToken> highestLevOperators;
std::map<std::size_t, std::vector<Opm::UDQToken>> substitutedTokens;
int noleadingOpenPar;
bool leadChangeSign;
};
// function to return
// a vector of functions and operators at the highest level,
// a map of substituted tokens,
// the number of leading open_paren that bracket the whole expression,
// a logical flag indicating whether there is a leading change of sign in the expression
substOuterParentheses substitute_outer_parenthesis(const std::vector<Opm::UDQToken>& modTokens, int noLeadOpenPar, bool leadChgSgn) {
std::map <std::size_t, std::vector<Opm::UDQToken>> substTok;
std::vector<Opm::UDQToken> highLevOp;
std::vector<std::size_t> startParen;
std::vector<std::size_t> endParen;
std::size_t level = 0;
std::size_t search_pos = 0;
std::size_t subS_max = 0;
while (search_pos < modTokens.size()) {
if (modTokens[search_pos].type() == Opm::UDQTokenType::open_paren && level == 0) {
startParen.emplace_back(search_pos);
level +=1;
}
else if (modTokens[search_pos].type() == Opm::UDQTokenType::open_paren) {
level +=1;
}
else if (modTokens[search_pos].type() == Opm::UDQTokenType::close_paren && level == +1) {
endParen.emplace_back(search_pos);
level -=1;
}
else if (modTokens[search_pos].type() == Opm::UDQTokenType::close_paren) {
level -=1;
}
search_pos += 1;
}
//
//Store all the operators at the highest level
//include the ecl_expr tokens and replace the content of parentheses with a comp_expr
if (startParen.size() >= 1) {
if (startParen[0] > 0) {
//First store all tokens before the first start_paren
for (std::size_t i = 0; i < startParen[0]; i++) {
highLevOp.emplace_back(modTokens[i]);
}
}
//
// Replace content of all parentheses at the highest level by an comp_expr
// store all tokens including () for all tokens inside a pair of ()
// also store the tokens between sets of () and at the end of an expression
std::string comp_expr;
for (std::size_t ind = 0; ind < startParen.size(); ind++) {
std::vector<Opm::UDQToken> substringToken;
for (std::size_t i = startParen[ind]; i < endParen[ind]+1; i++) {
substringToken.emplace_back(modTokens[i]);
}
// store the content inside the parenthesis
std::pair<std::size_t, std::vector<Opm::UDQToken>> groupPair = std::make_pair(ind, substringToken);
substTok.insert(groupPair);
//
// make the vector of high level tokens
//
//first add ecl_expr instead of content of (...)
comp_expr = std::to_string(ind);
highLevOp.emplace_back(Opm::UDQToken(comp_expr, Opm::UDQTokenType::comp_expr));
//
// store all tokens between end_paren before and start_paren after current ()
subS_max = (ind == startParen.size()-1) ? modTokens.size() : startParen[ind+1];
if ((endParen[ind] + 1) < subS_max) {
for (std::size_t i = endParen[ind] + 1; i < subS_max; i++) {
highLevOp.emplace_back(modTokens[i]);
}
}
}
} else {
//
// treat the case with no ()
for (std::size_t i = 0; i < modTokens.size(); i++) {
highLevOp.emplace_back(modTokens[i]);
}
}
//
// check if there is a leading minus-sign (change sign)
if ((modTokens[0].type() == Opm::UDQTokenType::binary_op_sub)) {
if (startParen.size() > 0) {
// if followed by start_paren linked to end_paren before end of data
// set flag and remove from operator list because it is considered as a highest precedence operator
// unless () go from token 2 two the end of expression
if ((startParen[0] == 1) && (endParen[0] < modTokens.size()-1)) {
leadChgSgn = true;
}
} else {
// set flag and remove from operator list
leadChgSgn = true;
}
if (leadChgSgn) {
// remove from operator list because it is considered as a highest precedence operator and is
// therefore not a normal "binary_op_sub" operator
std::vector<Opm::UDQToken> temp_high_lev_op(highLevOp.begin()+1, highLevOp.end());
highLevOp = temp_high_lev_op;
}
} else if (startParen.size() >= 1) {
//
// check for leading start_paren combined with end_paren at end of data
if ((startParen[0] == 0) && (endParen[0] == modTokens.size()-1)) {
//
// remove leading and trailing ()
const std::vector<Opm::UDQToken> modTokens_red(modTokens.begin()+1, modTokens.end()-1);
noLeadOpenPar +=1;
//
// recursive call to itself to re-interpret the token-input
substOuterParentheses substOpPar = substitute_outer_parenthesis(modTokens_red, noLeadOpenPar, leadChgSgn);
highLevOp = substOpPar.highestLevOperators;
substTok = substOpPar.substitutedTokens;
noLeadOpenPar = substOpPar.noleadingOpenPar;
leadChgSgn = substOpPar.leadChangeSign;
}
}
// interpretation of token input is completed return resulting object
return {
highLevOp,
substTok,
noLeadOpenPar,
leadChgSgn
};
}
// Categorize function in terms of which token-types are used in formula
//
// The define_type is (-) the location among a set of tokens of the "top" of the parse tree (AST - abstract syntax tree)
// i.e. the location of the lowest precedence operator relative to the total set of operators, functions and open-/close - parenthesis
int define_type(const std::vector<Opm::UDQToken>& tokens)
{
int def_type = 0;
int noLeadOpenPar = 0;
bool leadChgSgn = false;
//
// analyse the expression
substOuterParentheses expr = substitute_outer_parenthesis(tokens, noLeadOpenPar, leadChgSgn);
//
// loop over high level operators to find operator with lowest precedence and highest index
int curPrec = 100;
int tmpPrec = 100;
std::size_t indLowestPrecOper = 0;
for (std::size_t ind = 0; ind < expr.highestLevOperators.size(); ind++) {
if ((expr.highestLevOperators[ind].type() != Opm::UDQTokenType::ecl_expr) &&
(expr.highestLevOperators[ind].type() != Opm::UDQTokenType::comp_expr) &&
(expr.highestLevOperators[ind].type() != Opm::UDQTokenType::number)) {
tmpPrec = opFuncPrec(expr.highestLevOperators[ind].type());
if (tmpPrec <= curPrec) {
curPrec = tmpPrec;
indLowestPrecOper = ind;
}
}
}
//
// if lowest precedence operator is the first token (and not equal to change sign)
// NOTE: also for the case with outer () removed
if ((!expr.leadChangeSign) && (indLowestPrecOper == 0)) {
// test if operator is a function (precedence = 6)
if ((curPrec == 6) || (expr.highestLevOperators[indLowestPrecOper].type() == Opm::UDQTokenType::binary_op_sub) ) {
def_type = -1;
def_type -= expr.noleadingOpenPar;
} else {
// def type is 1 when for all other situations (ecl-expression or number)
def_type = 1;
}
} else {
//
// treat cases which start either with (ecl_experessions, open-parenthes or leadChangeSign
def_type = (expr.leadChangeSign) ? -1 : 0;
def_type -= expr.noleadingOpenPar;
// calculate position of lowest precedence operator
// account for leading change sign operator
for (std::size_t ind = 0; ind <= indLowestPrecOper; ind++) {
//
//count operators, including functions and parentheses (not original ecl_experessions)
if (operatorToken(expr.highestLevOperators[ind].type())) {
// single operator - subtract one
def_type -= 1;
} else if (expr.highestLevOperators[ind].type() == Opm::UDQTokenType::comp_expr) {
// expression in parentheses - add all operators
std::size_t ind_ce = static_cast<std::size_t>(std::stoi(expr.highestLevOperators[ind].str()));
auto indSubstTok = expr.substitutedTokens.find(ind_ce);
if (indSubstTok != expr.substitutedTokens.end()) {
auto& substTokVec = indSubstTok->second;
//
// count the number of operators & parenthes in this sub-expression
def_type -= noOperators(substTokVec);
} else {
std::cout << "comp_expr index: " << ind_ce << std::endl;
throw std::invalid_argument( "Invalid comp_expr index" );
}
} else if ((expr.highestLevOperators[ind].type() != Opm::UDQTokenType::ecl_expr) &&
(expr.highestLevOperators[ind].type() != Opm::UDQTokenType::number)) {
// unknown token - write warning
Opm::OpmLog::warning("define_type - unknown tokenType: " + expr.highestLevOperators[ind].str());
}
}
}
return def_type;
}
namespace iUdq {
Opm::RestartIO::Helpers::WindowedArray<int>
@@ -106,12 +419,12 @@ namespace {
{
if (udq_input.is<Opm::UDQDefine>()) {
const auto& udq_define = udq_input.get<Opm::UDQDefine>();
const auto& tokens = udq_define.func_tokens();
const auto& tokens = udq_define.tokens();
iUdq[0] = 2;
iUdq[1] = define_type(tokens);
} else {
iUdq[0] = 0;
iUdq[1] = -4;
iUdq[1] = 0;
}
iUdq[2] = udq_input.index.typed_insert_index;
}
@@ -192,6 +505,7 @@ namespace {
{
int l_sstr = 8;
int max_l_str = 128;
std::string temp_str;
// write out the input formula if key is a DEFINE udq
if (input.is<Opm::UDQDefine>()) {
const auto& udq_define = input.get<Opm::UDQDefine>();
@@ -203,7 +517,17 @@ namespace {
}
else {
for (int i = 0; i < n_sstr; i++) {
zUdl[i] = z_data.substr(i*l_sstr, l_sstr);
if (i == 0) {
temp_str = z_data.substr(i*l_sstr, l_sstr);
//if first character is a minus sign, change to ~
if (temp_str.compare(0,1,"-") == 0) {
temp_str.replace(0,1,"~");
}
zUdl[i] = temp_str;
}
else {
zUdl[i] = z_data.substr(i*l_sstr, l_sstr);
}
}
//add remainder of last non-zero string
if ((z_data.size() % l_sstr) > 0)

View File

@@ -27,10 +27,10 @@
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQToken.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
#include "../../../Parser/raw/RawConsts.hpp"
#include "UDQToken.hpp"
#include "UDQParser.hpp"
namespace Opm {
@@ -196,8 +196,8 @@ UDQDefine::UDQDefine(const UDQParams& udq_params,
}
}
}
std::vector<UDQToken> tokens = make_tokens(string_tokens);
this->ast = std::make_shared<UDQASTNode>( UDQParser::parse(udq_params, this->m_var_type, this->m_keyword, this->m_location, tokens, parseContext, errors) );
this->m_tokens = make_tokens(string_tokens);
this->ast = std::make_shared<UDQASTNode>( UDQParser::parse(udq_params, this->m_var_type, this->m_keyword, this->m_location, this->m_tokens, parseContext, errors) );
this->string_data = "";
for (std::size_t index = 0; index < deck_data.size(); index++) {
this->string_data += deck_data[index];
@@ -339,7 +339,9 @@ std::pair<UDQUpdate, std::size_t> UDQDefine::status() const {
return std::make_pair(this->m_update_status, this->m_report_step);
}
const std::vector<UDQToken> UDQDefine::tokens() const {
return this->m_tokens;
}
bool UDQDefine::operator==(const UDQDefine& data) const {
if ((ast && !data.ast) || (!ast && data.ast))

View File

@@ -28,8 +28,7 @@
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
#include "UDQToken.hpp"
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQToken.hpp>
namespace Opm {

View File

@@ -18,7 +18,7 @@
*/
#include <numeric>
#include "UDQToken.hpp"
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQToken.hpp>
namespace Opm {

View File

@@ -344,6 +344,45 @@ DEFINE WULPRU (WLPR PROD2 - 300) * 0.80 /
ASSIGN WULPRL 400. /
DEFINE FULPR (FLPR - 543) * 0.65 /
DEFINE WUOPRL (WOPR PROD1 - 170) * 0.60 /
DEFINE FU_CS01 LOG(FLPR) /
DEFINE FU_CS02 LOG(FLPR) + 3.5 /
DEFINE FU_CS03 LOG(FLPR + 2.) + 3.5 /
DEFINE FU_CS04 LOG(FLPR + SUM(WOPR)) + 3.5 /
DEFINE FU_CS05 3.5 + LOG(FLPR) /
DEFINE FU_CS06 (1 + FLPR*0.5) / (3.5) /
DEFINE FU_CS07 (3.5) / (1 + FLPR*0.5) /
DEFINE FU_CS08 3.5 / (1 + FLPR*0.5) /
DEFINE FU_CS09 FLPR + FOPR + (3. + FWPR) /
DEFINE FU_CS10 (FLPR + FOPR + (3. + FWPR)) /
DEFINE FU_CS11 FLPR * (FOPR * (3. + FWPR)) /
DEFINE FU_CS12 FLPR * (FOPR + (3. + FWPR)) /
DEFINE FU_CS13 FLPR * FOPR + 3. + FWPR /
DEFINE FU_CS14 (FLPR * FOPR + 3.) + FWPR/
DEFINE FU_CS15 SUM(WOPR) + FLPR + (FOPR + (3. * FWPR)) /
DEFINE FU_CS16 FLPR /
DEFINE FU_CS17 (FLPR) /
DEFINE FU_CS18 FLPR > FWPR /
DEFINE FU_CS19 (FLPR * FOPR) * FWPR /
DEFINE FU_CS20 FLPR UADD FOPR UADD FWPR /
DEFINE FU_CS21 FLPR UADD FOPR + FWPR /
DEFINE FU_CS22 FLPR + FOPR UADD FWPR /
DEFINE FU_CS23 FLPR + FOPR + FWPR * 4.3 /
DEFINE FU_CS24 (FLPR) + (1. + FOPR * FWPR) + 4.3 /
DEFINE FU_CS25 FLPR + (1. + FOPR * FWPR) + 4.3 /
DEFINE FU_CS26 FLPR + 1. + FOPR * FWPR + 4.3 /
DEFINE FU_CS27 3.5 + LOG(FOPR) + FWPR /
DEFINE FU_CS28 LOG(FOPR) * (3.5 + FWPR) /
DEFINE FU_CS29 LOG(FOPR) * (3.5 + FWPR) + 4.5 /
DEFINE FU_CS30 (FOPR - 3.5) * FWPR /
DEFINE FU_CS31 -(FOPR - 3.5) * FWPR /
DEFINE FU_CS32 -(-FOPR - 3.5) * FWPR /
DEFINE FU_CS33 -((FOPR - 3.5) * FWPR) /
DEFINE FU_CS34 -LOG(FOPR + FWPR) /
DEFINE FU_CS35 (-(FOPR - 3.5) * FWPR) /
DEFINE FU_CS36 (-((FOPR - 3.5) * FWPR)) /
DEFINE FU_CS37 -FOPR*3.5^2 + FWPR /
DEFINE FU_CS38 -FOPR /
-- units
UNITS WUOPRL SM3/DAY /
UNITS WULPRL SM3/DAY /
@@ -351,6 +390,45 @@ UNITS GUOPRU SM3/DAY /
UNITS WUOPRU SM3/DAY /
UNITS WULPRU SM3/DAY /
UNITS FULPR SM3/DAY /
UNITS FU_CS01 SM3/DAY /
UNITS FU_CS02 SM3/DAY /
UNITS FU_CS03 SM3/DAY /
UNITS FU_CS04 SM3/DAY /
UNITS FU_CS05 SM3/DAY /
UNITS FU_CS06 SM3/DAY /
UNITS FU_CS07 SM3/DAY /
UNITS FU_CS08 SM3/DAY /
UNITS FU_CS09 SM3/DAY /
UNITS FU_CS10 SM3/DAY /
UNITS FU_CS11 SM3/DAY /
UNITS FU_CS12 SM3/DAY /
UNITS FU_CS13 SM3/DAY /
UNITS FU_CS14 SM3/DAY /
UNITS FU_CS15 SM3/DAY /
UNITS FU_CS16 SM3/DAY /
UNITS FU_CS17 SM3/DAY /
UNITS FU_CS18 SM3/DAY /
UNITS FU_CS19 SM3/DAY /
UNITS FU_CS20 SM3/DAY /
UNITS FU_CS21 SM3/DAY /
UNITS FU_CS22 SM3/DAY /
UNITS FU_CS23 SM3/DAY /
UNITS FU_CS24 SM3/DAY /
UNITS FU_CS25 SM3/DAY /
UNITS FU_CS26 SM3/DAY /
UNITS FU_CS27 SM3/DAY /
UNITS FU_CS28 SM3/DAY /
UNITS FU_CS29 SM3/DAY /
UNITS FU_CS30 SM3/DAY /
UNITS FU_CS31 SM3/DAY /
UNITS FU_CS32 SM3/DAY /
UNITS FU_CS33 SM3/DAY /
UNITS FU_CS34 SM3/DAY /
UNITS FU_CS35 SM3/DAY /
UNITS FU_CS36 SM3/DAY /
UNITS FU_CS37 SM3/DAY /
UNITS FU_CS38 SM3/DAY /
--
/

View File

@@ -273,34 +273,223 @@ BOOST_AUTO_TEST_CASE (Declared_UDQ_data)
auto start = 0*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 1 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 1 - (-4 - DEFINE / ASSIGN
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 1
BOOST_CHECK_EQUAL(iUdq[start + 2] , 1); // udq NO. 1 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 1*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 0); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2 - (-4 - DEFINE / ASSIGN
BOOST_CHECK_EQUAL(iUdq[start + 1] , 0); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 2); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 2*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2 - (-4 - DEFINE / ASSIGN
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 3); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 3*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2 - (-4 - DEFINE / ASSIGN
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 1); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 4*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2 - (-4 - DEFINE / ASSIGN
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 4); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 5*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2 - (-4 - DEFINE / ASSIGN
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 1); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 6*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 2); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 7*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 3); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 8*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -5); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 4); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 9*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -8); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 5); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 10*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 6); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 11*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -5); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 7); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 12*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -3); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 8); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 13*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 9); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 14*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -2); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 10); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 15*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -3); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 11); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 16*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 12); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 17*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 13); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 18*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -3); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 14); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 19*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -5); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 15); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 20*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -5); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 16); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 21*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , 1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 17); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 22*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , 1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 18); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 23*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 19); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 24*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 20); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 25*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -2); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 21); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 26*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 22); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 27*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -2); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 23); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 28*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -2); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 24); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 29*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -8); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 25); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 30*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -6); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 26); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 31*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 27); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 32*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -5); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 28); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 33*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 29); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 34*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -8); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 30); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 35*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 31); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 36*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -5); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 32); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 37*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -6); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 33); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 38*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 34); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 39*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 35); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 40*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -6); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 36); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 41*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -2); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 37); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 42*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -4); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 38); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
start = 43*udqDims[1];
BOOST_CHECK_EQUAL(iUdq[start + 0] , 2); // udq NO. 2 - ( 0 - ASSIGN, 2 - DEFINE)
BOOST_CHECK_EQUAL(iUdq[start + 1] , -1); // udq NO. 2
BOOST_CHECK_EQUAL(iUdq[start + 2] , 39); // udq NO. 2 - (sequence number of UDQ pr type (CU, FU, GU, RU, , SU, WU, AU or BU etc.)
}
{