text:
function invariants_Q10_check(x)
prim=zeros(10,1);
pv=zeros(,1);

v=zeros(,1);
 v[1] = 1

 prim[1] = x[1] + x[2] + x[5] + x[3] + x[6] + x[8] +
x[4] + x[7] + x[9] + x[10]

 prim[2] = x[1]*x[2] + x[1]*x[5] + x[2]*x[5] +
x[1]*x[3] + x[2]*x[3] + x[1]*x[6] + x[5]*x[6] +
x[3]*x[6] + x[2]*x[8] + x[5]*x[8] + x[3]*x[8] +
x[6]*x[8] + x[1]*x[4] + x[2]*x[4] + x[3]*x[4] +
x[1]*x[7] + x[5]*x[7] + x[6]*x[7] + x[4]*x[7] +
x[2]*x[9] + x[5]*x[9] + x[8]*x[9] + x[4]*x[9] +
x[7]*x[9] + x[3]*x[10] + x[6]*x[10] + x[8]*x[10] +
x[4]*x[10] + x[7]*x[10] + x[9]*x[10]

 prim[3] = x[1]^2 + x[2]^2 + x[5]^2 + x[3]^2 + x[6]^2 +
x[8]^2 + x[4]^2 + x[7]^2 + x[9]^2 + x[10]^2

 prim[4] = x[1]*x[2]*x[3] + x[1]*x[5]*x[6] +
x[2]*x[5]*x[8] + x[3]*x[6]*x[8] +
x[1]*x[2]*x[4] + x[1]*x[3]*x[4] +
x[2]*x[3]*x[4] + x[1]*x[5]*x[7] +
x[1]*x[6]*x[7] + x[5]*x[6]*x[7] +
x[2]*x[5]*x[9] + x[2]*x[8]*x[9] +
x[5]*x[8]*x[9] + x[4]*x[7]*x[9] +
x[3]*x[6]*x[10] + x[3]*x[8]*x[10] +
x[6]*x[8]*x[10] + x[4]*x[7]*x[10] +
x[4]*x[9]*x[10] + x[7]*x[9]*x[10]

 prim[5] = x[1]^3 + x[2]^3 + x[5]^3 + x[3]^3 + x[6]^3 +
x[8]^3 + x[4]^3 + x[7]^3 + x[9]^3 + x[10]^3

 prim[6] = x[1]*x[2]*x[3]*x[4] +
x[1]*x[5]*x[6]*x[7] + x[2]*x[5]*x[8]*x[9] +
x[3]*x[6]*x[8]*x[10] + x[4]*x[7]*x[9]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4]^6 + x[7]^6 + x[9]^6 + x[10]^6

 pv[1] = x[1]^2*x[2] + x[1]*x[2]^2 + x[1]^2*x[5] +
x[2]^2*x[5] + x[1]*x[5]^2 + x[2]*x[5]^2 +
x[1]^2*x[3] + x[2]^2*x[3] + x[1]*x[3]^2 +
x[2]*x[3]^2 + x[1]^2*x[6] + x[5]^2*x[6] +
x[3]^2*x[6] + x[1]*x[6]^2 + x[5]*x[6]^2 +
x[3]*x[6]^2 + x[2]^2*x[8] + x[5]^2*x[8] +
x[3]^2*x[8] + x[6]^2*x[8] + x[2]*x[8]^2 +
x[5]*x[8]^2 + x[3]*x[8]^2 + x[6]*x[8]^2 +
x[1]^2*x[4] + x[2]^2*x[4] + x[3]^2*x[4] +
x[1]*x[4]^2 + x[2]*x[4]^2 + x[3]*x[4]^2 +
x[1]^2*x[7] + x[5]^2*x[7] + x[6]^2*x[7] +
x[4]^2*x[7] + x[1]*x[7]^2 + x[5]*x[7]^2 +
x[6]*x[7]^2 + x[4]*x[7]^2 + x[2]^2*x[9] +
x[5]^2*x[9] + x[8]^2*x[9] + x[4]^2*x[9] +
x[7]^2*x[9] + x[2]*x[9]^2 + x[5]*x[9]^2 +
x[8]*x[9]^2 + x[4]*x[9]^2 + x[7]*x[9]^2 +
x[3]^2*x[10] + x[6]^2*x[10] + x[8]^2*x[10] +
x[4]^2*x[10] + x[7]^2*x[10] + x[9]^2*x[10] +
x[3]*x[10]^2 + x[6]*x[10]^2 + x[8]*x[10]^2 +
x[4]*x[10]^2 + x[7]*x[10]^2 + x[9]*x[10]^2
 pv[2] = x[1]*x[2]*x[5] + x[1]*x[3]*x[6] +
x[2]*x[3]*x[8] + x[5]*x[6]*x[8] +
x[1]*x[4]*x[7] + x[2]*x[4]*x[9] +
x[5]*x[7]*x[9] + x[3]*x[4]*x[10] +
x[6]*x[7]*x[10] + x[8]*x[9]*x[10]
 v[2] = pv[1]
 v[3] = pv[2]
 pv[3] = x[1]^3*x[2] + x[1]*x[2]^3 + x[1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2*x[10] + x[2]*x[8]^2*x[9]*x[10] +
x[5]*x[8]^2*x[9]*x[10] + x[3]*x[8]^2*x[9]*x[10] +
x[6]*x[8]^2*x[9]*x[10] + x[2]*x[4]^2*x[9]*x[10] +
x[3]*x[4]^2*x[9]*x[10] + x[5]*x[7]^2*x[9]*x[10] +
x[6]*x[7]^2*x[9]*x[10] + x[2]*x[8]*x[9]^2*x[10] +
x[5]*x[8]*x[9]^2*x[10] + x[2]*x[4]*x[9]^2*x[10] +
x[8]*x[4]*x[9]^2*x[10] + x[5]*x[7]*x[9]^2*x[10] +
x[8]*x[7]*x[9]^2*x[10] + x[3]*x[6]*x[4]*x[10]^2 +
x[3]*x[8]*x[4]*x[10]^2 + x[3]*x[6]*x[7]*x[10]^2 +
x[6]*x[8]*x[7]*x[10]^2 + x[3]*x[4]*x[7]*x[10]^2 +
x[6]*x[4]*x[7]*x[10]^2 + x[3]*x[8]*x[9]*x[10]^2 +
x[6]*x[8]*x[9]*x[10]^2 + x[3]*x[4]*x[9]*x[10]^2 +
x[8]*x[4]*x[9]*x[10]^2 + x[6]*x[7]*x[9]*x[10]^2 +
x[8]*x[7]*x[9]*x[10]^2
 v[9] = pv[8]
 v[10] = pv[9]
 v[11] = pv[10]
 v[12] = pv[11]
 v[13] = pv[12]
 v[14] = pv[13]
 v[15] = pv[14]
 v[16] = pv[15]
 v[17] = pv[1]*pv[1]
 v[18] = pv[1]*pv[2]
 v[19] = pv[2]*pv[2]
 pv[16] = x[1]^5*x[2] + x[1]*x[2]^5 + x[1]^5*x[5] +
x[2]^5*x[5] + x[1]*x[5]^5 + x[2]*x[5]^5 +
x[1]^5*x[3] + x[2]^5*x[3] + x[1]*x[3]^5 +
x[2]*x[3]^5 + x[1]^5*x[6] + x[5]^5*x[6] +
x[3]^5*x[6] + x[1]*x[6]^5 + x[5]*x[6]^5 +
x[3]*x[6]^5 + x[2]^5*x[8] + x[5]^5*x[8] +
x[3]^5*x[8] + x[6]^5*x[8] + x[2]*x[8]^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9]^3 + x[8]^2*x[7]*x[9]^3 +
x[2]*x[7]^2*x[9]^3 + x[8]*x[7]^2*x[9]^3 +
x[1]^2*x[3]^3*x[10] + x[2]^2*x[3]^3*x[10] +
x[1]^2*x[6]^3*x[10] + x[5]^2*x[6]^3*x[10] +
x[2]^2*x[8]^3*x[10] + x[5]^2*x[8]^3*x[10] +
x[1]^2*x[4]^3*x[10] + x[2]^2*x[4]^3*x[10] +
x[1]^2*x[7]^3*x[10] + x[5]^2*x[7]^3*x[10] +
x[2]^2*x[9]^3*x[10] + x[5]^2*x[9]^3*x[10] +
x[1]*x[3]^3*x[10]^2 + x[2]*x[3]^3*x[10]^2 +
x[1]*x[6]^3*x[10]^2 + x[5]*x[6]^3*x[10]^2 +
x[2]*x[8]^3*x[10]^2 + x[5]*x[8]^3*x[10]^2 +
x[1]*x[4]^3*x[10]^2 + x[2]*x[4]^3*x[10]^2 +
x[1]*x[7]^3*x[10]^2 + x[5]*x[7]^3*x[10]^2 +
x[2]*x[9]^3*x[10]^2 + x[5]*x[9]^3*x[10]^2 +
x[6]^2*x[4]*x[10]^3 + x[8]^2*x[4]*x[10]^3 +
x[6]*x[4]^2*x[10]^3 + x[8]*x[4]^2*x[10]^3 +
x[3]^2*x[7]*x[10]^3 + x[8]^2*x[7]*x[10]^3 +
x[3]*x[7]^2*x[10]^3 + x[8]*x[7]^2*x[10]^3 +
x[3]^2*x[9]*x[10]^3 + x[6]^2*x[9]*x[10]^3 +
x[3]*x[9]^2*x[10]^3 + x[6]*x[9]^2*x[10]^3
 v[20] = pv[16]
 v[21] = pv[17]
 v[22] = pv[18]
 v[23] = pv[19]
 v[24] = pv[20]
 v[25] = pv[21]
 v[26] = pv[22]
 v[27] = pv[23]
 v[28] = pv[24]
 v[29] = pv[25]
 v[30] = pv[26]
 v[31] = pv[27]
 v[32] = pv[1]*pv[3]
 v[33] = pv[2]*pv[3]
 v[34] = pv[1]*pv[4]
 v[35] = pv[2]*pv[4]
 v[36] = pv[1]*pv[5]
 v[37] = pv[2]*pv[5]
 v[38] = pv[1]*pv[6]
 v[39] = pv[2]*pv[6]
 v[40] = pv[1]*pv[7]
 v[41] = pv[2]*pv[7]
 pv[28] = x[1]^7 + x[2]^7 + x[5]^7 + x[3]^7 + x[6]^7 +
