7 #include <boost/function.hpp>
8 #include <boost/bind.hpp>
41 .description(
"Link to the solver discretizing the problem")
42 .pretty_name(
"Solver")
47 .description(
"Mesh the Discretization Method will be applied to")
52 options().add(Tags::physical_model(), m_physical_model)
53 .description(
"Physical model")
54 .pretty_name(
"Physical Model")
56 .link_to(&m_physical_model);
58 std::vector< common::URI > dummy;
59 options().add(Tags::regions(), dummy)
60 .description(
"Regions this action is applied to")
61 .pretty_name(
"Regions")
62 .attach_trigger ( boost::bind ( &Action::config_regions,
this ) )
76 "Physical Model not yet set for component " +
uri().
string() );
87 "Mesh not yet set for component " +
uri().
string() );
97 "Solver not yet set for component " +
uri().
string() );
102 const std::vector< Handle<Region> >& Action::regions()
const
104 return m_loop_regions;
108 void Action::config_regions()
111 m_loop_regions.clear();
113 const std::string regions_option_name(
"regions");
114 boost_foreach(
const common::URI region_uri, options().option(regions_option_name).value< std::vector<common::URI> >())
125 comp = access_component(region_uri);
131 "Could not find region with path [" + region_uri.
path() +
"]" );
135 m_loop_regions.push_back( region );
138 "Component [" + region_uri.
path() +
"] is not of type Region" );
146 void Action::on_regions_set()
std::string name(ComponentWrapper &self)
bool is_null(T ptr)
predicate for comparison to nullptr
#define boost_foreach
lowercase version of BOOST_FOREACH
common::URI uri(ComponentWrapper &self)
Handle< Component > access_component(const URI &path) const
Uniform Resource Identifier (see http://en.wikipedia.org/wiki/Uniform_Resource_Identifier) ...
Basic Classes for Mesh applications used by COOLFluiD.
tuple model
Global confifuration.
Top-level namespace for coolfluid.
Action(const std::string &name)
Component that executes an action. Implementation of the IAction interface as a component, exposing the execute function as a signal.
Handle< Component > handle()
Get a handle to the component.
bool is_not_null(T ptr)
predicate for comparison to nullptr