Go to the documentation of this file.
   18 #ifndef LIBMESH_COMPOSITE_FEM_FUNCTION_H 
   19 #define LIBMESH_COMPOSITE_FEM_FUNCTION_H 
   22 #include "libmesh/dense_vector.h" 
   23 #include "libmesh/fem_function_base.h" 
   24 #include "libmesh/int_range.h" 
   25 #include "libmesh/libmesh.h" 
   26 #include "libmesh/point.h" 
   43 template <
typename Output=Number>
 
   74                            const std::vector<unsigned int> & index_map)
 
   76     const unsigned int subfunction_index =
 
   83     unsigned int max_index =
 
   84       *std::max_element(index_map.begin(), index_map.end());
 
   99           std::make_pair(subfunction_index, j);
 
  105                              const Real time = 0)
 override 
  115     libmesh_assert_greater_equal (output.
size(),
 
  149   virtual std::unique_ptr<FEMFunctionBase<Output>> 
clone()
 const override 
  154     return std::unique_ptr<FEMFunctionBase<Output>> (returnval);
 
  181 #endif // LIBMESH_COMPOSITE_FEM_FUNCTION_H 
  
virtual ~CompositeFEMFunction()=default
The subfunctions vector is automatically cleaned up.
 
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
 
unsigned int n_subfunctions() const
 
FEMFunctionBase is a base class from which users can derive in order to define "function-like" object...
 
virtual std::unique_ptr< FEMFunctionBase< Output > > clone() const =0
 
std::vector< std::unique_ptr< FEMFunctionBase< Output > > > subfunctions
 
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
 
The libMesh namespace provides an interface to certain functionality in the library.
 
virtual void zero() override
Set every element in the vector to 0.
 
std::vector< std::pair< unsigned int, unsigned int > > reverse_index_map
 
CompositeFEMFunction & operator=(CompositeFEMFunction &&)=default
 
virtual std::unique_ptr< FEMFunctionBase< Output > > clone() const override
 
std::vector< std::vector< unsigned int > > index_maps
 
FEMFunction which is a function of another function.
 
CompositeFEMFunction()=default
 
virtual Output component(const FEMContext &c, unsigned int i, const Point &p, Real time) override
 
A Point defines a location in LIBMESH_DIM dimensional Real space.
 
virtual unsigned int size() const override
 
void resize(const unsigned int n)
Resize the vector.
 
virtual Output operator()(const FEMContext &c, const Point &p, const Real time=0) override
 
void attach_subfunction(const FEMFunctionBase< Output > &f, const std::vector< unsigned int > &index_map)
Attach a new subfunction, along with a map from the indices of that subfunction to the indices of the...
 
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
This class provides all data required for a physics package (e.g.
 
unsigned int n_components() const