x[8]^7 + x[4]^7 + x[7]^7 + x[9]^7 + x[10]^7
 pv[29] = x[1]^6*x[2] + x[1]*x[2]^6 + x[1]^6*x[5] +
x[2]^6*x[5] + x[1]*x[5]^6 + x[2]*x[5]^6 +
x[1]^6*x[3] + x[2]^6*x[3] + x[1]*x[3]^6 +
x[2]*x[3]^6 + x[1]^6*x[6] + x[5]^6*x[6] +
x[3]^6*x[6] + x[1]*x[6]^6 + x[5]*x[6]^6 +
x[3]*x[6]^6 + x[2]^6*x[8] + x[5]^6*x[8] +
x[3]^6*x[8] + x[6]^6*x[8] + x[2]*x[8]^6 +
x[5]*x[8]^6 + x[3]*x[8]^6 + x[6]*x[8]^6 +
x[1]^6*x[4] + x[2]^6*x[4] + x[3]^6*x[4] +
x[1]*x[4]^6 + x[2]*x[4]^6 + x[3]*x[4]^6 +
x[1]^6*x[7] + x[5]^6*x[7] + x[6]^6*x[7] +
x[4]^6*x[7] + x[1]*x[7]^6 + x[5]*x[7]^6 +
x[6]*x[7]^6 + x[4]*x[7]^6 + x[2]^6*x[9] +
x[5]^6*x[9] + x[8]^6*x[9] + x[4]^6*x[9] +
x[7]^6*x[9] + x[2]*x[9]^6 + x[5]*x[9]^6 +
x[8]*x[9]^6 + x[4]*x[9]^6 + x[7]*x[9]^6 +
x[3]^6*x[10] + x[6]^6*x[10] + x[8]^6*x[10] +
x[4]^6*x[10] + x[7]^6*x[10] + x[9]^6*x[10] +
x[3]*x[10]^6 + x[6]*x[10]^6 + x[8]*x[10]^6 +
x[4]*x[10]^6 + x[7]*x[10]^6 + x[9]*x[10]^6
 pv[30] = x[1]^5*x[2]^2 + x[1]^2*x[2]^5 + x[1]^5*x[5]^2  + x[2]^5*x[5]^2 + x[1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x[10] + x[2]*x[3]^4*x[8]*x[10] +
x[5]*x[6]^4*x[8]*x[10] + x[2]*x[3]*x[8]^4*x[10] +
x[5]*x[6]*x[8]^4*x[10] + x[1]*x[3]^4*x[4]*x[10] +
x[2]*x[3]^4*x[4]*x[10] + x[3]^4*x[6]*x[4]*x[10] +
x[3]^4*x[8]*x[4]*x[10] + x[1]*x[3]*x[4]^4*x[10] +
x[2]*x[3]*x[4]^4*x[10] + x[1]*x[6]^4*x[7]*x[10] +
x[5]*x[6]^4*x[7]*x[10] + x[3]*x[6]^4*x[7]*x[10] +
x[6]^4*x[8]*x[7]*x[10] + x[1]*x[4]^4*x[7]*x[10] +
x[3]*x[4]^4*x[7]*x[10] + x[1]*x[6]*x[7]^4*x[10] +
x[5]*x[6]*x[7]^4*x[10] + x[1]*x[4]*x[7]^4*x[10] +
x[6]*x[4]*x[7]^4*x[10] + x[2]*x[8]^4*x[9]*x[10] +
x[5]*x[8]^4*x[9]*x[10] + x[3]*x[8]^4*x[9]*x[10] +
x[6]*x[8]^4*x[9]*x[10] + x[2]*x[4]^4*x[9]*x[10] +
x[3]*x[4]^4*x[9]*x[10] + x[5]*x[7]^4*x[9]*x[10] +
x[6]*x[7]^4*x[9]*x[10] + x[2]*x[8]*x[9]^4*x[10] +
x[5]*x[8]*x[9]^4*x[10] + x[2]*x[4]*x[9]^4*x[10] +
x[8]*x[4]*x[9]^4*x[10] + x[5]*x[7]*x[9]^4*x[10] +
x[8]*x[7]*x[9]^4*x[10] + x[3]*x[6]*x[4]*x[10]^4 +
x[3]*x[8]*x[4]*x[10]^4 + x[3]*x[6]*x[7]*x[10]^4 +
x[6]*x[8]*x[7]*x[10]^4 + x[3]*x[4]*x[7]*x[10]^4 +
x[6]*x[4]*x[7]*x[10]^4 + x[3]*x[8]*x[9]*x[10]^4 +
x[6]*x[8]*x[9]*x[10]^4 + x[3]*x[4]*x[9]*x[10]^4 +
x[8]*x[4]*x[9]*x[10]^4 + x[6]*x[7]*x[9]*x[10]^4 +
x[8]*x[7]*x[9]*x[10]^4
 v[42] = pv[28]
 v[43] = pv[29]
 v[44] = pv[30]
 v[45] = pv[31]
 v[46] = pv[32]
 v[47] = pv[33]
 v[48] = pv[34]
 v[49] = pv[35]
 v[50] = pv[36]
 v[51] = pv[37]
 v[52] = pv[38]
 v[53] = pv[39]
 v[54] = pv[40]
 v[55] = pv[4]*pv[4]
 v[56] = pv[3]*pv[5]
 v[57] = pv[4]*pv[5]
 v[58] = pv[5]*pv[5]
 v[59] = pv[3]*pv[6]
 v[60] = pv[4]*pv[6]
 v[61] = pv[5]*pv[6]
 v[62] = pv[6]*pv[6]
 v[63] = pv[3]*pv[7]
 v[64] = pv[4]*pv[7]
 v[65] = pv[5]*pv[7]
 v[66] = pv[6]*pv[7]
 v[67] = pv[7]*pv[7]
 v[68] = pv[1]*pv[8]
 v[69] = pv[2]*pv[8]
 v[70] = pv[1]*pv[9]
 v[71] = pv[2]*pv[9]
 v[72] = pv[1]*pv[10]
 v[73] = pv[2]*pv[10]
 v[74] = pv[1]*pv[11]
 v[75] = pv[2]*pv[11]
 v[76] = pv[1]*pv[12]
 v[77] = pv[2]*pv[12]
 v[78] = pv[1]*pv[13]
 v[79] = pv[2]*pv[13]
 v[80] = pv[1]*pv[14]
 v[81] = pv[2]*pv[14]
 v[82] = pv[1]*pv[15]
 v[83] = pv[2]*pv[15]
 pv[41] = x[1]^8 + x[2]^8 + x[5]^8 + x[3]^8 + x[6]^8 +
x[8]^8 + x[4]^8 + x[7]^8 + x[9]^8 + x[10]^8
 pv[42] = x[1]^7*x[2] + x[1]*x[2]^7 + x[1]^7*x[5] +
x[2]^7*x[5] + x[1]*x[5]^7 + x[2]*x[5]^7 +
x[1]^7*x[3] + x[2]^7*x[3] + x[1]*x[3]^7 +
x[2]*x[3]^7 + x[1]^7*x[6] + x[5]^7*x[6] +
x[3]^7*x[6] + x[1]*x[6]^7 + x[5]*x[6]^7 +
x[3]*x[6]^7 + x[2]^7*x[8] + x[5]^7*x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[7]^5 + x[2]^5*x[9]^3 +
x[5]^5*x[9]^3 + x[8]^5*x[9]^3 + x[4]^5*x[9]^3 +
x[7]^5*x[9]^3 + x[2]^3*x[9]^5 + x[5]^3*x[9]^5 +
x[8]^3*x[9]^5 + x[4]^3*x[9]^5 + x[7]^3*x[9]^5 +
x[3]^5*x[10]^3 + x[6]^5*x[10]^3 + x[8]^5*x[10]^3 +
x[4]^5*x[10]^3 + x[7]^5*x[10]^3 + x[9]^5*x[10]^3 +
x[3]^3*x[10]^5 + x[6]^3*x[10]^5 + x[8]^3*x[10]^5 +
x[4]^3*x[10]^5 + x[7]^3*x[10]^5 + x[9]^3*x[10]^5
 v[84] = pv[41]
 v[85] = pv[42]
 v[86] = pv[43]
 v[87] = pv[44]
 v[88] = pv[3]*pv[12]
 v[89] = pv[4]*pv[12]
 v[90] = pv[5]*pv[12]
 v[91] = pv[6]*pv[12]
 v[92] = pv[7]*pv[12]
 v[93] = pv[3]*pv[13]
 v[94] = pv[4]*pv[13]
 v[95] = pv[5]*pv[13]
 v[96] = pv[6]*pv[13]
 v[97] = pv[7]*pv[13]
 v[98] = pv[3]*pv[14]
 v[99] = pv[4]*pv[14]
 v[100] = pv[5]*pv[14]
 v[101] = pv[6]*pv[14]
 v[102] = pv[7]*pv[14]
 v[103] = pv[3]*pv[15]
 v[104] = pv[4]*pv[15]
 v[105] = pv[5]*pv[15]
 v[106] = pv[6]*pv[15]
 v[107] = pv[7]*pv[15]
 v[108] = pv[1]*pv[16]
 v[109] = pv[2]*pv[16]
 v[110] = pv[1]*pv[17]
 v[111] = pv[2]*pv[17]
 v[112] = pv[1]*pv[18]
 v[113] = pv[2]*pv[18]
 v[114] = pv[1]*pv[19]
 v[115] = pv[2]*pv[19]
 v[116] = pv[1]*pv[20]
 v[117] = pv[2]*pv[20]
 v[118] = pv[1]*pv[21]
 v[119] = pv[2]*pv[21]
 v[120] = pv[1]*pv[22]
 v[121] = pv[2]*pv[22]
 v[122] = pv[1]*pv[23]
 v[123] = pv[2]*pv[23]
 v[124] = pv[1]*pv[24]
 v[125] = pv[2]*pv[24]
 v[126] = pv[1]*pv[25]
 v[127] = pv[2]*pv[25]
 v[128] = pv[1]*pv[26]
 v[129] = pv[2]*pv[26]
 v[130] = pv[1]*pv[27]
 v[131] = pv[2]*pv[27]
 pv[45] = x[1]^9 + x[2]^9 + x[5]^9 + x[3]^9 + x[6]^9 +
x[8]^9 + x[4]^9 + x[7]^9 + x[9]^9 + x[10]^9
 pv[46] = x[1]^8*x[2] + x[1]*x[2]^8 + x[1]^8*x[5] +
x[2]^8*x[5] + x[1]*x[5]^8 + x[2]*x[5]^8 +
x[1]^8*x[3] + x[2]^8*x[3] + x[1]*x[3]^8 +
x[2]*x[3]^8 + x[1]^8*x[6] + x[5]^8*x[6] +
x[3]^8*x[6] + x[1]*x[6]^8 + x[5]*x[6]^8 +
x[3]*x[6]^8 + x[2]^8*x[8] + x[5]^8*x[8] +
x[3]^8*x[8] + x[6]^8*x[8] + x[2]*x[8]^8 +
x[5]*x[8]^8 + x[3]*x[8]^8 + x[6]*x[8]^8 +
x[1]^8*x[4] + x[2]^8*x[4] + x[3]^8*x[4] +
x[1]*x[4]^8 + x[2]*x[4]^8 + x[3]*x[4]^8 +
x[1]^8*x[7] + x[5]^8*x[7] + x[6]^8*x[7] +
x[4]^8*x[7] + x[1]*x[7]^8 + x[5]*x[7]^8 +
x[6]*x[7]^8 + x[4]*x[7]^8 + x[2]^8*x[9] +
x[5]^8*x[9] + x[8]^8*x[9] + x[4]^8*x[9] +
x[7]^8*x[9] + x[2]*x[9]^8 + x[5]*x[9]^8 +
x[8]*x[9]^8 + x[4]*x[9]^8 + x[7]*x[9]^8 +
x[3]^8*x[10] + x[6]^8*x[10] + x[8]^8*x[10] +
x[4]^8*x[10] + x[7]^8*x[10] + x[9]^8*x[10] +
x[3]*x[10]^8 + x[6]*x[10]^8 + x[8]*x[10]^8 +
x[4]*x[10]^8 + x[7]*x[10]^8 + x[9]*x[10]^8
 v[132] = pv[45]
 v[133] = pv[46]
 v[134] = pv[3]*pv[21]
 v[135] = pv[4]*pv[21]
 v[136] = pv[5]*pv[21]
 v[137] = pv[6]*pv[21]
 v[138] = pv[7]*pv[21]
 v[139] = pv[3]*pv[22]
 v[140] = pv[4]*pv[22]
 v[141] = pv[5]*pv[22]
 v[142] = pv[6]*pv[22]
 v[143] = pv[7]*pv[22]
 v[144] = pv[3]*pv[23]
 v[145] = pv[4]*pv[23]
 v[146] = pv[5]*pv[23]
 v[147] = pv[6]*pv[23]
 v[148] = pv[7]*pv[23]
 v[149] = pv[3]*pv[24]
 v[150] = pv[4]*pv[24]
 v[151] = pv[5]*pv[24]
 v[152] = pv[6]*pv[24]
 v[153] = pv[7]*pv[24]
 v[154] = pv[3]*pv[25]
 v[155] = pv[4]*pv[25]
 v[156] = pv[5]*pv[25]
 v[157] = pv[6]*pv[25]
 v[158] = pv[7]*pv[25]
 v[159] = pv[3]*pv[26]
 v[160] = pv[4]*pv[26]
 v[161] = pv[5]*pv[26]
 v[162] = pv[6]*pv[26]
 v[163] = pv[7]*pv[26]
 v[164] = pv[3]*pv[27]
 v[165] = pv[4]*pv[27]
 v[166] = pv[5]*pv[27]
 v[167] = pv[6]*pv[27]
 v[168] = pv[7]*pv[27]
 v[169] = pv[1]*pv[28]
 v[170] = pv[2]*pv[28]
 v[171] = pv[1]*pv[29]
 v[172] = pv[2]*pv[29]
 v[173] = pv[1]*pv[30]
 v[174] = pv[2]*pv[30]
 v[175] = pv[1]*pv[31]
 v[176] = pv[2]*pv[31]
 v[177] = pv[1]*pv[32]
 v[178] = pv[2]*pv[32]
 v[179] = pv[1]*pv[33]
 v[180] = pv[2]*pv[33]
 v[181] = pv[1]*pv[34]
 v[182] = pv[2]*pv[34]
 v[183] = pv[1]*pv[35]
 v[184] = pv[2]*pv[35]
 v[185] = pv[1]*pv[36]
 v[186] = pv[2]*pv[36]
 v[187] = pv[1]*pv[37]
 v[188] = pv[2]*pv[37]
 v[189] = pv[1]*pv[38]
 v[190] = pv[2]*pv[38]
 v[191] = pv[1]*pv[39]
 v[192] = pv[2]*pv[39]
 v[193] = pv[1]*pv[40]
 v[194] = pv[2]*pv[40]
 v[195] = pv[4]*pv[28]
 v[196] = pv[5]*pv[28]
 v[197] = pv[6]*pv[28]
 v[198] = pv[7]*pv[28]
 v[199] = pv[3]*pv[29]
 v[200] = pv[4]*pv[29]
 v[201] = pv[5]*pv[29]
 v[202] = pv[6]*pv[29]
 v[203] = pv[7]*pv[29]
 v[204] = pv[3]*pv[30]
 v[205] = pv[4]*pv[30]
 v[206] = pv[5]*pv[30]
 v[207] = pv[6]*pv[30]
 v[208] = pv[7]*pv[30]
 v[209] = pv[3]*pv[31]
 v[210] = pv[4]*pv[31]
 v[211] = pv[5]*pv[31]
 v[212] = pv[6]*pv[31]
 v[213] = pv[7]*pv[31]
 v[214] = pv[3]*pv[32]
 v[215] = pv[4]*pv[32]
 v[216] = pv[5]*pv[32]
 v[217] = pv[6]*pv[32]
 v[218] = pv[7]*pv[32]
 v[219] = pv[3]*pv[33]
 v[220] = pv[4]*pv[33]
 v[221] = pv[5]*pv[33]
 v[222] = pv[6]*pv[33]
 v[223] = pv[7]*pv[33]
 v[224] = pv[3]*pv[34]
 v[225] = pv[4]*pv[34]
 v[226] = pv[5]*pv[34]
 v[227] = pv[6]*pv[34]
 v[228] = pv[7]*pv[34]
 v[229] = pv[3]*pv[35]
 v[230] = pv[4]*pv[35]
 v[231] = pv[5]*pv[35]
 v[232] = pv[6]*pv[35]
 v[233] = pv[7]*pv[35]
 v[234] = pv[3]*pv[36]
 v[235] = pv[4]*pv[36]
 v[236] = pv[5]*pv[36]
 v[237] = pv[6]*pv[36]
 v[238] = pv[7]*pv[36]
 v[239] = pv[3]*pv[37]
 v[240] = pv[4]*pv[37]
 v[241] = pv[5]*pv[37]
 v[242] = pv[6]*pv[37]
 v[243] = pv[7]*pv[37]
 v[244] = pv[3]*pv[38]
 v[245] = pv[4]*pv[38]
 v[246] = pv[5]*pv[38]
 v[247] = pv[6]*pv[38]
 v[248] = pv[7]*pv[38]
 v[249] = pv[3]*pv[39]
 v[250] = pv[4]*pv[39]
 v[251] = pv[5]*pv[39]
 v[252] = pv[6]*pv[39]
 v[253] = pv[7]*pv[39]
 v[254] = pv[3]*pv[40]
 v[255] = pv[4]*pv[40]
 v[256] = pv[5]*pv[40]
 v[257] = pv[6]*pv[40]
 v[258] = pv[7]*pv[40]
 v[259] = pv[1]*pv[41]
 v[260] = pv[2]*pv[41]
 v[261] = pv[1]*pv[42]
 v[262] = pv[2]*pv[42]
 v[263] = pv[1]*pv[43]
 v[264] = pv[2]*pv[43]
 v[265] = pv[1]*pv[44]
 v[266] = pv[2]*pv[44]
return prim, v, pv

end

max_stars_repo_name: cortner/ManyBodyIPs

max_issues_repo_name: cortner/ManyBodyIPs

max_forks_repo_name: cortner/ManyBodyIPs


text:
using luteos
using SymPy

# let # limit scope

Ps = [P1(), P2(), P3()]         # Range of polynomial order
Ns = [9, 17]#, 33] # Range of grid size

dim = 3

κ = 1.0
c = fill( 0.0, dim )

# Material
mat = Material( ν=0.33, E=1.0 )

## Set up problem
#   Get functions for exact solution
function ExactSol3D(  )

  dim = 3

  @syms x1 x2 x3

  u = sin.(pi*x1) .* sin.(0.5*pi*x2) .* sin.(pi*x3)

  g = (x1^2 - x1) .* (x2^2 - x2) .* (x3^2 - x3)

  J = integrate( integrate( integrate( u .* g , x1, 0, 1 ), x2, 0, 1 ), x3, 0, 1 )

  ∂u∂x1 = diff( u, x1 )
  ∂u∂x2 = diff( u, x2 )
  ∂u∂x3 = diff( u, x3 )

  F  = diff( -∂u∂x1, x1 ) + diff( -∂u∂x2, x2 ) + diff( -∂u∂x3, x3 )

  ufunc_org = lambdify( u, [x1, x2, x3] )

  Ffunc_org  = lambdify( F, [x1, x2, x3] )

  q1func_org = lambdify( ∂u∂x1, [x1, x2, x3] )
  q2func_org = lambdify( ∂u∂x2, [x1, x2, x3] )
  q3func_org = lambdify( ∂u∂x3, [x1, x2, x3] )

  gfunc_org  = lambdify( g, [x1, x2, x3] )

  # make sure you can call it with matrices
  ufunc = x -> ufunc_org.(x[:,1], x[:,2], x[:,3])

  Ffunc = x -> Ffunc_org.(x[:,1], x[:,2], x[:,3])

  q1func = x -> q1func_org.(x[:,1], x[:,2], x[:,3])
  q2func = x -> q2func_org.(x[:,1], x[:,2], x[:,3])
  q3func = x -> q3func_org.(x[:,1], x[:,2], x[:,3])

  gfunc  = x -> gfunc_org.(x[:,1], x[:,2], x[:,3])

  return( ufunc,
          q1func,q2func,q3func,
          Ffunc, gfunc, J )

end

( ufunc, q1func, q2func, q3func, Ffunc, gfunc, J ) = ExactSol3D(  )

#   Setup boundary conditions
function funcB( p::Array{Float64} )
  return fill( 0.0, size(p,1) )
end
bctype = [1,1,1,1,1,2]

#   Setup source function
source = (p) -> Ffunc(p)

## Compute error for different polynomial orders and grid sizes
#   Initialize arrays
Err_uh  = fill( 0.0, length(Ps), length(Ns) )
Err_qh1 = fill( 0.0, length(Ps), length(Ns) )
Err_qh2 = fill( 0.0, length(Ps), length(Ns) )
Err_qh3 = fill( 0.0, length(Ps), length(Ns) )
Err_J   = fill( 0.0, length(Ps), length(Ns) )

#   Loop over polynomial order and grid size
for ii in 1:length(Ps), jj in 1:length(Ns)

  P = Ps[ii]; N = Ns[jj]

  @printf( " %6i %6i\n", P.p, N )

  mesh   = Mesh3D( "cube", P, N = N)
  master = Master3D( P )

  prob = CDR( @sprintf("Poisson - Reg %i %i", P.p, N), κ, c, source, bctype, false, [funcB, funcB, funcB, funcB, funcB, funcB] )

  (uhath, uh, qh) = hdgSolve( master, mesh, prob )

  #   Initialize arrays
  err_uh = 0.0
  err_qh = fill( 0.0, dim )
  Jcomp  = 0.0

  # preallocate
  jcwd = fill( 0.0, size(master.∇ϕ,2), size(master.∇ϕ,2) )
  ∂ξ∂x = fill( 0.0, size(master.∇ϕ,2), dim^2 )
  ∂x∂ξ = fill( 0.0, size(master.∇ϕ,2), dim^2 )

  for kk in 1:size(mesh.t,1)

    # Compute Jacobians
    luteos.compJacob!( master, mesh.nodes[:,:,kk], ∂ξ∂x, jcwd, ∂x∂ξ )

    # u
    Δuh     = master.ϕ' * ( uh[:,1,kk] - ufunc( mesh.nodes[:,:,kk] ) )
    err_uh += Δuh' * jcwd * Δuh

    # σ
    Δqh1       = master.ϕ' * ( qh[:,1,kk] - q1func( mesh.nodes[:,:,kk] ) )
    Δqh2       = master.ϕ' * ( qh[:,2,kk] - q2func( mesh.nodes[:,:,kk] ) )
    Δqh3       = master.ϕ' * ( qh[:,3,kk] - q3func( mesh.nodes[:,:,kk] ) )

    # output functional
    gquad  = master.ϕ' * gfunc( mesh.nodes[:,:,kk] )
    uquad  = master.ϕ' * uh[:,1,kk]
    Jcomp += gquad' * jcwd * uquad

    err_qh[1] += Δqh1' * jcwd * Δqh1
    err_qh[2] += Δqh2' * jcwd * Δqh2
    err_qh[3] += Δqh3' * jcwd * Δqh3

  end

  Err_uh[ii,jj]  = sqrt(err_uh)

  Err_qh1[ii,jj] = sqrt(err_qh[1])
  Err_qh2[ii,jj] = sqrt(err_qh[2])
  Err_qh3[ii,jj] = sqrt(err_qh[3])

  Err_J[ii,jj]   = abs(Jcomp - J)

end

# Compute convergence rates
h = 1 ./ ( Ns - 1 )
conv_uh  = (log.( Err_uh[:,end-1]) - log.( Err_uh[:,end] ) ) / (log.( h[end-1]) - log.( h[end] ));

conv_qh1 = (log.( Err_qh1[:,end-1]) - log.( Err_qh1[:,end] ) ) / (log.( h[end-1]) - log.( h[end] ));
conv_qh2 = (log.( Err_qh2[:,end-1]) - log.( Err_qh2[:,end] ) ) / (log.( h[end-1]) - log.( h[end] ));
conv_qh3 = (log.( Err_qh3[:,end-1]) - log.( Err_qh3[:,end] ) ) / (log.( h[end-1]) - log.( h[end] ));

conv_J   = (log.( Err_J[:,end-1])   - log.( Err_J[:,end] ) ) / (log.( h[end-1]) - log.( h[end] ));

# Output to terminal
@printf("\n")
@printf("   Convergence rates for Poisson 3D Neumann problem\n\n")
@printf("   ------------------------------------------------\n\n")
@printf( "P   ")
for jj in 1:size(Ps,1)
  @printf( " %6i", Ps[jj].p )
end
@printf( "\n" )

#   u
@printf( "u   ")
for jj in 1:size(Ps,1)
  @printf( " %6.4f", conv_uh[jj] )
end
@printf( "\n" )

#   q
@printf( "q₁  ")
for jj in 1:length(Ps)
  @printf( " %6.4f", conv_qh1[jj] )
end
@printf( "\n" )
@printf( "q₂  ")
for jj in 1:length(Ps)
  @printf( " %6.4f", conv_qh2[jj] )
end
@printf( "\n" )
@printf( "q₃  ")
for jj in 1:length(Ps)
  @printf( " %6.4f", conv_qh3[jj] )
end
@printf( "\n" )

# J
@printf( "J   ")
for jj in 1:length(Ps)
  @printf( " %6.4f", conv_J[jj] )
end
@printf( "\n" )

open("errors_Poisson_Neumann3D.dat", "w") do f
  @printf(f, "P \t N \t E_uh \t E_qh1 \t E_qh2 \t E_qh3 \t E_J\n")
  for ii in 1:length(Ps), jj in 1:length(Ns)
    @printf(f, "%i \t %i \t %16.15e \t %16.15e \t %16.15e \t %16.15e \t %16.15e\n",
    Ps[ii].p,Ns[jj],Err_uh[ii,jj],Err_qh1[ii,jj],Err_qh2[ii,jj],Err_qh3[ii,jj],Err_J[ii,jj])
  end
end

# end # limit scope

ext: jl


text:
# Autogenerated wrapper script for SLEEF_jll for aarch64-apple-darwin
export libsleef, libsleefquad

using CompilerSupportLibraries_jll
using MPFR_jll
using OpenSSL_jll
JLLWrappers.@generate_wrapper_header("SLEEF")
JLLWrappers.@declare_library_product(libsleef, "@rpath/libsleef.3.dylib")
JLLWrappers.@declare_library_product(libsleefquad, "@rpath/libsleefquad.3.dylib")
function __init__()
    JLLWrappers.@generate_init_header(CompilerSupportLibraries_jll, MPFR_jll, OpenSSL_jll)
    JLLWrappers.@init_library_product(
        libsleef,
        "lib/libsleef.3.4.1.dylib",
        RTLD_LAZY | RTLD_DEEPBIND,
    )

    JLLWrappers.@init_library_product(
        libsleefquad,
        "lib/libsleefquad.3.4.1.dylib",
        RTLD_LAZY | RTLD_DEEPBIND,
    )

    JLLWrappers.@generate_init_footer()
end  # __init__()


text:
using Pkg
# Pkg.add("Images");
# Pkg.add("Plots");
# Pkg.instantiate()
Pkg.activate(".")

using Images, CausticsEngineering

image = Images.load("./examples/cat_posing.jpg")
# Check current working directory with pwd()
engineer_caustics(image);

max_stars_repo_name: Mehul-Bagaria/causticsEngineering

max_issues_repo_name: Mehul-Bagaria/causticsEngineering

max_forks_repo_name: Mehul-Bagaria/causticsEngineering


text:
function hasquadratic(m::LinQuadOptimizer)
    (m.obj_type == QuadraticObjective) || (length(cmap(m).q_less_than) + length(cmap(m).q_greater_than) + length(cmap(m).q_equal_to) > 0)
end

#=
    Optimize the model
=#

function MOI.optimize!(m::LinQuadOptimizer)
    # reset storage
    fill!(m.variable_primal_solution, NaN)
    fill!(m.variable_dual_solution, NaN)
    fill!(m.constraint_primal_solution, NaN)
    fill!(m.constraint_dual_solution, NaN)
    m.primal_status = MOI.UnknownResultStatus
    m.dual_status   = MOI.UnknownResultStatus
    m.primal_result_count = 0
    m.dual_result_count = 0

    t = time()
    if hasinteger(m)
        solve_mip_problem!(m)
    elseif hasquadratic(m)
        solve_quadratic_problem!(m)
    else
        solve_linear_problem!(m)
    end
    m.solvetime = time() - t

    # termination_status
    m.termination_status = get_termination_status(m)
    m.primal_status = get_primal_status(m)
    m.dual_status = get_dual_status(m)

    if m.primal_status in [MOI.FeasiblePoint, MOI.InfeasiblePoint]
        # primal solution exists
        get_variable_primal_solution!(m, m.variable_primal_solution)
        get_linear_primal_solution!(m, m.constraint_primal_solution)
        if hasquadratic(m)
            get_quadratic_primal_solution!(m, m.qconstraint_primal_solution)
        end
        m.primal_result_count = 1
        # CPLEX can return infeasible points
    elseif m.primal_status == MOI.InfeasibilityCertificate
        get_unbounded_ray!(m, m.variable_primal_solution)
        m.primal_result_count = 1
    end
    if m.dual_status in [MOI.FeasiblePoint, MOI.InfeasiblePoint]
        # dual solution exists
        get_variable_dual_solution!(m, m.variable_dual_solution)
        get_linear_dual_solution!(m, m.constraint_dual_solution)
        if hasquadratic(m)
            get_quadratic_dual_solution!(m, m.qconstraint_dual_solution)
        end
        m.dual_result_count = 1
        # dual solution may not be feasible
    elseif m.dual_status == MOI.InfeasibilityCertificate
        get_farkas_dual!(m, m.constraint_dual_solution)
        m.dual_result_count = 1
    end

    #=
        CPLEX has the dual convention that the sign of the dual depends on the
        optimization sense. This isn't the same as the MOI convention so we need
        to correct that.
    =#
    # TODO
    if MOI.get(m, MOI.ObjectiveSense()) == MOI.MaxSense
        m.constraint_dual_solution *= -1
        m.variable_dual_solution *= -1
    end
end

#=
    Result Count
=#
function MOI.get(m::LinQuadOptimizer, ::MOI.ResultCount)
    max(m.primal_result_count, m.dual_result_count)
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ResultCount) = true

