import numpy as nm

filename_mesh = 'my.mesh'

regions = {
    'Omega'       : ('all', {}),

    'Overground'  : ('nodes of group 84', {}),
    'Underground' : ('nodes of group 85', {}),
    'Brick'       : ('nodes of group 86', {}),

    'Top'         : ('nodes in (z >  0.9999)', {}),
    'Bottom'      : ('nodes in (z < -0.9999)', {}),
    'Right'       : ('nodes in (y >  0.9999)', {}),
    'Left'        : ('nodes in (y < -0.9999)', {}),
    'Far'         : ('nodes in (x >  0.9999)', {}),
    'Near'        : ('nodes in (x < -0.9999)', {}),
}

field_1 = {
    'name' : 'gravity',
    'dtype' : nm.float64,
    'shape' : (3,),
    'region' : 'Omega',
    'approx_order' : 1,
}

variables = {
    'G'       : ('unknown field',   'gravity',  0 ),
    'g'       : ('test field',      'gravity', 'G'),
}

ebcs = {
}

materials = {
    'm' : ({'rho': {
              'Overground':  1.0e-7,
              'Underground': 1.0e+0,
              'Brick':       1.0e+5
          }},
    ),
    'n' : ({'G' : 1.0 }, )
}

equations = {
    'Gravity' : """dw_div_grad.1.Omega( g, G ) = dw_volume_lvf.1.Omega( m.rho, g )""",
}

solvers = {
    'ls' : ('ls.scipy_direct', {}),
    'newton' : ('nls.newton', {
        'i_max'      : 1,
        'eps_a'      : 1e-10,
    }),
}

