24 template <
int dim,
int spacedim>
26 const std::string &default_name,
27 const std::string &default_component_names,
28 const unsigned int n_components) :
30 _n_components(n_components),
31 fe_name(default_name),
32 default_component_names(default_component_names)
38 template <
int dim,
int spacedim>
42 "Finite element space",
fe_name,
44 "The finite element space to use. For vector " 45 "finite elements use the notation " 46 "FESystem[FE_Q(2)^2-FE_DGP(1)] (e.g. Navier-Stokes). ");
55 "How to partition the finite element. This information can be used " 56 "to construct block matrices and vectors, as well as to create " 57 "names for solution vectors, or error tables. A repeated component " 58 "is interpreted as a vector field, with dimension equal to the " 59 "number of repetitions (up to 3). This is used in conjunction " 60 "with a ParsedFiniteElement class, to generate arbitrary " 61 "finite dimensional spaces.");
64 template <
int dim,
int spacedim>
68 return FETools::get_fe_by_name<dim,spacedim>(
fe_name);
72 template<
int dim,
int spacedim>
94 template<
int dim,
int spacedim>
101 template<
int dim,
int spacedim>
108 template<
int dim,
int spacedim>
115 template<
int dim,
int spacedim>
122 template<
int dim,
int spacedim>
128 template<
int dim,
int spacedim>
137 template<
int dim,
int spacedim>
146 return (*pos_it == var);
152 template class deal2lkit::ParsedFiniteElement<1,1>;
153 template class deal2lkit::ParsedFiniteElement<1,2>;
154 template class deal2lkit::ParsedFiniteElement<1,3>;
155 template class deal2lkit::ParsedFiniteElement<2,2>;
156 template class deal2lkit::ParsedFiniteElement<2,3>;
157 template class deal2lkit::ParsedFiniteElement<3,3>;
static const unsigned int invalid_unsigned_int
A parameter acceptor base class.
unsigned int get_first_occurence(const std::string &var) const
Return the first occurence of var in default_component_names.
static ParameterHandler prm
Static parameter.
std::string default_component_names
Default component names.
#define AssertThrow(cond, exc)
ParsedFiniteElement(const std::string &name="", const std::string &default_fe="FE_Q(1)", const std::string &default_component_names="u", const unsigned int n_components=0)
Constructor.
std::vector< std::string > block_names
The subdivision, in terms of block names.
virtual void declare_parameters(ParameterHandler &prm)
Declare possible parameters of this class.
unsigned int n_blocks() const
Return the number of blocks of the Finite Element, i.e., the number of variables. ...
virtual void parse_parameters_call_back()
Fill information about blocks after parsing the parameters.
const unsigned int _n_components
Number of components of this FiniteElement.
FiniteElement< dim, spacedim > * operator()() const
Return a shared pointer to a newly created Finite Element.
std::string get_block_names() const
Return the block names for this Finite Element.
#define Assert(cond, exc)
std::vector< unsigned int > component_blocks
The subdivision, in terms of component indices.
std::vector< unsigned int > get_component_blocks() const
Return the blocking of the components for this finite element.
bool is_vector(const std::string &var) const
unsigned int n_components() const
unsigned int n_components() const
Return the number of components of the Finite Element.
std::string print(const std::vector< Type > &list, const std::string sep=",")
Return a string containing the content of the vector, with elements separated by the @ sep parameter...
std::vector< std::string > split_string_list(const std::string &s, const char delimiter=',')
std::string get_component_names() const
Return the component names for this Finite Element.
void add_parameter(ParameterHandler &prm, T *parameter, const std::string &entry, const std::string &default_value, const Patterns::PatternBase &pattern=Patterns::Anything(), const std::string &documentation=std::string())
Add a parameter the given parameter list.
std::string fe_name
Finite Element Name.
static::ExceptionBase & ExcInternalError()
std::vector< std::string > component_names
Block names.