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());
}
Esempio n. 2
0
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());
}
Esempio n. 3
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);
}
Esempio n. 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());
}
Esempio n. 5
0
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());
}
Esempio n. 6
0
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() );
}