''' @author: [email protected] ''' import numpy as np import common_tools all_nodes_size = 13 random_seed = 47 rand = common_tools.gen_random_by_seed(random_seed) def gen_test_datas(): result = [gen_test_data(value_dimension) for value_dimension in [1, 1, 2, 2, 2, 3, 3, 3]] return result def gen_test_data(value_dimension): data = {} data['allNodesSize'] = all_nodes_size data['valueDimension'] = value_dimension; data['weight'] = rand.random() data['load'] = common_tools.gen_vector(value_dimension, rand) data['constitutiveLaw'] = common_tools.gen_constitutive(value_dimension, rand) (assembly_indes, test_shape_function, trial_shape_function) = gen_test_trial_shape_function(value_dimension) data['testShapeFunction'] = test_shape_function data['trialShapeFunction'] = trial_shape_function data['assemblyIndes'] = assembly_indes
''' @author: [email protected] ''' import numpy as np import common_tools all_nodes_size = 13 random_seed = 47 rand = common_tools.gen_random_by_seed(random_seed) def gen_test_datas(): result = [ gen_test_data(value_dimension) for value_dimension in [1, 1, 2, 2, 3, 3] ] return result def gen_test_data(value_dimension): data = {} data['allNodesSize'] = all_nodes_size data['valueDimension'] = value_dimension data['weight'] = rand.random() data['load'] = common_tools.gen_vector(value_dimension, rand) shape_func_nodes_num = rand.randint(1, all_nodes_size // 2) test_shape_function = common_tools.gen_matrix((1, shape_func_nodes_num),