119 float sc1,
float sc2,
bool otherSolid,
120 float exStd =
gpNan(),
float exSliver =
gpNan()) {
122 if (sg >= 0.0f && snb >= 0.0f)
124 if (sg < 0.0f && otherSolid) {
131 th =
gpFinite(exStd) ? exStd : sn / (sn - sg);
138 th =
gpFinite(exSliver) ? exSliver : 1.0f + sg / (sg - sb);
140 th = th < lo ? lo : (th > 2.0f ? 2.0f : th);
143 const bool src1 = (sn >= 0.0f) && (sc1 >= 0.0f);
144 const bool src2 = (sf >= 0.0f) && (sc2 >= 0.0f);
160 f.w1 = (th - 1.0f) / th;
176 const float Cq[3][5],
int matrixOrder,
int rhsOrder,
177 const float* exStd =
nullptr,
const float* exSliver =
nullptr) {
182 const float nanv =
gpNan();
183 for (
int a = 0; a < 3; ++a) {
184 const bool solidM = F[a][1] < 0.0f;
185 const bool solidP = F[a][2] < 0.0f;
189 gpClassifyFace(F[a][1], F[a][2], F[a][3], F[a][0], Cq[a][1], Cq[a][3], Cq[a][4], solidP,
190 exStd ? exStd[2 * a + 1] : nanv, exSliver ? exSliver[2 * a + 1] : nanv);
194 gpClassifyFace(F[a][2], F[a][1], F[a][0], F[a][3], Cq[a][3], Cq[a][1], Cq[a][0], solidM,
195 exStd ? exStd[2 * a] : nanv, exSliver ? exSliver[2 * a] : nanv);
197 float wbcM[6], w1M[6], w2M[6];
198 for (
int k = 0; k < 6; ++k) {
199 const GpFace& f = faces[k];
204 wbcM[k] = w1M[k] = w2M[k] = 0.0f;
214 ov.cell(slot) = cellId;
215 ov.rescale(slot) = rho;
216 ov.coupled(slot) = anyPhi ? 1 : 0;
217 for (
int k = 0; k < 6; ++k) {
218 const GpFace& f = faces[k];
219 float wbc, w1, w2, D;
222 wbc = w1 = w2 = 0.0f;
223 ov.state(slot * 6 + k) = f.
state;
224 ov.th(slot * 6 + k) = f.
th;
225 ov.w_bc(slot * 6 + k) = wbc;
226 ov.w_n1(slot * 6 + k) = w1;
227 ov.w_n2(slot * 6 + k) = w2;
228 ov.wm_n1(slot * 6 + k) = w1M[k];
229 ov.wm_n2(slot * 6 + k) = w2M[k];