Lines Matching refs:normal
205 …t cdim, const PetscScalar coords[], const PetscReal p[], const PetscReal normal[], PetscBool *pos,… in DMPlexGetPlaneSimplexIntersection_Coords_Internal() argument
215 PetscReal mag = DMPlex_NormD_Internal(cdim, normal); in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
219 dp = DMPlex_DotRealD_Internal(cdim, normal, p); in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
225 d[v] = DMPlex_DotRealD_Internal(cdim, normal, c); in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
227 d[v] = DMPlex_DotRealD_Internal(cdim, normal, &coords[v * cdim]); in DMPlexGetPlaneSimplexIntersection_Coords_Internal()
269 …al(DM dm, PetscInt dim, PetscInt c, const PetscReal p[], const PetscReal normal[], PetscBool *pos,… in DMPlexGetPlaneSimplexIntersection_Internal() argument
284 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, coords, p, normal, pos,… in DMPlexGetPlaneSimplexIntersection_Internal()
290 …al(DM dm, PetscInt dim, PetscInt c, const PetscReal p[], const PetscReal normal[], PetscBool *pos,… in DMPlexGetPlaneQuadIntersection_Internal() argument
311 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneQuadIntersection_Internal()
314 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneQuadIntersection_Internal()
321 …al(DM dm, PetscInt dim, PetscInt c, const PetscReal p[], const PetscReal normal[], PetscBool *pos,… in DMPlexGetPlaneHexIntersection_Internal() argument
347 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneHexIntersection_Internal()
351 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneHexIntersection_Internal()
355 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneHexIntersection_Internal()
359 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneHexIntersection_Internal()
363 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneHexIntersection_Internal()
367 …PetscCall(DMPlexGetPlaneSimplexIntersection_Coords_Internal(dm, dim, cdim, tcoords, p, normal, pos… in DMPlexGetPlaneHexIntersection_Internal()
397 …section_Internal(DM dm, PetscInt c, const PetscReal p[], const PetscReal normal[], PetscBool *pos,… in DMPlexGetPlaneCellIntersection_Internal() argument
407 …PetscCall(DMPlexGetPlaneSimplexIntersection_Internal(dm, DMPolytopeTypeGetDim(ct), c, p, normal, p… in DMPlexGetPlaneCellIntersection_Internal()
410 …PetscCall(DMPlexGetPlaneQuadIntersection_Internal(dm, DMPolytopeTypeGetDim(ct), c, p, normal, pos,… in DMPlexGetPlaneCellIntersection_Internal()
413 …PetscCall(DMPlexGetPlaneHexIntersection_Internal(dm, DMPolytopeTypeGetDim(ct), c, p, normal, pos, … in DMPlexGetPlaneCellIntersection_Internal()
610 PetscReal normal[3]; in DMPlexLocatePoint_Hex_3D_Linear_Internal() local
620 normal[0] = v_i[1] * v_j[2] - v_i[2] * v_j[1]; in DMPlexLocatePoint_Hex_3D_Linear_Internal()
621 normal[1] = v_i[2] * v_j[0] - v_i[0] * v_j[2]; in DMPlexLocatePoint_Hex_3D_Linear_Internal()
622 normal[2] = v_i[0] * v_j[1] - v_i[1] * v_j[0]; in DMPlexLocatePoint_Hex_3D_Linear_Internal()
626 dot = normal[0] * pp[0] + normal[1] * pp[1] + normal[2] * pp[2]; in DMPlexLocatePoint_Hex_3D_Linear_Internal()
1020 PetscReal normal[9] = {1., 0., 0., 0., 1., 0., 0., 0., 1.}; in DMPlexComputeGridHash_Internal() local
1050 …PetscCall(DMPlexGetPlaneCellIntersection_Internal(dm, c, lp, &normal[d * 3], &lower[d], &lowerInt[… in DMPlexComputeGridHash_Internal()
1059 …if (cdim > 2) PetscCall(DMPlexGetPlaneCellIntersection_Internal(dm, c, up, &normal[3 * 2], &upper[… in DMPlexComputeGridHash_Internal()
1065 …if (cdim > 1) PetscCall(DMPlexGetPlaneCellIntersection_Internal(dm, c, up, &normal[3 * 1], &upper[… in DMPlexComputeGridHash_Internal()
1078 …PetscCall(DMPlexGetPlaneCellIntersection_Internal(dm, c, up, &normal[3 * 0], &upper[0], &upperInt[… in DMPlexComputeGridHash_Internal()
2642 …ernal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal normal[]) in DMPlexComputeGeometryFVM_0D_Internal() argument
2660 if (normal) { in DMPlexComputeGeometryFVM_0D_Internal()
2668 PetscCall(DMPlexComputeCellGeometryFVM(dm, support[0], NULL, normal, NULL)); in DMPlexComputeGeometryFVM_0D_Internal()
2673 for (d = 0; d < dof; d++) normal[d] -= PetscRealPart(coords[off + d]); in DMPlexComputeGeometryFVM_0D_Internal()
2679 norm = DMPlex_NormD_Internal(dim, normal); in DMPlexComputeGeometryFVM_0D_Internal()
2680 for (d = 0; d < dim; ++d) normal[d] /= (norm * sign); in DMPlexComputeGeometryFVM_0D_Internal()
2687 …ernal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal normal[]) in DMPlexComputeGeometryFVM_1D_Internal() argument
2701 if (normal) { in DMPlexComputeGeometryFVM_1D_Internal()
2706 normal[2] = 0.; /* fall through */ in DMPlexComputeGeometryFVM_1D_Internal()
2708 normal[0] = -PetscRealPart(coords[1] - coords[cdim + 1]); in DMPlexComputeGeometryFVM_1D_Internal()
2709 normal[1] = PetscRealPart(coords[0] - coords[cdim + 0]); in DMPlexComputeGeometryFVM_1D_Internal()
2712 normal[0] = 1.0; in DMPlexComputeGeometryFVM_1D_Internal()
2717 norm = DMPlex_NormD_Internal(cdim, normal); in DMPlexComputeGeometryFVM_1D_Internal()
2718 for (d = 0; d < cdim; ++d) normal[d] /= norm; in DMPlexComputeGeometryFVM_1D_Internal()
2730 …ernal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal normal[]) in DMPlexComputeGeometryFVM_2D_Internal() argument
2787 if (normal) in DMPlexComputeGeometryFVM_2D_Internal()
2788 for (d = 0; d < cdim; ++d) normal[d] = n[d]; in DMPlexComputeGeometryFVM_2D_Internal()
2795 …ernal(DM dm, PetscInt dim, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal normal[]) in DMPlexComputeGeometryFVM_3D_Internal() argument
2902 if (normal) in DMPlexComputeGeometryFVM_3D_Internal()
2903 for (d = 0; d < dim; ++d) normal[d] = 0.0; in DMPlexComputeGeometryFVM_3D_Internal()
2927 …puteCellGeometryFVM(DM dm, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal normal[]) in DMPlexComputeCellGeometryFVM() argument
2938 PetscCall(DMPlexComputeGeometryFVM_0D_Internal(dm, dim, cell, vol, centroid, normal)); in DMPlexComputeCellGeometryFVM()
2941 PetscCall(DMPlexComputeGeometryFVM_1D_Internal(dm, dim, cell, vol, centroid, normal)); in DMPlexComputeCellGeometryFVM()
2944 PetscCall(DMPlexComputeGeometryFVM_2D_Internal(dm, dim, cell, vol, centroid, normal)); in DMPlexComputeCellGeometryFVM()
2947 PetscCall(DMPlexComputeGeometryFVM_3D_Internal(dm, dim, cell, vol, centroid, normal)); in DMPlexComputeCellGeometryFVM()
3032 PetscCall(DMPlexComputeCellGeometryFVM(dm, f, &area, fg->centroid, fg->normal)); in DMPlexComputeGeometryFVM()
3033 for (d = 0; d < dim; ++d) fg->normal[d] *= area; in DMPlexComputeGeometryFVM()
3051 if (DMPlex_DotRealD_Internal(dim, fg->normal, v) < 0) { in DMPlexComputeGeometryFVM()
3052 for (d = 0; d < dim; ++d) fg->normal[d] = -fg->normal[d]; in DMPlexComputeGeometryFVM()
3054 if (DMPlex_DotRealD_Internal(dim, fg->normal, v) <= 0) { in DMPlexComputeGeometryFVM()
3055 …could not be fixed, normal (%g,%g) v (%g,%g)", f, (double)fg->normal[0], (double)fg->normal[1], (d… in DMPlexComputeGeometryFVM()
3056 …, normal (%g,%g,%g) v (%g,%g,%g)", f, (double)fg->normal[0], (double)fg->normal[1], (double)fg->no… in DMPlexComputeGeometryFVM()
3093 …a = DMPlex_DotRealD_Internal(dim, c2f, fg->normal) / DMPlex_DotRealD_Internal(dim, fg->normal, fg-… in DMPlexComputeGeometryFVM()
3095 DMPlex_WaxpyD_Internal(dim, 2 * a, fg->normal, ci->centroid, cg->centroid); in DMPlexComputeGeometryFVM()