* degree. Derived classes are called whenever one wants to have a
* transparent way to create a finite element object.
*
- * This class is used in the FETools::get_fe_from_name() and
+ * This class is used in the FETools::get_fe_by_name() and
* FETools::add_fe_name() functions.
*
* @author Guido Kanschat, 2006
/**
* Extend the list of finite elements that can be generated by
- * get_fe_from_name() by the one given as @p name. If get_fe_from_name() is
+ * get_fe_by_name() by the one given as @p name. If get_fe_by_name() is
* later called with this name, it will use the object given as second
* argument to create a finite element object.
*
* used anymore.
*
* In most cases, if you want objects of type <code>MyFE</code> be created
- * whenever the name <code>my_fe</code> is given to get_fe_from_name, you
+ * whenever the name <code>my_fe</code> is given to get_fe_by_name, you
* will want the second argument to this function be of type
* FEFactory@<MyFE@>, but you can of course create your custom finite
* element factory class.
* object will be deleted at the end of the program's lifetime.
*
* If the name of the element is already in use, an exception is thrown.
- * Thus, functionality of get_fe_from_name() can only be added, not changed.
+ * Thus, functionality of get_fe_by_name() can only be added, not changed.
*
* @note This function manipulates a global table (one table for each space
* dimension). It is thread safe in the sense that every access to this
const FEFactoryBase<dim,spacedim> *factory);
/**
- * The string used for get_fe_from_name() cannot be translated to a finite
+ * The string used for get_fe_by_name() cannot be translated to a finite
* element.
*
* Either the string is badly formatted or you are using a custom element
<< arg1 << "'.");
/**
- * The string used for get_fe_from_name() cannot be translated to a finite
+ * The string used for get_fe_by_name() cannot be translated to a finite
* element.
*
* Dimension arguments in finite element names should be avoided. If they
FE_ABF<dim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
FE_BDM<dim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
std::string
FE_Bernstein<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::string
FE_DGNedelec<dim, spacedim>::get_name () const
{
- // note that the
- // FETools::get_fe_from_name
- // function depends on the
+ // note that the FETools::get_fe_by_nam function depends on the
// particular format of the string
// this function returns, so they
// have to be kept in synch
FE_DGRaviartThomas<dim, spacedim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
FE_DGBDM<dim, spacedim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
std::string
FE_DGP<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in sync
FE_DGPMonomial<dim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
FE_DGPNonparametric<dim,spacedim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
std::string
FE_DGQ<dim, spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in sync
std::string
FE_DGQArbitraryNodes<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function does not work for
+ // note that the FETools::get_fe_by_name function does not work for
// FE_DGQArbitraryNodes since there is no initialization by a degree value.
std::ostringstream namebuf;
bool equidistant = true;
std::string
FE_FaceQ<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::ostringstream namebuf;
std::string
FE_FaceQ<1,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::ostringstream namebuf;
std::string
FE_FaceP<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::ostringstream namebuf;
std::string
FE_FaceP<1,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::ostringstream namebuf;
FE_Nedelec<dim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
std::string
FE_Q<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::string
FE_Q_Bubbles<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::string
FE_Q_DG0<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
FE_Q_Hierarchical<dim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
std::string
FE_Q_iso_Q1<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in sync
FE_RaviartThomas<dim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
FE_RaviartThomasNodal<dim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
FESystem<dim,spacedim>::get_name () const
{
// note that the
- // FETools::get_fe_from_name
+ // FETools::get_fe_by_name
// function depends on the
// particular format of the string
// this function returns, so they
static
Threads::Mutex fe_name_map_lock;
- // This is the map used by FETools::get_fe_from_name and
+ // This is the map used by FETools::get_fe_by_name and
// FETools::add_fe_name. It is only accessed by functions in this
// file, so it is safe to make it a static variable here. It must be
// static so that we can link several dimensions together.
// smarter?
template <int dim, int spacedim>
FiniteElement<dim,spacedim> *
- get_fe_from_name_ext (std::string &name,
- const std::map<std::string,
- std_cxx11::shared_ptr<const Subscriptor> >
- &fe_name_map)
+ get_fe_by_name_ext (std::string &name,
+ const std::map<std::string,
+ std_cxx11::shared_ptr<const Subscriptor> >
+ &fe_name_map)
{
// Extract the name of the
// finite element class, which only
// Now, the name of the
// first base element is
// first... Let's get it
- base_fes.push_back (get_fe_from_name_ext<dim,spacedim> (name,
- fe_name_map));
+ base_fes.push_back (get_fe_by_name_ext<dim,spacedim> (name,
+ fe_name_map));
// next check whether
// FESystem placed a
// multiplicity after
template <int dim,int spacedim>
- FiniteElement<dim,spacedim> *get_fe_from_name (std::string &name)
+ FiniteElement<dim,spacedim> *get_fe_by_name (std::string &name)
{
- return get_fe_from_name_ext<dim,spacedim> (name, fe_name_map[dim][spacedim]);
+ return get_fe_by_name_ext<dim,spacedim> (name, fe_name_map[dim][spacedim]);
}
}
}
try
{
- FiniteElement<dim,spacedim> *fe = internal::get_fe_from_name<dim,spacedim> (name);
+ FiniteElement<dim,spacedim> *fe = internal::get_fe_by_name<dim,spacedim> (name);
// Make sure the auxiliary function
// ate up all characters of the name.
template <int dim>
FiniteElement<dim> *
- get_fe_from_name (const std::string ¶meter_name)
+ get_fe_by_name (const std::string ¶meter_name)
{
return get_fe_by_name<dim,dim> (parameter_name);
}
template class FEFactoryBase<deal_II_dimension>;
template FiniteElement<deal_II_dimension> *
- get_fe_from_name<deal_II_dimension> (const std::string &);
+ get_fe_by_name<deal_II_dimension> (const std::string &);
template
void compute_node_matrix(
std::string
FE_TraceQ<dim,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::string
FE_TraceQ<1,spacedim>::get_name () const
{
- // note that the FETools::get_fe_from_name function depends on the
+ // note that the FETools::get_fe_by_name function depends on the
// particular format of the string this function returns, so they have to be
// kept in synch
std::ostringstream namebuf;
fe_name[template_starts+1] = '1';
}
std_cxx11::shared_ptr<FiniteElement<1> > fe_1d
- (FETools::get_fe_from_name<1>(fe_name));
+ (FETools::get_fe_by_name<1,1>(fe_name));
const FiniteElement<1> &fe = *fe_1d;
unsigned int n_child_dofs_1d = numbers::invalid_unsigned_int;
#include <deal.II/lac/sparsity_pattern.h>
// check
-// FETools::get_fe_from_name
+// FETools::get_fe_by_name
std::string output_file_name = "output";
// pretty good indication that the
// two FEs are actually the same
deallog << fe1.get_name();
- p1 = FETools::get_fe_from_name<dim> (fe1.get_name());
+ p1 = FETools::get_fe_by_name<dim, dim> (fe1.get_name());
AssertThrow (fe1.get_name() == p1->get_name(),
ExcInternalError());
deallog << " ok" << std::endl;
// same for fe2
deallog << fe2.get_name();
- p2 = FETools::get_fe_from_name<dim> (fe2.get_name());
+ p2 = FETools::get_fe_by_name<dim, dim> (fe2.get_name());
AssertThrow (fe2.get_name() == p2->get_name(),
ExcInternalError());
deallog << " ok" << std::endl;
#include <deal.II/lac/sparsity_pattern.h>
// check
-// FETools::get_fe_from_name
+// FETools::get_fe_by_name
// like fe_tools_09, but with the difference that we use the generic
// "<dim>" marker in the finite element name, instead of the one with
// the concrete dimension (see the documentation)
// pretty good indication that the
// two FEs are actually the same
deallog << modify_name<dim> (fe1.get_name());
- p1 = FETools::get_fe_from_name<dim> (modify_name<dim> (fe1.get_name()));
+ p1 = FETools::get_fe_by_name<dim, dim> (modify_name<dim> (fe1.get_name()));
AssertThrow (fe1.get_name() == p1->get_name(),
ExcInternalError());
deallog << " ok" << std::endl;
// same for fe2
deallog << modify_name<dim> (fe2.get_name());
- p2 = FETools::get_fe_from_name<dim> (modify_name<dim> (fe2.get_name()));
+ p2 = FETools::get_fe_by_name<dim, dim> (modify_name<dim> (fe2.get_name()));
AssertThrow (fe2.get_name() == p2->get_name(),
ExcInternalError());
deallog << " ok" << std::endl;
#include <deal.II/lac/sparsity_pattern.h>
// check
-// FETools::get_fe_from_name
+// FETools::get_fe_by_name
// like fe_tools_09 and fe_tools_10, but this time with no dimension
// marker at all (see the documentation)
// pretty good indication that the
// two FEs are actually the same
deallog << modify_name<dim> (fe1.get_name());
- p1 = FETools::get_fe_from_name<dim> (modify_name<dim> (fe1.get_name()));
+ p1 = FETools::get_fe_by_name<dim, dim> (modify_name<dim> (fe1.get_name()));
AssertThrow (fe1.get_name() == p1->get_name(),
ExcInternalError());
deallog << " ok" << std::endl;
// same for fe2
deallog << modify_name<dim> (fe2.get_name());
- p2 = FETools::get_fe_from_name<dim> (modify_name<dim> (fe2.get_name()));
+ p2 = FETools::get_fe_by_name<dim, dim> (modify_name<dim> (fe2.get_name()));
AssertThrow (fe2.get_name() == p2->get_name(),
ExcInternalError());
deallog << " ok" << std::endl;
template <int dim>
void test_fe(const char *name)
{
- FiniteElement<dim> *fe = FETools::get_fe_from_name<dim>(std::string(name));
+ FiniteElement<dim> *fe = FETools::get_fe_by_name<dim, dim>(std::string(name));
deallog << fe->get_name() << std::endl
<< '\t' << fe->dofs_per_cell
std::string fluid_fe_name = "FESystem[FE_Nothing()^2-FE_Nothing()^2-FE_Q(2)^2-FE_Q(1)-FE_Q(2)^2]";
hp::FECollection<dim> fe_collection;
- FiniteElement<dim> *solid_fe = FETools::get_fe_from_name<dim>(solid_fe_name);
- FiniteElement<dim> *fluid_fe = FETools::get_fe_from_name<dim>(fluid_fe_name);
+ FiniteElement<dim> *solid_fe = FETools::get_fe_by_name<dim, dim>(solid_fe_name);
+ FiniteElement<dim> *fluid_fe = FETools::get_fe_by_name<dim, dim>(fluid_fe_name);
deallog << "Solid FE Space: " << solid_fe->get_name() << std::endl;
deallog << "Fluid/Mesh FE Space: " << fluid_fe->get_name() << std::endl;