Lines Matching refs:ldx
112 static PetscErrorCode ComputeGamma(PetscInt d, PetscInt ldx, PetscScalar f[]) in ComputeGamma() argument
114 const PetscScalar fin[4] = {f[0 * ldx], f[1 * ldx], f[2 * ldx], f[3 * ldx]}; in ComputeGamma()
119 f[0 * ldx] = PETSC_i * fin[3]; in ComputeGamma()
120 f[1 * ldx] = PETSC_i * fin[2]; in ComputeGamma()
121 f[2 * ldx] = -PETSC_i * fin[1]; in ComputeGamma()
122 f[3 * ldx] = -PETSC_i * fin[0]; in ComputeGamma()
125 f[0 * ldx] = -fin[3]; in ComputeGamma()
126 f[1 * ldx] = fin[2]; in ComputeGamma()
127 f[2 * ldx] = fin[1]; in ComputeGamma()
128 f[3 * ldx] = -fin[0]; in ComputeGamma()
131 f[0 * ldx] = PETSC_i * fin[2]; in ComputeGamma()
132 f[1 * ldx] = -PETSC_i * fin[3]; in ComputeGamma()
133 f[2 * ldx] = -PETSC_i * fin[0]; in ComputeGamma()
134 f[3 * ldx] = PETSC_i * fin[1]; in ComputeGamma()
137 f[0 * ldx] = fin[2]; in ComputeGamma()
138 f[1 * ldx] = fin[3]; in ComputeGamma()
139 f[2 * ldx] = fin[0]; in ComputeGamma()
140 f[3 * ldx] = fin[1]; in ComputeGamma()
149 static PetscErrorCode ComputeGammaFactor(PetscInt d, PetscBool forward, PetscInt ldx, PetscScalar f… in ComputeGammaFactor() argument
152 const PetscScalar fin[4] = {f[0 * ldx], f[1 * ldx], f[2 * ldx], f[3 * ldx]}; in ComputeGammaFactor()
157 f[0 * ldx] += sign * PETSC_i * fin[3]; in ComputeGammaFactor()
158 f[1 * ldx] += sign * PETSC_i * fin[2]; in ComputeGammaFactor()
159 f[2 * ldx] += sign * -PETSC_i * fin[1]; in ComputeGammaFactor()
160 f[3 * ldx] += sign * -PETSC_i * fin[0]; in ComputeGammaFactor()
163 f[0 * ldx] += -sign * fin[3]; in ComputeGammaFactor()
164 f[1 * ldx] += sign * fin[2]; in ComputeGammaFactor()
165 f[2 * ldx] += sign * fin[1]; in ComputeGammaFactor()
166 f[3 * ldx] += -sign * fin[0]; in ComputeGammaFactor()
169 f[0 * ldx] += sign * PETSC_i * fin[2]; in ComputeGammaFactor()
170 f[1 * ldx] += sign * -PETSC_i * fin[3]; in ComputeGammaFactor()
171 f[2 * ldx] += sign * -PETSC_i * fin[0]; in ComputeGammaFactor()
172 f[3 * ldx] += sign * PETSC_i * fin[1]; in ComputeGammaFactor()
175 f[0 * ldx] += sign * fin[2]; in ComputeGammaFactor()
176 f[1 * ldx] += sign * fin[3]; in ComputeGammaFactor()
177 f[2 * ldx] += sign * fin[0]; in ComputeGammaFactor()
178 f[3 * ldx] += sign * fin[1]; in ComputeGammaFactor()
183 f[0 * ldx] *= 0.5; in ComputeGammaFactor()
184 f[1 * ldx] *= 0.5; in ComputeGammaFactor()
185 f[2 * ldx] *= 0.5; in ComputeGammaFactor()
186 f[3 * ldx] *= 0.5; in ComputeGammaFactor()