void BoundaryConditions::signal_create_function_bc ( SignalArgs& node ) { SignalOptions options( node ); SignalFrame reply = node.create_reply(uri()); SignalOptions reply_options(reply); reply_options.add_option("created_component", add_function_bc(options.value<std::string>("region_name"), options.value<std::string>("variable_name"))->uri()); }
void LSSAction::signal_create_lss(SignalArgs& node) { SignalOptions options(node); LSS::System& lss = create_lss(options.option("matrix_builder").value<std::string>()); SignalFrame reply = node.create_reply(uri()); SignalOptions reply_options(reply); reply_options.add("created_component", lss.uri()); }
void VolumeIntegral::signal_integrate ( common::SignalArgs& node ) { common::XML::SignalOptions options( node ); Field& field = *options.value< Handle<Field> >("field"); std::vector< Handle<Region> > regions = options.value< std::vector<Handle<Region> > >("regions"); Real integral = integrate(field,regions); SignalFrame reply = node.create_reply(uri()); SignalOptions reply_options(reply); reply_options.add("return_value", integral); }
void Domain::signal_create_mesh ( common::SignalArgs& node ) { SignalOptions options( node ); std::string name ("mesh"); if( options.check("name") ) name = options.value<std::string>("name"); Mesh& created_component = *create_component<Mesh>(name); SignalFrame reply = node.create_reply(uri()); SignalOptions reply_options(reply); reply_options.add("created_component", created_component.uri()); }
void InitialConditions::signal_create_initial_condition ( SignalArgs& args ) { SignalOptions options( args ); std::string name = options.value<std::string>("name"); std::vector<URI> regions; if( options.check("regions") ) { regions = options.array<URI>("regions"); } else // if user did not specify, then use the whole topology (all regions) { regions = solver().options().option("regions").value< std::vector<common::URI> >(); } solver::Action& created_component = create_initial_condition(name,regions); SignalFrame reply = args.create_reply(uri()); SignalOptions reply_options(reply); reply_options.add_option("created_component", created_component.uri()); }
void TimeStepComputer::signal_max_cfl( common::SignalArgs& node ) { SignalFrame reply = node.create_reply(uri()); SignalOptions reply_options(reply); reply_options.add( "return_value", max_cfl() ); }