{'fraction_non_alphanumeric': 0.06592304800100263, 'fraction_numerical': 0.021890796674604168, 'mean_word_length': 3.6562925500875316, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Magnetostatic problems in fractal domains

We consider a magnetostatic problem in a 3D"cylindrical"domain of Koch type. We prove existence and uniqueness results for both the fractal and pre-fractal problems and we investigate the convergence of the pre-fractal solutions to the limit fractal one. We consider the numerical approximation of the pre-fractal problems via FEM and we prove a priori error estimates. Some numerical simulations are also shown. Our long term motivation includes studying problems that appear in quantum physics in fractal domains.


Introduction
The aim of this paper is to study a magnetostatic problem in a fractal domain. Trying to understand the magnetic properties of fractal structures is a new challenge from both the practical and theoretical point of view. In general mathematical physics on fractals is still a young subject, see [2][3][4][5][6] for some results; magnetic operators on fractal spaces have been studied only very recently, [23,25,26,29], as well as heat transfer across fractal layers or boundaries [8,12,13,24,32,33,35,44]. Our long term motivation includes a possibility to study non-quantized penetration of magnetic field in the vortex state of superconductors [18] in fractal domains. A mathematical theory of electrodynamics on domains with fractal boundary still has to be developed. Although many results are well known in the case of Lipschitz domains, see for instance [14, Chapter IX], for such fractal domains even the simplest models and effects have not yet been discussed. Our considerations here should be regarded as a preliminary step in a long term project, which aims to provide theoretical and numerical studies of related physical phenomena. We believe that, beyond their theoretical interest, such results may also be useful for the construction of concrete prototypes in industrial applications, which aim to maximize (or minimize) physical quantities such as the intensity of the magnetic vector field induced by a given current density.
In the present paper we consider a linear magnetostatic problem in a cylindrical threedimensional domain Q = Ω × I, where Ω is the two-dimensional snowflake domain with Koch-type boundary F and I is the unit interval. We consider the problem of finding a divergence free magnetic vector potential for given time-independent permeability and time-independent current density, and we assume that the magnetic induction vanishes outside Q. Using trace and extension techniques from [30] we establish a generalized Stokes formula, see Theorem 4.4. It involves generalized tangential traces that can be expressed as a limit of tangential traces along the boundaries of "polyhedral" approximations. We establish a Friedrichs inequality, Theorem 5.3, and establish existence and uniqueness of weak solutions, Theorem 5.4. For the numerical approximation, we restrict ourselves to the axial-symmetric case, which in turn brings us to solve the problem in the snowflake domain. We consider both the fractal and pre-fractal problems, which we denote with (P ) and (P n ) respectively. We prove existence and uniqueness of weak solutions (Propositions 6.1 and 6.3) and regularity results (Proposition 6.2). We show that, in a suitable sense, the pre-fractal solutions converge to the limit fractal one, see Theorem 6.4. We consider the numerical approximation of the pre-fractal problem (P n ) by a FEM scheme. To obtain an optimal a priori error estimate, we rely on the regularity of the weak solution of problem (P n ) in suitable weighted Sobolev spaces, see Theorem 7.1. Since the pre-fractal domain Ω n is not convex, the solution is not in H 2 (Ω n ), hence the rate of convergence is deteriorated. By using a suitable mesh constructed in [10], which is compliant with the so-called Grisvard conditions [21], we can prove optimal a priori error estimates. These conditions involve the weight exponent of the weak solution given in Theorem 7.1. We finally present numerical simulations, which describe the behavior of the magnetic field. It turns out that the intensity of the magnetic field increases as the length of the boundary approaches the "length" of F × I. We believe that this effect may be useful for potential applications.

Fractal domains
We write |P − P | to denote the Euclidean distance between two points P and P in R N . The Koch snowflake F ⊂ R 2 is the union F = 3 i=1 K (i) of three com-planar Koch curves K (1) , K (2) and K (3) , cf. [16], whose junction points A, B and C are the vertices of a regular triangle. We assume this triangle has unit side length, i.e. |A − B| = |A − C| = |B − C| = 1. The single Koch curve K (1) is the uniquely determined self-similar set with respect to a family Ψ 1 of four contractive similarities ψ 4 , all having contraction ratio 1 3 , see [16,17]. Let V (1) 0 We write i|n = (i 1 , i 2 , . . . , i n ) and V (1) denote the unit segment whose endpoints are A and B. We set K In a similar way, it is possible to approximate K (2) and K (3) by the sequences (V n , respectively. The Koch snowflake F itself is approximated by the sequence (F n ) n≥1 of "pre-fractal" closed polygonal curves F n , defined by

A 3D magnetostatics problem
We formulate a linear magnetostatic problem on the fractal domain Q. To deduce it and to explain its physical meaning we start by recalling Maxwell's equations for classical macroscopic electromagnetic fields. We assume that Q is made up from a linear material, i.e. in a material without any magnetization or polarization effects, and we assume it is dielectric, i.e. its conductivity can be neglected, see for instance [37, Section 1.2.1]. Then Ampère's law, curl(H) = J + ∂D ∂t , tells that the total magnetic field H induced around a closed loop equals the electric current plus the rate of change of the electric displacement field D enclosed by the loop, here J denotes the electric current density, i.e. the vector field describing the directed flow of electric charges. The corresponding magnetic induction is B = µH, where µ is a positive and bounded scalar function of space and time, called the permeability of the material. By Faraday's law of induction, curl(E) = − ∂B ∂t , the voltage induced in a closed loop equals the change of the enclosed magnetic field. Here E = 1 ε D, where ε is a positive and bounded scalar of space and time referred to as the permittivity of the material. These assumptions of µ and ε mean we model a inhomogeneous isotropic material, so practically Q may consist of a mixture of different materials whose electromagnetic properties may depend on the location in space but not on the direction of the fields. Gauss' law, div(D) = ρ, states that the electric flux leaving a volume equals the charge inside, here ρ ≥ 0 is the charge density. According to Gauss' law for magnetism, div(B) = 0, i.e. the magnetic flux through a closed surface is zero. We now make the following assumptions leading to a much simpler magnetostatic setup: • the permittivity ε = ε(x) and the permeability µ = µ(x) are time-independent; • the charge density is zero, ρ = 0; • the current density J ≡ J(x) is time-independent and real valued ; • the fields E ≡ E(x) and H ≡ H(x) are time-independent and real valued ; • all the fields vanish outside Q.
Our assumption that E vanishes in Q c means that the surrounding region Q c is a perfect conductor. When passing from one to another medium the parallel component of the electric field should be continuous, this can be seen by taking a small rectangular loop with long sides parallel to ∂Q, one inside Q, one outside and applying Faraday's law. Since the field vanishes outside Q this forces to impose what is referred to as the perfectly conducting boundary condition n × E = 0 on ∂Q.
Since B is divergence free, there exists a magnetic vector potential u = (u 1 , u 2 , u 3 ) such that B = curl(u), and we may choose it to be divergence free, div u = 0. Note that Gauss' law for magnetism then becomes trivial. Also B is supposed to be zero on Q c . Therefore, looking at the flux of the magnetic field through small closed loops on ∂Q, which should not differ for the interior and the exterior field, and applying the Kelvin-Stokes theorem, it follows that we should impose n × u = 0 on ∂Q. See for instance [20,Section 5.4.2] or [48, p. 82]. We now restrict attention to the magnetic field only and pose the following problem: Given µ and J as above, find a magnetic vector potential u that satisfies Note that if µ is constant then the first equation rewrites where ∆ vec denotes the vector Laplacian.

Trace theorems, Stokes formula and Gauss-Green identity
We discuss measures, function spaces and trace theorems. The latter allow rigorous definitions of boundary conditions and generalizations of classical integral formulas. We write B(P, r) = {P ∈ R N : |P − P | < r}, P ∈ R N , r > 0, for the euclidean ball of radius r centered at P . For the two-dimensional Lebesgue measure we write dx 1 dx 2 and for the three-dimensional one we write dx = dx 1 dx 2 dx 3 .
On the snowflake curve F = 3 i=1 K (i) we consider the finite Borel measure µ defined by with positive constants c 1 and c 2 . If we endow the cylindrical type surface S = F × I with the measure where dx 3 is one-dimensional Lebesgue measure on I, then clearly for all P ∈ S and r > 0. We equip the boundary ∂Q with the measure is the union of the two bases of the cylinder domain Q. In particular, supp µ ∂Q = ∂Q. From (4.1) and the quadratic scaling of the two-dimensional Lebesgue measure it follows that µ ∂Q (B(P, kr)) ≤ c 1 k D f +1 µ ∂Q (B(P, r)) and µ ∂Q (B(P, kr)) ≥ c 2 k 2 µ ∂Q (B(P, r)) (4.2) for all P ∈ ∂Q, r > 0, k ≥ 1 such that kr ≤ 1. We write L 2 (Q) and L 2 (Q n ) for the L 2 -spaces with respect to the three-dimensional Lebesgue measure, the spaces L 2 (Ω), L 2 (Ω n ), L 2 (∂Q n ) are taken with respect to the two-dimensional Lebesgue respectively Hausdorff measure (depending on whether considered in R 2 or R 3 ). For ∂Q we write L 2 (∂Q) = L 2 (Q, µ ∂Q ), the L 2 -space with respect to µ ∂Q . The spaces H α (R N ) = H α,2 (R N ) denote the usual Bessel potential spaces, see for instance [1] (where they are denoted by L α,2 (R N )). Given a domain O ⊂ R N , the notation H 1 (O) denotes the classical Sobolev space of square integrable functions with finite Dirichlet integral (usually denoted by W 1,2 (O)). Because we need to discuss boundary values for the fractal type boundary ∂Q of Q we quote a special case of a suitable trace theorem from [30]. For any [30, page 356]. Note that here we follow the notation of [30]; the spaces B 2,2 α (∂Q) should not be confused with the Besov spaces defined in [31] or [47]. We denote by |A| the Lebesgue measure of a subset A ⊂ R N . For f ∈ H α (G), we put at every point P ∈ G where the limit exists. This is a typical form of restriction operator in the spirit of Lebesgue differentiation.
(ii) There exists a linear and continuous operator Ext : Combined with trace and extension results between the spaces H 1 (R 3 ) and H 1 (Q), such as for instance [31, Chapter VII, Theorem 1, combined with Chapter VIII, Proposition 1], we obtain the following. For the restriction to ∂Q of a function f ∈ H 1 (Q) we write f | ∂Q . More classical trace and extension results cover the case of Lipschitz boundaries, such as the sets ∂Q n := S n ∪Ω n , whereΩ n := (Ω n × {0}) ∪ (Ω n × {1}). For the following result see [22,39].
on ∂Q n in the following sense: (i) γ 0 is a continuous and linear operator from As usual, we write H − 1 2 (∂Q n ) to denote the dual space of H 1 2 (∂Q n ), see [19, p. 8]. We pass to vector valued functions. Consider the space , it becomes a Hilbert space, see for instance [15,19] or [46]. We now prove a generalized vector Stokes formula. Suppose u ∈ H(curl, Q). For any v ∈B 2,2 1 (∂Q) 3 let w ∈ H 1 (Q) 3 be such that w| ∂Q = v, defined component-wise in the sense of Corollary 4.2, and consider the quantity (i) The map u → γ τ u is well defined as a bounded linear operator from H(curl, Q) into ((B 2,2 1 (∂Q)) ) 3 . By setting u × n| ∂Q := γ τ u we have for all u ∈ H(curl, Q) and v ∈B 2,2 1 (∂Q) 3 .
Formula (4.7) provides a suitable approximation of u × n| ∂Q in terms of the tangential traces u × n| ∂Qn along the Lipschitz boundaries ∂Q n , see [19,§2,Theorem 2.11] or [46]. In this sense u × n| ∂Q can be seen as a generalized tangential trace and (4.8) is a generalized Stokes formula.
Proof. Let u ∈ H(curl, Q). Given v ∈B 2,2 1 (∂Q) 3 , let w ∈ H 1 (Q) 3 be such that w| ∂Q = v inB 2,2 1 (∂Q) 3 . Then Cauchy-Schwarz together with the inclusion H 1 (Q) 3 ⊂ H(curl, Q) and Proposition 4.2 lead to the estimate This shows in particular, that γ τ u(v) is independent from the choice of the extension w of v, and that u × n is an element of ((B 2,2 1 (∂Q)) ) 3 which satisfies (4.6). We now consider the sequence of domains Q n = Ω n × I, which are bounded Lipschitz domains and satisfy Q n ⊂ Q n+1 and Q = ∞ n=1 Q n . By the vector Stokes formula for Lipschitz domains, cf. [19,§2,Theorem 2.11] or Appendix I in [46], together with the dominated convergence theorem, we have for all w ∈ H 1 (Q) 3 and n, where u × n| ∂Qn is defined as an element of H − 1 2 (∂Q n ) 3 .
Similarly as before formula (4.9) provides a suitable approximation of u · n| ∂Q by normal traces u · n| ∂Qn on the Lipschitz boundaries ∂Q n , which follows again from corresponding results in the Lipschitz case, [19, §2, Theorem 2.5].

Friedrichs inequality and weak solutions
We discuss (3.2) in terms of weak solutions and the Lax-Milgram Theorem, and to do so we introduce the symmetric bilinear form where, in agreement with the above assumptions, µ is a real valued measurable function on Q satisfying µ 0 ≤ µ ≤ µ 1 a.e. in Q with two constants µ 0 , µ 1 > 0. Given J ∈ L 2 (Q) 3 we consider the linear and continuous functional on H(curl, Q), defined by The interpretation as an identity in ((B 2,2 1 (∂Q)) ) 3 gives a rigorous meaning to the boundary condition u × n = 0 in (3.2). To encode it in a suitable function space, we consider the space H 0 (curl, Q), defined as the closure in H(curl, Q) of all compactly supported smooth vector fields C ∞ c (Q) 3 .
Remark 5.1. Taking into account the boundary condition in (3.2), the natural space would be Ker γ τ := {w ∈ H(curl, Q) : n×w = 0 on ∂Q}. The inclusion H 0 (curl, Q) ⊂ Ker γ τ follows from (4.8). The reverse inclusion is not straightforward, and to keep the present note simple we leave its investigation to a later forthcoming paper.
If we agree to say that a weak solution in H 0 (curl, Q) of the equation is a vector field u ∈ H 0 (curl, Q) such that a(u, v) = f (v) for all v ∈ H 0 (curl, Q), then test vector fields v can in particular be recruited from so that a weak solution of (P ) can only exist if J satisfies the compatibility condition Moreover, since we are also interested in the uniqueness of weak solutions, we restrict ourselves to the quotient space H 0 (curl, Q)/ Ker(curl, Q), which by a simple quadratic variational problem, [  3) A second requirement to be incorporated in the function spaces is that a solution u of (P ) should be divergence free. We consider the space H 0 (div, Q), defined as the completion in H(div, Q) of C ∞ c (Q) 3 , and its subspace Ker(div, Q) := {u ∈ H 0 (div, Q) : div u = 0}.
This discussion suggests that one possible way to phrase (P ) rigorously could be to look for a weak solution to equation (5.1) in the space H 0,⊥ (curl, Q) ∩ Ker(div, Q). The latter space admits a much simpler description. A proof of the following fact can be found at the end of this section. As a next step of simplification, the intersection of the spaces H 0 (curl, Q) and H 0 (div, Q) can be determined in a standard way, see [7,Theorem 2.5] or [19,Lemma 2.5]. As a by-product we obtain the following Friedrichs inequality, [45], sometimes also referred to as a Maxwell inequality, [40], which provides a suitable coercivity bound for our problem. As usual, H 1 0 (Q) denotes the closure of C ∞ c (Q) in H 1 (Q).
We say that u is a weak solution of (P ) if u ∈ H 1 0 (Q) 3 ∩ Ker(div, Q) and a(u, v) = f (v) for all v ∈ H 1 0 (Q) 3 ∩ Ker(div, Q). Existence and uniqueness of a solution are now easily seen from the Lax-Milgram Theorem (see [43]) together with Theorem 5.3.
Theorem 5.4. For any J ∈ L 2 (Q) 3 satisfying (5.2) there exists a unique weak solution u of problem (P). Moreover, there exists a positive constant C = C(Q, µ 0 , µ 1 ) such that The rest of this section is devoted to the proof of Proposition 5.2. The first observation follows from (4.10) by the same arguments as used to show [19, Theorem 2.6], we recall them for convenience. Let Ker γ ν := {w ∈ H(div, Q) : n · w = 0 on ∂Q}.
The second item is an adaption of [19,Theorem 2.7] about the complement of Ker(div, Q), seen as a closed subspace of L 2 (Q) 3 . Again we briefly recall the classical proof.
Adaptions of [19, Theorem 2.9 and Corollary 2.9] provide a suitable version of the classical fact that a curl free differentiable vector field in a simply connected domain is a gradient field. We interpret curl as an operator on L 2 (Q) 3 in the sense of distributions on Q.
Theorem 5.7. A vector u ∈ L 2 (Q) 3 satisfies curl u = 0 if and only if there exists a function q ∈ H 1 (Q)/R such that u = ∇q.
Proof. If u = ∇q with some q ∈ H 1 (Q) then clearly curl u = 0. Suppose u ∈ L 2 (Q) 3 is such that curl u = 0. Let u be the extension of u to R 3 by zero on Q c and let ( ε ) ε>0 ⊂ C ∞ c (R 3 ) be a standard mollifier. Then we have curl ε * u = ε * curl u and ε * u ∈ C ∞ c (R 3 ) 3 for any ε > 0, and lim ε→0 ε * u = u in L 2 (Q) 3 . Let (O n ) n be an increasing sequence of simply connected Lipschitz domains O n such that O n ⊂ Q for all n and Q = ∞ n=1 O n . Because the two-dimensional snowflake domain can be exhausted by increasing simply connected Lipschitz domains whose closures are contained in the snowflake domain, see for instance [24,Section 6], it follows easily that such a sequence (O n ) n exists. If now n is fixed and ε > 0 is small enough then x∈On B(x, ε) ⊂ Q and therefore curl ε * u = 0 in O n . Consequently there is a function q ε ∈ H 1 (O n ) such that ε * u = ∇q ε in O n . Since lim ε→0 ∇q ε = u ∈ L 2 (O n ) 3 , the limit q n := lim ε→0 q ε exists in H 1 (O n )/R, and clearly u = ∇q n in O n . Varying n, we have ∇q n = ∇q n+1 in O n , i.e. q n − q n+1 is constant on O n . We can choose these constants so that q n+1 = q n in O n for all n ≥ 1, and then consistently define q := q n on O n for all n ≥ 1 to obtain a function q with the desired properties.  We can now easily prove Proposition 5.2.

Weak solutions and Hölder regularity in 2D
We now reduce the three-dimensional problem (P ) to a magnetostatic problem in 2D. If J(x) = (0, 0, J(x 1 , x 2 )) and µ = µ(x 1 , x 2 ) then it is reasonable to assume that also the magnetic induction B does not depend on the x 3 coordinate. Therefore it is possible to choose a magnetic vector potential of form u = (0, 0, u(x 1 , x 2 )). Problem (P ) then reduces to finding a function u = u(x 1 , x 2 ) on Ω such that The energy form associated with (P ) is where as usual, H 1 0 (Ω) denotes the closure in H 1 (Ω) of the smooth functions with compact support in Ω. We recall some regularity results for the weak solution of problem (P ).
Here W 1,3 0 (Ω) and C 0,1/3 (Ω) denote respectively the usual Sobolev space and the space of Hölder continuous functions of exponent 1 3 , while ∇ 2 u denotes the Hessian of u. The statement ∇ 2 u ∈ L 2 (Ω, d) means that For the proof of Proposition 6.2 we refer to Theorem 1.3 (part B) and Proposition 7.1 in [41] (which is also related to [42]).
We now consider the approximating problems on the pre-fractal domains Ω n introduced in Section 2. Let us assume that µ is a positive constant and J ∈ L 2 (Ω). For every fixed n ∈ N, we consider the following problems (P n ): in Ω n , u n = 0 on ∂Ω n . . For every u n , v ∈ H 1 0 (Ω n ), let a n (u n , v) = Ωn 1 µ ∇u n ∇v dx be the energy form associated with problem (P n ).
Proposition 6.3. For every given J ∈ L 2 (Ω) there exists a unique weak solution u n ∈ H 1 0 (Ω n ) of problem (P n ).
The following result states the convergence of the pre-fractal solutions u n to the solution u of problem (P ) in a suitable sense. We recall that, for any compact subset E ⊂ Ω, its relative capacity with respect to Ω is defined by Theorem 6.4. Let u and u n be the solutions of problems (P ) and (P n ) respectively. Then u n strongly converges to u in H 1 0 (Ω) as n → ∞.
Proof. The result follows from [38] since Ω n is an increasing sequence of sets invading Ω and cap 2,Ω (Ω \ Ω n ) → 0 when n → ∞ for any compact subset Ω of Ω.

Numerical approximation in 2D
In this section we perform a numerical approximation of problem (P ) by a finite element method. For the sake of simplicity, we put µ = 1. Hence problem (P n ) reduces to the following form: in Ω n , u n = 0 on ∂Ω n . In order to obtain the optimal rate of convergence of the numerical scheme, we use the theory of regularity in weighted Sobolev spaces developed by Grisvard. Let us introduce the weighted Sobolev space where r = r(x) is the distance from the vertices of ∂Ω n whose angles are "reentrant". This space is endowed with the norm From Kondrat'ev results and Sobolev embedding theorem we deduce the following.
We point out that u n / ∈ H 2 (Ω n ) since it has a singular behavior in small neighborhoods of the reentrant corners of ∂Ω n . Hence we have to construct a suitable mesh compliant with the so-called Grisvard conditions [21] in order to obtain the optimal rate of convergence. We refer to [9] and [10], where such mesh algorithm was developed (see [11] for the case of fractal mixtures). We point out that this mesh algorithm produces a sequence of nested refinements. The mesh refinement process generates a conformal and regular family of triangulations {T n,h }, where h = max{diam(S), S ∈ T n,h } is the size of the triangulation, which is also compliant with the Grisvard conditions (see Section 5 in [10] for the case of interest). We define the finite dimensional space of piecewise linear functions X n,h := {v ∈ C 0 (Ω n ) : v| T ∈ P 1 ∀ T ∈ T n,h }.
We set V n,h := X n,h ∩ H 1 0 (Ω n ). Hence V n,h is a finite dimensional space of dimension N h = {number of inner nodes of T n,h }. The discrete approximation problem is the following: given J ∈ L 2 (Ω n ), find u n,h ∈ V n,h such that (∇u n,h , ∇v h ) L 2 (Ωn) = (J, v h ) L 2 (Ωn) ∀ v h ∈ V n,h . (7. 2) The existence and uniqueness of the semi-discrete solution u n,h ∈ V n,h of the variational problem (7.2) follows from the Lax-Milgram theorem (see e.g. [43]).
Theorem 7.2. Let u n be the solution of problem (P n ) and u n,h be the solution of the discrete problem (7.2). Then u n − u n,h 2 H 1 0 (Ωn) ≤ C h 2 J 2 L 2 (Ωn) , (7.3) where C is a suitable constant independent of h.
We now show some numerical simulations for problem (P n ). We choose the source J as follows: J(x 1 , x 2 ) = 10 5 e −0.5((x 1 −x 1 ) 2 +(x 2 −x 2 ) 2 )/0.1 , where (x 1 ,x 2 ) are the center coordinates of the domain. In our simulations, Ω 0 is the circle of radius 1 2 , while Ω n , n = 1, . . . , 5, are the domains having as boundary the n-th approximation of the Koch snowflake. We suppose that all the domains are centered at the same point. Denoting by u n the solution of problem (P n ), we define the vector u n = (0, 0, u n ) and we compute the magnetic field B generated by the current J := (0, 0, J(x 1 , x 2 )). In other words, B = curl u n = ∇ × u n . In the following table (Table 1), we write in the second column the value of the L ∞norm of B in Ω n , while in the third column we write the length (n) of the boundary ∂Ω n . In the first column, we write the domain we consider in the simulation. As one can notice from Table 1, the magnetic field increases as the length of the boundary of the domain increases.