44 .description(
"Link to the solver discretizing the problem")
45 .pretty_name(
"Solver")
49 options().add(
"mesh", m_mesh)
50 .description(
"Mesh the Discretization Method will be applied to")
55 options().add(Tags::physical_model(), m_physical_model)
56 .description(
"Physical model")
57 .pretty_name(
"Physical Model")
59 .link_to(&m_physical_model);
61 std::vector< common::URI > dummy;
62 options().add(Tags::regions(), dummy)
63 .description(
"Regions this action is applied to")
64 .pretty_name(
"Regions")
65 .attach_trigger ( boost::bind ( &ActionDirector::config_regions,
this ) )
69 ActionDirector::~ActionDirector() {}
76 "Physical Model not yet set for component " +
uri().
string() );
77 return *m_physical_model;
85 "Mesh not yet set for component " +
uri().
string() );
94 "Solver not yet set for component " +
uri().
string() );
98 void ActionDirector::config_regions()
100 m_loop_regions.clear();
102 const std::string regions_option_name(
"regions");
103 boost_foreach(
const common::URI region_uri, options().option(regions_option_name).value< std::vector<common::URI> >())
114 comp = access_component(region_uri);
120 "Could not find region with path [" + region_uri.
path() +
"]" );
124 m_loop_regions.push_back( region );
127 "Component [" + region_uri.
path() +
"] is not of type Region" );
133 void ActionDirector::on_regions_set()
std::string name(ComponentWrapper &self)
bool is_null(T ptr)
predicate for comparison to nullptr
Safe pointer to an object. This is the supported method for referring to components.
Helper class to create the Builder and place it in the factory.
common::ComponentBuilder< solver::ActionDirector, common::ActionDirector, solver::LibSolver > SolverActionDirector_Builder
#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.
Top-level namespace for coolfluid.
ActionDirector(const std::string &name)
Handle< Component > handle()
Get a handle to the component.
Most basic kernel library.
bool is_not_null(T ptr)
predicate for comparison to nullptr