static int bloch_jacobian(long int N, realtype t, N_Vector M, N_Vector fM, DlsMat J, void *user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { struct bloch_sim *bs = (struct bloch_sim*)user_data; int i; for (i=0; i < bs->num_cells; ++i) { realtype dw = bs->cell_frequencies[i] - bs->w_avg; realtype w_1 = bs->rf_on ? bs->w_1 : 0.0; XX(J,i) = -1 / bs->T_2; XY(J,i) = dw; XZ(J,i) = 0.0; YX(J,i) = -dw; YY(J,i) = -1 / bs->T_2; YZ(J,i) = w_1; ZX(J,i) = 0.0; ZY(J,i) = -w_1; ZZ(J,i) = -1 / bs->T_1; } return 0; }
std::string Ioss::Full_Tensor_12::label(int which, const char) const { assert(which > 0 && which <= component_count()); switch(which) { case 1: return XX(); case 2: return XY(); case 3: return YX(); default: return ""; } }
std::string Ioss::Matrix_33::label(int which, const char) const { assert(which > 0 && which <= component_count()); switch(which) { case 1: return XX(); case 2: return XY(); case 3: return XZ(); case 4: return YX(); case 5: return YY(); case 6: return YZ(); case 7: return ZX(); case 8: return ZY(); case 9: return ZZ(); default: return ""; } }