FEMClass`

By Edgar Camacho Cota
Universidad Nacional Autonoma de Mexico (UNAM)
ecc@mira.labvis.unam.mx
June 2000.

Example 5 :
Solve
D[ f[x,y], {x,2} ] + D[ f[x,y], {y,2} ] - 1 = 0,
f = 0 on x = 0, y = 0, y = 1
D[f,normalVector] = 1, x = 1

Needs["FEMClass`"]

Pre-Process

myMalla = 
      NewMalla[T3, {{1, 2, 5}, {5, 2, 3}, {5, 3, 4}, {1, 5, 4}}, {{0, 0}, {1, 
            0}, {1, 1}, {0, 1}, {(1/2), (1/2)}}]

Refinamela[myMalla]; Refinamela[myMalla];

GrafMalla[myMalla]

fm = Frontera[myMalla]

this problem are similar to previus problem, but in this, we stands for the nodes 37 and 41 the function value equal to cero.

argument  =  
      Flatten[{(g[D0, #1] == 0&)/@
            Union[Flatten[
                fm[[{1, 2, 3, 4, 9, 10, 11, 12, 13, 14, 15, 
                    16}]]]]}]

myRes = NewRestricciones[argument, {g}]

myCampo = NewCampoEF[T3C0, myMalla]

Principal Process

ao = CreaArgOmega[myCampo, myRes];

ag1 = CreaArgGama[myCampo, myRes, ao, fm];

ag1 = CreaArgGama[myCampo, myRes, ao, fm];

ag2 = 
      CreaArgGama[myCampo, myRes, ao, 
        fm[[{5, 6, 7, 8}]]];

ieo = 
      IntegralesElementalesOmega[myCampo, myRes, 
        ao, {(∂_x) #2 (∂_x) #1 + 
              (∂_y) #2 (∂_y) #1&}, {x, y}];

\(\(ieg1 = 
      IntegralesElementalesGama[myCampo, myRes, ag1, fm, 

        		{#1\ {∂\_x #2, ∂\_y #2}.NormalVector&}, {x, 
          y}]; \)\)

\(\(ieg2 = 
      IntegralesElementalesGama[myCampo, myRes, ag2, 
        fm[[{5, 6, 7, 8}]], 

        		{#1\ \(({∂\_x #2, ∂\_y #2}.NormalVector - 1)
                \)&}, {x, y}]; \)\)

ito = IntegralesTotales[ieo]; itg1 = IntegralesTotales[ieg1]; itg2 = IntegralesTotales[ieg2];

it = itg1 - ito + itg2;

si = SistemaIncompleto[it];

sc = SistemaCompleto[si, myRes];

s = 
      (FindRoot[sc, ##1]&)@@
        (Incognitas[myCampo, myRes] /. a_g -> {a, 1});

ColumnForm[s]

Post-Proceso

GrafCampo[myCampo, g, s]

Show[%, ViewPoint -> {-2.738, 0.268, 1.970}]