#=
    Termination status
=#

function MOI.get(m::LinQuadOptimizer, ::MOI.TerminationStatus)
    m.termination_status
end
MOI.canget(m::LinQuadOptimizer, ::MOI.TerminationStatus) = true

#=
    Primal status
=#

function MOI.get(m::LinQuadOptimizer, p::MOI.PrimalStatus)
    m.primal_status
end
function MOI.canget(m::LinQuadOptimizer, p::MOI.PrimalStatus)
    m.primal_result_count >= p.N
end

#=
    Dual status
=#

function MOI.get(m::LinQuadOptimizer, d::MOI.DualStatus)
    m.dual_status
end
function MOI.canget(m::LinQuadOptimizer, d::MOI.DualStatus)
    m.dual_result_count >= d.N
end

#=
    Objective Value
=#

function MOI.get(m::LinQuadOptimizer, attr::MOI.ObjectiveValue)
    if attr.resultindex == 1
        get_objective_value(m) + m.objective_constant
    else
        error("Unable to access multiple objective values")
    end
end
function MOI.canget(m::LinQuadOptimizer, attr::MOI.ObjectiveValue)
    if attr.resultindex == 1
        return true
    else
        return false
    end
end

#=
    Variable Primal solution
=#

function MOI.get(m::LinQuadOptimizer, ::MOI.VariablePrimal, v::VarInd)
    col = m.variable_mapping[v]
    return m.variable_primal_solution[col]
