Example #1
0
void PDE::signal_add_bc( common::SignalArgs& args )
{
  common::XML::SignalOptions opts(args);

  Handle<solver::BC> bc = add_bc( opts.value<std::string>("name"),
                                  opts.value<std::string>("type"),
                                  opts.value< std::vector< Handle<Component> > >("regions"));

  common::XML::SignalFrame reply = args.create_reply(uri());
  SignalOptions reply_options(reply);
  reply_options.add("created_component",bc->uri());

}
Example #2
0
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);
}
Example #3
0
void PDE::signal_add_term( common::SignalArgs& args )
{
  common::XML::SignalOptions opts(args);

  Handle<solver::Term> term = add_term( opts.value<std::string>("name"),
                                        opts.value<std::string>("type"),
                                        opts.value<std::string>("computer"));

  common::XML::SignalFrame reply = args.create_reply(uri());
  SignalOptions reply_options(reply);
  reply_options.add("created_component",term->uri());

}
Example #4
0
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 TimeStepComputer::signal_max_cfl( common::SignalArgs& node )
{
  SignalFrame reply = node.create_reply(uri());
  SignalOptions reply_options(reply);
  reply_options.add( "return_value", max_cfl() );
}