예제 #1
0
파일: Z_MoM.py 프로젝트: max941126/Puma-EM
                 library_dirs = ['./code/MoM/'],
                 libraries = ['MoM','pthread'],
                 headers = ['<iostream>','<complex>','"Z_EJ_Z_HJ.h"'],
                 compiler = 'gcc',
                 extra_compile_args = ['-O3', '-pthread', '-w'])
    return Z_CFIE_J

if __name__=="__main__":
    path = './geo'
    targetName = 'sphere'
    f = 2.12e9
    write_geo(path, targetName, 'lc', c/f/9.1)
    write_geo(path, targetName, 'lx', 0.1)
    write_geo(path, targetName, 'ly', 0.1)
    write_geo(path, targetName, 'lz', 0.1)
    executeGmsh(path, targetName, 0)
    z_offset = 0.0
    targetDimensions_scaling_factor = 1.0
    languageForMeshConstruction = "Python"
    meshFormat = 'GMSH'
    meshFileTermination = '.msh'
    target_mesh = MeshClass(path, targetName, targetDimensions_scaling_factor, z_offset, languageForMeshConstruction, meshFormat, meshFileTermination)
    target_mesh.constructFromGmshFile()
    N_RWG = target_mesh.N_RWG

    w = 2. * pi * f
    eps_r = 1.
    mu_r = 1.
    TDS_APPROX = 0
    Z_s = 0.0
    list_of_test_edges_numbers = arange(N_RWG).astype('i')
예제 #2
0
    # and now the scaling tests
    parameter_values = [0.1, 0.11, 0.12]
    #parameter_values = [0.3, 0.4, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.2]
    res = resClass(parameter_values)
    for index in range(len(res.parameter_values)):
        fileName = os.path.join(params_simu.pathToTarget,
                                params_simu.targetName)
        write_geo(params_simu.pathToTarget, params_simu.targetName, 'lc',
                  c / params_simu.f / 10.)
        write_geo(params_simu.pathToTarget, params_simu.targetName, 'lx',
                  res.parameter_values[index])
        write_geo(params_simu.pathToTarget, params_simu.targetName, 'ly',
                  res.parameter_values[index])
        write_geo(params_simu.pathToTarget, params_simu.targetName, 'lz',
                  res.parameter_values[index])
        executeGmsh(params_simu.pathToTarget, params_simu.targetName, 0)
        targetDimensions_scaling_factor = 1.0

        target_mesh = MeshClass(params_simu.pathToTarget,
                                params_simu.targetName,
                                targetDimensions_scaling_factor,
                                params_simu.z_offset,
                                params_simu.languageForMeshConstruction)
        N_RWG = target_mesh.E
        sys.stdout.write("average edge length = %.5s" %
                         str(target_mesh.average_edge_length /
                             (c / params_simu.f)) + " lambdas \n")
        ## cubes computation
        target_mesh.cubes_data_computation(a)
        target_mesh.write_cubes()
        # target_MLFMA construction