Hi all,

I used to the following to get the truth solution to see if my model works
correctly:

    rb_con.initialize_rb_construction();
    std::vector<Real> online_mu_vector(rb_con.get_n_params());
    for(unsigned int i=0; i<rb_con.get_n_params(); i++)
    {
        online_mu_vector[i] = infile("online_mu", online_mu_vector[i], i);
    }
    rb_con.set_current_parameters(online_mu_vector);
    rb_con.print_current_parameters();
    rb_con.truth_solve(-1);

    GMVIO gmv_io(mesh);
    gmv_io.write_subdomain_id_as_material() = true;
    gmv_io.write_equation_systems ("truth_sol.gmv",equation_systems);
    ExodusII_IO(mesh).write_equation_systems
("truth_sol.e",equation_systems);
    return 0;

But now it doesn't work since set_current_parameters is not supported.  It
looks like all parameter settings are done by RBParameters, and I guess I
need to call

    rb_con.set_parameters

, which takes RBParameters for its argument.  So I created an RBParameters
instance and pass it to set_parameters as follows:

    std::vector<Real> online_mu_vector(rb_con.get_n_params());
    for(unsigned int i=0; i<rb_con.get_n_params(); i++) {
        online_mu_vector[i] = infile("initial_parameters",
online_mu_vector[i], i);
    }
    RBParameters mu_init;
    mu_init.set_value("load_Fx",online_mu_vector[0]);
    mu_init.set_value("load_Fy",online_mu_vector[1]);
    rb_con.set_parameters(mu_init);

However, according to the print_info log, the parameter values are zeros,
which means the values are not set properly.

Number of parameters: 2
Parameter load_Fx: Min = -2, Max = 2, value = 0
Parameter load_Fy: Min = -2, Max = 2, value = 0

I wonder what I need to do to set the parameter values to just check the
truth solution.

K. Lee.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to