18 #ifndef LIBMESH_COMPOSITE_FEM_FUNCTION_H 19 #define LIBMESH_COMPOSITE_FEM_FUNCTION_H 42 template <
typename Output=Number>
73 const std::vector<unsigned int> & index_map)
75 const unsigned int subfunction_index =
82 unsigned int max_index =
83 *std::max_element(index_map.begin(), index_map.end());
90 for (std::size_t j=0; j != index_map.size(); ++j)
98 std::make_pair(subfunction_index, j);
104 const Real time = 0)
override 114 libmesh_assert_greater_equal (output.
size(),
126 for (
unsigned int j=0; j != temp.
size(); ++j)
148 virtual std::unique_ptr<FEMFunctionBase<Output>>
clone()
const override 153 return std::unique_ptr<FEMFunctionBase<Output>> (returnval);
180 #endif // LIBMESH_COMPOSITE_FEM_FUNCTION_H virtual unsigned int size() const override
const unsigned int invalid_uint
std::vector< std::pair< unsigned int, unsigned int > > reverse_index_map
void resize(const unsigned int n)
void attach_subfunction(const FEMFunctionBase< Output > &f, const std::vector< unsigned int > &index_map)
virtual std::unique_ptr< FEMFunctionBase< Output > > clone() const override
unsigned int n_components() const
virtual Output component(const FEMContext &c, unsigned int i, const Point &p, Real time) override
CompositeFEMFunction & operator=(CompositeFEMFunction &&)=default
std::vector< std::vector< unsigned int > > index_maps
FEMFunction which is a function of another function.
std::vector< std::unique_ptr< FEMFunctionBase< Output > > > subfunctions
virtual Output operator()(const FEMContext &c, const Point &p, const Real time=0) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CompositeFEMFunction()=default
unsigned int n_subfunctions() const
virtual ~CompositeFEMFunction()=default
virtual std::unique_ptr< FEMFunctionBase< Output > > clone() const =0
A geometric point in (x,y,z) space.
virtual void zero() override