end
MOI.canget(m::LinQuadOptimizer, ::MOI.VariablePrimal, ::Type{VarInd}) = true

function MOI.get(m::LinQuadOptimizer, ::MOI.VariablePrimal, v::Vector{VarInd})
    MOI.get.(m, MOI.VariablePrimal(), v)
end
MOI.canget(m::LinQuadOptimizer, ::MOI.VariablePrimal, ::Type{Vector{VarInd}}) = true

#=
    Variable Dual solution
=#
isbinding(set::LE, value::Float64) = isapprox(set.upper, value)
isbinding(set::GE, value::Float64) = isapprox(set.lower, value)
isbinding(set::EQ, value::Float64) = isapprox(set.value, value)
isbinding(set::IV, value::Float64) = isapprox(set.lower, value) || isapprox(set.upper, value)
function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintDual, c::SVCI{<: LinSets})
    vref = m[c]
    col = m.variable_mapping[vref]
    # the variable reduced cost is only the constriant dual if the bound is active.
    set = MOI.get(m, MOI.ConstraintSet(), c)
    solval = m.variable_primal_solution[col]
    if isbinding(set, solval)
        return m.variable_dual_solution[col]
    else
        return 0.0
    end
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintDual, ::Type{SVCI{S}}) where S <: LinSets = true

