It is shown how the current density $\mathbf{J}(\mathbf{r},t)$ and magnetic induction $\mathbf{B}(\mathbf{r},t)$ in a superconductor with arbitrary shape and material laws $\mathbf{H}(\mathbf{B},\mathbf{r})$ (equilibrium field) and $\mathbf{E}(\mathbf{J},\mathbf{B},\mathbf{r})$ (electric field caused by flux-line motion) can be calculated within continuum approximation when a magnetic field ${\mathbf{B}}_{\mathbf{a}}(\mathbf{r},t)$ and/or current are applied. This general method is then used to calculate the geometric edge barrier for flux penetration, and Indenbom's current string occurring at the flux front, for superconducting strips with rectangular cross section in a perpendicular field. The field of first flux entry ${B}_{\mathrm{en}}$ is given. Both effects could not be obtained by previous theories which assume $\mathbf{H}=\mathbf{B}/{\ensuremath{\mu}}_{0}.$