From 7afdf565224b06d422a639190a929c2373c8510e Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 25 Oct 2006 01:41:39 +0000 Subject: [PATCH] A few updates to the documentation git-svn-id: https://svn.dealii.org/trunk@14080 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe_tools.h | 91 +++++++++++++++++++++------ 1 file changed, 71 insertions(+), 20 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe_tools.h b/deal.II/deal.II/include/fe/fe_tools.h index a65857d06c..6e0a993778 100644 --- a/deal.II/deal.II/include/fe/fe_tools.h +++ b/deal.II/deal.II/include/fe/fe_tools.h @@ -64,9 +64,19 @@ class FETools { public: /** - * The base for factory objects - * creating finite elements of a - * given degree. + * A base class for factory + * objects creating finite + * elements of a given + * 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 FETools::add_fe_name() + * functions. * * @author Guido Kanschat, 2006 */ @@ -80,7 +90,8 @@ class FETools */ virtual FiniteElement* get (const unsigned int degree) const = 0; - /** + + /** * Virtual destructor doing * nothing but making the * compiler happy. @@ -89,10 +100,19 @@ class FETools }; /** - * The base for factory objects - * creating finite elements of a - * given degree. + * A concrete class for factory + * objects creating finite + * elements of a given degree. * + * The class's get() function + * generates a finite element + * object of the type given as + * template argument, and with + * the degree (however the finite + * element class wishes to + * interpret this number) given + * as argument to get(). + * * @author Guido Kanschat, 2006 */ template @@ -1011,20 +1031,51 @@ class FETools get_fe_from_name (const std::string &name); /** - * Adds the name of a finite - * element to be used by - * get_fe_from_name(). + * 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 later + * called with this name, it will + * use the object given as second + * argument to create a finite + * element object. * - * It is safe to use either the - * class name explicitly or to - * use the result of - * FiniteElement::get_name, since - * everything after the first - * non-name character will be - * chopped off. + * The format of the @p name + * parameter should include the + * name of a finite + * element. However, it is safe + * to use either the class name + * alone or to use the result of + * FiniteElement::get_name (which + * includes the space dimension + * as well as the polynomial + * degree), since everything + * after the first non-name + * character will be ignored. * + * In most cases, if you want + * objects of type + * MyFE be created + * whenever the name + * my_fe is given to + * get_fe_from_name, you will + * want the second argument to + * this function be of type + * FEFactory@, but you can + * of course create your custom + * finite element factory class. + * + * This function takes over + * ownership of the object given + * as second argument, i.e. you + * should never attempt to + * destroy it later on. The + * object will be deleted at the + * end of the program's lifetime. + * * If the name of the element - * already exists, an exception + * is already in use, an exception * is thrown. Thus, functionality * of get_fe_from_name() can only * be added, not changed. @@ -1042,8 +1093,8 @@ class FETools * new element. */ template - static void add_fe_name(const std::string& name, - const FEFactoryBase *factory); + static void add_fe_name (const std::string &name, + const FEFactoryBase *factory); /** * The string used for -- 2.39.5