76 const TArray& cellVolume0 =
88 XArray& rCell =
dynamic_cast<XArray&
>(rField[cVarIndex]);
111 for(
int c=0; c<nCells; c++)
113 const T_Scalar rhoVHbydT2 = density[c]*cellVolume0[c]*thickness[c]/_dT2;
114 const T_Scalar rhobydT2 = density[c]/_dT2;
115 const T_Scalar rhoVH3by12dT2 = density[c]*cellVolume0[c]*
116 pow(thickness[c],three)/(twelve*_dT2);
117 rCell[c][0] += rhoVH3by12dT2*(two*x[c][0] - five*xN1[c][0] + four*xN2[c][0]
119 (diag[c])(0,0) += two*rhoVH3by12dT2;
120 rCell[c][1] += rhoVH3by12dT2*(two*x[c][1] - five*xN1[c][1] + four*xN2[c][1]
122 (diag[c])(1,1) += two*rhoVH3by12dT2;
123 rCell[c][2] += rhoVHbydT2*(two*x[c][2] - five*xN1[c][2] + four*xN2[c][2]
125 (diag[c])(2,2) += two*rhoVHbydT2;
132 for(
int c=0; c<nCells; c++)
134 const T_Scalar rhoVHbydT2 = density[c]*cellVolume0[c]*thickness[c]/_dT2;
135 const T_Scalar rhobydT2 = density[c]/_dT2;
136 const T_Scalar rhoVH3by12dT2 = density[c]*cellVolume0[c]*
137 pow(thickness[c],three)/(twelve*_dT2);
139 rCell[c][0] += rhoVH3by12dT2*(x[c][0]- two*xN1[c][0]
141 (diag[c])(0,0) += rhoVH3by12dT2;
142 rCell[c][1] += rhoVH3by12dT2*(x[c][1]- two*xN1[c][1]
144 (diag[c])(1,1) += rhoVH3by12dT2;
146 rCell[c][2] += rhoVHbydT2*(x[c][2]- two*xN1[c][2]
148 (diag[c])(2,2) += rhoVHbydT2;
161 T_Scalar c1 = (two*a*b*(pow(a,two)-pow(b,two))+two*b*(pow(b,two)-one)-two*a*(pow(a,two)-one))/
162 (a*b*(a-one)*(b-one)*(a-b));
163 T_Scalar c2 = -two*(a+b)/((a-1)*(b-1));
164 T_Scalar c3 = -two*(b+one)/(a*(a-b)*(a-one));
165 T_Scalar c4 = two*(a+one)/(b*(a-b)*(b-one));
167 for(
int c=0; c<nCells; c++)
169 const T_Scalar rhoVHbydT2 = density[c]*cellVolume0[c]*thickness[c]/_dT2;
170 const T_Scalar rhobydT2 = density[c]/_dT2;
171 const T_Scalar rhoVH3by12dT2 = density[c]*cellVolume0[c]*
172 pow(thickness[c],three)/(twelve*_dT2);
173 rCell[c][0] += rhoVH3by12dT2*(c1*x[c][0] + c2*xN1[c][0] + c3*xN2[c][0]
175 (diag[c])(0,0) += c1*rhoVH3by12dT2;
176 rCell[c][1] += rhoVH3by12dT2*(c1*x[c][1] + c2*xN1[c][1] + c3*xN2[c][1]
178 (diag[c])(1,1) += c1*rhoVH3by12dT2;
179 rCell[c][2] += rhoVHbydT2*(c1*x[c][2] + c2*xN1[c][2] + c3*xN2[c][2]
181 (diag[c])(2,2) += c1*rhoVHbydT2;
191 for(
int c=0; c<nCells; c++)
193 const T_Scalar rhoVHbydT2 = density[c]*cellVolume0[c]*thickness[c]/_dT2;
194 const T_Scalar rhobydT2 = density[c]/_dT2;
195 const T_Scalar rhoVH3by12dT2 = density[c]*cellVolume0[c]*
196 pow(thickness[c],three)/(twelve*_dT2);
198 rCell[c][0] += rhoVH3by12dT2*(c1*x[c][0] + c2*xN1[c][0]
200 (diag[c])(0,0) += c1*rhoVH3by12dT2;
201 rCell[c][1] += rhoVH3by12dT2*(c1*x[c][1] + c2*xN1[c][1]
203 (diag[c])(1,1) += c1*rhoVH3by12dT2;
205 rCell[c][2] += rhoVHbydT2*(c1*x[c][2] + c2*xN1[c][2]
207 (diag[c])(2,2) += c1*rhoVHbydT2;
Matrix & getMatrix(const Index &rowIndex, const Index &colIndex)
NumTypeTraits< X >::T_Scalar T_Scalar
bool hasArray(const StorageSite &s) const
const Field & _varN1Field
Field & _accelerationField
CRMatrix< Diag, OffDiag, X > CCMatrix
const Field & _varN3Field
pair< const Field *, const StorageSite * > ArrayIndex
const StorageSite & getCells() const
const Field & _densityField
const Field & _varN2Field
CCMatrix::DiagArray DiagArray
const bool _variableTimeStep
const Field & _thicknessField
const Field & _volume0Field