Lines Matching refs:coords
40 PetscErrorCode constant(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscS… in constant() argument
47 PetscErrorCode constantDer(PetscInt dim, PetscReal time, const PetscReal coords[], const PetscReal … in constantDer() argument
55 PetscErrorCode rt0(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscScalar… in rt0() argument
58 for (d = 0; d < dim; ++d) u[d] = 1.0 + coords[d]; in rt0()
62 PetscErrorCode rt0Der(PetscInt dim, PetscReal time, const PetscReal coords[], const PetscReal n[], … in rt0Der() argument
73 PetscErrorCode linear(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscSca… in linear() argument
76 for (d = 0; d < dim; ++d) u[d] = coords[d] + coords[dim - d - 1]; in linear()
79 PetscErrorCode linearDer(PetscInt dim, PetscReal time, const PetscReal coords[], const PetscReal n[… in linearDer() argument
90 PetscErrorCode rt1(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscScalar… in rt1() argument
93 …u[0] = 1.0 + coords[0] + coords[1] + coords[2] + coords[0] * coords[0] + coords[0] * coords[1] + c… in rt1()
94 …u[1] = 1.0 + coords[0] + coords[1] + coords[2] + coords[0] * coords[1] + coords[1] * coords[1] + c… in rt1()
95 …u[2] = 1.0 + coords[0] + coords[1] + coords[2] + coords[0] * coords[2] + coords[1] * coords[2] + c… in rt1()
97 u[0] = 1.0 + coords[0] + coords[1] + coords[0] * coords[0] + coords[0] * coords[1]; in rt1()
98 u[1] = 1.0 + coords[0] + coords[1] + coords[0] * coords[1] + coords[1] * coords[1]; in rt1()
103 PetscErrorCode rt1Der(PetscInt dim, PetscReal time, const PetscReal coords[], const PetscReal n[], … in rt1Der() argument
106 …u[0] = (1.0 + 2.0 * coords[0] + coords[1] + coords[2]) * n[0] + (1.0 + coords[0]) * n[1] + (1.0 + … in rt1Der()
107 …u[1] = (1.0 + coords[1]) * n[0] + (1.0 + coords[0] + 2.0 * coords[1] + coords[2]) * n[1] + (1.0 + … in rt1Der()
108 …u[2] = (1.0 + coords[2]) * n[0] + (1.0 + coords[2]) * n[1] + (1.0 + coords[0] + coords[1] + 2.0 * … in rt1Der()
110 u[0] = (1.0 + 2.0 * coords[0] + coords[1]) * n[0] + (1.0 + coords[0]) * n[1]; in rt1Der()
111 u[1] = (1.0 + coords[1]) * n[0] + (1.0 + coords[0] + 2.0 * coords[1]) * n[1]; in rt1Der()
117 PetscErrorCode quadratic(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, Petsc… in quadratic() argument
120 u[0] = coords[0] * coords[1]; in quadratic()
121 u[1] = coords[1] * coords[2]; in quadratic()
122 u[2] = coords[2] * coords[0]; in quadratic()
124 u[0] = coords[0] * coords[0]; in quadratic()
125 u[1] = coords[0] * coords[1]; in quadratic()
127 u[0] = coords[0] * coords[0]; in quadratic()
131 PetscErrorCode quadraticDer(PetscInt dim, PetscReal time, const PetscReal coords[], const PetscReal… in quadraticDer() argument
134 u[0] = coords[1] * n[0] + coords[0] * n[1]; in quadraticDer()
135 u[1] = coords[2] * n[1] + coords[1] * n[2]; in quadraticDer()
136 u[2] = coords[2] * n[0] + coords[0] * n[2]; in quadraticDer()
138 u[0] = 2.0 * coords[0] * n[0]; in quadraticDer()
139 u[1] = coords[1] * n[0] + coords[0] * n[1]; in quadraticDer()
141 u[0] = 2.0 * coords[0] * n[0]; in quadraticDer()
147 PetscErrorCode cubic(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscScal… in cubic() argument
150 u[0] = coords[0] * coords[0] * coords[1]; in cubic()
151 u[1] = coords[1] * coords[1] * coords[2]; in cubic()
152 u[2] = coords[2] * coords[2] * coords[0]; in cubic()
154 u[0] = coords[0] * coords[0] * coords[0]; in cubic()
155 u[1] = coords[0] * coords[0] * coords[1]; in cubic()
157 u[0] = coords[0] * coords[0] * coords[0]; in cubic()
161 PetscErrorCode cubicDer(PetscInt dim, PetscReal time, const PetscReal coords[], const PetscReal n[]… in cubicDer() argument
164 u[0] = 2.0 * coords[0] * coords[1] * n[0] + coords[0] * coords[0] * n[1]; in cubicDer()
165 u[1] = 2.0 * coords[1] * coords[2] * n[1] + coords[1] * coords[1] * n[2]; in cubicDer()
166 u[2] = 2.0 * coords[2] * coords[0] * n[2] + coords[2] * coords[2] * n[0]; in cubicDer()
168 u[0] = 3.0 * coords[0] * coords[0] * n[0]; in cubicDer()
169 u[1] = 2.0 * coords[0] * coords[1] * n[0] + coords[0] * coords[0] * n[1]; in cubicDer()
171 u[0] = 3.0 * coords[0] * coords[0] * n[0]; in cubicDer()
177 PetscErrorCode trig(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscScala… in trig() argument
180 for (d = 0; d < dim; ++d) u[d] = PetscTanhReal(coords[d] - 0.5); in trig()
183 PetscErrorCode trigDer(PetscInt dim, PetscReal time, const PetscReal coords[], const PetscReal n[],… in trigDer() argument
186 for (d = 0; d < dim; ++d) u[d] = 1.0 / PetscSqr(PetscCoshReal(coords[d] - 0.5)) * n[d]; in trigDer()
239 PetscScalar *coords; in TransformCoordinates() local
248 PetscCall(VecGetArray(coordinates, &coords)); in TransformCoordinates()
257 …r = PetscSqr(PetscRealPart(coords[off + 0])) + PetscSqr(PetscRealPart(coords[off + 1… in TransformCoordinates()
258 coords[off + 0] = r == 0.0 ? 0.0 : PetscPowReal(r, (1 - p) / (2 * p)) * coords[off + 0]; in TransformCoordinates()
259 coords[off + 1] = r == 0.0 ? 0.0 : PetscPowReal(r, (1 - p) / (2 * p)) * coords[off + 1]; in TransformCoordinates()
262 …r = PetscSqr(PetscRealPart(coords[off + 0])) + PetscSqr(PetscRealPart(coords[off + 1… in TransformCoordinates()
263 coords[off + 0] = r == 0.0 ? 0.0 : PetscPowReal(r, (1 - p) / (2 * p)) * coords[off + 0]; in TransformCoordinates()
264 coords[off + 1] = r == 0.0 ? 0.0 : PetscPowReal(r, (1 - p) / (2 * p)) * coords[off + 1]; in TransformCoordinates()
265 coords[off + 2] = coords[off + 2]; in TransformCoordinates()
269 PetscCall(VecRestoreArray(coordinates, &coords)); in TransformCoordinates()
276 PetscCall(VecGetArray(coordinates, &coords)); in TransformCoordinates()
285 coords[off + 0] = coords[off + 0] + m * coords[off + 1]; in TransformCoordinates()
286 coords[off + 1] = coords[off + 1]; in TransformCoordinates()
289 coords[off + 0] = coords[off + 0] + m * coords[off + 1] + m * coords[off + 2]; in TransformCoordinates()
290 coords[off + 1] = coords[off + 1] + m * coords[off + 2]; in TransformCoordinates()
291 coords[off + 2] = coords[off + 2]; in TransformCoordinates()
295 PetscCall(VecRestoreArray(coordinates, &coords)); in TransformCoordinates()