function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintDual, c::VVCI{<: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives}})
    rowrefs = m[c]
    out = Float64[]
    sizehint!(out, length(rowrefs))
    for ref in rowrefs
        push!(out, m.constraint_dual_solution[ref])
    end
    return out
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintDual, ::Type{VVCI{S}}) where S <: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives} = true

#=
    Variable Bound Primal solution
=#

function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, c::SVCI{<: LinSets})
    vref = m[c]
    col = m.variable_mapping[vref]
    return m.variable_primal_solution[col]
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, ::Type{SVCI{S}}) where S <: LinSets = true

function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, c::VVCI{<: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives}})
    rowrefs = m[c]
    out = Float64[]
    sizehint!(out, length(rowrefs))
    for ref in rowrefs
        push!(out, m.constraint_primal_solution[ref])
    end
    return out
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, ::Type{VVCI{S}}) where S <: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives} = true

#=
    Constraint Primal solution
=#

function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, c::LCI{<: LinSets})
    row = m[c]
    return m.constraint_primal_solution[row]+m.constraint_constant[row]
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, ::Type{LCI{S}}) where S <: LinSets = true

function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, c::QCI{<: LinSets})
    row = m[c]
    return m.qconstraint_primal_solution[row]#+m.qconstraint_constant[row]
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, ::Type{QCI{S}}) where S <: LinSets = true

# vector valued constraint duals
function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, c::VLCI{<: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives}})
    row = m[c]
    return m.constraint_primal_solution[row]+m.constraint_constant[row]
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintPrimal, ::Type{VLCI{S}}) where S <: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives} = true

#=
    Constraint Dual solution
=#

_checkdualsense(::LCI{LE}, dual) = dual <= 0.0
_checkdualsense(::LCI{GE}, dual) = dual >= 0.0
_checkdualsense(::LCI{IV}, dual) = true
_checkdualsense(::LCI{EQ}, dual) = true

function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintDual, c::LCI{<: LinSets})
    row = m[c]
    dual = m.constraint_dual_solution[row]
    @assert _checkdualsense(c, dual)
    return dual
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintDual, ::Type{LCI{S}}) where S <: LinSets = true

function MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintDual, c::QCI{<: LinSets})
    row = m[c]
    return m.qconstraint_dual_solution[row]#+m.qconstraint_constant[row]
end
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintDual, ::Type{QCI{S}}) where S <: LinSets = true

# vector valued constraint duals
MOI.get(m::LinQuadOptimizer, ::MOI.ConstraintDual, c::VLCI{<: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives}}) = m.constraint_dual_solution[m[c]]
MOI.canget(m::LinQuadOptimizer, ::MOI.ConstraintDual, ::Type{VLCI{S}}) where S <: Union{MOI.Zeros, MOI.Nonnegatives, MOI.Nonpositives} = true

#=
    Solution Attributes
=#

