29 #include "libmesh/composite_function.h"
30 #include "libmesh/composite_fem_function.h"
31 #include "libmesh/parsed_function.h"
32 #include "libmesh/parsed_fem_function.h"
33 #include "libmesh/zero_function.h"
34 #include "libmesh/const_fem_function.h"
38 template<
typename FunctionType>
39 libMesh::UniquePtr<FunctionType>
42 std::vector<std::string>& var_names,
43 const std::string& section )
45 libmesh_assert( !var_names.empty() );
48 libMesh::UniquePtr<FunctionType> all_funcs;
49 all_funcs.reset( this->build_composite_func().release() );
52 composite_type * composite_func =
53 libMesh::cast_ptr<composite_type *>(all_funcs.get());
60 std::set<std::string> vars_found;
61 this->check_for_vars(input,section,var_names,&vars_found);
63 for( std::vector<std::string>::const_iterator var = var_names.begin();
64 var < var_names.end(); ++var )
66 std::vector<VariableIndex> var_idx(1,system.variable_number(*var));
70 if( vars_found.find(*var) != vars_found.end() )
72 std::string expression = input(section+
"/"+(*var),
"DIE!");
74 composite_func->attach_subfunction
80 composite_func->attach_subfunction
Interface with libMesh for solving Multiphysics problems.
virtual libMesh::UniquePtr< FunctionType > build_func(const GetPot &input, MultiphysicsSystem &system, std::vector< std::string > &var_names, const std::string §ion)
Builds the Parsed(FEM)Function objects for boundary conditions.