61 double*
const sm,
double*
const ss)
63 size_t j, k, l, i, jl, ml, jr, ielem;
66 double test = -1.0E10;
70 for (i=0; i<77; i++) {
74 plogf(
" --- Subroutine elem_rearrange() called to ");
75 plogf(
"check stoich. coefficient matrix\n");
76 plogf(
" --- and to rearrange the element ordering once");
116 if (aw[ielem] != test) {
122 if (k == m_numElemConstraints) {
123 plogf(
"vcs_elem_rearrange::Shouldn't be here. Algorithm misfired.");
148 for (j = 0; j < ncomponents; ++j) {
158 for (j = 0; j < jl; ++j) {
160 for (i = 0; i < ncomponents; ++i) {
161 ss[j] += sm[i + jr*ncomponents] * sm[i + j*ncomponents];
169 for (j = 0; j < jl; ++j) {
170 for (l = 0; l < ncomponents; ++l) {
171 sm[l + jr*ncomponents] -= ss[j] * sm[l + j*ncomponents];
181 for (ml = 0; ml < ncomponents; ++ml) {
182 sa[jr] += SQUARE(sm[ml + jr*ncomponents]);
187 if (sa[jr] < 1.0e-6) {
208 std::swap(aw[jr], aw[k]);
216 }
while (jr < (ncomponents-1));
239 plogf(
"vcs_switch_elem_pos: ifunc = 0: inappropriate args: %d %d\n",