# struct ObjectiveBound <: MOI.AbstractOptimizerAttribute end
MOI.get(m::LinQuadOptimizer, ::MOI.ObjectiveBound) = get_objective_bound(m)
MOI.canget(m::LinQuadOptimizer, ::MOI.ObjectiveBound) = true

# struct RelativeGap <: MOI.AbstractOptimizerAttribute  end
MOI.get(m::LinQuadOptimizer, ::MOI.RelativeGap) = get_relative_mip_gap(m)
MOI.canget(m::LinQuadOptimizer, ::MOI.RelativeGap) = true

# struct SolveTime <: MOI.AbstractOptimizerAttribute end
MOI.get(m::LinQuadOptimizer, ::MOI.SolveTime) = m.solvetime
MOI.canget(m::LinQuadOptimizer, ::MOI.SolveTime) = true

# struct SimplexIterations <: MOI.AbstractOptimizerAttribute end
MOI.get(m::LinQuadOptimizer, ::MOI.SimplexIterations) = get_iteration_count(m)
MOI.canget(m::LinQuadOptimizer, ::MOI.SimplexIterations) = true

# struct BarrierIterations <: MOI.AbstractOptimizerAttribute end
MOI.get(m::LinQuadOptimizer, ::MOI.BarrierIterations) = get_barrier_iterations(m)
MOI.canget(m::LinQuadOptimizer, ::MOI.BarrierIterations) = true

# struct NodeCount <: MOI.AbstractOptimizerAttribute end
MOI.get(m::LinQuadOptimizer, ::MOI.NodeCount) = get_node_count(m)
MOI.canget(m::LinQuadOptimizer, ::MOI.NodeCount) = true

# struct RawSolver <: MOI.AbstractOptimizerAttribute end
MOI.get(m::LinQuadOptimizer, ::MOI.RawSolver) = m
MOI.canget(m::LinQuadOptimizer, ::MOI.RawSolver) = true


text:
"""
    AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Abstract shape descriptor (simplex, or cuboid, of various manifold dimension)

The definitions of concrete types below define a set of shape descriptors,
covering the usual element shapes: point, line segment, quadrilateral,
hexahedron, and a similar hierarchy for the simplex elements: point, line
segment, triangle, tetrahedron.

The concrete types of the shape descriptor will provide access to the following
properties of the shape S:
- `manifdim` = manifold dimension of the shape S (i. e. 0, 1, 2, or 3),
- `nvertices` = number of vertices of the shape S,
- `n1storderv` = number of first-order vertices for the shape S, for instance
    a 6-node triangle has 3 first-order vertices,
- `nfacets` = number of shapes on the boundary of the shape S,
- `facetdesc` = shape descriptor of the shapes on the boundary of the shape S,
- `facets` = definitions of the shapes on the boundary of the shape S in terms
    of local connectivity
- `ridgedesc` = shape descriptor of the shapes on the boundary of the boundary
    of the shape S (which we call ridges here),
- `ridges` = definitions of the shapes on the boundary of the boundary of the
    shape S in terms of local connectivity

The bit-type values are defined with the type parameters:
- `MD` is the manifold dimension,
- `NV` is the number of connected vertices,
- `NF` is the number of boundary facets,
- `FD` is the descriptor of the facet (boundary shape).
- `NR` is the number of boundary ridges,
- `RD` is the descriptor of the ridge (boundary shape).
- `NFOV` is number of first-order vertices,
- `NSHIFTS` is the number of shifts that should be attempted when matching
    shapes to determine orientation.
"""
abstract type AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} end

"""
    manifdim(sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

What is the manifold dimension of this shape?
"""
manifdim(
    sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS},
) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} = MD

"""
    nvertices(sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

How many vertices does the shape connect?
"""
nvertices(
    sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS},
) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} = NV

"""
    nfacets(sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

How many facets bound the shape?
"""
nfacets(
    sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS},
) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} = NF

"""
    nridges(sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

How many ridges bound the shape?
"""
nridges(
    sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS},
) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} = NR

"""
    n1storderv(sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

How many 1st-order vertices are there per shape?

For instance, for hexahedra each shape has 8 1st-order vertices.
"""
n1storderv(
    sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS},
) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} = NFOV

"""
    nshifts(sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

How many circular shifts should be tried to figure out the orientation (sense)?
"""
nshifts(
    sd::AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS},
) where {MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} = NSHIFTS

"""
    NoSuchShapeDesc

Base descriptor: no shape is of this description.
"""
struct NoSuchShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} end

const NoSuchShape = NoSuchShapeDesc{
    0, # MD
    0, # NV
    0, # NF
    0, # FD
    0, # NR
    0, # RD
    0, # NFOV
    0, # NSHIFTS
}()

"""
    P1ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a point shape.
"""
struct P1ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,0,Int64,0}
    ridgedesc::RD
    ridges::SMatrix{NR,0,Int64,0}
    name::String
end

const P1 = P1ShapeDesc{
    0, # MD
    1, # NV
    0, # NF
    NoSuchShapeDesc, # FD
    0, # NR
    NoSuchShapeDesc, # RD
    1, # NFOV
    0, # NSHIFTS
}(
    NoSuchShape,
    SMatrix{0,0}(Int64[]),
    NoSuchShape,
    SMatrix{0,0}(Int64[]),
    "P1",
)

"""
    L2ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a line segment shape.
"""
struct L2ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,1,Int64,2}
    ridgedesc::RD
    ridges::SMatrix{NR,0,Int64,0}
    name::String
end

const L2 = L2ShapeDesc{
    1, # MD
    2, # NV
    2, # NF
    P1ShapeDesc, # FD
    0, # NR
    NoSuchShapeDesc, # RD
    2, # NFOV
    0, # NSHIFTS
}(
    P1,
    SMatrix{2,1}([1; 2]),
    NoSuchShape,
    SMatrix{0,0}(Int64[]),
    "L2",
)

"""
    Q4ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a quadrilateral shape.

Facets: First the two orthogonal to xi, then the two orthogonal to eta. The
coordinate along the edge increases.

Ridges: Counterclockwise.
"""
struct Q4ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,2,Int64,4 * 2}
    ridgedesc::RD
    ridges::SMatrix{NR,1,Int64,4 * 1}
    name::String
end

const Q4 = Q4ShapeDesc{
    2, # MD
    4, # NV
    4, # NF
    L2ShapeDesc, # FD
    4, # NR
    P1ShapeDesc, # RD
    4, # NFOV
    4, # NSHIFTS
}(
    L2,
    SMatrix{4,2}([1 4; 2 3; 1 2; 4 3]),
    P1,
    SMatrix{4,1}([1; 2; 3; 4]),
    "Q4",
)

"""
    H8ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a hexahedral shape.

Facets: First the two faces orthogonal to xi, then the two orthogonal to eta,
finally the two orthogonal to zeta. The vertices are given counterclockwise when
looking from the outside.

Ridges: First the four edges parallel to xi, then the four parallel to eta, and
finally the four parallel to zeta.
"""
struct H8ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,4,Int64,6 * 4}
    ridgedesc::RD
    ridges::SMatrix{NR,2,Int64,12 * 2}
    name::String
end

const H8 = H8ShapeDesc{
    3, # MD
    8, # NV
    6, # NF
    Q4ShapeDesc, # FD
    12, # NR
    L2ShapeDesc, # RD
    8, # NFOV
    0, # NSHIFTS
}(
    Q4,
    SMatrix{6,4}([8 4 1 5; 7 6 2 3; 6 5 1 2; 7 3 4 8; 3 2 1 4; 7 8 5 6]),
    L2,
    SMatrix{12,2}([8 7; 5 6; 1 2; 4 3; 6 7; 5 8; 1 4; 2 3; 3 7; 4 8; 1 5; 2 6]),
    "H8",
)

"""
    T3ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a triangular shape.

Facets: We start with the edge opposite to vertex 1, then the edge opposite to
vertex 2 and so on. The vertices define counterclockwise orientation.

Ridges: The vertices in counterclockwise order.
"""
struct T3ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,2,Int64,3 * 2}
    ridgedesc::RD
    ridges::SMatrix{NR,1,Int64,3 * 1}
    name::String
end

const T3 = T3ShapeDesc{
    2, # MD
    3, # NV
    3, # NF
    L2ShapeDesc, # FD
    3, # NR
    P1ShapeDesc, # RD
    3, # NFOV
    3, # NSHIFTS
}(
    L2,
    SMatrix{3,2}([2 3; 3 1; 1 2]),
    P1,
    SMatrix{3,1}([1; 2; 3]),
    "T3",
)

"""
    T4ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a tetrahedral shape.

Facets: We start with the face opposite to vertex 1, then the face opposite to
vertex 2 and so on. The vertices define counterclockwise orientation when viewed
from outside of the shape.

Ridges: The vertices of the edges are defined in the order based on the
right-hand side rotation rule: rotate about an edge (ridge) as if it was a
rotation vector  with positive orientation. The vertices on the edge opposite
across the tetrahedron are traversed in the order given by the rotation.
"""
struct T4ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,3,Int64,4 * 3}
    ridgedesc::RD
    ridges::SMatrix{NR,2,Int64,6 * 2}
    name::String
end

const T4 = T4ShapeDesc{
    3, # MD
    4, # NV
    4, # NF
    T3ShapeDesc, # FD
    6, # NR
    L2ShapeDesc, # RD
    4, # NFOV
    0, # NSHIFTS
}(
    T3,
    SMatrix{4,3}([2 3 4; 1 4 3; 4 1 2; 3 2 1]),
    L2,
    SMatrix{6,2}([1 4; 2 3; 1 2; 3 4; 4 2; 1 3]),
    "T4",
)

"""
    L3ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a quadratic line segment shape.
"""
struct L3ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,1,Int64,2}
    ridgedesc::RD
    ridges::SMatrix{NR,0,Int64,0}
    name::String
end

const L3 = L3ShapeDesc{
    1, # MD
    3, # NV
    2, # NF
    P1ShapeDesc, # FD
    0, # NR
    NoSuchShapeDesc, # RD
    2, # NFOV
    0, # NSHIFTS
}(
    P1,
    SMatrix{2,1}([1; 2]),
    NoSuchShape,
    SMatrix{0,0}(Int64[]),
    "L3",
)

"""
    T6ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a quadratic triangular shape.

Facets: We start with the edge opposite to vertex 1, then the edge opposite to
vertex 2 and so on. The vertices define counterclockwise orientation.

Ridges: The vertices in counterclockwise order.
"""
struct T6ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,3,Int64,3 * 3}
    ridgedesc::RD
    ridges::SMatrix{NR,1,Int64,3 * 1}
    name::String
end

const T6 = T6ShapeDesc{
    2, # MD
    6, # NV
    3, # NF
    L3ShapeDesc, # FD
    3, # NR
    P1ShapeDesc, # RD
    3, # NFOV
    3, # NSHIFTS
}(
    L3,
    SMatrix{3,3}([2 3 5; 3 1 6; 1 2 4]),
    P1,
    SMatrix{3,1}([1; 2; 3]),
    "T6",
)

"""
    Q8ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <: AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}

Shape descriptor of a quadrilateral shape.

Facets: First the two orthogonal to xi, then the two orthogonal to eta. The
coordinate along the edge increases.

Ridges: Counterclockwise.
"""
struct Q8ShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS} <:
       AbsShapeDesc{MD,NV,NF,FD,NR,RD,NFOV,NSHIFTS}
    facetdesc::FD
    facets::SMatrix{NF,3,Int64,4 * 3}
    ridgedesc::RD
    ridges::SMatrix{NR,1,Int64,4 * 1}
    name::String
end

const Q8 = Q8ShapeDesc{
    2, # MD
    8, # NV
    4, # NF
    L3ShapeDesc, # FD
    4, # NR
    P1ShapeDesc, # RD
    4, # NFOV
    4, # NSHIFTS
}(
    L3,
    SMatrix{4,3}([1 4 8; 2 3 6; 1 2 5; 4 3 7]),
    P1,
    SMatrix{4,1}([1; 2; 3; 4]),
    "Q8",
)

"""
    SHAPE_DESC

Dictionary of all the descriptors.
"""
const SHAPE_DESC = Dict(
    "NoSuchShape" => NoSuchShape,
    "P1" => P1,
    "L2" => L2,
    "T3" => T3,
    "T4" => T4,
    "Q4" => Q4,
    "H8" => H8,
    "L3" => L3,
    "T6" => T6,
    "Q8" => Q8,
)

"""
    nfeatofdim(sd::SD, m) where {SD<:AbsShapeDesc}

Compute number of manifold features of given dimension.

For instance, a tetrahedron with four vertices has 1 feature of manifold
dimension 3, four features of manifold dimension 2, six features of manifold
dimension 1, and four features of manifold dimension 0.

Quadratic or higher order elements may have more vertices than would correspond
to the hierarchy of cells, facets, ridges. Internal vertices must be accounted
for as well. For instance, L3 has two facets, but three vertices. T6 has three
facets, three ridges, but six vertices.
"""
function nfeatofdim(sd::SD, m) where {SD<:AbsShapeDesc}
    if m > manifdim(sd)
        return 0
    end
    if m == manifdim(sd)
        return 1
    elseif m == manifdim(sd) - 1
        # There may be more vertices than facets: There may be internal vertices.
        return m == 0 ? nvertices(sd) : nfacets(sd)
    elseif m == manifdim(sd) - 2
        # There may be more vertices than ridges: There may be internal vertices.
        return m == 0 ? nvertices(sd) : nridges(sd)
    else # m must be equal to 0
        return nvertices(sd)
    end
end


text:
// Compare double with boolean.

int main() {
  if (2.0 == true) {
   printString("foo");
  }
  return 0 ;
}

max_stars_repo_name: jwilk/jtc

max_issues_repo_name: jwilk/jtc

max_forks_repo_name: jwilk/jtc


text:
#=
This file is auto-generated. Do not edit.
=#

#! format: off

"""
    mutable struct HydroTurbineGov <: TurbineGov
        R::Float64
        r::Float64
        Tr::Float64
        Tf::Float64
        Tg::Float64
        VELM::Float64
        gate_position_limits::NamedTuple{(:min, :max), Tuple{Float64, Float64}}
        Tw::Float64
        At::Float64
        D_T::Float64
        q_nl::Float64
        P_ref::Float64
        ext::Dict{String, Any}
        states::Vector{Symbol}
        n_states::Int
        states_types::Vector{StateTypes}
        internal::InfrastructureSystemsInternal
    end

Hydro Turbine-Governor.

# Arguments
- `R::Float64`: Permanent droop parameter, validation range: `(0, 0.1)`, action if invalid: `warn`
- `r::Float64`: Temporary Droop, validation range: `(0, 2)`, action if invalid: `warn`
- `Tr::Float64`: Governor time constant, validation range: `(eps(), 30)`, action if invalid: `error`
- `Tf::Float64`: Filter Time constant, validation range: `(eps(), 0.1)`
- `Tg::Float64`: Servo time constant, validation range: `(eps(), 1)`, action if invalid: `error`
- `VELM::Float64`: gate velocity limit, validation range: `(eps(), 0.3)`, action if invalid: `error`
- `gate_position_limits::NamedTuple{(:min, :max), Tuple{Float64, Float64}}`: Gate position limits
- `Tw::Float64`: water time constant, validation range: `(eps(), 3)`, action if invalid: `error`
- `At::Float64`: Turbine gain, validation range: `(0.8, 1.5)`, action if invalid: `warn`
- `D_T::Float64`: Turbine Damping, validation range: `(0, 0.5)`, action if invalid: `warn`
- `q_nl::Float64`: No-power flow, validation range: `(0, nothing)`, action if invalid: `warn`
- `P_ref::Float64`: Reference Power Set-point, validation range: `(0, nothing)`
- `ext::Dict{String, Any}`
- `states::Vector{Symbol}`: The states of the HydroTurbineGov model are:
	x_g1: filter_output,
	x_g2: desired gate,
	x_g3: gate opening,
	x_g4: turbine flow
- `n_states::Int`: HYGOV has 4 states
- `states_types::Vector{StateTypes}`: HYGOV has 4 differential states
- `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify
"""
mutable struct HydroTurbineGov <: TurbineGov
    "Permanent droop parameter"
    R::Float64
    "Temporary Droop"
    r::Float64
    "Governor time constant"
    Tr::Float64
    "Filter Time constant"
    Tf::Float64
    "Servo time constant"
    Tg::Float64
    "gate velocity limit"
    VELM::Float64
    "Gate position limits"
    gate_position_limits::NamedTuple{(:min, :max), Tuple{Float64, Float64}}
    "water time constant"
    Tw::Float64
    "Turbine gain"
    At::Float64
    "Turbine Damping"
    D_T::Float64
    "No-power flow"
    q_nl::Float64
    "Reference Power Set-point"
    P_ref::Float64
    ext::Dict{String, Any}
    "The states of the HydroTurbineGov model are:
	x_g1: filter_output,
	x_g2: desired gate,
	x_g3: gate opening,
	x_g4: turbine flow"
    states::Vector{Symbol}
    "HYGOV has 4 states"
    n_states::Int
    "HYGOV has 4 differential states"
    states_types::Vector{StateTypes}
    "power system internal reference, do not modify"
    internal::InfrastructureSystemsInternal
end

function HydroTurbineGov(R, r, Tr, Tf, Tg, VELM, gate_position_limits, Tw, At, D_T, q_nl, P_ref=1.0, ext=Dict{String, Any}(), )
    HydroTurbineGov(R, r, Tr, Tf, Tg, VELM, gate_position_limits, Tw, At, D_T, q_nl, P_ref, ext, [:x_g1, :x_g2, :x_g3, :x_g4], 4, [StateTypes.Differential, StateTypes.Differential, StateTypes.Differential, StateTypes.Differential], InfrastructureSystemsInternal(), )
end

function HydroTurbineGov(; R, r, Tr, Tf, Tg, VELM, gate_position_limits, Tw, At, D_T, q_nl, P_ref=1.0, ext=Dict{String, Any}(), states=[:x_g1, :x_g2, :x_g3, :x_g4], n_states=4, states_types=[StateTypes.Differential, StateTypes.Differential, StateTypes.Differential, StateTypes.Differential], internal=InfrastructureSystemsInternal(), )
    HydroTurbineGov(R, r, Tr, Tf, Tg, VELM, gate_position_limits, Tw, At, D_T, q_nl, P_ref, ext, states, n_states, states_types, internal, )
end

# Constructor for demo purposes; non-functional.
function HydroTurbineGov(::Nothing)
    HydroTurbineGov(;
        R=0,
        r=0,
        Tr=0,
        Tf=0,
        Tg=0,
        VELM=0,
        gate_position_limits=(min=0.0, max=0.0),
        Tw=0,
        At=0,
        D_T=0,
        q_nl=0,
        P_ref=0,
        ext=Dict{String, Any}(),
    )
end

"""Get [`HydroTurbineGov`](@ref) `R`."""
get_R(value::HydroTurbineGov) = value.R
"""Get [`HydroTurbineGov`](@ref) `r`."""
get_r(value::HydroTurbineGov) = value.r
"""Get [`HydroTurbineGov`](@ref) `Tr`."""
get_Tr(value::HydroTurbineGov) = value.Tr
"""Get [`HydroTurbineGov`](@ref) `Tf`."""
get_Tf(value::HydroTurbineGov) = value.Tf
"""Get [`HydroTurbineGov`](@ref) `Tg`."""
get_Tg(value::HydroTurbineGov) = value.Tg
"""Get [`HydroTurbineGov`](@ref) `VELM`."""
get_VELM(value::HydroTurbineGov) = value.VELM
"""Get [`HydroTurbineGov`](@ref) `gate_position_limits`."""
get_gate_position_limits(value::HydroTurbineGov) = value.gate_position_limits
"""Get [`HydroTurbineGov`](@ref) `Tw`."""
get_Tw(value::HydroTurbineGov) = value.Tw
"""Get [`HydroTurbineGov`](@ref) `At`."""
get_At(value::HydroTurbineGov) = value.At
"""Get [`HydroTurbineGov`](@ref) `D_T`."""
get_D_T(value::HydroTurbineGov) = value.D_T
"""Get [`HydroTurbineGov`](@ref) `q_nl`."""
get_q_nl(value::HydroTurbineGov) = value.q_nl
"""Get [`HydroTurbineGov`](@ref) `P_ref`."""
get_P_ref(value::HydroTurbineGov) = value.P_ref
"""Get [`HydroTurbineGov`](@ref) `ext`."""
get_ext(value::HydroTurbineGov) = value.ext
"""Get [`HydroTurbineGov`](@ref) `states`."""
get_states(value::HydroTurbineGov) = value.states
"""Get [`HydroTurbineGov`](@ref) `n_states`."""
get_n_states(value::HydroTurbineGov) = value.n_states
"""Get [`HydroTurbineGov`](@ref) `states_types`."""
get_states_types(value::HydroTurbineGov) = value.states_types
"""Get [`HydroTurbineGov`](@ref) `internal`."""
get_internal(value::HydroTurbineGov) = value.internal

"""Set [`HydroTurbineGov`](@ref) `R`."""
set_R!(value::HydroTurbineGov, val) = value.R = val
"""Set [`HydroTurbineGov`](@ref) `r`."""
set_r!(value::HydroTurbineGov, val) = value.r = val
"""Set [`HydroTurbineGov`](@ref) `Tr`."""
set_Tr!(value::HydroTurbineGov, val) = value.Tr = val
"""Set [`HydroTurbineGov`](@ref) `Tf`."""
set_Tf!(value::HydroTurbineGov, val) = value.Tf = val
"""Set [`HydroTurbineGov`](@ref) `Tg`."""
set_Tg!(value::HydroTurbineGov, val) = value.Tg = val
"""Set [`HydroTurbineGov`](@ref) `VELM`."""
set_VELM!(value::HydroTurbineGov, val) = value.VELM = val
"""Set [`HydroTurbineGov`](@ref) `gate_position_limits`."""
set_gate_position_limits!(value::HydroTurbineGov, val) = value.gate_position_limits = val
"""Set [`HydroTurbineGov`](@ref) `Tw`."""
set_Tw!(value::HydroTurbineGov, val) = value.Tw = val
"""Set [`HydroTurbineGov`](@ref) `At`."""
set_At!(value::HydroTurbineGov, val) = value.At = val
"""Set [`HydroTurbineGov`](@ref) `D_T`."""
set_D_T!(value::HydroTurbineGov, val) = value.D_T = val
"""Set [`HydroTurbineGov`](@ref) `q_nl`."""
set_q_nl!(value::HydroTurbineGov, val) = value.q_nl = val
"""Set [`HydroTurbineGov`](@ref) `P_ref`."""
set_P_ref!(value::HydroTurbineGov, val) = value.P_ref = val
"""Set [`HydroTurbineGov`](@ref) `ext`."""
set_ext!(value::HydroTurbineGov, val) = value.ext = val
"""Set [`HydroTurbineGov`](@ref) `states_types`."""
set_states_types!(value::HydroTurbineGov, val) = value.states_types = val


text:
const ReComp = Union{Real,Complex}
const StaticTuple{T,S,N} = NamedTuple{S, NTuple{N,T}}

# Thanks simeonshaub on https://discourse.julialang.org/t/namedtuples-with-constant-type/37977/2
struct DiffCheck{T<:ReComp, S, N} <: Number
    value::T
    der::StaticTuple{T,S,N} # maybe not the fastest structure

    function DiffCheck{T, S}(x::T, der::StaticTuple{T,S,N}) where {T<:ReComp, S, N}
        return new{T,S,N}(x, der)
    end

    function DiffCheck{T₁, S}(x::T₂, der::StaticTuple{T₃, S, N}) where {T₁<:ReComp, T₂,T₃<:Number, S, N}
        val_tuple = StaticTuple{T₁, S, N}(values(der))
        return new{T₁,S,N}(T₁(x), val_tuple)
    end

    #@generated function DiffCheck{T, S}(x::T) where {T<:ReComp, S}
    #	@assert( length(S)==1 )
    #	val_tuple = StaticTuple{T, S, 1}((one(T), ))
    #return	Expr(:call, Expr(:new, :(DiffCheck{$T, $S, 1})), :($T(x), $val_tuple))
    #return #:(new{$T,$S,1}

end

DiffCheck(x::T) where {T<:ReComp} = DiffCheck{T, ()}(x, StaticTuple{T, (), 0}(()))
DiffCheck{T₁}(x::T₂) where {T₁<:ReComp, T₂<:Number} = DiffCheck{T₁, ()}(T₁(x), StaticTuple{T₁, (), 0}(()))
DiffCheck{T₁}(x::T₂, y::Symbol) where {T₁<:ReComp, T₂<:Number} = DiffCheck{T₁, (y, )}(T₁(x), StaticTuple{T₁, (y, ), 1}((T₁(1),)))

# not possible to be generated, since y is only known at runtime
DiffCheck(x::T, y::Symbol) where {T<:ReComp} = DiffCheck{T, (y, )}(x, StaticTuple{T, (y, ), 1}((T(1),)))

function DiffCheck(x::T, y::Array{Symbol}) where {T<:ReComp}
    Z = Tuple(Set(y))
    N = length(Z)
    return DiffCheck{T, Z}(x, StaticTuple{T, Z, N}(Tuple(ones(T, N))))
end

DiffCheck{T₁}(x::T₂, y::Array{Symbol}) where {T₁<:ReComp, T₂<:Number} = DiffCheck(T₁(x), y)

DiffCheck{T}(x::DiffCheck{R, S, N}) where {R, T<:ReComp, S, N} = Base.convert(DiffCheck{T, S, N}, x)


text:
export iauAf2a
"""
Convert degrees, arcminutes, arcseconds to radians.

This function is part of the International Astronomical Union's
SOFA (Standards of Fundamental Astronomy) software collection.

Status:  support function.

Given:
    s         char    sign:  '-' = negative, otherwise positive
    ideg      int     degrees
    iamin     int     arcminutes
    asec      double  arcseconds

Returned:
    rad       double  angle in radians

Returned (function value):
    int status:  0 = OK
                 1 = ideg outside range 0-359
                 2 = iamin outside range 0-59
                 3 = asec outside range 0-59.999...
Notes:
    1. The result is computed even if any of the range checks fail.

    2. Negative ideg, iamin and/or asec produce a warning status, but
    the absolute value is used in the conversion.

    3. If there are multiple errors, the status value reflects only the
    first, the smallest taking precedence.

    This revision:  2013 June 18

SOFA release 2018-01-30

Copyright (C) 2018 IAU SOFA Board.  See notes at end.
"""
function iauAf2a(sign::Char, ideg::Int, iamin::Int, asec::Real)
    rad  = zeros(Float64, 1)

    status = ccall((:iauAf2a, libsofa_c), Cint,
        (Cchar, Cint, Cint, Cdouble, Ptr{Cdouble}),
        convert(UInt8, sign),
        convert(Int32, ideg),
        convert(Int32, iamin),
        convert(Float64, asec),
        rad)

    return status, rad[1]
end


text:
using GLVisualize, GeometryTypes, GLAbstraction, Colors, FileIO

if !isdefined(:runtests)
	window = glscreen()
end
const static_example = true

# loadasset is defined as `loadasset(name) = load(assetphat(name))`
# load comes from FileIO, which automatically detects the file format and loads it
# in general, load will try to load the mesh as is, which may return different
# meshtypes. This is why it's wrapped into GLNormalMesh, to guarantee some type
# stability.
# Formats supported are currently: obj, stl, ply, off and 2DM
msh = GLNormalMesh(loadasset("cat.obj"))
v = vertices(msh)
f = faces(msh)
colors = RGBA{Float32}[RGBA{Float32}(rand(), rand(), rand(), 0.5) for i=1:length(v)]

colored_mesh = GLNormalVertexcolorMesh(
    vertices=v, faces=f,
    color=colors
)

_view(visualize(colored_mesh, is_fully_opaque=false), window, camera=:perspective)
_view(visualize(msh, :lines, thickness=1f0), window, camera=:perspective)

if !isdefined(:runtests)
	@async renderloop(window)
end