/**
* Select data from NamedData corresponding to the attached name.
*
- * Given a list of names to search for (provided by add()), objects of
- * this
+ * Given a list of names to search for (provided by add()), objects of this
* class provide an index list of the selected data.
*
* @author Guido Kanschat, 2009
/**
- * The number of names in this object. This function may be used
- * whether
+ * The number of names in this object. This function may be used whether
* initialize() was called before or not.
*/
unsigned int size() const;
/**
- * Return the corresponding index in the NamedData object supplied
- * to the
- * last initialize(). It is an error if initialize() has not been
- * called
+ * Return the corresponding index in the NamedData object supplied to the
+ * last initialize(). It is an error if initialize() has not been called
* before.
*
* Indices are in the same order as the calls to add().
std::vector<std::string> names;
/**
- * The index map generated by initialize() and accessed by
- * operator().
+ * The index map generated by initialize() and accessed by operator().
*/
std::vector<unsigned int> indices;
};
/**
- * An unary operator base class, intended to output the vectors in
- * AnyData in each step of an iteration.
+ * An unary operator base class, intended to output the vectors in AnyData
+ * in each step of an iteration.
*
* @author Guido Kanschat, 2010
*/
/**
* Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * object. This is not exact (but will usually be close) because
+ * calculating the memory usage of trees (e.g., <tt>std::map</tt>) is
+ * difficult.
*/
std::size_t memory_consumption () const;
/**
- * Base class describing common functionality between different output flags.
+ * Base class describing common functionality between different output
+ * flags.
*
* This is implemented with the "Curiously Recurring Template Pattern";
* derived classes use their own type to fill in the typename so that
- * <tt>memory_consumption</tt> works correctly. See the Wikipedia page on the
- * pattern for more information.
+ * <tt>memory_consumption</tt> works correctly. See the Wikipedia page on
+ * the pattern for more information.
*
* @ingroup output
*/
/**
* Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * object. This is not exact (but will usually be close) because
+ * calculating the memory usage of trees (e.g., <tt>std::map</tt>) is
+ * difficult.
*/
std::size_t memory_consumption () const;
};
/**
- * Set the flags to be used for output. This method expects <tt>flags</tt> to
- * be a member of one of the child classes of <tt>OutputFlagsBase</tt>.
+ * Set the flags to be used for output. This method expects <tt>flags</tt>
+ * to be a member of one of the child classes of <tt>OutputFlagsBase</tt>.
*/
template<typename FlagType>
void set_flags (const FlagType &flags);
void parse_parameters (ParameterHandler &prm);
/**
- * Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * Return an estimate for the memory consumption, in bytes, of this object.
+ * This is not exact (but will usually be close) because calculating the
+ * memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
*/
std::size_t memory_consumption () const;
/**
- * Declare an exception class derived from ExceptionBase that can take
- * one runtime argument, but if none is given in the place where you
- * want to throw the exception, it simply reverts to the default text
- * provided when declaring the exception class through this macro.
+ * Declare an exception class derived from ExceptionBase that can take one
+ * runtime argument, but if none is given in the place where you want to throw
+ * the exception, it simply reverts to the default text provided when
+ * declaring the exception class through this macro.
*
* @ingroup Exceptions
*/
static dealii::ExceptionBase& Exception0 ()
/**
- * Declare an exception class derived from ExceptionBase that can take
- * one runtime argument, but if none is given in the place where you
- * want to throw the exception, it simply reverts to the default text
- * provided when declaring the exception class through this macro.
+ * Declare an exception class derived from ExceptionBase that can take one
+ * runtime argument, but if none is given in the place where you want to throw
+ * the exception, it simply reverts to the default text provided when
+ * declaring the exception class through this macro.
*
* @ingroup Exceptions
*/
* of arithmetic operations that do not result from a division by zero (use
* ExcDivideByZero for those).
*
- * The exception uses std::complex as its argument to ensure that we can
- * use it for all scalar arguments (real or complex-valued).
+ * The exception uses std::complex as its argument to ensure that we can use
+ * it for all scalar arguments (real or complex-valued).
*/
DeclException1 (ExcNumberNotFinite,
std::complex<double>,
<< " nor to " << arg3);
/**
- * This exception indicates that an index is not within the
- * expected range. For example, it may be that you are trying to
- * access an element of a vector which does not exist.
+ * This exception indicates that an index is not within the expected range.
+ * For example, it may be that you are trying to access an element of a
+ * vector which does not exist.
*
* The constructor takes three <tt>int</tt> arguments, namely
* <ol>
""));
/**
- * This exception indicates that an index is not within the
- * expected range. For example, it may be that you are trying to
- * access an element of a vector which does not exist.
+ * This exception indicates that an index is not within the expected range.
+ * For example, it may be that you are trying to access an element of a
+ * vector which does not exist.
*
* The constructor takes three <tt>int</tt> arguments, namely
* <ol>
ExcIndexRange<types::global_dof_index>((index),0,(range)))
/**
- * An assertion that checks whether a number is finite or not.
- * We explicitly cast the number to std::complex to match
- * the signature of the exception (see there for an explanation
- * of why we use std::complex at all) and to satisfy the
- * fact that std::complex has no implicit conversions.
+ * An assertion that checks whether a number is finite or not. We explicitly
+ * cast the number to std::complex to match the signature of the exception
+ * (see there for an explanation of why we use std::complex at all) and to
+ * satisfy the fact that std::complex has no implicit conversions.
*
* @ingroup Exceptions
* @author Wolfgang Bangerth, 2015
std::vector<Vector<Number> > &values) const;
/**
- * Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * Return an estimate for the memory consumption, in bytes, of this object.
+ * This is not exact (but will usually be close) because calculating the
+ * memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
*/
std::size_t memory_consumption () const;
};
std::vector<Vector<Number> > &values) const;
/**
- * Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * Return an estimate for the memory consumption, in bytes, of this object.
+ * This is not exact (but will usually be close) because calculating the
+ * memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
*/
std::size_t memory_consumption () const;
const unsigned int component = 0) const;
/**
- * Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * Return an estimate for the memory consumption, in bytes, of this object.
+ * This is not exact (but will usually be close) because calculating the
+ * memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
*/
std::size_t memory_consumption () const;
/**
* Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * object. This is not exact (but will usually be close) because
+ * calculating the memory usage of trees (e.g., <tt>std::map</tt>) is
+ * difficult.
*/
std::size_t memory_consumption () const;
* described by a $dim$-tuple of exponents. Consequently, the class's
* constructor takes a Tensor<1,dim> to describe the set of exponents. Most
* of the time these exponents will of course be integers, but real
- * exponents are of course equally valid. Exponents can't be real when
- * the bases are negative numbers.
+ * exponents are of course equally valid. Exponents can't be real when the
+ * bases are negative numbers.
*
* @author Wolfgang Bangerth, 2006
*/
/**
* A class that represents a function object for a polynomial. A polynomial
* is composed by the summation of multiple monomials. If the polynomial has
- * n monomials and the dimension is equal to dim, the polynomial can be written as
- * $\sum_{i=1}^{n} a_{i}(\prod_{d=1}^{dim} x_{d}^{\alpha_{i,d}})$, where
- * $a_{i}$ are the coefficients of the monomials and $\alpha_{i,d}$ are their exponents.
- * The class's constructor takes a Table<2,double> to describe the set of
- * exponents and a Vector<double> to describe the set of coefficients.
+ * n monomials and the dimension is equal to dim, the polynomial can be
+ * written as $\sum_{i=1}^{n} a_{i}(\prod_{d=1}^{dim}
+ * x_{d}^{\alpha_{i,d}})$, where $a_{i}$ are the coefficients of the
+ * monomials and $\alpha_{i,d}$ are their exponents. The class's constructor
+ * takes a Table<2,double> to describe the set of exponents and a
+ * Vector<double> to describe the set of coefficients.
*
- * @author Ángel Rodríguez, 2015
+ * @author Ángel Rodríguez, 2015
*/
template <int dim>
class Polynomial : public Function<dim>
public:
/**
* Constructor. The coefficients and the exponents of the polynomial are
- * passed as arguments. The Table<2, double> exponents has a number of rows
- * equal to the number of monomials of the polynomial and a number of columns
- * equal to dim. The i-th row of the exponents table contains the
- * ${\alpha_{i,d}}$ exponents of the i-th monomial
- * $a_{i}\prod_{d=1}^{dim} x_{d}^{\alpha_{i,d}}$. The i-th element of the coefficients
- * vector contains the coefficient $a_{i}$ for the i-th monomial.
+ * passed as arguments. The Table<2, double> exponents has a number of
+ * rows equal to the number of monomials of the polynomial and a number of
+ * columns equal to dim. The i-th row of the exponents table contains the
+ * ${\alpha_{i,d}}$ exponents of the i-th monomial $a_{i}\prod_{d=1}^{dim}
+ * x_{d}^{\alpha_{i,d}}$. The i-th element of the coefficients vector
+ * contains the coefficient $a_{i}$ for the i-th monomial.
*/
Polynomial (const Table<2,double> &exponents,
const std::vector<double> &coefficients);
* computations which need only be done once for every new time. For example,
* if a time dependent function had a factor <tt>sin(t)</tt>, then it may be a
* reasonable choice to calculate this factor in a derived version of
- * set_time(), store it in a member variable and use that one rather
- * than computing it every time <tt>value()</tt>, <tt>value_list</tt> or
- * one of the other functions of class Function is called.
+ * set_time(), store it in a member variable and use that one rather than
+ * computing it every time <tt>value()</tt>, <tt>value_list</tt> or one of the
+ * other functions of class Function is called.
*
- * By default, the advance_time() function calls the set_time()
- * function with the new time, so it is sufficient in most cases to overload
- * only set_time() for computations as sketched out above.
+ * By default, the advance_time() function calls the set_time() function with
+ * the new time, so it is sufficient in most cases to overload only set_time()
+ * for computations as sketched out above.
*
* The constructor of this class takes an initial value for the time variable,
* which defaults to zero. Because a default value is given, none of the
* derived classes needs to take an initial value for the time variable if not
* needed.
*
- * @tparam Number The data type in which time values are to be
- * stored. This will, in almost all cases, simply be the default @p double,
- * but there are cases where one may want to store the time in a different
- * (and always scalar) type. An example would be an interval type that can
- * store a value as well as its uncertainty. Another example
- * would be a type that allows for Automatic Differentiation (see, for
- * example, the Sacado type used in step-33) and thereby can generate analytic
- * (temporal) derivatives of a function.
+ * @tparam Number The data type in which time values are to be stored. This
+ * will, in almost all cases, simply be the default @p double, but there are
+ * cases where one may want to store the time in a different (and always
+ * scalar) type. An example would be an interval type that can store a value
+ * as well as its uncertainty. Another example would be a type that allows for
+ * Automatic Differentiation (see, for example, the Sacado type used in
+ * step-33) and thereby can generate analytic (temporal) derivatives of a
+ * function.
*
*
* @ingroup functions
/**
- * Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * Return an estimate for the memory consumption, in bytes, of this object.
+ * This is not exact (but will usually be close) because calculating the
+ * memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
*/
std::size_t memory_consumption () const;
/**
* Determine the amount of memory consumed by a C-style string. The returned
- * value does not include the size of the pointer. This function only measures
- * up to (and including) the NUL byte; the underlying buffer may be larger.
+ * value does not include the size of the pointer. This function only
+ * measures up to (and including) the NUL byte; the underlying buffer may be
+ * larger.
*/
inline
std::size_t memory_consumption (const char *string);
/**
* Estimate the amount of memory (in bytes) occupied by a C-style array.
* Since in this library we do not usually store simple data elements like
- * <tt>double</tt>s in such arrays (but rather use <tt>std::vector</tt>s
- * or deal.II <tt>Vector</tt> objects), we do not provide specializations
- * like for the <tt>std::vector</tt> arrays, but always use the loop over
- * all elements.
+ * <tt>double</tt>s in such arrays (but rather use <tt>std::vector</tt>s or
+ * deal.II <tt>Vector</tt> objects), we do not provide specializations like
+ * for the <tt>std::vector</tt> arrays, but always use the loop over all
+ * elements.
*/
template <typename T, int N>
inline
static unsigned int n_threads ();
/**
- * Return an estimate for the memory consumption, in bytes, of this
- * object. This is not exact (but will usually be close) because calculating
- * the memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
+ * Return an estimate for the memory consumption, in bytes, of this object.
+ * This is not exact (but will usually be close) because calculating the
+ * memory usage of trees (e.g., <tt>std::map</tt>) is difficult.
*/
static std::size_t memory_consumption ();
/**
* Check whether a value is not a number.
*
- * This function uses either <code>std::isnan</code>,
- * <code>isnan</code>, or <code>_isnan</code>, whichever is
- * available on the system and returns the result.
+ * This function uses either <code>std::isnan</code>, <code>isnan</code>, or
+ * <code>_isnan</code>, whichever is available on the system and returns the
+ * result.
*
- * If none of the functions detecting NaN is available, this
- * function returns false.
+ * If none of the functions detecting NaN is available, this function
+ * returns false.
*/
bool is_nan (const double x);
namespace internal
{
/**
- * Helper struct to tell us if we can use SIMD instructions for the given @p
- * Number type.
+ * Helper struct to tell us if we can use SIMD instructions for the given
+ * @p Number type.
*/
template <typename Number>
struct EnableOpenMPSimdFor
const std::string &documentation = std::string());
/**
- * Create an alias for an existing entry. This provides a way to refer
- * to a parameter in the input file using an alternate name. The
- * alias will be in the current section, and the referenced entry needs
- * to be an existing entry in the current section.
+ * Create an alias for an existing entry. This provides a way to refer to a
+ * parameter in the input file using an alternate name. The alias will be in
+ * the current section, and the referenced entry needs to be an existing
+ * entry in the current section.
*
* The primary purpose of this function is to allow for a backward
- * compatible way of changing names in input files of applications
- * for which backward compatibility is important. This can be
- * achieved by changing the name of the parameter in the call to
- * declare_entry(), and then creating an alias that maps the old
- * name to the new name. This way, old input files can continue
- * to refer to parameters under the old name, and they will
- * automatically be mapped to the new parameter name.
+ * compatible way of changing names in input files of applications for which
+ * backward compatibility is important. This can be achieved by changing the
+ * name of the parameter in the call to declare_entry(), and then creating
+ * an alias that maps the old name to the new name. This way, old input
+ * files can continue to refer to parameters under the old name, and they
+ * will automatically be mapped to the new parameter name.
*
* It is valid to set the same parameter multiple times in an input file.
- * The value that will ultimately be chosen in such
- * cases is simply the last value set. This rule also applies to
- * aliases, where the final value of a parameter is the last value
- * set either through the current name of the parameter or through
- * any of its possible multiple aliases. For example, if you have
- * an input file that looks like
+ * The value that will ultimately be chosen in such cases is simply the last
+ * value set. This rule also applies to aliases, where the final value of a
+ * parameter is the last value set either through the current name of the
+ * parameter or through any of its possible multiple aliases. For example,
+ * if you have an input file that looks like
* @code
* set parm1 = 1
* set parm1_alias = 2
* @code
* prm.declare_alias ("parm1", "parm1_alias");
* @endcode
- * then the final value for the parameter called <code>parm1</code>
- * will be 2, not 1.
+ * then the final value for the parameter called <code>parm1</code> will be
+ * 2, not 1.
*
- * @param existing_entry_name The name of an existing parameter
- * in the current section that the alias should refer to.
- * @param alias_name An alternate name for the parameter referenced
- * by the first argument.
- * @param alias_is_deprecated If true, mark the alias as deprecated.
- * This will then be listed in the description of the alias if you call
- * print_parameters(), and you will get a warning on the screen
- * when reading an input file that contains this deprecated alias.
- * The purpose of this argument is to be able to allow the use of
- * an old name for a parameter (see above) but make it clear that
- * this old name will eventually be removed.
+ * @param existing_entry_name The name of an existing parameter in the
+ * current section that the alias should refer to.
+ * @param alias_name An alternate name for the parameter referenced by the
+ * first argument.
+ * @param alias_is_deprecated If true, mark the alias as deprecated. This
+ * will then be listed in the description of the alias if you call
+ * print_parameters(), and you will get a warning on the screen when reading
+ * an input file that contains this deprecated alias. The purpose of this
+ * argument is to be able to allow the use of an old name for a parameter
+ * (see above) but make it clear that this old name will eventually be
+ * removed.
*/
void declare_alias (const std::string &existing_entry_name,
const std::string &alias_name,
* present object and the indices of the argument, and the result is a
* tensor of rank 2.
*
- * Note that the multiplication operator for symmetric tensors is defined
- * to be a double contraction over two indices, while it is defined as a
- * single contraction over only one index for regular <tt>Tensor</tt>
- * objects. For symmetric tensors it therefore acts in a way that is
- * commonly denoted by a "colon multiplication" in the mathematical
- * literature.
+ * Note that the multiplication operator for symmetric tensors is defined to
+ * be a double contraction over two indices, while it is defined as a single
+ * contraction over only one index for regular <tt>Tensor</tt> objects. For
+ * symmetric tensors it therefore acts in a way that is commonly denoted by
+ * a "colon multiplication" in the mathematical literature.
*
* There are global functions <tt>double_contract</tt> that do the same work
* as this operator, but rather than returning the result as a return value,
/**
* Reset all values to zero.
*
- * Note that this is partly inconsistent with the semantics of the @p clear()
- * member functions of the standard library containers and of several other
- * classes within deal.II, which not only reset the values of stored elements
- * to zero, but release all memory and return the object into a virginial
- * state. However, since the size of objects of the present type is determined
- * by its template parameters, resizing is not an option, and indeed the state
- * where all elements have a zero value is the state right after construction
- * of such an object.
+ * Note that this is partly inconsistent with the semantics of the @p
+ * clear() member functions of the standard library containers and of
+ * several other classes within deal.II, which not only reset the values of
+ * stored elements to zero, but release all memory and return the object
+ * into a virginial state. However, since the size of objects of the present
+ * type is determined by its template parameters, resizing is not an option,
+ * and indeed the state where all elements have a zero value is the state
+ * right after construction of such an object.
*/
void clear ();
void clear ();
/**
- * Remove all values added at the current row. This is useful when,
- * for example, a time-step is rejected and all data recorded about
- * it needs to be discarded.
- */
+ * Remove all values added at the current row. This is useful when, for
+ * example, a time-step is rejected and all data recorded about it needs to
+ * be discarded.
+ */
void clear_current_row ();
/**
- * Read or write the data of this object to or from a stream for the purpose
- * of serialization.
- */
+ * Read or write the data of this object to or from a stream for the purpose
+ * of serialization.
+ */
template <class Archive>
void serialize(Archive &ar, const unsigned int version);
/**
* Reset all values to zero.
*
- * Note that this is partly inconsistent with the semantics of the @p clear()
- * member functions of the standard library containers and of several other
- * classes within deal.II, which not only reset the values of stored elements
- * to zero, but release all memory and return the object into a virginial
- * state. However, since the size of objects of the present type is determined
- * by its template parameters, resizing is not an option, and indeed the state
- * where all elements have a zero value is the state right after construction
- * of such an object.
+ * Note that this is partly inconsistent with the semantics of the @p
+ * clear() member functions of the standard library containers and of
+ * several other classes within deal.II, which not only reset the values of
+ * stored elements to zero, but release all memory and return the object
+ * into a virginial state. However, since the size of objects of the present
+ * type is determined by its template parameters, resizing is not an option,
+ * and indeed the state where all elements have a zero value is the state
+ * right after construction of such an object.
*/
void clear ();
/**
* Reset all values to zero.
*
- * Note that this is partly inconsistent with the semantics of the @p clear()
- * member functions of the standard library containers and of several other
- * classes within deal.II, which not only reset the values of stored elements
- * to zero, but release all memory and return the object into a virginial
- * state. However, since the size of objects of the present type is determined
- * by its template parameters, resizing is not an option, and indeed the state
- * where all elements have a zero value is the state right after construction
- * of such an object.
+ * Note that this is partly inconsistent with the semantics of the @p
+ * clear() member functions of the standard library containers and of
+ * several other classes within deal.II, which not only reset the values of
+ * stored elements to zero, but release all memory and return the object
+ * into a virginial state. However, since the size of objects of the present
+ * type is determined by its template parameters, resizing is not an option,
+ * and indeed the state where all elements have a zero value is the state
+ * right after construction of such an object.
*/
void clear ();
/**
* Reset all values to zero.
*
- * Note that this is partly inconsistent with the semantics of the @p clear()
- * member functions of the standard library containers and of several other
- * classes within deal.II, which not only reset the values of stored elements
- * to zero, but release all memory and return the object into a virginial
- * state. However, since the size of objects of the present type is determined
- * by its template parameters, resizing is not an option, and indeed the state
- * where all elements have a zero value is the state right after construction
- * of such an object.
+ * Note that this is partly inconsistent with the semantics of the @p
+ * clear() member functions of the standard library containers and of
+ * several other classes within deal.II, which not only reset the values of
+ * stored elements to zero, but release all memory and return the object
+ * into a virginial state. However, since the size of objects of the present
+ * type is determined by its template parameters, resizing is not an option,
+ * and indeed the state where all elements have a zero value is the state
+ * right after construction of such an object.
*/
void clear ();
/**
* Given a string that contains text separated by a @p delimiter, split it
* into its components; for each component, remove leading and trailing
- * spaces. The default value of the delimiter is a comma, so that the function
- * splits comma separated lists of strings.
+ * spaces. The default value of the delimiter is a comma, so that the
+ * function splits comma separated lists of strings.
*
- * To make data input from tables simpler, if the input string ends in
- * a delimiter (possibly followed by an arbitrary amount of whitespace),
- * then this last delimiter is ignored. For example,
+ * To make data input from tables simpler, if the input string ends in a
+ * delimiter (possibly followed by an arbitrary amount of whitespace), then
+ * this last delimiter is ignored. For example,
* @code
* Utilities::split_string_list("abc; def; ghi; ", ';');
* @endcode
* @code
* Utilities::split_string_list(" ; ", ';');
* @endcode
- * yields a one-element list. Because of the trimming of
- * whitespace, the single element is the empty string.
+ * yields a one-element list. Because of the trimming of whitespace, the
+ * single element is the empty string.
*
* This function can digest the case that the delimiter is a space. In this
* case, it returns all words in the string. Combined with the rules above,
* @code
* Utilities::split_string_list("abc def ghi ", ' ');
* @endcode
- * yields again the 3-element list of output <code>{"abc","def","ghi"}</code>
- * from above despite the presence of space at the end of the string.
- * Furthermore,
+ * yields again the 3-element list of output
+ * <code>{"abc","def","ghi"}</code> from above despite the presence of space
+ * at the end of the string. Furthermore,
* @code
* Utilities::split_string_list(" ", ' ');
* @endcode
* Generate a random number from a normalized Gaussian probability
* distribution centered around @p a and with standard deviation @p sigma.
*
- * This function is reentrant, i.e., it can safely be called from
- * multiple threads at the same time. In addition, each thread will
- * get the same sequence of numbers every time. On the other hand,
- * if you run Threads::Task objects via the Threading Building
- * Blocks, then tasks will be assigned to mostly random threads, and
- * may get a different sequence of random numbers in different runs
- * of the program, since a previous task may already have consumed
- * the first few random numbers generated for the thread you're
- * on. If this is a problem, you need to create your own random
- * number generator objects every time you want to start from a
+ * This function is reentrant, i.e., it can safely be called from multiple
+ * threads at the same time. In addition, each thread will get the same
+ * sequence of numbers every time. On the other hand, if you run
+ * Threads::Task objects via the Threading Building Blocks, then tasks will
+ * be assigned to mostly random threads, and may get a different sequence of
+ * random numbers in different runs of the program, since a previous task
+ * may already have consumed the first few random numbers generated for the
+ * thread you're on. If this is a problem, you need to create your own
+ * random number generator objects every time you want to start from a
* defined point.
*
* @note Like the system function rand(), this function produces the same
std::string get_time ();
/**
- * Return the present date as YYYY/MM/DD. MM and DD may be either one or two
- * digits.
+ * Return the present date as YYYY/MM/DD. MM and DD may be either one or
+ * two digits.
*/
std::string get_date ();
/**
- * Call the system function posix_memalign, or a replacement function if not
- * available, to allocate memory with a certain minimal alignment. The
+ * Call the system function posix_memalign, or a replacement function if
+ * not available, to allocate memory with a certain minimal alignment. The
* first argument will then return a pointer to this memory block that can
* be released later on through a standard <code>free</code> call.
*
- * @param memptr The address of a pointer variable that will after this call
- * point to the allocated memory.
+ * @param memptr The address of a pointer variable that will after this
+ * call point to the allocated memory.
* @param alignment The minimal alignment of the memory block, in bytes.
* @param size The size of the memory block to be allocated, in bytes.
*
* @note This function checks internally for error codes, rather than
- * leaving this task to the calling site.
+ * leaving this task to the calling site.
*/
void posix_memalign (void **memptr, size_t alignment, size_t size);
* given array @p in. The offsets to the input array are given by the array @p
* offsets. From each stream, n_entries are read. The data is then transposed
* and stored it into an array of VectorizedArray type. The output array @p
- * out is expected to be an array of size @p n_entries. This method
- * operates on plain arrays, so no checks for valid data access are made. It is
- * the user's responsibility to ensure that the given arrays are valid
- * according to the access layout below.
+ * out is expected to be an array of size @p n_entries. This method operates
+ * on plain arrays, so no checks for valid data access are made. It is the
+ * user's responsibility to ensure that the given arrays are valid according
+ * to the access layout below.
*
* This operation corresponds to a transformation of an array-of-struct
* (input) into a struct-of-array (output) according to the following formula:
/**
* This method stores the vectorized arrays in transposed form into the given
* output array @p out with the given offsets @p offsets. This operation
- * corresponds to a transformation of a struct-of-array (input) into an
- * array-of-struct (output). This method operates on plain array, so no checks
- * for valid data access are made. It is the user's responsibility to ensure
- * that the given arrays are valid according to the access layout below.
+ * corresponds to a transformation of a struct-of-array (input) into an array-
+ * of-struct (output). This method operates on plain array, so no checks for
+ * valid data access are made. It is the user's responsibility to ensure that
+ * the given arrays are valid according to the access layout below.
*
* This method assumes that the specified offsets do not overlap. Otherwise,
* the behavior is undefined in the vectorized case. It is the user's
* out[offsets[v]+i] = in[i][v];
* @endcode
*
- * For <code>add_into == true</code>, the code implements the following action:
+ * For <code>add_into == true</code>, the code implements the following
+ * action:
* @code
* for (unsigned int i=0; i<n_entries; ++i)
* for (unsigned int v=0; v<VectorizedArray<Number>::n_array_elements; ++v)
* argument but permanently fix this one argument to a reference to the
* coarse grid triangulation. After each refinement step, the
* triangulation will then call the object so created which will in turn
- * call <code>set_boundary_ids<dim></code> with the reference to
- * the coarse grid as argument.
+ * call <code>set_boundary_ids<dim></code> with the reference to the
+ * coarse grid as argument.
*
* This approach can be generalized. In the example above, we have used a
* global function that will be called. However, sometimes it is necessary
* that this function is in fact a member function of the class that
* generates the mesh, for example because it needs to access run-time
* parameters. This can be achieved as follows: assuming the
- * <code>set_boundary_ids()</code> function has been declared as a
- * (non-static, but possibly private) member function of the
+ * <code>set_boundary_ids()</code> function has been declared as a (non-
+ * static, but possibly private) member function of the
* <code>MyClass</code> class, then the following will work:
* @code
* #include <deal.II/base/std_cxx11/bind.h>
* std_cxx11::ref(coarse_grid)));
* }
* @endcode
- * Here, like any other member function,
- * <code>set_boundary_ids</code> implicitly takes a pointer or
- * reference to the object it belongs to as first argument.
- * <code>std::bind</code> again creates an object that can be called like
- * a global function with no arguments, and this object in turn calls
- * <code>set_boundary_ids</code> with a pointer to the current
+ * Here, like any other member function, <code>set_boundary_ids</code>
+ * implicitly takes a pointer or reference to the object it belongs to as
+ * first argument. <code>std::bind</code> again creates an object that can
+ * be called like a global function with no arguments, and this object in
+ * turn calls <code>set_boundary_ids</code> with a pointer to the current
* object and a reference to the triangulation to work on. Note that
* because the <code>create_coarse_mesh</code> function is declared as
* <code>const</code>, it is necessary that the
/**
* Return an invalid iterator of a type that represents pointing to a child
- * of the current object. The object is invalid because points (as represented
- * by the current class) do not have children.
+ * of the current object. The object is invalid because points (as
+ * represented by the current class) do not have children.
*/
TriaIterator<DoFAccessor<0,DH<1,spacedim>, level_dof_access > >
child (const unsigned int c) const;
*
* @param dof_handler The DoFHandler or hp::DoFHandler object to work on.
* @param reversed_numbering Whether to use the original Cuthill-McKee
- * algorithm, or to reverse the ordering.
- * @param use_constraints Whether or not to use hanging node constraints
- * in determining the reordering of degrees of freedom.
- * @param starting_indices A set of degrees of freedom that form the
- * first level of renumbered degrees of freedom. If the set is empty,
- * then a single starting entry is chosen automatically among those
- * that have the smallest number of others that couple with it.
- * If the DoFHandler is built on a parallel triangulation, then on every
- * processor, these starting indices need to be a (possibly empty)
- * subset of the
- * @ref GlossLocallyOwnedDof "locally owned degrees of freedom".
- * These will then be used as starting indices for the local renumbering
- * on the current processor. (In other words, this argument will in
- * fact be different on every processor unless you pass an
- * empty list as is the default.)
+ * algorithm, or to reverse the ordering.
+ * @param use_constraints Whether or not to use hanging node constraints in
+ * determining the reordering of degrees of freedom.
+ * @param starting_indices A set of degrees of freedom that form the first
+ * level of renumbered degrees of freedom. If the set is empty, then a
+ * single starting entry is chosen automatically among those that have the
+ * smallest number of others that couple with it. If the DoFHandler is built
+ * on a parallel triangulation, then on every processor, these starting
+ * indices need to be a (possibly empty) subset of the
+ * @ref GlossLocallyOwnedDof "locally owned degrees of freedom".
+ * These will then be used as starting indices for the local renumbering on
+ * the current processor. (In other words, this argument will in fact be
+ * different on every processor unless you pass an empty list as is the
+ * default.)
*/
template <class DH>
void
/**
* Sort the degrees of freedom by component. It does the same thing as the
- * above function, only that it does this for one single level of a multilevel
- * discretization. The non-multigrid part of the the DoFHandler is not touched.
+ * above function, only that it does this for one single level of a
+ * multilevel discretization. The non-multigrid part of the the DoFHandler
+ * is not touched.
*/
template <class DH>
void
block_wise (DoFHandler<dim,spacedim> &dof_handler);
/**
- * Sort the degrees of freedom by vector block. It does the same thing as the
- * above function, only that it does this for one single level of a multilevel
- * discretization. The non-multigrid part of the the DoFHandler is not touched.
+ * Sort the degrees of freedom by vector block. It does the same thing as
+ * the above function, only that it does this for one single level of a
+ * multilevel discretization. The non-multigrid part of the the DoFHandler
+ * is not touched.
*/
template <int dim, int spacedim>
void
*
* The actual type of the sparsity pattern may be SparsityPattern,
* DynamicSparsityPattern, BlockSparsityPattern,
- * BlockDynamicSparsityPattern, or any other class that satisfies
- * similar requirements. It is assumed that the size of the sparsity pattern
- * matches the number of degrees of freedom and that enough unused nonzero
- * entries are left to fill the sparsity pattern. The nonzero entries
- * generated by this function are overlaid to possible previous content of
- * the object, that is previously added entries are not deleted.
+ * BlockDynamicSparsityPattern, or any other class that satisfies similar
+ * requirements. It is assumed that the size of the sparsity pattern matches
+ * the number of degrees of freedom and that enough unused nonzero entries
+ * are left to fill the sparsity pattern. The nonzero entries generated by
+ * this function are overlaid to possible previous content of the object,
+ * that is previously added entries are not deleted.
*
* Since this process is purely local, the sparsity pattern does not provide
* for entries introduced by the elimination of hanging nodes. They have to
*
* The actual type of the sparsity pattern may be SparsityPattern,
* DynamicSparsityPattern, BlockSparsityPattern,
- * BlockDynamicSparsityPattern, BlockDynamicSetSparsityPattern, or any
- * other class that satisfies similar requirements.
+ * BlockDynamicSparsityPattern, BlockDynamicSetSparsityPattern, or any other
+ * class that satisfies similar requirements.
*
* There is a complication if some or all of the shape functions of the
* finite element in use are non-zero in more than one component (in deal.II
*
* The actual type of the sparsity pattern may be SparsityPattern,
* DynamicSparsityPattern, BlockSparsityPattern,
- * BlockDynamicSparsityPattern, BlockDynamicSetSparsityPattern, or any
- * other class that satisfies similar requirements. It is assumed that the
- * size of the sparsity pattern is already correct.
+ * BlockDynamicSparsityPattern, BlockDynamicSetSparsityPattern, or any other
+ * class that satisfies similar requirements. It is assumed that the size of
+ * the sparsity pattern is already correct.
*/
template <class DH, class SparsityPattern>
void
* @ref GlossFaceOrientation "standard orientation".
*
* Instead of defining a 'first' and 'second' boundary with the help of two
- * boundary_ids this function defines a 'left' boundary as all faces
- * with local face index <code>2*dimension</code> and boundary indicator @p
- * b_id and, similarly, a 'right' boundary consisting of all face with local
- * face index <code>2*dimension+1</code> and boundary indicator @p b_id.
+ * boundary_ids this function defines a 'left' boundary as all faces with
+ * local face index <code>2*dimension</code> and boundary indicator @p b_id
+ * and, similarly, a 'right' boundary consisting of all face with local face
+ * index <code>2*dimension+1</code> and boundary indicator @p b_id.
*
* @note This version of make_periodicity_constraints will not work on
* meshes with cells not in
* of freedom is at the boundary and belongs to one of the selected
* components, and @p false otherwise. The function is used in step-15.
*
- * By specifying the @p boundary_id variable, you can select which
- * boundary indicators the faces have to have on which the degrees of
- * freedom are located that shall be extracted. If it is an empty list, then
- * all boundary indicators are accepted.
+ * By specifying the @p boundary_id variable, you can select which boundary
+ * indicators the faces have to have on which the degrees of freedom are
+ * located that shall be extracted. If it is an empty list, then all
+ * boundary indicators are accepted.
*
* The size of @p component_mask (see
* @ref GlossComponentMask)
* boundary (and correspond to the selected vector components and boundary
* indicators, depending on the values of the @p component_mask and @p
* boundary_ids arguments).
- * @param boundary_ids If empty, this function extracts the indices
- * of the degrees of freedom for all parts of the boundary. If it is a non-
- * empty list, then the function only considers boundary faces with the
- * boundary indicators listed in this argument.
+ * @param boundary_ids If empty, this function extracts the indices of the
+ * degrees of freedom for all parts of the boundary. If it is a non- empty
+ * list, then the function only considers boundary faces with the boundary
+ * indicators listed in this argument.
*
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
* boundary (and correspond to the selected vector components and boundary
* indicators, depending on the values of the @p component_mask and @p
* boundary_ids arguments).
- * @param boundary_ids If empty, this function extracts the indices
- * of the degrees of freedom for all parts of the boundary. If it is a non-
- * empty list, then the function only considers boundary faces with the
- * boundary indicators listed in this argument.
+ * @param boundary_ids If empty, this function extracts the indices of the
+ * degrees of freedom for all parts of the boundary. If it is a non- empty
+ * list, then the function only considers boundary faces with the boundary
+ * indicators listed in this argument.
*
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
* A variant of this function with different arguments is used in step-36.
*
* @param dof The DoFHandler to work on.
- * @param boundary_id The indicator of that part of the boundary for
- * which constraints should be computed. If this number equals
+ * @param boundary_id The indicator of that part of the boundary for which
+ * constraints should be computed. If this number equals
* numbers::invalid_boundary_id then all boundaries of the domain will be
* treated.
* @param zero_boundary_constraints The constraint object into which the
/*@{*/
/**
- * Implementation of a scalar Bernstein finite element @p that we call FE_Bernstein
- * in analogy with FE_Q that yields the
- * finite element space of continuous, piecewise Bernstein polynomials of degree @p p in
- * each coordinate direction. This class is realized using tensor product
+ * Implementation of a scalar Bernstein finite element @p that we call
+ * FE_Bernstein in analogy with FE_Q that yields the finite element space of
+ * continuous, piecewise Bernstein polynomials of degree @p p in each
+ * coordinate direction. This class is realized using tensor product
* polynomials of Bernstein basis polynomials.
*
*
* The standard constructor of this class takes the degree @p p of this finite
* element.
*
- * For more information about the <tt>spacedim</tt> template parameter
- * check the documentation of FiniteElement or the one of
- * Triangulation.
+ * For more information about the <tt>spacedim</tt> template parameter check
+ * the documentation of FiniteElement or the one of Triangulation.
*
* <h3>Implementation</h3>
*
* The constructor creates a TensorProductPolynomials object that includes the
- * tensor product of @p Bernstein polynomials of degree @p p. This
- * @p TensorProductPolynomials object provides all values and derivatives of
- * the shape functions.
+ * tensor product of @p Bernstein polynomials of degree @p p. This @p
+ * TensorProductPolynomials object provides all values and derivatives of the
+ * shape functions.
*
* <h3>Numbering of the degrees of freedom (DoFs)</h3>
*
* The original ordering of the shape functions represented by the
- * TensorProductPolynomials is a tensor product
- * numbering. However, the shape functions on a cell are renumbered
- * beginning with the shape functions whose support points are at the
- * vertices, then on the line, on the quads, and finally (for 3d) on
- * the hexes. See the documentation of FE_Q for more details.
+ * TensorProductPolynomials is a tensor product numbering. However, the shape
+ * functions on a cell are renumbered beginning with the shape functions whose
+ * support points are at the vertices, then on the line, on the quads, and
+ * finally (for 3d) on the hexes. See the documentation of FE_Q for more
+ * details.
*
*
* @author Marco Tezzele, Luca Heltai
FE_Bernstein (const unsigned int p);
/**
- * Return the matrix interpolating from a face of one element to the face
- * of the neighboring element. The size of the matrix is then
- * <tt>source.dofs_per_face</tt> times <tt>this->dofs_per_face</tt>. The
- * FE_Bernstein element family only provides interpolation matrices for elements of
- * the same type and FE_Nothing. For all other elements, an exception of
- * type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented is
- * thrown.
- */
+ * Return the matrix interpolating from a face of one element to the face of
+ * the neighboring element. The size of the matrix is then
+ * <tt>source.dofs_per_face</tt> times <tt>this->dofs_per_face</tt>. The
+ * FE_Bernstein element family only provides interpolation matrices for
+ * elements of the same type and FE_Nothing. For all other elements, an
+ * exception of type
+ * FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented is thrown.
+ */
virtual void
get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &source,
FullMatrix<double> &matrix) const;
/**
- * Return the matrix interpolating from a face of one element to the face
- * of the neighboring element. The size of the matrix is then
+ * Return the matrix interpolating from a face of one element to the face of
+ * the neighboring element. The size of the matrix is then
* <tt>source.dofs_per_face</tt> times <tt>this->dofs_per_face</tt>. The
- * FE_Bernstein element family only provides interpolation matrices for elements of
- * the same type and FE_Nothing. For all other elements, an exception of
- * type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented is
- * thrown.
+ * FE_Bernstein element family only provides interpolation matrices for
+ * elements of the same type and FE_Nothing. For all other elements, an
+ * exception of type
+ * FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented is thrown.
*/
virtual void
get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &source,
/**
* Return a string that uniquely identifies a finite element. This class
- * returns <tt>FE_Bernstein<dim>(degree)</tt>, with @p dim and @p degree replaced by
- * appropriate values.
+ * returns <tt>FE_Bernstein<dim>(degree)</tt>, with @p dim and @p degree
+ * replaced by appropriate values.
*/
virtual std::string get_name () const;
virtual bool hp_constraints_are_implemented () const;
/**
- * Return the matrix interpolating from the given finite element to the present one.
- * Interpolation only between FE_Q_Hierarchical is supported.
+ * Return the matrix interpolating from the given finite element to the
+ * present one. Interpolation only between FE_Q_Hierarchical is supported.
*/
virtual void get_interpolation_matrix(const FiniteElement< dim> &source,
FullMatrix< double > &matrix) const;
/**
- * Embedding matrix between grids.
- * Only isotropic refinement is supported.
+ * Embedding matrix between grids. Only isotropic refinement is supported.
*/
virtual const
FullMatrix<double> &get_prolongation_matrix (const unsigned int child,
* FEValuesBase::get_function_values function but it only works on the
* selected scalar component.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the values of shape functions (i.e., @p
- * value_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the values of shape functions (i.e., @p value_type) times the
+ * type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_values}
*/
* FEValuesBase::get_function_gradients function but it only works on the
* selected scalar component.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the gradients of shape functions (i.e., @p
- * gradient_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the gradients of shape functions (i.e., @p gradient_type)
+ * times the type used to store the values of the unknowns $U_j$ of your
+ * finite element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_gradients}
*/
* FEValuesBase::get_function_hessians function but it only works on the
* selected scalar component.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the Hessians of shape functions (i.e., @p
- * hessian_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the Hessians of shape functions (i.e., @p hessian_type) times
+ * the type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_hessians}
*/
* FEValuesBase::get_function_laplacians function but it only works on the
* selected scalar component.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the Laplacians of shape functions (i.e., @p
- * value_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the Laplacians of shape functions (i.e., @p value_type) times
+ * the type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_hessians}
*/
* FEValuesBase::get_function_values function but it only works on the
* selected vector components.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the values of shape functions (i.e., @p
- * value_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the values of shape functions (i.e., @p value_type) times the
+ * type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_values}
*/
* FEValuesBase::get_function_gradients function but it only works on the
* selected vector components.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the gradients of shape functions (i.e., @p
- * gradient_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the gradients of shape functions (i.e., @p gradient_type)
+ * times the type used to store the values of the unknowns $U_j$ of your
+ * finite element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_gradients}
*/
* but the information can be obtained from
* FEValuesBase::get_function_gradients, of course.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the symmetric gradients of shape functions (i.e., @p
+ * The data type stored by the output vector must be what you get when you
+ * multiply the symmetric gradients of shape functions (i.e., @p
* symmetric_gradient_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * unknowns $U_j$ of your finite element vector $U$ (represented by the @p
+ * fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_gradients}
*/
* information can be obtained from FEValuesBase::get_function_gradients,
* of course.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the divergences of shape functions (i.e., @p
- * divergence_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the divergences of shape functions (i.e., @p divergence_type)
+ * times the type used to store the values of the unknowns $U_j$ of your
+ * finite element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_gradients}
*/
* information can be obtained from FEValuesBase::get_function_gradients,
* of course.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the curls of shape functions (i.e., @p
- * curl_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the curls of shape functions (i.e., @p curl_type) times the
+ * type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_gradients}
*/
* FEValuesBase::get_function_hessians function but it only works on the
* selected vector components.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the Hessians of shape functions (i.e., @p
- * hessian_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the Hessians of shape functions (i.e., @p hessian_type) times
+ * the type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_hessians}
*/
* FEValuesBase::get_function_laplacians function but it only works on the
* selected vector components.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the Laplacians of shape functions (i.e., @p
- * laplacian_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the Laplacians of shape functions (i.e., @p laplacian_type)
+ * times the type used to store the values of the unknowns $U_j$ of your
+ * finite element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_hessians}
*/
* FEValuesBase::get_function_values function but it only works on the
* selected vector components.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the values of shape functions (i.e., @p
- * value_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the values of shape functions (i.e., @p value_type) times the
+ * type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_values}
*/
* See the general discussion of this class for a definition of the
* divergence.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the divergences of shape functions (i.e., @p
- * divergence_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the divergences of shape functions (i.e., @p divergence_type)
+ * times the type used to store the values of the unknowns $U_j$ of your
+ * finite element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_gradients}
*/
* FEValuesBase::get_function_values function but it only works on the
* selected vector components.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the values of shape functions (i.e., @p
- * value_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the values of shape functions (i.e., @p value_type) times the
+ * type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_values}
*/
* See the general discussion of this class for a definition of the
* divergence.
*
- * The data type stored by the output vector must be what you get
- * when you multiply the divergences of shape functions (i.e., @p
- * divergence_type) times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * The data type stored by the output vector must be what you get when you
+ * multiply the divergences of shape functions (i.e., @p divergence_type)
+ * times the type used to store the values of the unknowns $U_j$ of your
+ * finite element vector $U$ (represented by the @p fe_function argument).
*
* @dealiiRequiresUpdateFlags{update_gradients}
*/
*
* @param[out] values The values of the function specified by fe_function at
* the quadrature points of the current cell. The object is assume to
- * already have the correct size.
- * The data type stored by this output vector must be what you get
- * when you multiply the values of shape function
- * times the type used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument). This happens to be equal to the
- * type of the elements of the solution vector.
+ * already have the correct size. The data type stored by this output vector
+ * must be what you get when you multiply the values of shape function times
+ * the type used to store the values of the unknowns $U_j$ of your finite
+ * element vector $U$ (represented by the @p fe_function argument). This
+ * happens to be equal to the type of the elements of the solution vector.
*
* @post <code>values[q]</code> will contain the value of the field
* described by fe_function at the $q$th quadrature point.
* @param[out] gradients The gradients of the function specified by
* fe_function at the quadrature points of the current cell. The gradients
* are computed in real space (as opposed to on the unit cell). The object
- * is assume to already have the correct size.
- * The data type stored by this output vector must be what you get
- * when you multiply the gradients of shape function times the type
- * used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * is assume to already have the correct size. The data type stored by this
+ * output vector must be what you get when you multiply the gradients of
+ * shape function times the type used to store the values of the unknowns
+ * $U_j$ of your finite element vector $U$ (represented by the @p
+ * fe_function argument).
*
* @post <code>gradients[q]</code> will contain the gradient of the field
* described by fe_function at the $q$th quadrature point.
* @param[out] hessians The Hessians of the function specified by
* fe_function at the quadrature points of the current cell. The Hessians
* are computed in real space (as opposed to on the unit cell). The object
- * is assume to already have the correct size.
- * The data type stored by this output vector must be what you get
- * when you multiply the Hessians of shape function times the type
- * used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument).
+ * is assume to already have the correct size. The data type stored by this
+ * output vector must be what you get when you multiply the Hessians of
+ * shape function times the type used to store the values of the unknowns
+ * $U_j$ of your finite element vector $U$ (represented by the @p
+ * fe_function argument).
*
* @post <code>hessians[q]</code> will contain the Hessian of the field
* described by fe_function at the $q$th quadrature point.
* @param[out] laplacians The Laplacians of the function specified by
* fe_function at the quadrature points of the current cell. The Laplacians
* are computed in real space (as opposed to on the unit cell). The object
- * is assume to already have the correct size.
- * The data type stored by this output vector must be what you get
- * when you multiply the Laplacians of shape function times the type
- * used to store the values of the
- * unknowns $U_j$ of your finite element vector $U$ (represented
- * by the @p fe_function argument). This happens to be equal to the
- * type of the elements of the input vector.
+ * is assume to already have the correct size. The data type stored by this
+ * output vector must be what you get when you multiply the Laplacians of
+ * shape function times the type used to store the values of the unknowns
+ * $U_j$ of your finite element vector $U$ (represented by the @p
+ * fe_function argument). This happens to be equal to the type of the
+ * elements of the input vector.
*
* @post <code>laplacians[q]</code> will contain the Laplacian of the field
* described by fe_function at the $q$th quadrature point.
/*@{*/
/**
- * The MappingFEField is a generalization of the MappingQEulerian
- * class, for arbitrary vector finite elements. The two main
- * differences are that this class uses a vector of absolute positions
- * instead of a vector of displacements, and it allows for arbitrary
- * FiniteElement types, instead of only FE_Q.
+ * The MappingFEField is a generalization of the MappingQEulerian class, for
+ * arbitrary vector finite elements. The two main differences are that this
+ * class uses a vector of absolute positions instead of a vector of
+ * displacements, and it allows for arbitrary FiniteElement types, instead of
+ * only FE_Q.
*
* This class effectively decouples the topology from the geometry, by
* relegating all geometrical information to some components of a
- * FiniteElement vector field. The components that are used for the
- * geometry can be arbitrarily selected at construction time.
+ * FiniteElement vector field. The components that are used for the geometry
+ * can be arbitrarily selected at construction time.
*
- * The idea is to consider the Triangulation as a parameter
- * configuration space, on which we construct an arbitrary
- * geometrical mapping, using the instruments of the deal.II library:
- * a vector of degrees of freedom, a DoFHandler associated to the
- * geometry of the problem and a ComponentMask that tells us which
- * components of the FiniteElement to use for the mapping.
+ * The idea is to consider the Triangulation as a parameter configuration
+ * space, on which we construct an arbitrary geometrical mapping, using the
+ * instruments of the deal.II library: a vector of degrees of freedom, a
+ * DoFHandler associated to the geometry of the problem and a ComponentMask
+ * that tells us which components of the FiniteElement to use for the mapping.
*
- * Typically, the DoFHandler operates on a finite element that is
- * constructed as a system element (FESystem()) from continuous FE_Q()
- * (for iso-parametric discretizations) or FE_Bernstein() (for
- * iso-geometric discretizations) objects. An example is shown below:
+ * Typically, the DoFHandler operates on a finite element that is constructed
+ * as a system element (FESystem()) from continuous FE_Q() (for iso-parametric
+ * discretizations) or FE_Bernstein() (for iso-geometric discretizations)
+ * objects. An example is shown below:
*
* @code
* const FE_Q<dim,spacedim> feq(1);
* transformation of the domain from the reference to the current
* configuration.
*
- * In general this class decouples geometry from topology, allowing
- * users to define geometries which are only topologically
- * equivalent to the underlying Triangulation, but which may
- * otherwise be arbitrary. Differently from what happens in
- * MappingQEulerian, the FiniteElement field which is passed to the
- * constructor is interpreted as an absolute geometrical
- * configuration, therefore one has to make sure that the
- * euler_vector actually represents a valid geometry (i.e., one with
- * no inverted cells, or with no zero-volume cells).
+ * In general this class decouples geometry from topology, allowing users to
+ * define geometries which are only topologically equivalent to the
+ * underlying Triangulation, but which may otherwise be arbitrary.
+ * Differently from what happens in MappingQEulerian, the FiniteElement
+ * field which is passed to the constructor is interpreted as an absolute
+ * geometrical configuration, therefore one has to make sure that the
+ * euler_vector actually represents a valid geometry (i.e., one with no
+ * inverted cells, or with no zero-volume cells).
*
- * If the underlying FiniteElement is a system of FE_Q(), and
- * euler_vector is initialized using
- * VectorTools::get_position_vector(), then this class is in all
- * respects identical to MappingQ().
+ * If the underlying FiniteElement is a system of FE_Q(), and euler_vector
+ * is initialized using VectorTools::get_position_vector(), then this class
+ * is in all respects identical to MappingQ().
*
* The optional ComponentMask argument can be used to specify what
* components of the FiniteElement to use for the geometrical
- * transformation. If no mask is specified at construction time,
- * then a default one is used, which makes this class works in the
- * same way of MappingQEulerian(), i.e., the first spacedim
- * components of the FiniteElement are assumed to represent the
- * geometry of the problem.
+ * transformation. If no mask is specified at construction time, then a
+ * default one is used, which makes this class works in the same way of
+ * MappingQEulerian(), i.e., the first spacedim components of the
+ * FiniteElement are assumed to represent the geometry of the problem.
*
* Notice that if a mask is specified, it has to match in size the
- * underlying FiniteElement, and it has to have exactly spacedim
- * non-zero elements, indicating the components (in order) of the
- * FiniteElement which will be used for the geometry.
+ * underlying FiniteElement, and it has to have exactly spacedim non-zero
+ * elements, indicating the components (in order) of the FiniteElement which
+ * will be used for the geometry.
*
* If an incompatible mask is passed, an exception is thrown.
*/
const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const Point<spacedim> &p) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual void
const typename Mapping<dim,spacedim>::InternalDataBase &internal,
const MappingType type) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual void
const typename Mapping<dim,spacedim>::InternalDataBase &internal,
const MappingType type) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual
/**
- * Storage for internal data of
- * d-linear transformation.
+ * Storage for internal data of d-linear transformation.
*/
class InternalData : public Mapping<dim,spacedim>::InternalDataBase
{
const ComponentMask mask);
/**
- * Shape function at quadrature
- * point. Shape functions are
- * in tensor product order, so
- * vertices must be reordered
- * to obtain transformation.
+ * Shape function at quadrature point. Shape functions are in tensor
+ * product order, so vertices must be reordered to obtain transformation.
*/
double shape (const unsigned int qpoint,
const unsigned int shape_nr) const;
/**
- * Shape function at quadrature
- * point. See above.
+ * Shape function at quadrature point. See above.
*/
double &shape (const unsigned int qpoint,
const unsigned int shape_nr);
/**
- * Gradient of shape function
- * in quadrature point. See
- * above.
+ * Gradient of shape function in quadrature point. See above.
*/
Tensor<1,dim> derivative (const unsigned int qpoint,
const unsigned int shape_nr) const;
/**
- * Gradient of shape function
- * in quadrature point. See
- * above.
+ * Gradient of shape function in quadrature point. See above.
*/
Tensor<1,dim> &derivative (const unsigned int qpoint,
const unsigned int shape_nr);
/**
- * Second derivative of shape
- * function in quadrature
- * point. See above.
+ * Second derivative of shape function in quadrature point. See above.
*/
Tensor<2,dim> second_derivative (const unsigned int qpoint,
const unsigned int shape_nr) const;
/**
- * Second derivative of shape
- * function in quadrature
- * point. See above.
+ * Second derivative of shape function in quadrature point. See above.
*/
Tensor<2,dim> &second_derivative (const unsigned int qpoint,
const unsigned int shape_nr);
/**
- * Return an estimate (in
- * bytes) or the memory
- * consumption of this
- * object.
+ * Return an estimate (in bytes) or the memory consumption of this object.
*/
virtual std::size_t memory_consumption () const;
/**
- * Values of shape
- * functions. Access by
- * function @p shape.
+ * Values of shape functions. Access by function @p shape.
*
* Computed once.
*/
std::vector<double> shape_values;
/**
- * Values of shape function
- * derivatives. Access by
- * function @p derivative.
+ * Values of shape function derivatives. Access by function @p derivative.
*
* Computed once.
*/
std::vector<Tensor<1,dim> > shape_derivatives;
/**
- * Values of shape function
- * second derivatives. Access
- * by function
- * @p second_derivative.
+ * Values of shape function second derivatives. Access by function @p
+ * second_derivative.
*
* Computed once.
*/
std::vector<Tensor<2,dim> > shape_second_derivatives;
/**
- * Tensors of covariant
- * transformation at each of
- * the quadrature points. The
- * matrix stored is the
- * Jacobian * G^{-1},
- * where G = Jacobian^{t} * Jacobian,
- * is the first fundamental
- * form of the map;
- * if dim=spacedim then
- * it reduces to the transpose of the
- * inverse of the Jacobian
- * matrix, which itself is
- * stored in the
- * @p contravariant field of
- * this structure.
+ * Tensors of covariant transformation at each of the quadrature points.
+ * The matrix stored is the Jacobian * G^{-1}, where G = Jacobian^{t} *
+ * Jacobian, is the first fundamental form of the map; if dim=spacedim
+ * then it reduces to the transpose of the inverse of the Jacobian matrix,
+ * which itself is stored in the @p contravariant field of this structure.
*
* Computed on each cell.
*/
std::vector<DerivativeForm<1,dim, spacedim > > covariant;
/**
- * Tensors of contravariant
- * transformation at each of
- * the quadrature points. The
- * contravariant matrix is
- * the Jacobian of the
- * transformation,
+ * Tensors of contravariant transformation at each of the quadrature
+ * points. The contravariant matrix is the Jacobian of the transformation,
* i.e. $J_{ij}=dx_i/d\hat x_j$.
*
* Computed on each cell.
std::vector< DerivativeForm<1,dim,spacedim> > contravariant;
/**
- * Unit tangential vectors. Used
- * for the computation of
- * boundary forms and normal
- * vectors.
+ * Unit tangential vectors. Used for the computation of boundary forms and
+ * normal vectors.
*
- * This vector has
- * (dim-1)GeometryInfo::faces_per_cell
- * entries. The first
- * GeometryInfo::faces_per_cell
- * contain the vectors in the first
- * tangential direction for each
- * face; the second set of
- * GeometryInfo::faces_per_cell
- * entries contain the vectors in the
- * second tangential direction (only
- * in 3d, since there we have 2
- * tangential directions per face),
- * etc.
+ * This vector has (dim-1)GeometryInfo::faces_per_cell entries. The first
+ * GeometryInfo::faces_per_cell contain the vectors in the first
+ * tangential direction for each face; the second set of
+ * GeometryInfo::faces_per_cell entries contain the vectors in the second
+ * tangential direction (only in 3d, since there we have 2 tangential
+ * directions per face), etc.
*
* Filled once.
*/
std::vector<std::vector<Tensor<1,spacedim> > > aux;
/**
- * Number of shape functions. If this is a Q1 mapping, then it is
- * simply the number of vertices per cell. However, since also
- * derived classes use this class (e.g. the Mapping_Q() class),
- * the number of shape functions may also be different.
+ * Number of shape functions. If this is a Q1 mapping, then it is simply
+ * the number of vertices per cell. However, since also derived classes
+ * use this class (e.g. the Mapping_Q() class), the number of shape
+ * functions may also be different.
*/
unsigned int n_shape_functions;
/**
- * Stores the mask given at construction time. If no mask was
- * specified at construction time, then a default one is used,
- * which makes this class works in the same way of
- * MappingQEulerian(), i.e., the first spacedim components of the
- * FiniteElement are used for the euler_vector and the euler_dh.
+ * Stores the mask given at construction time. If no mask was specified at
+ * construction time, then a default one is used, which makes this class
+ * works in the same way of MappingQEulerian(), i.e., the first spacedim
+ * components of the FiniteElement are used for the euler_vector and the
+ * euler_dh.
*
* If a mask is specified, then it has to match the underlying
- * FiniteElement, and it has to have exactly spacedim non-zero
- * elements, indicating the components (in order) of the
- * FiniteElement which will be used for the euler vector and the
- * euler dof handler.
+ * FiniteElement, and it has to have exactly spacedim non-zero elements,
+ * indicating the components (in order) of the FiniteElement which will be
+ * used for the euler vector and the euler dof handler.
*/
ComponentMask mask;
};
/**
- * Transforms a point @p p on
- * the unit cell to the point
- * @p p_real on the real cell
- * @p cell and returns @p p_real.
+ * Transforms a point @p p on the unit cell to the point @p p_real on the
+ * real cell @p cell and returns @p p_real.
*
- * This function is called by
- * @p transform_unit_to_real_cell
- * and multiple times (through the
- * Newton iteration) by
- * @p transform_real_to_unit_cell_internal.
+ * This function is called by @p transform_unit_to_real_cell and multiple
+ * times (through the Newton iteration) by @p
+ * transform_real_to_unit_cell_internal.
*
- * Takes a reference to an
- * @p InternalData that must
- * already include the shape
- * values at point @p p and the
- * mapping support points of the
- * cell.
+ * Takes a reference to an @p InternalData that must already include the
+ * shape values at point @p p and the mapping support points of the cell.
*
- * This @p InternalData argument
- * avoids multiple computations
- * of the shape values at point
- * @p p and especially multiple
- * computations of the mapping
+ * This @p InternalData argument avoids multiple computations of the shape
+ * values at point @p p and especially multiple computations of the mapping
* support points.
*/
Point<spacedim>
/**
- * Transforms the point @p p on
- * the real cell to the corresponding
- * point on the unit cell
- * @p cell by a Newton
- * iteration.
+ * Transforms the point @p p on the real cell to the corresponding point on
+ * the unit cell @p cell by a Newton iteration.
*
- * Takes a reference to an
- * @p InternalData that is
- * assumed to be previously
- * created by the @p get_data
- * function with @p UpdateFlags
- * including
- * @p update_transformation_values
- * and
- * @p update_transformation_gradients
- * and a one point Quadrature
- * that includes the given
- * initial guess for the
- * transformation
- * @p initial_p_unit. Hence this
- * function assumes that
- * @p mdata already includes the
- * transformation shape values
- * and gradients computed at
- * @p initial_p_unit.
+ * Takes a reference to an @p InternalData that is assumed to be previously
+ * created by the @p get_data function with @p UpdateFlags including @p
+ * update_transformation_values and @p update_transformation_gradients and a
+ * one point Quadrature that includes the given initial guess for the
+ * transformation @p initial_p_unit. Hence this function assumes that @p
+ * mdata already includes the transformation shape values and gradients
+ * computed at @p initial_p_unit.
*
- * @p mdata will be changed by
- * this function.
+ * @p mdata will be changed by this function.
*/
Point<dim>
transform_real_to_unit_cell_internal (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
InternalData &mdata) const;
/**
- * Do the computation for the
- * <tt>fill_*</tt> functions.
+ * Do the computation for the <tt>fill_*</tt> functions.
*/
void compute_fill (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int npts,
/**
- * Do the computation for the
- * <tt>fill_*</tt> functions.
+ * Do the computation for the <tt>fill_*</tt> functions.
*/
void compute_fill_face (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
/**
- This function and the next allow to generate the transform require by
- the virtual transform() in mapping, but unfortunately in C++ one cannot
- declare a virtual template function.
- */
+ * This function and the next allow to generate the transform require by the
+ * virtual transform() in mapping, but unfortunately in C++ one cannot
+ * declare a virtual template function.
+ */
template < int rank >
void
transform_fields(const VectorSlice<const std::vector<Tensor<rank,dim> > > input,
/**
- see doc in transform_fields
+ * see doc in transform_fields
*/
template < int rank >
void
protected:
/**
- * Reference to the vector of shifts.
- */
+ * Reference to the vector of shifts.
+ */
SmartPointer<const VECTOR, MappingFEField<dim,spacedim,DH,VECTOR> >euler_vector;
/**
- * A FiniteElement object which is only needed in 3D, since it knows how to reorder
- * shape functions/DoFs on non-standard faces. This is used to reorder
- * support points in the same way. We could make this a pointer to prevent
- * construction in 1D and 2D, but since memory and time requirements are not
- * particularly high this seems unnecessary at the moment.
+ * A FiniteElement object which is only needed in 3D, since it knows how to
+ * reorder shape functions/DoFs on non-standard faces. This is used to
+ * reorder support points in the same way. We could make this a pointer to
+ * prevent construction in 1D and 2D, but since memory and time requirements
+ * are not particularly high this seems unnecessary at the moment.
*/
SmartPointer<const FiniteElement<dim,spacedim>, MappingFEField<dim,spacedim,DH,VECTOR> > fe;
void update_internal_dofs(const typename Triangulation<dim,spacedim>::cell_iterator &cell) const;
/**
- * It stores the local degrees of freedom of the DH for each cell
- * (i.e. euler_vector * dof_indices, see method update_internal_dofs for more
+ * It stores the local degrees of freedom of the DH for each cell (i.e.
+ * euler_vector * dof_indices, see method update_internal_dofs for more
* clarifications.).
*/
mutable Threads::ThreadLocalStorage <std::vector<double> > local_dof_values;
/**
* Store the degrees of freedom of the DH for each cell (i.e.
- * cell->get_dof_indices(dof_indices), see method update_internal_dofs for more
- * clarifications.). Thread safe.
+ * cell->get_dof_indices(dof_indices), see method update_internal_dofs for
+ * more clarifications.). Thread safe.
*/
mutable Threads::ThreadLocalStorage <std::vector<types::global_dof_index> > local_dof_indices;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual void
compute_shapes_virtual (const std::vector<Point<dim> > &unit_points,
typename MappingFEField<dim, spacedim>::InternalData &data) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual UpdateFlags
update_once (const UpdateFlags in) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual UpdateFlags
update_each (const UpdateFlags in) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
void
const unsigned int n_original_q_points,
InternalData &data) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
void
const unsigned int n_original_q_points,
InternalData &data) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual
get_data (const UpdateFlags,
const Quadrature<dim> &quadrature) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual
get_face_data (const UpdateFlags flags,
const Quadrature<dim-1>& quadrature) const;
- /** Reimplemented from Mapping. See the documentation of the base class for
+ /**
+ * Reimplemented from Mapping. See the documentation of the base class for
* detailed information.
*/
virtual
/**
- * Mapping between indices in the FE space and the real space. This vector contains one
- * index for each component of the finite element space. If the index is one for which
- * the ComponentMask which is used to construct this element is false, then
- * numbers::invalid_unsigned_int is returned, otherwise the component in real space is
- * returned. For example, if we construct the mapping using ComponentMask(spacedim, true),
- * then this vector contains {0,1,2} in spacedim = 3.
+ * Mapping between indices in the FE space and the real space. This vector
+ * contains one index for each component of the finite element space. If the
+ * index is one for which the ComponentMask which is used to construct this
+ * element is false, then numbers::invalid_unsigned_int is returned,
+ * otherwise the component in real space is returned. For example, if we
+ * construct the mapping using ComponentMask(spacedim, true), then this
+ * vector contains {0,1,2} in spacedim = 3.
*/
std::vector<unsigned int> fe_to_real;
/**
* Constructor.
*
- * @param[in] degree The polynomical degree of the desired
- * $Q_p$ mapping.
- * @param[in] euler_dof_handler A DoFHandler object that defines a
- * finite element space. This space needs to have at least dim
- * components and the first dim components of the space will
- * be considered displacements relative to the original positions
- * of the cells of the triangulation.
- * @param[in] euler_vector A finite element function in the
- * space defined by the second argument. The first dim components
- * of this function will be interpreted as the displacement we
- * use in definining the mapping, relative to the location of cells
- * of the underlying triangulation.
+ * @param[in] degree The polynomical degree of the desired $Q_p$ mapping.
+ * @param[in] euler_dof_handler A DoFHandler object that defines a finite
+ * element space. This space needs to have at least dim components and the
+ * first dim components of the space will be considered displacements
+ * relative to the original positions of the cells of the triangulation.
+ * @param[in] euler_vector A finite element function in the space defined by
+ * the second argument. The first dim components of this function will be
+ * interpreted as the displacement we use in definining the mapping,
+ * relative to the location of cells of the underlying triangulation.
*/
MappingQEulerian (const unsigned int degree,
const DoFHandler<dim,spacedim> &euler_dof_handler,
const VECTOR &euler_vector);
/**
- * @deprecated Use the constructor with the reverse order of
- * second and third argument.
+ * @deprecated Use the constructor with the reverse order of second and
+ * third argument.
*/
MappingQEulerian (const unsigned int degree,
const VECTOR &euler_vector,
/**
* \brief Mesh of a d-simplex with (d+1) vertices and mesh cells, resp.
*
- * The @p vertices argument contains a vector with all d+1 vertices
- * of the simplex. They must be given in an order such that
- * the vectors from the first vertex to each of the others form a
- * right-handed system. And I am not happy about the discrimination
- * involved here.
+ * The @p vertices argument contains a vector with all d+1 vertices of the
+ * simplex. They must be given in an order such that the vectors from the
+ * first vertex to each of the others form a right-handed system. And I am
+ * not happy about the discrimination involved here.
*
* The meshes generated in two and three dimensions are
*
* Create a coordinate-parallel brick from the two diagonally opposite
* corner points @p p1 and @p p2.
*
- * If the @p colorize flag is set, the @p boundary_ids of the
- * surfaces are assigned, such that the lower one in @p x-direction is 0,
- * the upper one is 1. The indicators for the surfaces in @p y-direction are
- * 2 and 3, the ones for @p z are 4 and 5. Additionally, material ids are
- * assigned to the cells according to the octant their center is in: being
- * in the right half plane for any coordinate direction <i>x<sub>i</sub></i>
- * adds 2<sup>i</sup>. For instance, the center point (1,-1,1) yields a
- * material id 5.
- *
- * @note If spacedim>dim the same mesh as in the case spacedim=dim
- * is created, but the vertices have all additional coordinates
- * equal to the coordinates of p1, i.e., we generate a
- * hyper_rectangle parallel to the x-axis (1d), or to the xy-axis
- * passing through p1. The additional coordinates of the point p2
- * are ignored by this class in this case.
+ * If the @p colorize flag is set, the @p boundary_ids of the surfaces are
+ * assigned, such that the lower one in @p x-direction is 0, the upper one
+ * is 1. The indicators for the surfaces in @p y-direction are 2 and 3, the
+ * ones for @p z are 4 and 5. Additionally, material ids are assigned to the
+ * cells according to the octant their center is in: being in the right half
+ * plane for any coordinate direction <i>x<sub>i</sub></i> adds
+ * 2<sup>i</sup>. For instance, the center point (1,-1,1) yields a material
+ * id 5.
+ *
+ * @note If spacedim>dim the same mesh as in the case spacedim=dim is
+ * created, but the vertices have all additional coordinates equal to the
+ * coordinates of p1, i.e., we generate a hyper_rectangle parallel to the
+ * x-axis (1d), or to the xy-axis passing through p1. The additional
+ * coordinates of the point p2 are ignored by this class in this case.
*
* @note The triangulation needs to be void upon calling this function.
*/
* a list of integers denoting the number of subdivisions in each coordinate
* direction.
*
- * If the @p colorize flag is set, the @p boundary_ids of the
- * surfaces are assigned, such that the lower one in @p x-direction is 0,
- * the upper one is 1 (the left and the right vertical face). The indicators
- * for the surfaces in @p y-direction are 2 and 3, the ones for @p z are 4
- * and 5. Additionally, material ids are assigned to the cells according to
- * the octant their center is in: being in the right half plane for any
+ * If the @p colorize flag is set, the @p boundary_ids of the surfaces are
+ * assigned, such that the lower one in @p x-direction is 0, the upper one
+ * is 1 (the left and the right vertical face). The indicators for the
+ * surfaces in @p y-direction are 2 and 3, the ones for @p z are 4 and 5.
+ * Additionally, material ids are assigned to the cells according to the
+ * octant their center is in: being in the right half plane for any
* coordinate direction <i>x<sub>i</sub></i> adds 2<sup>i</sup>. For
* instance, the center point (1,-1,1) yields a material id 5 (this means
* that in 2d only material ids 0,1,2,3 are assigned independent from the
/**
* \brief Rectangular domain with rectangular pattern of holes
*
- * The domain itself is rectangular, very much as if it had been
- * generated by subdivided_hyper_rectangle(). The argument <code>holes</code>
- * specifies how many square holes the domain should have in each
- * coordinate direction. The total number of mesh cells in that
- * direction is then twice this number plus one.
+ * The domain itself is rectangular, very much as if it had been generated
+ * by subdivided_hyper_rectangle(). The argument <code>holes</code>
+ * specifies how many square holes the domain should have in each coordinate
+ * direction. The total number of mesh cells in that direction is then twice
+ * this number plus one.
*
* The number of holes in one direction must be at least one.
*
const double half_length = 1.0);
/**
- * \brief A center cell with stacks of cell protruding from each surface.
- *
- * Each of the square mesh cells is Cartesian and has size one in each
- * coordinate direction. The center of cell number zero is the
- * origin.
- *
- * @param tria A Triangulation object which has to be empty.
- *
- * @param sizes A vector of integers of dimension
- * GeometryInfo<dim>::faces_per_cell with the following meaning: the
- * legs of the cross are stacked on the faces of the center cell,
- * in the usual order of deal.II cells, namely first $-x$, then $x$,
- * then $-y$ and so on. The corresponding entries in
- * <code>sizes</code> name the number of cells stacked on this
- * face. All numbers may be zero, thus L- and T-shaped domains are
- * specializations of this domain.
- *
- * @param colorize_cells If colorization is chosen, then the material
- * id of a cells corresponds to the leg it is in. The id of the
- * center cell is zero, and then the legs are numbered starting at
- * one.
- *
- * Examples in two and three dimensions are
- *
+ * \brief A center cell with stacks of cell protruding from each surface.
+ *
+ * Each of the square mesh cells is Cartesian and has size one in each
+ * coordinate direction. The center of cell number zero is the origin.
+ *
+ * @param tria A Triangulation object which has to be empty.
+ *
+ * @param sizes A vector of integers of dimension
+ * GeometryInfo<dim>::faces_per_cell with the following meaning: the legs of
+ * the cross are stacked on the faces of the center cell, in the usual order
+ * of deal.II cells, namely first $-x$, then $x$, then $-y$ and so on. The
+ * corresponding entries in <code>sizes</code> name the number of cells
+ * stacked on this face. All numbers may be zero, thus L- and T-shaped
+ * domains are specializations of this domain.
+ *
+ * @param colorize_cells If colorization is chosen, then the material id of
+ * a cells corresponds to the leg it is in. The id of the center cell is
+ * zero, and then the legs are numbered starting at one.
+ *
+ * Examples in two and three dimensions are
+ *
* @image html hyper_cross_2d.png
* @image html hyper_cross_3d.png
- *
- * @author Guido Kanschat
- * @date 2015
- */
+ *
+ * @author Guido Kanschat
+ * @date 2015
+ */
template <int dim, int spacedim>
void hyper_cross(Triangulation<dim, spacedim> &tria,
const std::vector<unsigned int> &sizes,
* computed adaptively such that the resulting elements have the least
* aspect ratio.
*
- * If colorize is set to true, the inner, outer, and the part of the boundary
- * where $x=0$, get indicator 0, 1, and 2, respectively. Otherwise all
- * indicators are set to 0.
+ * If colorize is set to true, the inner, outer, and the part of the
+ * boundary where $x=0$, get indicator 0, 1, and 2, respectively. Otherwise
+ * all indicators are set to 0.
*
* @note The triangulation needs to be void upon calling this function.
*/
* from meshes for simpler geometries, then this is not the function for
* you. Instead, consider GridGenerator::merge_triangulations().
*
- * @pre Both of the source conditions need to be available entirely
- * locally. In other words, they can not be objects of type
- * parallel::distributed::Triangulation.
+ * @pre Both of the source conditions need to be available entirely locally.
+ * In other words, they can not be objects of type
+ * parallel::distributed::Triangulation.
*/
template <int dim, int spacedim>
void
Triangulation<dim, spacedim> &result);
/**
- * This function creates a triangulation that consists of the same cells
- * as are present in the first argument, except those cells that are listed
- * in the second argument. The purpose of the function is to generate
+ * This function creates a triangulation that consists of the same cells as
+ * are present in the first argument, except those cells that are listed in
+ * the second argument. The purpose of the function is to generate
* geometries <i>subtractively</i> from the geometry described by an
* existing triangulation. A prototypical case is a 2d domain with
* rectangular holes. This can be achieved by first meshing the entire
- * domain and then using this function to get rid of the cells that
- * are located at the holes. Likewise, you could create the mesh
- * that GridGenerator::hyper_L() produces by starting with a
- * GridGenerator::hyper_cube(), refining it once, and then calling
- * the current function with a single cell in the second argument.
+ * domain and then using this function to get rid of the cells that are
+ * located at the holes. Likewise, you could create the mesh that
+ * GridGenerator::hyper_L() produces by starting with a
+ * GridGenerator::hyper_cube(), refining it once, and then calling the
+ * current function with a single cell in the second argument.
*
* @param[in] input_triangulation The original triangulation that serves as
- * the template from which the new one is to be created.
+ * the template from which the new one is to be created.
* @param[in] cells_to_remove A list of cells of the triangulation provided
- * as first argument that should be removed (i.e., that should not
- * show up in the result.
+ * as first argument that should be removed (i.e., that should not show up
+ * in the result.
* @param[out] result The resulting triangulation that consists of the same
- * cells as are in @p input_triangulation, with the exception of the cells
- * listed in @p cells_to_remove.
+ * cells as are in @p input_triangulation, with the exception of the cells
+ * listed in @p cells_to_remove.
*
* @pre Because we cannot create triangulations de novo that contain
- * adaptively refined cells, the input triangulation needs to have all
- * of its cells on the same level. Oftentimes, this will in fact be
- * the coarsest level, but it is allowed to pass in a triangulation
- * that has been refined <i>globally</i> a number of times. The output
- * triangulation will in that case simply be a mesh with only one
- * level that consists of the active cells of the input minus the
- * ones listed in the second argument. However, the input triangulation
- * must not have been <i>adaptively</i> refined.
+ * adaptively refined cells, the input triangulation needs to have all of
+ * its cells on the same level. Oftentimes, this will in fact be the
+ * coarsest level, but it is allowed to pass in a triangulation that has
+ * been refined <i>globally</i> a number of times. The output triangulation
+ * will in that case simply be a mesh with only one level that consists of
+ * the active cells of the input minus the ones listed in the second
+ * argument. However, the input triangulation must not have been
+ * <i>adaptively</i> refined.
*/
template <int dim, int spacedim>
void
{
/**
* Return a pair of double values of which the first is adjusted refinement
- * fraction of cells and the second is adjusted coarsening fraction of cells.
+ * fraction of cells and the second is adjusted coarsening fraction of
+ * cells.
*
*
* @arg @p current_n_cells is current cell number.
*
- * @arg @p max_n_cells is the maximal number of cells. If current cell number
- * @p current_n_cells is already exceeded maximal cell number @p max_n_cells,
- * refinement fraction of cells will be set to zero and coarsening fraction
- * of cells will be adjusted to reduce cell number to @ max_n_cells.
- * If cell number is going to be exceeded only upon refinement, then refinement
- * and coarsening fractions are going to be adjusted with a same ratio in
- * an attempt to reach the maximum number of cells.
- * Be aware though that through proliferation of refinement due to
- * Triangulation::MeshSmoothing, this number is only an indicator.
- * The default value of this argument is to impose no limit on the number
- * of cells.
+ * @arg @p max_n_cells is the maximal number of cells. If current cell
+ * number @p current_n_cells is already exceeded maximal cell number @p
+ * max_n_cells, refinement fraction of cells will be set to zero and
+ * coarsening fraction of cells will be adjusted to reduce cell number to @
+ * max_n_cells. If cell number is going to be exceeded only upon refinement,
+ * then refinement and coarsening fractions are going to be adjusted with a
+ * same ratio in an attempt to reach the maximum number of cells. Be aware
+ * though that through proliferation of refinement due to
+ * Triangulation::MeshSmoothing, this number is only an indicator. The
+ * default value of this argument is to impose no limit on the number of
+ * cells.
*
* @arg @p top_fraction is the requested fraction of cells to be refined.
*
- * @arg @p bottom_fraction is the requested fraction of cells to be coarsened.
+ * @arg @p bottom_fraction is the requested fraction of cells to be
+ * coarsened.
*
- * @note Usually you do not need to call this function explicitly. Pass
- * @p max_n_cells to function refine_and_coarsen_fixed_number() or function
+ * @note Usually you do not need to call this function explicitly. Pass @p
+ * max_n_cells to function refine_and_coarsen_fixed_number() or function
* refine_and_coarsen_fixed_fraction() and they will call this function if
* necessary.
*/
const Function<dim,double> *coefficient = 0);
/**
- * Returns a std::map with all vertices of faces located in the boundary
- *
- * @param[in] tria The Triangulation object.
- */
+ * Returns a std::map with all vertices of faces located in the boundary
+ *
+ * @param[in] tria The Triangulation object.
+ */
template <int dim, int spacedim>
std::map<unsigned int,Point<spacedim> >
get_all_vertices_at_boundary (const Triangulation<dim, spacedim> &tria);
* @ref GlossFaceOrientation "standard orientation".
*
* Instead of defining a 'first' and 'second' boundary with the help of two
- * boundary_ids this function defines a 'left' boundary as all faces
- * with local face index <code>2*dimension</code> and boundary indicator @p
- * b_id and, similarly, a 'right' boundary consisting of all face with local
- * face index <code>2*dimension+1</code> and boundary indicator @p b_id.
+ * boundary_ids this function defines a 'left' boundary as all faces with
+ * local face index <code>2*dimension</code> and boundary indicator @p b_id
+ * and, similarly, a 'right' boundary consisting of all face with local face
+ * index <code>2*dimension+1</code> and boundary indicator @p b_id.
*
* This function will collect periodic face pairs on the coarsest mesh level
* and add them to @p matched_pairs leaving the original contents intact.
* quite inconvenient if one attempted to operate on it directly, since data
* is spread over quite a lot of arrays and other places. However, there are
* ways powerful enough to work on these data structures without knowing their
- * exact relations. deal.II uses class local typedefs (see below) to make things
- * as easy and dimension independent as possible.
+ * exact relations. deal.II uses class local typedefs (see below) to make
+ * things as easy and dimension independent as possible.
*
* The Triangulation class provides iterators which enable looping over all
* cells without knowing the exact representation used to describe them. For
- * more information see the documentation of <tt>TriaIterator</tt>. Their names
- * are typedefs imported from the Iterators class (thus making them local types
- * to this class) and are as follows:
+ * more information see the documentation of <tt>TriaIterator</tt>. Their
+ * names are typedefs imported from the Iterators class (thus making them
+ * local types to this class) and are as follows:
*
* <ul>
* <li> <tt>cell_iterator</tt>: loop over all cells used in the Triangulation
*
* Usage of these iterators is similar to usage of standard container
* iterators. Some examples taken from the Triangulation source code follow
- * (notice that in the last two examples the template parameter @p spacedim has
- * been omitted, so it takes the default value <code>dim</code>).
+ * (notice that in the last two examples the template parameter @p spacedim
+ * has been omitted, so it takes the default value <code>dim</code>).
*
* <ul>
* <li> <em>Counting the number of cells on a specific level</em>
void clear_despite_subscriptions ();
/**
- * For all cells, set the active cell indices so that active cells know
- * the how many-th active cell they are, and all other cells have an invalid
+ * For all cells, set the active cell indices so that active cells know the
+ * how many-th active cell they are, and all other cells have an invalid
* value. This function is called after mesh creation, refinement, and
* serialization.
*/
* fields of this class that can be modified by the TriaAccessor hierarchy
* are pointers, and so these accessor classes store a const pointer to the
* triangulation. We could no longer do so for TriaAccessor<0,1,spacedim> if
- * this field (that can be modified by TriaAccessor::set_boundary_id)
- * were not a pointer.
+ * this field (that can be modified by TriaAccessor::set_boundary_id) were
+ * not a pointer.
*/
std::map<unsigned int, types::boundary_id> *vertex_to_boundary_id_map_1d;
* fields of this class that can be modified by the TriaAccessor hierarchy
* are pointers, and so these accessor classes store a const pointer to the
* triangulation. We could no longer do so for TriaAccessor<0,1,spacedim> if
- * this field (that can be modified by TriaAccessor::set_boundary_id)
- * were not a pointer.
+ * this field (that can be modified by TriaAccessor::set_boundary_id) were
+ * not a pointer.
*/
std::map<unsigned int, types::manifold_id> *vertex_to_manifold_id_map_1d;
types::boundary_id boundary_indicator () const DEAL_II_DEPRECATED;
/**
- * Set the boundary indicator of the current object. The same applies as for the
- * boundary_id() function.
+ * Set the boundary indicator of the current object. The same applies as for
+ * the boundary_id() function.
*
* This function only sets the boundary object of the current object itself,
* not the indicators of the ones that bound it. For example, in 3d, if this
* function is called on a face, then the boundary indicator of the 4 edges
* that bound the face remain unchanged. If you want to set the boundary
* indicators of face and edges at the same time, use the
- * set_all_boundary_ids() function. You can see the result of not
- * using the correct function in the results section of step-49.
+ * set_all_boundary_ids() function. You can see the result of not using the
+ * correct function in the results section of step-49.
*
* @warning You should never set the boundary indicator of an interior face
* (a face not at the boundary of the domain), or set set the boundary
void set_boundary_indicator (const types::boundary_id) const DEAL_II_DEPRECATED;
/**
- * Do as set_boundary_id() but also set the boundary indicators of
- * the objects that bound the current object. For example, in 3d, if
- * set_boundary_id() is called on a face, then the boundary indicator
- * of the 4 edges that bound the face remain unchanged. In contrast, if you
- * call the current function, the boundary indicators of face and edges are
- * all set to the given value.
+ * Do as set_boundary_id() but also set the boundary indicators of the
+ * objects that bound the current object. For example, in 3d, if
+ * set_boundary_id() is called on a face, then the boundary indicator of the
+ * 4 edges that bound the face remain unchanged. In contrast, if you call
+ * the current function, the boundary indicators of face and edges are all
+ * set to the given value.
*
* This function is useful if you set boundary indicators of faces in 3d (in
* 2d, the function does the same as set_boundary_id()) and you do so
bool direction_flag () const;
/**
- * Return the how many-th active cell the current cell is (assuming
- * the current cell is indeed active). This is useful, for example,
- * if you are accessing the elements of a vector with as many
- * entries as there are active cells. Such vectors are used for
- * estimating the error on each cell of a triangulation, for
- * specifying refinement criteria passed to the functions in
- * GridRefinement, and for generating cell-wise output.
+ * Return the how many-th active cell the current cell is (assuming the
+ * current cell is indeed active). This is useful, for example, if you are
+ * accessing the elements of a vector with as many entries as there are
+ * active cells. Such vectors are used for estimating the error on each cell
+ * of a triangulation, for specifying refinement criteria passed to the
+ * functions in GridRefinement, and for generating cell-wise output.
*
- * The function throws an exception if the current cell is not
- * active.
+ * The function throws an exception if the current cell is not active.
*
- * @note If the triangulation this function is called on is
- * of type parallel::distributed::Triangulation, then active
- * cells may be locally owned, ghost cells, or artificial
- * (see
+ * @note If the triangulation this function is called on is of type
+ * parallel::distributed::Triangulation, then active cells may be locally
+ * owned, ghost cells, or artificial (see
* @ref GlossLocallyOwnedCell,
- * @ref GlossGhostCell, and
+ * @ref GlossGhostCell,
+ * and
* @ref GlossArtificialCell).
- * This function counts over all of
- * them, including ghost and artificial active cells.
+ * This function counts over all of them, including ghost and artificial
+ * active cells.
*/
unsigned int active_cell_index () const;
/**
- * Return the index of the parent of this cell within the level of the triangulation to
- * which the parent cell belongs. The level of the parent is of course one
- * lower than that of the present cell. If the parent does not exist (i.e.,
- * if the object is at the coarsest level of the mesh hierarchy), an
- * exception is generated.
+ * Return the index of the parent of this cell within the level of the
+ * triangulation to which the parent cell belongs. The level of the parent
+ * is of course one lower than that of the present cell. If the parent does
+ * not exist (i.e., if the object is at the coarsest level of the mesh
+ * hierarchy), an exception is generated.
*/
int parent_index () const;
private:
/**
- * Set the active cell index of a cell. This is done at the end of refinement.
+ * Set the active cell index of a cell. This is done at the end of
+ * refinement.
*/
void set_active_cell_index (const unsigned int active_cell_index);
*
* Furthermore, the iterators described here satisfy the requirement of input
* and bidirectional iterators as stated by the C++ standard. It is therefore
- * possible to use the functions from the algorithm section of the C++ standard,
- * e.g., <em>count_if</em> (see the documentation for Triangulation for an
- * example) and several others.
+ * possible to use the functions from the algorithm section of the C++
+ * standard, e.g., <em>count_if</em> (see the documentation for Triangulation
+ * for an example) and several others.
*
* <h3>Implementation</h3>
*
/**
- * An integer that, for every active cell, stores the how
- * many-th active cell this is. For non-active cells, this value
- * is unused and set to an invalid value.
+ * An integer that, for every active cell, stores the how many-th active
+ * cell this is. For non-active cells, this value is unused and set to
+ * an invalid value.
*/
std::vector<unsigned int> active_cell_indices;
//TODO: Replace TriaObjectsHex to avoid this specialization
/**
- * Specialization of TriaLevels for 3D. Since we need
- * TriaObjectsHex instead of TriaObjects. Refer to the
- * documentation of the general class template for details.
+ * Specialization of TriaLevels for 3D. Since we need TriaObjectsHex
+ * instead of TriaObjects. Refer to the documentation of the general class
+ * template for details.
*/
template<>
class TriaLevel<3>
* <code>dnaupd</code> work and also how to set the parameters appropriately
* please take a look into the ARPACK manual.
*
- * @note Whenever you eliminate degrees of freedom using
- * ConstraintMatrix, you generate spurious eigenvalues and
- * eigenvectors. If you make sure that the diagonals of eliminated
- * matrix rows are all equal to one, you get a single additional
- * eigenvalue. But beware that some functions in deal.II set these
- * diagonals to rather arbitrary (from the point of view of
- * eigenvalue problems) values. See also
+ * @note Whenever you eliminate degrees of freedom using ConstraintMatrix, you
+ * generate spurious eigenvalues and eigenvectors. If you make sure that the
+ * diagonals of eliminated matrix rows are all equal to one, you get a single
+ * additional eigenvalue. But beware that some functions in deal.II set these
+ * diagonals to rather arbitrary (from the point of view of eigenvalue
+ * problems) values. See also
* @ref step_36 "step-36"
* for an example.
*
/**
* Solve the generalized eigensprectrum problem $A x=\lambda B x$ by calling
- * the <code>dneupd</code> and <code>dnaupd</code> functions of
- * ARPACK.
+ * the <code>dneupd</code> and <code>dnaupd</code> functions of ARPACK.
*
- * The function returns a vector of eigenvalues of length <i>n</i>
- * and a vector of eigenvectors, where the latter should be twice
- * the size of the eigenvalue vector. The first <i>n</i> vectors in
- * <code>eigenvectors</code> will be the real parts of the
- * eigenvectors, the second <i>n</i> the imaginary parts.
+ * The function returns a vector of eigenvalues of length <i>n</i> and a
+ * vector of eigenvectors, where the latter should be twice the size of the
+ * eigenvalue vector. The first <i>n</i> vectors in
+ * <code>eigenvectors</code> will be the real parts of the eigenvectors, the
+ * second <i>n</i> the imaginary parts.
*
- * @param A The operator for which we want to compute
- * eigenvalues. Actually, this parameter is entirely unused.
+ * @param A The operator for which we want to compute eigenvalues. Actually,
+ * this parameter is entirely unused.
*
- * @param B The inner product of the underlying space, typically the
- * mass matrix. For constrained problems, it can be a partial mass
- * matrix, like for instance the velocity mass matrix of a Stokes
- * problem. Only its function <code>vmult()</code> is used.
+ * @param B The inner product of the underlying space, typically the mass
+ * matrix. For constrained problems, it can be a partial mass matrix, like
+ * for instance the velocity mass matrix of a Stokes problem. Only its
+ * function <code>vmult()</code> is used.
*
- * @param inverse This is the possibly shifted inverse that is
- * actually used instead of <code>A</code>. Only its function
- * <code>vmult()</code> is used.
+ * @param inverse This is the possibly shifted inverse that is actually used
+ * instead of <code>A</code>. Only its function <code>vmult()</code> is
+ * used.
*
* @param eigenvalues is a vector of complex numbers in which the
* eigenvalues are returned.
*
- * @param eigenvectors is a <b>real</b> vector of eigenvectors,
- * containing alternatingly the real parts and the imaginary parts of the
- * eigenvectors. Therefore, its length should be twice the number of
- * eigenvalues. The vectors have to be initialized to match the
- * matrices.
+ * @param eigenvectors is a <b>real</b> vector of eigenvectors, containing
+ * alternatingly the real parts and the imaginary parts of the eigenvectors.
+ * Therefore, its length should be twice the number of eigenvalues. The
+ * vectors have to be initialized to match the matrices.
*
- * @param n_eigenvalues The purpose of this parameter is not clear,
- * but it is safe to set it to the size of <code>eigenvalues</code>
- * or greater. Leave it at its default zero, which will be reset to the size
- * of <code>eigenvalues</code> internally.
+ * @param n_eigenvalues The purpose of this parameter is not clear, but it
+ * is safe to set it to the size of <code>eigenvalues</code> or greater.
+ * Leave it at its default zero, which will be reset to the size of
+ * <code>eigenvalues</code> internally.
*/
template <typename VECTOR, typename MATRIX1,
typename MATRIX2, typename INVERSE>
/**
* @relates LinearOperator
*
- * A function that encapsulates a given collection @p ops of
- * LinearOperators into a block structure. Hereby, it is assumed that Range
- * and Domain are blockvectors, i.e., derived from
+ * A function that encapsulates a given collection @p ops of LinearOperators
+ * into a block structure. Hereby, it is assumed that Range and Domain are
+ * blockvectors, i.e., derived from
* @ref BlockVectorBase.
* The individual linear operators in @p ops must act on a the underlying
* vector type of the block vectors, i.e., on Domain::BlockType yielding a
* result in Range::BlockType.
*
- * The list @p ops is best passed as an initializer list. Consider for
- * example a linear operator block (acting on Vector<double>)
+ * The list @p ops is best passed as an initializer list. Consider for example
+ * a linear operator block (acting on Vector<double>)
* @code
* op_a00 | op_a01
* |
/**
* @relates LinearOperator
*
- * A variant of above function that builds up a block diagonal linear
- * operator from an array @p ops of diagonal elements (off-diagonal blocks
- * are assumed to be 0).
+ * A variant of above function that builds up a block diagonal linear operator
+ * from an array @p ops of diagonal elements (off-diagonal blocks are assumed
+ * to be 0).
*
- * The list @p ops is best passed as an initializer list. Consider for
- * example a linear operator block (acting on Vector<double>)
- * <code>diag(op_a0, op_a1, ..., op_am)</code>. The coresponding
- * block_operator invocation takes the form
+ * The list @p ops is best passed as an initializer list. Consider for example
+ * a linear operator block (acting on Vector<double>) <code>diag(op_a0, op_a1,
+ * ..., op_am)</code>. The coresponding block_operator invocation takes the
+ * form
* @code
* block_diagonal_operator<m, BlockVector<double>>({op_00, op_a1, ..., op_am});
* @endcode
* @relates LinearOperator
*
* A variant of above function that only takes a single LinearOperator
- * argument @p op and creates a blockdiagonal linear operator with @p m
- * copies of it.
+ * argument @p op and creates a blockdiagonal linear operator with @p m copies
+ * of it.
*
* @ingroup LAOperators
*/
/**
* @relates LinearOperator
*
- * This function uses above functions block_back_substitution and block_forward_substitution
- * to invert triangular matrices.
- * It takes as input a triangular block matrix @p block_matrix, an array of LinearOperators
- * @p inverse_diagonal representing inverses of block_matrix, and an optional bool @p lower
- * used to specify if block_matrix should be conidered as lower triangular matrix (true) or
- * as upper triangular matrix (false). @p lower is equal to true by default.
+ * This function uses above functions block_back_substitution and
+ * block_forward_substitution to invert triangular matrices. It takes as input
+ * a triangular block matrix @p block_matrix, an array of LinearOperators @p
+ * inverse_diagonal representing inverses of block_matrix, and an optional
+ * bool @p lower used to specify if block_matrix should be conidered as lower
+ * triangular matrix (true) or as upper triangular matrix (false). @p lower is
+ * equal to true by default.
*
*/
*
* @deprecated If deal.II was configured with C++11 support, use the
* LinearOperator class instead, see the module on
- * @ref LAOperators "linear operators" for further details.
+ * @ref LAOperators "linear operators"
+ * for further details.
*
* @see
* @ref GlossBlockLA "Block (linear algebra)"
const unsigned int column) const;
/**
- * Return the dimension of the codomain (or range) space. To remember:
- * the matrix is of dimension $m \times n$.
+ * Return the dimension of the codomain (or range) space. To remember: the
+ * matrix is of dimension $m \times n$.
*/
size_type m () const;
* sparsity pattern of the input matrix, this function will throw an
* exception.
*
- * Depending on MatrixType, however, additional restrictions might
- * arise. Some sparse matrix formats require <tt>matrix</tt> to be based on
- * the same sparsity pattern as the calling matrix.
+ * Depending on MatrixType, however, additional restrictions might arise.
+ * Some sparse matrix formats require <tt>matrix</tt> to be based on the
+ * same sparsity pattern as the calling matrix.
*/
void add (const value_type factor,
const BlockMatrixBase<MatrixType> &matrix);
bool empty () const;
/**
- * Return number of rows of this matrix, which equals the dimension of
- * the codomain (or range) space. It is the sum of the number of rows over the
+ * Return number of rows of this matrix, which equals the dimension of the
+ * codomain (or range) space. It is the sum of the number of rows over the
* sub-matrix blocks of this matrix.
*
* @deprecated Use m() instead.
/**
* Return number of columns of this matrix, which equals the dimension of
- * the domain space. It is the sum of the number of columns over the
- * sub-matrix blocks of this matrix.
+ * the domain space. It is the sum of the number of columns over the sub-
+ * matrix blocks of this matrix.
*
* @deprecated Use n() instead.
*/
size_type n_cols () const DEAL_II_DEPRECATED;
/**
- * Return number of rows of this matrix, which equals the dimension of
- * the codomain (or range) space. It is the sum of the number of rows over the
+ * Return number of rows of this matrix, which equals the dimension of the
+ * codomain (or range) space. It is the sum of the number of rows over the
* sub-matrix blocks of this matrix. Recall that the matrix is of size m()
* times n().
*/
/**
* Return number of columns of this matrix, which equals the dimension of
- * the domain space. It is the sum of the number of columns over the
- * sub-matrix blocks of this matrix. Recall that the matrix is of size m()
- * times n().
+ * the domain space. It is the sum of the number of columns over the sub-
+ * matrix blocks of this matrix. Recall that the matrix is of size m() times
+ * n().
*/
size_type n () const;
* patterns.
*
* The largest difference between the SparsityPattern and
- * DynamicSparsityPattern classes and this class is that mostly, the
- * matrices have different properties and you will want to work on the blocks
- * making up the matrix rather than the whole matrix. You can access the
- * different blocks using the <tt>block(row,col)</tt> function.
+ * DynamicSparsityPattern classes and this class is that mostly, the matrices
+ * have different properties and you will want to work on the blocks making up
+ * the matrix rather than the whole matrix. You can access the different
+ * blocks using the <tt>block(row,col)</tt> function.
*
* Attention: this object is not automatically notified if the size of one of
* its subobjects' size is changed. After you initialize the sizes of the
std::size_t memory_consumption () const;
/**
- * Copy data from an object of type BlockDynamicSparsityPattern, i.e.
- * resize this object to the size of the given argument, and copy over the
- * contents of each of the subobjects. Previous content of this object is
- * lost.
+ * Copy data from an object of type BlockDynamicSparsityPattern, i.e. resize
+ * this object to the size of the given argument, and copy over the contents
+ * of each of the subobjects. Previous content of this object is lost.
*/
void copy_from (const BlockDynamicSparsityPattern &dsp);
};
/**
* Constructor. There are three ways to use this constructor. First, without
* any arguments, it generates an object with no blocks. Given one argument,
- * it initializes <tt>n_blocks</tt> blocks, but these blocks have size
- * zero. The third variant finally initializes all blocks to the same size
+ * it initializes <tt>n_blocks</tt> blocks, but these blocks have size zero.
+ * The third variant finally initializes all blocks to the same size
* <tt>block_size</tt>.
*
* Confer the other constructor further down if you intend to use blocks of
#ifdef DEAL_II_WITH_CXX11
/**
- * Move constructor. Creates a new vector by stealing the internal data
- * of the vector @p v.
+ * Move constructor. Creates a new vector by stealing the internal data of
+ * the vector @p v.
*
* @note This constructor is only available if deal.II is configured with
* C++11 support.
#ifdef DEAL_II_WITH_CXX11
/**
- * Move the given vector. This operator replaces the present vector with
- * @p v by efficiently swapping the internal data structures.
+ * Move the given vector. This operator replaces the present vector with @p
+ * v by efficiently swapping the internal data structures.
*
- * @note This operator is only available if deal.II is configured with
- * C++11 support.
+ * @note This operator is only available if deal.II is configured with C++11
+ * support.
*/
BlockVector<Number> &operator= (BlockVector<Number> &&v);
#endif
template <typename> class ReinitHelper;
/**
- * A helper class internally used in linear_operator.h.
- * Specialization for BlockVector<number>.
+ * A helper class internally used in linear_operator.h. Specialization for
+ * BlockVector<number>.
*/
template<typename number>
class ReinitHelper<BlockVector<number> >
typedef types::global_dof_index size_type;
/**
- * Type of matrix entries. This typedef is analogous to <tt>value_type</tt> in
- * the standard library containers.
+ * Type of matrix entries. This typedef is analogous to <tt>value_type</tt>
+ * in the standard library containers.
*/
typedef number value_type;
bool empty () const;
/**
- * Return the dimension of the codomain (or range) space. To remember:
- * the matrix is of dimension $m \times n$.
+ * Return the dimension of the codomain (or range) space. To remember: the
+ * matrix is of dimension $m \times n$.
*/
size_type m () const;
/**
- * Return the dimension of the domain space. To remember: the matrix is
- * of dimension $m \times n$.
+ * Return the dimension of the domain space. To remember: the matrix is of
+ * dimension $m \times n$.
*/
size_type n () const;
iterator end ();
/**
- * Iterator starting at the first entry of row <tt>r</tt>. This is the version
- * for constant matrices.
+ * Iterator starting at the first entry of row <tt>r</tt>. This is the
+ * version for constant matrices.
*
* Note that if the given row is empty, i.e. does not contain any nonzero
* entries, then the iterator returned by this function equals
const_iterator end (const unsigned int r) const;
/**
- * Iterator starting at the first entry of row <tt>r</tt>. This is the version
- * for non-constant matrices.
+ * Iterator starting at the first entry of row <tt>r</tt>. This is the
+ * version for non-constant matrices.
*
* Note that if the given row is empty, i.e. does not contain any nonzero
* entries, then the iterator returned by this function equals
* statements like <tt>v.push_back (ChunkSparsityPattern());</tt>, with
* <tt>v</tt> a vector of ChunkSparsityPattern objects.
*
- * Usually, it is sufficient to use the explicit keyword to disallow unwanted
- * temporaries, but this does not work for <tt>std::vector</tt>. Since
- * copying a structure like this is not useful anyway because multiple
+ * Usually, it is sufficient to use the explicit keyword to disallow
+ * unwanted temporaries, but this does not work for <tt>std::vector</tt>.
+ * Since copying a structure like this is not useful anyway because multiple
* matrices can use the same sparsity structure, copies are only allowed for
* empty objects, as described above.
*/
const size_type chunk_size);
/**
- * Copy data from an object of type DynamicSparsityPattern. Previous
- * content of this object is lost, and the sparsity pattern is in compressed
- * mode afterwards.
+ * Copy data from an object of type DynamicSparsityPattern. Previous content
+ * of this object is lost, and the sparsity pattern is in compressed mode
+ * afterwards.
*/
template <typename SparsityType>
void copy_from (const SparsityType &dsp,
bool stores_only_added_elements () const;
/**
- * Iterator starting at the first entry of the matrix. The resulting iterator
- * can be used to walk over all nonzero entries of the sparsity pattern.
+ * Iterator starting at the first entry of the matrix. The resulting
+ * iterator can be used to walk over all nonzero entries of the sparsity
+ * pattern.
*/
iterator begin () const;
*/
/**
- * Given a vector, set all constrained degrees of freedom to values
- * so that the constraints are satisfied. For example, if the
- * current object stores the constraint $x_3=\frac 12 x_1 + \frac 12
- * x_2$, then this function will read the values of $x_1$ and $x_1$
- * from the given vector and set the element $x_3$ according to this
- * constraints. Similarly, if the current object stores the
- * constraint $x_42=208$, then this function will set the 42nd
- * element of the given vector to 208.
- *
- * @note If this function is called with a parallel vector @p vec,
- * then the vector must not contain ghost elements.
+ * Given a vector, set all constrained degrees of freedom to values so that
+ * the constraints are satisfied. For example, if the current object stores
+ * the constraint $x_3=\frac 12 x_1 + \frac 12 x_2$, then this function will
+ * read the values of $x_1$ and $x_1$ from the given vector and set the
+ * element $x_3$ according to this constraints. Similarly, if the current
+ * object stores the constraint $x_42=208$, then this function will set the
+ * 42nd element of the given vector to 208.
+ *
+ * @note If this function is called with a parallel vector @p vec, then the
+ * vector must not contain ghost elements.
*/
template <class VectorType>
void distribute (VectorType &vec) const;
typedef types::global_dof_index size_type;
/**
- * Accessor class for iterators into objects of type
- * DynamicSparsityPattern.
+ * Accessor class for iterators into objects of type DynamicSparsityPattern.
*
* Note that this class only allows read access to elements, providing their
* row and column number (or alternatively the index within the complete
unsigned int current_row;
/**
- * A pointer to the element within the current row that we
- * currently point to.
+ * A pointer to the element within the current row that we currently point
+ * to.
*/
std::vector<size_type>::const_iterator current_entry;
/**
- * A pointer to the end of the current row. We store this
- * to make comparison against the end of line iterator
- * cheaper as it otherwise needs to do the IndexSet translation
- * from row index to the index within the 'lines' array
- * of DynamicSparsityPattern.
+ * A pointer to the end of the current row. We store this to make
+ * comparison against the end of line iterator cheaper as it otherwise
+ * needs to do the IndexSet translation from row index to the index within
+ * the 'lines' array of DynamicSparsityPattern.
*/
std::vector<size_type>::const_iterator end_of_row;
* The typical use for these iterators is to iterate over the elements of a
* sparsity pattern (or, since they also serve as the basis for iterating
* over the elements of an associated matrix, over the elements of a sparse
- * matrix), or over the elements of individual rows. There is no
- * guarantee that the elements of a row are actually traversed in an order
- * in which column numbers monotonically increase. See the documentation of the
+ * matrix), or over the elements of individual rows. There is no guarantee
+ * that the elements of a row are actually traversed in an order in which
+ * column numbers monotonically increase. See the documentation of the
* SparsityPattern class for more information.
*
- * @note This class operates directly on the internal data
- * structures of the DynamicSparsityPattern class. As a consequence, some
- * operations are cheap and some are not. In particular, it is cheap
- * to access the column index of the sparsity pattern entry pointed
- * to. On the other hand, it is expensive to compute the distance
- * between two iterators. As a consequence, when you design
- * algorithms that use these iterators, it is common practice to not
- * loop over <i>all</i> elements of a sparsity pattern at once, but
- * to have an outer loop over all rows and within this loop iterate
- * over the elements of this row. This way, you only ever need to
- * dereference the iterator to obtain the column indices whereas the
- * (expensive) lookup of the row index can be avoided by using the
- * loop index instead.
+ * @note This class operates directly on the internal data structures of the
+ * DynamicSparsityPattern class. As a consequence, some operations are cheap
+ * and some are not. In particular, it is cheap to access the column index
+ * of the sparsity pattern entry pointed to. On the other hand, it is
+ * expensive to compute the distance between two iterators. As a
+ * consequence, when you design algorithms that use these iterators, it is
+ * common practice to not loop over <i>all</i> elements of a sparsity
+ * pattern at once, but to have an outer loop over all rows and within this
+ * loop iterate over the elements of this row. This way, you only ever need
+ * to dereference the iterator to obtain the column indices whereas the
+ * (expensive) lookup of the row index can be avoided by using the loop
+ * index instead.
*/
class Iterator
{
const unsigned int index_within_row);
/**
- * Constructor. Create an invalid (end) iterator into the sparsity
- * pattern @p sp.
+ * Constructor. Create an invalid (end) iterator into the sparsity pattern
+ * @p sp.
*/
Iterator (const DynamicSparsityPattern *sp);
* module.
*
* This class is an example of the "dynamic" type of
- * @ref Sparsity. It is used in most tutorial programs in one way or another.
+ * @ref Sparsity.
+ * It is used in most tutorial programs in one way or another.
*
* <h3>Interface</h3>
*
typedef types::global_dof_index size_type;
/**
- * Typedef an for iterator class that allows to walk over all nonzero elements
- * of a sparsity pattern.
+ * Typedef an for iterator class that allows to walk over all nonzero
+ * elements of a sparsity pattern.
*
* Since the iterator does not allow to modify the sparsity pattern, this
* type is the same as that for @p const_iterator.
iterator;
/**
- * Typedef for an iterator class that allows to walk over all nonzero elements
- * of a sparsity pattern.
+ * Typedef for an iterator class that allows to walk over all nonzero
+ * elements of a sparsity pattern.
*/
typedef
DynamicSparsityPatternIterators::Iterator
const_iterator;
/**
- * Initialize as an empty object. This is
- * useful if you want such objects as member variables in other classes. You
- * can make the structure usable by calling the reinit() function.
+ * Initialize as an empty object. This is useful if you want such objects as
+ * member variables in other classes. You can make the structure usable by
+ * calling the reinit() function.
*/
DynamicSparsityPattern ();
* involuntary copies of objects for temporaries, which can use large
* amounts of computing time. However, copy constructors are needed if you
* want to place a DynamicSparsityPattern in a container, e.g. to write such
- * statements like <tt>v.push_back (DynamicSparsityPattern());</tt>, with
- * @p v a vector of @p DynamicSparsityPattern objects.
+ * statements like <tt>v.push_back (DynamicSparsityPattern());</tt>, with @p
+ * v a vector of @p DynamicSparsityPattern objects.
*/
DynamicSparsityPattern (const DynamicSparsityPattern &);
/**
- * Initialize a rectangular sparsity pattern with @p m rows and @p n columns. The @p
- * rowset restricts the storage to elements in rows of this set. Adding
- * elements outside of this set has no effect. The default argument keeps
- * all entries.
+ * Initialize a rectangular sparsity pattern with @p m rows and @p n
+ * columns. The @p rowset restricts the storage to elements in rows of this
+ * set. Adding elements outside of this set has no effect. The default
+ * argument keeps all entries.
*/
DynamicSparsityPattern (const size_type m,
const size_type n,
DynamicSparsityPattern &operator = (const DynamicSparsityPattern &);
/**
- * Reallocate memory and set up data structures for a new sparsity pattern with @p m
- * rows and @p n columns. The @p rowset restricts the storage to elements in rows of this
- * set. Adding elements outside of this set has no effect. The default
- * argument keeps all entries.
+ * Reallocate memory and set up data structures for a new sparsity pattern
+ * with @p m rows and @p n columns. The @p rowset restricts the storage to
+ * elements in rows of this set. Adding elements outside of this set has no
+ * effect. The default argument keeps all entries.
*/
void reinit (const size_type m,
const size_type n,
const size_type j);
/**
- * Add several nonzero entries to the specified row. Already existing entries are ignored.
+ * Add several nonzero entries to the specified row. Already existing
+ * entries are ignored.
*/
template <typename ForwardIterator>
void add_entries (const size_type row,
void symmetrize ();
/**
- * Print the sparsity pattern. The output consists of one line per row
- * of the format <tt>[i,j1,j2,j3,...]</tt>. <i>i</i> is the row number and
+ * Print the sparsity pattern. The output consists of one line per row of
+ * the format <tt>[i,j1,j2,j3,...]</tt>. <i>i</i> is the row number and
* <i>jn</i> are the allocated columns in this row.
*/
void print (std::ostream &out) const;
/**
- * Print the sparsity pattern in a format that @p gnuplot understands
- * and which can be used to plot the sparsity pattern in a graphical way.
- * The format consists of pairs <tt>i j</tt> of nonzero elements, each
- * representing one entry, one per line of the output file.
- * Indices are counted from zero on, as usual. Since sparsity patterns are
- * printed in the same way as matrices are displayed, we print the negative
- * of the column index, which means that the <tt>(0,0)</tt> element is in
- * the top left rather than in the bottom left corner.
+ * Print the sparsity pattern in a format that @p gnuplot understands and
+ * which can be used to plot the sparsity pattern in a graphical way. The
+ * format consists of pairs <tt>i j</tt> of nonzero elements, each
+ * representing one entry, one per line of the output file. Indices are
+ * counted from zero on, as usual. Since sparsity patterns are printed in
+ * the same way as matrices are displayed, we print the negative of the
+ * column index, which means that the <tt>(0,0)</tt> element is in the top
+ * left rather than in the bottom left corner.
*
* Print the sparsity pattern in gnuplot by setting the data style to dots
* or points and use the @p plot command.
void print_gnuplot (std::ostream &out) const;
/**
- * Return the number of rows, which equals the dimension of the
- * image space.
+ * Return the number of rows, which equals the dimension of the image space.
*/
size_type n_rows () const;
/**
- * Return the number of columns, which equals the dimension of
- * the range space.
+ * Return the number of columns, which equals the dimension of the range
+ * space.
*/
size_type n_cols () const;
* Note the discussion in the general documentation of this class about the
* order in which elements are accessed.
*
- * @note If the sparsity pattern has been initialized with an IndexSet
- * that denotes which rows to store, then iterators will simply skip
- * over rows that are not stored. In other words, they will look like
- * empty rows, but no exception will be generated when iterating over
- * such rows.
+ * @note If the sparsity pattern has been initialized with an IndexSet that
+ * denotes which rows to store, then iterators will simply skip over rows
+ * that are not stored. In other words, they will look like empty rows, but
+ * no exception will be generated when iterating over such rows.
*/
iterator begin () const;
* Note also the discussion in the general documentation of this class about
* the order in which elements are accessed.
*
- * @note If the sparsity pattern has been initialized with an IndexSet
- * that denotes which rows to store, then iterators will simply skip
- * over rows that are not stored. In other words, they will look like
- * empty rows, but no exception will be generated when iterating over
- * such rows.
+ * @note If the sparsity pattern has been initialized with an IndexSet that
+ * denotes which rows to store, then iterators will simply skip over rows
+ * that are not stored. In other words, they will look like empty rows, but
+ * no exception will be generated when iterating over such rows.
*/
iterator begin (const size_type r) const;
typedef unsigned int size_type;
/**
- * Type of matrix entries. This typedef is analogous to <tt>value_type</tt> in
- * the standard library containers.
+ * Type of matrix entries. This typedef is analogous to <tt>value_type</tt>
+ * in the standard library containers.
*/
typedef number value_type;
DEAL_II_NAMESPACE_OPEN
/**
- * A namespace in which the wrappers to the Trilinos linear algebra classes are
- * typedef'ed to generic names. There are similar namespaces
+ * A namespace in which the wrappers to the Trilinos linear algebra classes
+ * are typedef'ed to generic names. There are similar namespaces
* LinearAlgebraDealII and LinearAlgebraPETSc for typedefs to deal.II's own
* classes and classes that interface with PETSc.
*/
*
* @deprecated If deal.II was configured with C++11 support, use the
* LinearOperator class instead, see the module on
- * @ref LAOperators "linear operators" for further details.
+ * @ref LAOperators "linear operators"
+ * for further details.
*
* @ingroup Matrix2
* @author Guido Kanschat
* @note Source and destination must not be the same vector.
*
* @note The template with @p number2 only exists for compile-time
- * compatibility with FullMatrix. Only the case @p number2 = @p
- * number is implemented due to limitations in the underlying LAPACK
- * interface. All other variants throw an error upon invocation.
+ * compatibility with FullMatrix. Only the case @p number2 = @p number is
+ * implemented due to limitations in the underlying LAPACK interface. All
+ * other variants throw an error upon invocation.
*/
template <typename number2>
void vmult (Vector<number2> &w,
const bool adding=false) const;
/**
- * Adding transpose matrix-vector-multiplication.
- * <i>w += A<sup>T</sup>*v</i>
+ * Adding transpose matrix-vector-multiplication. <i>w +=
+ * A<sup>T</sup>*v</i>
*
* See the documentation of vmult() for details on the implementation.
*/
/**
* A class to store the abstract concept of a linear operator.
*
- * The class essentially consists of <code>std::function</code> objects
- * that store the knowledge of how to apply the linear operator by
- * implementing the abstract @p Matrix interface:
+ * The class essentially consists of <code>std::function</code> objects that
+ * store the knowledge of how to apply the linear operator by implementing the
+ * abstract @p Matrix interface:
* @code
* std::function<void(Range &, const Domain &)> vmult;
* std::function<void(Range &, const Domain &)> vmult_add;
*
* But, in contrast to a usual matrix object, the domain and range of the
* linear operator are also bound to the LinearOperator class on the type
- * level. Because of this, <code>LinearOperator <Range, Domain></code>
- * has two additional function objects
+ * level. Because of this, <code>LinearOperator <Range, Domain></code> has two
+ * additional function objects
* @code
* std::function<void(Range &, bool)> reinit_range_vector;
* std::function<void(Domain &, bool)> reinit_domain_vector;
* @endcode
- * that store the knowledge how to initialize (resize + internal data structures)
- * an arbitrary vector of the @p Range and @p Domain space.
+ * that store the knowledge how to initialize (resize + internal data
+ * structures) an arbitrary vector of the @p Range and @p Domain space.
*
- * The primary purpose of this class is to provide syntactic sugar for
- * complex matrix-vector operations and free the user from having to
- * create, set up and handle intermediate storage locations by hand.
+ * The primary purpose of this class is to provide syntactic sugar for complex
+ * matrix-vector operations and free the user from having to create, set up
+ * and handle intermediate storage locations by hand.
*
- * As an example consider the operation $(A+k\,B)\,C$, where $A$, $B$ and
- * $C$ denote (possible different) matrices. In order to construct a
- * LinearOperator <code>op</code> that stores the knowledge of this
- * operation, one can write:
+ * As an example consider the operation $(A+k\,B)\,C$, where $A$, $B$ and $C$
+ * denote (possible different) matrices. In order to construct a
+ * LinearOperator <code>op</code> that stores the knowledge of this operation,
+ * one can write:
*
* @code
* dealii::SparseMatrix<double> A, B, C;
* @endcode
*
* @note This class is only available if deal.II was configured with C++11
- * support, i.e., if <code>DEAL_II_WITH_CXX11</code> is enabled during
- * cmake configure.
+ * support, i.e., if <code>DEAL_II_WITH_CXX11</code> is enabled during cmake
+ * configure.
*
* @author Luca Heltai, Matthias Maier, 2015
*
LinearOperator (const LinearOperator<Range, Domain> &) = default;
/**
- * Templated copy constructor that creates a LinearOperator object from
- * an object @p op for which the conversion function
- * <code>linear_operator</code>
- * is defined.
+ * Templated copy constructor that creates a LinearOperator object from an
+ * object @p op for which the conversion function
+ * <code>linear_operator</code> is defined.
*/
template<typename Op>
LinearOperator (const Op &op)
}
/**
- * Application of the LinearOperator object to a vector u of the @p
- * Domain space giving a vector v of the @p Range space.
+ * Application of the LinearOperator object to a vector u of the @p Domain
+ * space giving a vector v of the @p Range space.
*/
std::function<void(Range &v, const Domain &u)> vmult;
/**
- * Application of the LinearOperator object to a vector u of the @p
- * Domain space. The result is added to the vector v.
+ * Application of the LinearOperator object to a vector u of the @p Domain
+ * space. The result is added to the vector v.
*/
std::function<void(Range &v, const Domain &u)> vmult_add;
/**
- * Application of the transpose LinearOperator object to a vector u of
- * the @p Range space giving a vector v of the @p Domain
- * space.
+ * Application of the transpose LinearOperator object to a vector u of the
+ * @p Range space giving a vector v of the @p Domain space.
*/
std::function<void(Domain &v, const Range &u)> Tvmult;
std::function<void(Domain &v, const Range &u)> Tvmult_add;
/**
- * Initializes a vector v of the Range space to be directly usable
- * as the destination parameter in an application of vmult. Similar to
- * the reinit functions of the vector classes, the boolean determines
- * whether a fast initalization is done, i.e., if it is set to false the
- * content of the vector is set to 0.
+ * Initializes a vector v of the Range space to be directly usable as the
+ * destination parameter in an application of vmult. Similar to the reinit
+ * functions of the vector classes, the boolean determines whether a fast
+ * initalization is done, i.e., if it is set to false the content of the
+ * vector is set to 0.
*/
std::function<void(Range &v, bool fast)> reinit_range_vector;
//@{
/**
- * Addition with a LinearOperator @p second_op with the same @p Domain
- * and @p Range.
+ * Addition with a LinearOperator @p second_op with the same @p Domain and
+ * @p Range.
*/
LinearOperator<Range, Domain> &
operator+=(const LinearOperator<Range, Domain> &second_op)
}
/**
- * Composition of the LinearOperator with an endomorphism @p second_op
- * of the @p Domain space.
+ * Composition of the LinearOperator with an endomorphism @p second_op of
+ * the @p Domain space.
*/
LinearOperator<Range, Domain> &
operator*=(const LinearOperator<Domain, Domain> &second_op)
}
/**
- * This bool is used to determine whether a linear operator is a
- * null operator. In this case the class is able to optimize some
- * operations like multiplication or addition.
- */
+ * This bool is used to determine whether a linear operator is a null
+ * operator. In this case the class is able to optimize some operations like
+ * multiplication or addition.
+ */
bool is_null_operator;
//@}
* @relates LinearOperator
*
* Addition of two linear operators @p first_op and @p second_op given by
- * $(\text{first\_op}+\text{second\_op})x := \text{first\_op}(x) + \text{second\_op}(x)$
+ * $(\text{first\_op}+\text{second\_op})x := \text{first\_op}(x) +
+ * \text{second\_op}(x)$
*
* @ingroup LAOperators
*/
* @relates LinearOperator
*
* Subtraction of two linear operators @p first_op and @p second_op given by
- * $(\text{first\_op}-\text{second\_op})x := \text{first\_op}(x) - \text{second\_op}(x)$
+ * $(\text{first\_op}-\text{second\_op})x := \text{first\_op}(x) -
+ * \text{second\_op}(x)$
*
* @ingroup LAOperators
*/
/**
* @relates LinearOperator
*
- * Scalar multiplication of a ScalarOperator object @p op with @p number
- * from the left.
+ * Scalar multiplication of a ScalarOperator object @p op with @p number from
+ * the left.
*
* The @p Domain and @p Range types must implement the following
- * <code>operator*=</code> member functions accepting the appropriate
- * scalar Number type for rescaling:
+ * <code>operator*=</code> member functions accepting the appropriate scalar
+ * Number type for rescaling:
*
* @code
* Domain & operator *=(Domain::value_type);
* @relates LinearOperator
*
* Composition of two linear operators @p first_op and @p second_op given by
- * $(\text{first\_op}*\text{second\_op})x := \text{first\_op}(\text{second\_op}(x))$
+ * $(\text{first\_op}*\text{second\_op})x :=
+ * \text{first\_op}(\text{second\_op}(x))$
*
* @ingroup LAOperators
*/
* <code>vmult</code> and <code>Tvmult</code> implementations of the
* LinearOperator object.
*
- * The LinearOperator object that is created stores a reference to @p
- * solver and @p preconditioner. Thus, both objects must remain a valid
- * reference for the whole lifetime of the LinearOperator object. Internal
- * data structures of the @p solver object will be modified upon
- * invocation of <code>vmult</code> or <code>Tvmult</code>.
+ * The LinearOperator object that is created stores a reference to @p solver
+ * and @p preconditioner. Thus, both objects must remain a valid reference for
+ * the whole lifetime of the LinearOperator object. Internal data structures
+ * of the @p solver object will be modified upon invocation of
+ * <code>vmult</code> or <code>Tvmult</code>.
*
* @ingroup LAOperators
*/
/**
* @relates LinearOperator
*
- * Returns a LinearOperator that is the identity of the vector space
- * @p Range.
+ * Returns a LinearOperator that is the identity of the vector space @p Range.
*
* The function takes an <code>std::function</code> object
* @ref reinit_vector
- * as an argument to initialize the
- * <code>reinit_range_vector</code> and <code>reinit_domain_vector</code>
- * objects of the LinearOperator object.
+ * as an argument to initialize the <code>reinit_range_vector</code> and
+ * <code>reinit_domain_vector</code> objects of the LinearOperator object.
*
* @ingroup LAOperators
*/
/**
* @relates LinearOperator
*
- * Returns a nulled variant of the LinearOperator @p op, i.e. with
- * optimized LinearOperator::vmult, LinearOperator::vmult_add, etc.
- * functions and with LinearOperator::is_null_operator set to true.
+ * Returns a nulled variant of the LinearOperator @p op, i.e. with optimized
+ * LinearOperator::vmult, LinearOperator::vmult_add, etc. functions and with
+ * LinearOperator::is_null_operator set to true.
*
* @ingroup LAOperators
*/
namespace LinearOperator
{
/**
- * A helper class that is responsible for the initialization of a
- * vector to be directly usable as the destination parameter, or source
- * parameter in an application of vmult of a matrix.
+ * A helper class that is responsible for the initialization of a vector
+ * to be directly usable as the destination parameter, or source parameter
+ * in an application of vmult of a matrix.
*
* The generic version of this class just calls
* <code>Vector::reinit()</code> with the result of
* <code>Matrix::m()</code> or <code>Matrix::n()</code>, respectively.
- * This class is specialized for more complicated data structures, such
- * as TrilinosWrappers::MPI::Vector, etc.
+ * This class is specialized for more complicated data structures, such as
+ * TrilinosWrappers::MPI::Vector, etc.
*/
template<typename Vector>
class ReinitHelper
{
public:
/**
- * Initializes a vector v of the Range space to be directly usable
- * as the destination parameter in an application of vmult. Similar to
- * the reinit functions of the vector classes, the boolean determines
+ * Initializes a vector v of the Range space to be directly usable as
+ * the destination parameter in an application of vmult. Similar to the
+ * reinit functions of the vector classes, the boolean determines
* whether a fast initalization is done, i.e., if it is set to false the
* content of the vector is set to 0.
*
/**
* Initializes a vector of the Domain space to be directly usable as the
* source parameter in an application of vmult. Similar to the reinit
- * functions of the vector classes, the boolean determines whether a fast
- * initalization is done, i.e., if it is set to false the content of the
- * vector is set to 0.
+ * functions of the vector classes, the boolean determines whether a
+ * fast initalization is done, i.e., if it is set to false the content
+ * of the vector is set to 0.
*
* The generic version of this class just calls
* <code>Vector::reinit()</code> with the result of
* A function that encapsulates generic @p matrix objects that act on a
* compatible Vector type into a LinearOperator. The LinearOperator object
* that is created stores a reference to the matrix object. Thus, @p matrix
- * must remain a valid reference for the whole lifetime of the
- * LinearOperator object.
+ * must remain a valid reference for the whole lifetime of the LinearOperator
+ * object.
*
* All changes made on @p matrix after the creation of the LinearOperator
* object are reflected by the operator object. For example, it is a valid
* procedure to first create a LinearOperator and resize, reassemble the
* matrix later.
*
- * The Matrix class in question must provide the following minimal
- * interface:
+ * The Matrix class in question must provide the following minimal interface:
*
* @code
* class Matrix
*
* Variant of above function that takes an operator object @p
* operator_exemplar as an additional reference. This object is used to
- * populate the reinit_domain_vector and reinit_range_vector function
- * objects. The reference @p matrix is used to construct vmult, Tvmult,
- * etc.
+ * populate the reinit_domain_vector and reinit_range_vector function objects.
+ * The reference @p matrix is used to construct vmult, Tvmult, etc.
*
- * This variant can, for example, be used to encapsulate preconditioners
- * (that typically do not expose any information about the underlying
- * matrix).
+ * This variant can, for example, be used to encapsulate preconditioners (that
+ * typically do not expose any information about the underlying matrix).
*
* @author Matthias Maier, 2015
*
typedef MatrixBlock<MATRIX> value_type;
/**
- * The pointer type used for storing the objects. We use a shard
- * pointer, such that they get deleted automatically when not used
- * anymore.
+ * The pointer type used for storing the objects. We use a shard pointer,
+ * such that they get deleted automatically when not used anymore.
*/
typedef std_cxx11::shared_ptr<value_type> ptr_type;
*
* @deprecated If deal.II was configured with C++11 support, use the
* LinearOperator class instead, see the module on
- * @ref LAOperators "linear operators" for further details.
+ * @ref LAOperators "linear operators"
+ * for further details.
*
* @author Guido Kanschat, 2000, 2001, 2002, 2005
*/
*
* @deprecated If deal.II was configured with C++11 support, use the
* LinearOperator class instead, see the module on
- * @ref LAOperators "linear operators" for further details.
+ * @ref LAOperators "linear operators"
+ * for further details.
*
* @author Guido Kanschat, 2007
*/
*
* @deprecated If deal.II was configured with C++11 support, use the
* LinearOperator class instead, see the module on
- * @ref LAOperators "linear operators" for further details.
+ * @ref LAOperators "linear operators"
+ * for further details.
*
* @author Guido Kanschat, 2000, 2001, 2002, 2005
*/
*
* @deprecated If deal.II was configured with C++11 support, use the
* LinearOperator class instead, see the module on
- * @ref LAOperators "linear operators" for further details.
+ * @ref LAOperators "linear operators"
+ * for further details.
*
* @author Guido Kanschat, 2005
*/
/**
- * Return the element with given indices from any matrix type for which no
- * specialization of this function was declared above. This will call
+ * Return the element with given indices from any matrix type for which
+ * no specialization of this function was declared above. This will call
* <tt>operator()</tt> on the matrix.
*/
template <class Matrix>
/**
* A class to store a computation.
*
- * The PackagedOperation class allows lazy evaluation of expressions
- * involving vectors and linear operators. This is done by storing the
- * computational expression and only performing the computation when either
- * the object is implicitly converted to a vector object, or
- * <code>apply</code> (or <code>apply_add</code>) is invoked by hand. This
- * avoids unnecessary temporary storage of intermediate results.
- *
- * The class essentially consists of <code>std::function</code> objects
- * that store the knowledge of how to generate the result of a computation
- * and store it in a vector:
+ * The PackagedOperation class allows lazy evaluation of expressions involving
+ * vectors and linear operators. This is done by storing the computational
+ * expression and only performing the computation when either the object is
+ * implicitly converted to a vector object, or <code>apply</code> (or
+ * <code>apply_add</code>) is invoked by hand. This avoids unnecessary
+ * temporary storage of intermediate results.
+ *
+ * The class essentially consists of <code>std::function</code> objects that
+ * store the knowledge of how to generate the result of a computation and
+ * store it in a vector:
* @code
* std::function<void(Range &)> apply;
* std::function<void(Range &)> apply_add;
* @endcode
* The expression <code>residual</code> is of type
* <code>PackagedOperation<dealii::Vector<double>></code>. It stores
- * references to <code>A</code>, <code>b</code> and <code>x</code> and
- * defers the actual computation until <code>apply</code>, or
- * <code>apply_add</code> are explicitly invoked,
+ * references to <code>A</code>, <code>b</code> and <code>x</code> and defers
+ * the actual computation until <code>apply</code>, or <code>apply_add</code>
+ * are explicitly invoked,
* @code
* dealii::Vector<double> y;
* residual.reinit_vector(y);
PackagedOperation (const PackagedOperation<Range> &) = default;
/**
- * Constructor that creates a PackagedOperation object from a reference vector
- * @p u. The PackagedOperation returns @p u.
+ * Constructor that creates a PackagedOperation object from a reference
+ * vector @p u. The PackagedOperation returns @p u.
*
- * The PackagedOperation object that is created stores a reference to @p
- * u. Thus, the vector must remain a valid reference for the whole
- * lifetime of the PackagedOperation object. All changes made on @p u
- * after the creation of the PackagedOperation object are reflected by
- * the operator object.
+ * The PackagedOperation object that is created stores a reference to @p u.
+ * Thus, the vector must remain a valid reference for the whole lifetime of
+ * the PackagedOperation object. All changes made on @p u after the creation
+ * of the PackagedOperation object are reflected by the operator object.
*/
PackagedOperation (const Range &u)
{
*/
PackagedOperation<Range> &operator=(const PackagedOperation<Range> &) = default;
- /** Copy assignment operator that creates a PackagedOperation object from a
+ /**
+ * Copy assignment operator that creates a PackagedOperation object from a
* reference vector @p u. The PackagedOperation returns @p u.
*
* The PackagedOperation object that is created stores a reference to @p u.
- * Thus, the vector must remain a valid reference for the whole lifetime
- * of the PackagedOperation object. All changes made on @p u after the creation
+ * Thus, the vector must remain a valid reference for the whole lifetime of
+ * the PackagedOperation object. All changes made on @p u after the creation
* of the PackagedOperation object are reflected by the operator object.
*/
PackagedOperation<Range> &operator=(const Range &u)
}
/**
- * Subtraction with a PackagedOperation @p second_comp with the same @p Range.
+ * Subtraction with a PackagedOperation @p second_comp with the same @p
+ * Range.
*/
PackagedOperation<Range> &operator-=(const PackagedOperation<Range> &second_comp)
{
}
/**
- * Subract a constant @p offset (of the @p Range space) from the result
- * of a PackagedOperation.
+ * Subract a constant @p offset (of the @p Range space) from the result of a
+ * PackagedOperation.
*/
PackagedOperation<Range> &operator-=(const Range &offset)
{
std::function<void(Range &v)> apply;
/**
- * Add the result of the PackagedOperation to a vector v of the @p Range space.
+ * Add the result of the PackagedOperation to a vector v of the @p Range
+ * space.
*/
std::function<void(Range &v)> apply_add;
/**
* Initializes a vector v of the Range space to be directly usable as the
- * destination parameter in an application of apply, or apply_add.
- * Similar to the reinit functions of the vector classes, the boolean
- * determines whether a fast initialization is done, i.e., if it is set
- * to false the content of the vector is set to 0.
+ * destination parameter in an application of apply, or apply_add. Similar
+ * to the reinit functions of the vector classes, the boolean determines
+ * whether a fast initialization is done, i.e., if it is set to false the
+ * content of the vector is set to 0.
*/
std::function<void(Range &v, bool fast)> reinit_vector;
};
/**
* @relates PackagedOperation
*
- * Addition of two PackagedOperation objects @p first_comp and
- * @p second_comp given by vector space addition of the corresponding results.
+ * Addition of two PackagedOperation objects @p first_comp and @p second_comp
+ * given by vector space addition of the corresponding results.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Subtraction of two PackagedOperation objects @p first_comp and @p second_comp
- * given by vector space addition of the corresponding results.
+ * Subtraction of two PackagedOperation objects @p first_comp and @p
+ * second_comp given by vector space addition of the corresponding results.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Scalar multiplication of a PackagedOperation objects @p comp with a
- * scalar @p number given by a scaling PackagedOperation result with
- * @p number.
+ * Scalar multiplication of a PackagedOperation objects @p comp with a scalar
+ * @p number given by a scaling PackagedOperation result with @p number.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Scalar multiplication of a PackagedOperation objects @p comp with a
- * scalar @p number given by a scaling PackagedOperation result with
- * @p number.
+ * Scalar multiplication of a PackagedOperation objects @p comp with a scalar
+ * @p number given by a scaling PackagedOperation result with @p number.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Subtract a computational result from a constant @p offset (of the @p
- * Range space). The result is a PackagedOperation object that applies this
+ * Subtract a computational result from a constant @p offset (of the @p Range
+ * space). The result is a PackagedOperation object that applies this
* computation.
*
* @ingroup LAOperators
*
* Create a PackagedOperation object that stores the addition of two vectors.
*
- * The PackagedOperation object that is created stores a reference to @p u and @p
- * v. Thus, the vectors must remain valid references for the whole lifetime
+ * The PackagedOperation object that is created stores a reference to @p u and
+ * @p v. Thus, the vectors must remain valid references for the whole lifetime
* of the PackagedOperation object. All changes made on @p u or @p v after the
- * creation of the PackagedOperation object are reflected by the operator object.
+ * creation of the PackagedOperation object are reflected by the operator
+ * object.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Create a PackagedOperation object that stores the subtraction of two vectors.
+ * Create a PackagedOperation object that stores the subtraction of two
+ * vectors.
*
- * The PackagedOperation object that is created stores a reference to @p u
- * and @p v. Thus, the vectors must remain valid references for the whole
- * lifetime of the PackagedOperation object. All changes made on @p u or @p
- * v after the creation of the PackagedOperation object are reflected by
- * the operator object.
+ * The PackagedOperation object that is created stores a reference to @p u and
+ * @p v. Thus, the vectors must remain valid references for the whole lifetime
+ * of the PackagedOperation object. All changes made on @p u or @p v after the
+ * creation of the PackagedOperation object are reflected by the operator
+ * object.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Create a PackagedOperation object that stores the scaling of a vector
- * with a @p number.
+ * Create a PackagedOperation object that stores the scaling of a vector with
+ * a @p number.
*
* The PackagedOperation object that is created stores a reference to @p u.
* Thus, the vectors must remain valid references for the whole lifetime of
/**
* @relates PackagedOperation
*
- * Create a PackagedOperation object that stores the scaling of a vector
- * with a @p number.
+ * Create a PackagedOperation object that stores the scaling of a vector with
+ * a @p number.
*
* The PackagedOperation object that is created stores a reference to @p u.
* Thus, the vectors must remain valid references for the whole lifetime of
/**
* @relates PackagedOperation
*
- * Create a PackagedOperation object from a LinearOperator and a reference to a
- * vector @p u of the Domain space. The object stores the PackagedOperation
+ * Create a PackagedOperation object from a LinearOperator and a reference to
+ * a vector @p u of the Domain space. The object stores the PackagedOperation
* $\text{op} \,u$ (in matrix notation). <code>return</code>
* (<code>return_add</code>) are implemented with <code>vmult(__1,u)</code>
* (<code>vmult_add(__1,u)</code>).
*
* The PackagedOperation object that is created stores a reference to @p u.
* Thus, the vector must remain a valid reference for the whole lifetime of
- * the PackagedOperation object. All changes made on @p u after the
- * creation of the PackagedOperation object are reflected by the operator
- * object.
+ * the PackagedOperation object. All changes made on @p u after the creation
+ * of the PackagedOperation object are reflected by the operator object.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Create a PackagedOperation object from a LinearOperator and a reference
- * to a vector @p u of the Range space. The object stores the
- * PackagedOperation $\text{op}^T \,u$ (in matrix notation).
- * <code>return</code> (<code>return_add</code>) are implemented with
- * <code>Tvmult(__1,u)</code> (<code>Tvmult_add(__1,u)</code>).
+ * Create a PackagedOperation object from a LinearOperator and a reference to
+ * a vector @p u of the Range space. The object stores the PackagedOperation
+ * $\text{op}^T \,u$ (in matrix notation). <code>return</code>
+ * (<code>return_add</code>) are implemented with <code>Tvmult(__1,u)</code>
+ * (<code>Tvmult_add(__1,u)</code>).
*
* The PackagedOperation object that is created stores a reference to @p u.
* Thus, the vector must remain a valid reference for the whole lifetime of
- * the PackagedOperation object. All changes made on @p u after the
- * creation of the PackagedOperation object are reflected by the operator
- * object.
+ * the PackagedOperation object. All changes made on @p u after the creation
+ * of the PackagedOperation object are reflected by the operator object.
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Composition of a PackagedOperation object with a LinearOperator. The
- * object stores the computation $\text{op} \,comp$ (in matrix notation).
+ * Composition of a PackagedOperation object with a LinearOperator. The object
+ * stores the computation $\text{op} \,comp$ (in matrix notation).
*
* @ingroup LAOperators
*/
/**
* @relates PackagedOperation
*
- * Composition of a PackagedOperation object with a LinearOperator. The
- * object stores the computation $\text{op}^T \,comp$ (in matrix notation).
+ * Composition of a PackagedOperation object with a LinearOperator. The object
+ * stores the computation $\text{op}^T \,comp$ (in matrix notation).
*
* @ingroup LAOperators
*/
/**
* Internal function that checks that there are no pending insert/add
- * operations. Throws an exception otherwise. Useful before calling
- * any PETSc internal functions modifying the matrix.
+ * operations. Throws an exception otherwise. Useful before calling any
+ * PETSc internal functions modifying the matrix.
*/
void assert_is_compressed();
const MPI_Comm &communicator);
/**
- * Release all memory and return to a state just like after having called
- * the default constructor.
+ * Release all memory and return to a state just like after having
+ * called the default constructor.
*/
void clear ();
/**
* Return the imaginary part of the value of the referenced element.
*
- * @note This operation is not defined for real numbers and an
- * exception is thrown.
+ * @note This operation is not defined for real numbers and an exception
+ * is thrown.
*/
PetscReal imag () const;
typedef types::global_dof_index size_type;
/**
- * Parameters for block relaxation methods. In addition to typical
- * control parameters like #relaxation, this object also contains
- * the block structure in #block_list and an optional ordering of
- * the blocks in #order.
+ * Parameters for block relaxation methods. In addition to typical control
+ * parameters like #relaxation, this object also contains the block
+ * structure in #block_list and an optional ordering of the blocks in
+ * #order.
*/
class AdditionalData : public Subscriptor
{
const bool same_diagonal = false);
/**
- * The mapping from indices to blocks. Each row of this pattern
- * enumerates the indices constituting a diagonal block to be
- * inverted.
+ * The mapping from indices to blocks. Each row of this pattern enumerates
+ * the indices constituting a diagonal block to be inverted.
*/
SparsityPattern block_list;
double relaxation;
/**
- * Invert diagonal during initialization. Alternatively, diagonal
- * blocks are inverted on the fly, whenever they are used. While
- * inverting blocks in advance requires more memory, it usually
- * saves a lot of computation. See #same_diagonal on how you can
- * avoid memory overhead.
+ * Invert diagonal during initialization. Alternatively, diagonal blocks
+ * are inverted on the fly, whenever they are used. While inverting blocks
+ * in advance requires more memory, it usually saves a lot of computation.
+ * See #same_diagonal on how you can avoid memory overhead.
*/
bool invert_diagonal;
/**
- * Assume all diagonal blocks are equal to save memory. If this
- * flag is true, then only the first diagonal block of the matrix
- * is inverted and stored. It is then used for all other blocks.
+ * Assume all diagonal blocks are equal to save memory. If this flag is
+ * true, then only the first diagonal block of the matrix is inverted and
+ * stored. It is then used for all other blocks.
*
* \note Avoid setting this true if your blocks are not equal, in
* particularr if their sizes differ.
typename PreconditionBlockBase<inverse_type>::Inversion inversion;
/**
- * If #inversion is SVD, we can compute the Penrose-Moore inverse
- * of the blocks. In order to do so, we can specify here the
- * threshold below which a singular value will be considered zero
- * and thus not inverted. This parameter is used in the call to
+ * If #inversion is SVD, we can compute the Penrose-Moore inverse of the
+ * blocks. In order to do so, we can specify here the threshold below
+ * which a singular value will be considered zero and thus not inverted.
+ * This parameter is used in the call to
* LAPACKFullMatrix::compute_inverse_svd().
*/
double threshold;
};
/**
- * Initialize matrix and additional information. In a second step,
- * the inverses of the diagonal blocks may be computed.
+ * Initialize matrix and additional information. In a second step, the
+ * inverses of the diagonal blocks may be computed.
*
- * Note that AdditionalData, different from other preconditioners,
- * defines quite large objects, and that therefore the object is not
- * copied, but rather a pointer is stored. Thus, the lifetime of
- * <code>additional_data</code> hast to exceed the lifetime of this
- * object.
+ * Note that AdditionalData, different from other preconditioners, defines
+ * quite large objects, and that therefore the object is not copied, but
+ * rather a pointer is stored. Thus, the lifetime of
+ * <code>additional_data</code> hast to exceed the lifetime of this object.
*/
void initialize (const MATRIX &A,
const AdditionalData ¶meters);
* sparsity pattern of the decomposition is a superset of the sparsity pattern
* in the original matrix.
*
- * Such fill-in can be accomplished by various ways, one of which is the
- * copy-constructor of the SparsityPattern class that allows the addition of
- * side-diagonals to a given sparsity structure.
+ * Such fill-in can be accomplished by various ways, one of which is the copy-
+ * constructor of the SparsityPattern class that allows the addition of side-
+ * diagonals to a given sparsity structure.
*
*
* <h3>Unified use of preconditioners</h3>
* parameters of the LU decomposition.
*
* 1/ The matrix diagonal can be strengthened by adding
- * <code>strengthen_diagonal</code> times the sum of the absolute row entries of
- * each row to the respective diagonal entries. By default no strengthening is
- * performed.
+ * <code>strengthen_diagonal</code> times the sum of the absolute row entries
+ * of each row to the respective diagonal entries. By default no strengthening
+ * is performed.
*
* 2/ By default, each initialize() function call creates its own sparsity.
* For that, it copies the sparsity of <code>matrix</code> and adds a specific
const SparsityPattern *use_this_sparsity=0);
/**
- * <code>strengthen_diag</code> times the sum of absolute row entries is added
- * to the diagonal entries.
+ * <code>strengthen_diag</code> times the sum of absolute row entries is
+ * added to the diagonal entries.
*
* Per default, this value is zero, i.e. the diagonal is not strengthened.
*/
double strengthen_diagonal;
/**
- * By default, the <code>initialize(matrix, data)</code> function creates its
- * own sparsity. This sparsity has the same SparsityPattern as
- * <code>matrix</code> with some extra off diagonals the number of which is
- * specified by <code>extra_off_diagonals</code>.
+ * By default, the <code>initialize(matrix, data)</code> function creates
+ * its own sparsity. This sparsity has the same SparsityPattern as
+ * <code>matrix</code> with some extra off diagonals the number of which
+ * is specified by <code>extra_off_diagonals</code>.
*
- * The user can give a SparsityPattern to <code>use_this_sparsity</code>. Then
- * this sparsity is used and the <code>extra_off_diagonals</code> argument is
- * ignored.
+ * The user can give a SparsityPattern to <code>use_this_sparsity</code>.
+ * Then this sparsity is used and the <code>extra_off_diagonals</code>
+ * argument is ignored.
*/
unsigned int extra_off_diagonals;
* function calls <code>reinit(*use_this_sparsity)</code> causing this
* sparsity to be used.
*
- * Note that the sparsity structures of <code>*use_this_sparsity</code> and
- * the matrix passed to the initialize function need not be equal. Fill-in
- * is allowed, as well as filtering out some elements in the matrix.
+ * Note that the sparsity structures of <code>*use_this_sparsity</code>
+ * and the matrix passed to the initialize function need not be equal.
+ * Fill-in is allowed, as well as filtering out some elements in the
+ * matrix.
*/
const SparsityPattern *use_this_sparsity;
};
*
* According to the <code>parameters</code>, this function creates a new
* SparsityPattern or keeps the previous sparsity or takes the sparsity
- * given by the user to <code>data</code>. Then, this function performs the LU
- * decomposition.
+ * given by the user to <code>data</code>. Then, this function performs the
+ * LU decomposition.
*
* After this function is called the preconditioner is ready to be used
* (using the <code>vmult</code> function of derived classes).
bool empty () const;
/**
- * Return the dimension of the codomain (or range) space. To remember:
- * the matrix is of dimension $m \times n$.
+ * Return the dimension of the codomain (or range) space. To remember: the
+ * matrix is of dimension $m \times n$.
*/
size_type m () const;
iterator begin ();
/**
- * Return an iterator pointing the element past the last one of
- * this matrix.
+ * Return an iterator pointing the element past the last one of this matrix.
*/
const_iterator end () const;
/**
* Return an iterator pointing to the first element of row @p r.
*
- * Note that if the given row is empty, i.e. does not contain any
- * nonzero entries, then the iterator returned by this function
- * equals <tt>end(r)</tt>. The returned iterator may not be
- * dereferencable in that case if neither row @p r nor any of the
- * following rows contain any nonzero entries.
+ * Note that if the given row is empty, i.e. does not contain any nonzero
+ * entries, then the iterator returned by this function equals
+ * <tt>end(r)</tt>. The returned iterator may not be dereferencable in that
+ * case if neither row @p r nor any of the following rows contain any
+ * nonzero entries.
*/
const_iterator begin (const size_type r) const;
iterator begin (const size_type r);
/**
- * Return an iterator pointing the element past the last one of
- * row @p r , or past the end of the entire sparsity pattern if
- * none of the rows after @p r contain any entries at all.
+ * Return an iterator pointing the element past the last one of row @p r ,
+ * or past the end of the entire sparsity pattern if none of the rows after
+ * @p r contain any entries at all.
*
- * Note that the end iterator is not necessarily dereferencable. This is
- * in particular the case if it is the end iterator for the last row of a
+ * Note that the end iterator is not necessarily dereferencable. This is in
+ * particular the case if it is the end iterator for the last row of a
* matrix.
*/
const_iterator end (const size_type r) const;
};
/**
- * Type of matrix entries. This typedef is analogous to <tt>value_type</tt> in
- * the standard library containers.
+ * Type of matrix entries. This typedef is analogous to <tt>value_type</tt>
+ * in the standard library containers.
*/
typedef number value_type;
bool empty () const;
/**
- * Return the dimension of the codomain (or range) space. To remember:
- * the matrix is of dimension $m \times n$.
+ * Return the dimension of the codomain (or range) space. To remember: the
+ * matrix is of dimension $m \times n$.
*/
size_type m () const;
/**
- * Return the dimension of the domain space. To remember: the matrix is
- * of dimension $m \times n$.
+ * Return the dimension of the domain space. To remember: the matrix is of
+ * dimension $m \times n$.
*/
size_type n () const;
const_iterator end () const;
/**
- * Iterator starting at the first entry of row @p r. If this row is empty, the
- * result is <tt>end(r)</tt>, which does NOT point into row @p r.
+ * Iterator starting at the first entry of row @p r. If this row is empty,
+ * the result is <tt>end(r)</tt>, which does NOT point into row @p r.
*/
const_iterator begin (const size_type r) const;
* The typical use for these iterators is to iterate over the elements of a
* sparsity pattern (or, since they also serve as the basis for iterating
* over the elements of an associated matrix, over the elements of a sparse
- * matrix), or over the elements of individual rows. There is no
- * guarantee that the elements of a row are actually traversed in an order
- * in which column numbers monotonically increase. See the documentation of the
+ * matrix), or over the elements of individual rows. There is no guarantee
+ * that the elements of a row are actually traversed in an order in which
+ * column numbers monotonically increase. See the documentation of the
* SparsityPattern class for more information.
*
* @note This class operates directly on the internal data structures of the
* statements like <tt>v.push_back (SparsityPattern());</tt>, with
* <tt>v</tt> a vector of SparsityPattern objects.
*
- * Usually, it is sufficient to use the explicit keyword to disallow unwanted
- * temporaries, but this does not work for <tt>std::vector</tt>s. Since
- * copying a structure like this is not useful anyway because multiple
+ * Usually, it is sufficient to use the explicit keyword to disallow
+ * unwanted temporaries, but this does not work for <tt>std::vector</tt>s.
+ * Since copying a structure like this is not useful anyway because multiple
* matrices can use the same sparsity structure, copies are only allowed for
* empty objects, as described above.
*/
const ForwardIterator end);
/**
- * Copy data from an object of type DynamicSparsityPattern. Although
- * not a compressed sparsity pattern, this function is also instantiated if
- * the argument is of type SparsityPattern (i.e., the current class).
- * Previous content of this object is lost, and the sparsity pattern is in
- * compressed mode afterwards.
+ * Copy data from an object of type DynamicSparsityPattern. Although not a
+ * compressed sparsity pattern, this function is also instantiated if the
+ * argument is of type SparsityPattern (i.e., the current class). Previous
+ * content of this object is lost, and the sparsity pattern is in compressed
+ * mode afterwards.
*/
template <typename CompressedSparsityType>
void copy_from (const CompressedSparsityType &dsp);
* and puts that node and its direct neighbors into one chunk. Next, it
* selects one of the neighbors of the already selected nodes, adds the node
* and its direct neighbors that are not part of one of the previous chunks,
- * into the next. After this sweep, neighboring nodes are grouped
- * together. To ensure a similar grouping on a more global level, this
- * grouping is called recursively on the groups so formed. The recursion
- * stops when no further grouping is possible. Eventually, the ordering
- * obtained by this method passes through the indices represented in the
- * sparsity pattern in a z-like way.
+ * into the next. After this sweep, neighboring nodes are grouped together.
+ * To ensure a similar grouping on a more global level, this grouping is
+ * called recursively on the groups so formed. The recursion stops when no
+ * further grouping is possible. Eventually, the ordering obtained by this
+ * method passes through the indices represented in the sparsity pattern in
+ * a z-like way.
*
* If the graph has two or more unconnected components, the algorithm will
* number each component consecutively, starting with the components with
* processors that all participate in this operation.
*
* @param myrange indicates the range of elements stored locally and should
- * be the one used in the constructor of the
- * DynamicSparsityPattern. This should be the locally relevant
- * set. Only rows contained in myrange are checked in dsp for transfer.
- * This function needs to be used with PETScWrappers::MPI::SparseMatrix for
- * it to work correctly in a parallel computation.
+ * be the one used in the constructor of the DynamicSparsityPattern. This
+ * should be the locally relevant set. Only rows contained in myrange are
+ * checked in dsp for transfer. This function needs to be used with
+ * PETScWrappers::MPI::SparseMatrix for it to work correctly in a parallel
+ * computation.
*/
template <class DSP_t>
void distribute_sparsity_pattern(DSP_t &dsp,
*
* @deprecated If deal.II was configured with C++11 support, use the
* LinearOperator class instead, see the module on
- * @ref LAOperators "linear operators" for further details.
+ * @ref LAOperators "linear operators"
+ * for further details.
*
* @ingroup Matrix2
* @author Guido Kanschat, 2006
/**
* Return a vector of the underlying Trilinos Epetra_Map that sets the
* partitioning of the range space of this block matrix, i.e., the
- * partitioning of the individual block vectors that are the result
- * from matrix-vector products.
+ * partitioning of the individual block vectors that are the result from
+ * matrix-vector products.
*/
std::vector<Epetra_Map> range_partitioner () const;
template <typename> class ReinitHelper;
/**
- * A helper class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::BlockVector.
+ * A helper class internally used in linear_operator.h. Specialization for
+ * TrilinosWrappers::BlockVector.
*/
template<>
class ReinitHelper<TrilinosWrappers::BlockVector>
* Move constructor. Creates a new vector by stealing the internal data
* of the vector @p v.
*
- * @note This constructor is only available if deal.II is configured with
- * C++11 support.
+ * @note This constructor is only available if deal.II is configured
+ * with C++11 support.
*/
BlockVector (BlockVector &&v);
#endif
template <typename> class ReinitHelper;
/**
- * A helper class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::BlockVector.
+ * A helper class internally used in linear_operator.h. Specialization for
+ * TrilinosWrappers::MPI::BlockVector.
*/
template<>
class ReinitHelper<TrilinosWrappers::MPI::BlockVector>
/**
* A data structure that is used to control details of how the algebraic
- * multigrid is set up. The flags detailed in here are then passed to
- * the Trilinos MueLu implementation. A structure of the current type are
+ * multigrid is set up. The flags detailed in here are then passed to the
+ * Trilinos MueLu implementation. A structure of the current type are
* passed to the constructor of PreconditionAMGMueLu.
*/
struct AdditionalData
/**
* Determines whether the AMG preconditioner should be optimized for
* elliptic problems (MueLu option smoothed aggregation SA, using a
- * Chebyshev smoother) or for non-elliptic problems (MueLu option
- * non-symmetric smoothed aggregation NSSA, smoother is SSOR with
+ * Chebyshev smoother) or for non-elliptic problems (MueLu option non-
+ * symmetric smoothed aggregation NSSA, smoother is SSOR with
* underrelaxation).
*/
bool elliptic;
bool output_details;
/**
- * Determines which smoother to use for the AMG cycle. Possibilities
- * for smoother_type are the following:
+ * Determines which smoother to use for the AMG cycle. Possibilities for
+ * smoother_type are the following:
* <ul>
- * <li> "Aztec" </li>
- * <li> "IFPACK" </li>
- * <li> "Jacobi" </li>
- * <li> "ML symmetric Gauss-Seidel" </li>
- * <li> "symmetric Gauss-Seidel" </li>
- * <li> "ML Gauss-Seidel" </li>
- * <li> "Gauss-Seidel" </li>
- * <li> "block Gauss-Seidel" </li>
- * <li> "symmetric block Gauss-Seidel" </li>
- * <li> "Chebyshev" </li>
- * <li> "MLS" </li>
- * <li> "Hiptmair" </li>
- * <li> "Amesos-KLU" </li>
- * <li> "Amesos-Superlu" </li>
- * <li> "Amesos-UMFPACK" </li>
- * <li> "Amesos-Superludist" </li>
- * <li> "Amesos-MUMPS" </li>
- * <li> "user-defined" </li>
- * <li> "SuperLU" </li>
- * <li> "IFPACK-Chebyshev" </li>
- * <li> "self" </li>
- * <li> "do-nothing" </li>
- * <li> "IC" </li>
- * <li> "ICT" </li>
- * <li> "ILU" </li>
- * <li> "ILUT" </li>
- * <li> "Block Chebyshev" </li>
- * <li> "IFPACK-Block Chebyshev" </li>
+ * <li> "Aztec" </li>
+ * <li> "IFPACK" </li>
+ * <li> "Jacobi" </li>
+ * <li> "ML symmetric Gauss-Seidel" </li>
+ * <li> "symmetric Gauss-Seidel" </li>
+ * <li> "ML Gauss-Seidel" </li>
+ * <li> "Gauss-Seidel" </li>
+ * <li> "block Gauss-Seidel" </li>
+ * <li> "symmetric block Gauss-Seidel" </li>
+ * <li> "Chebyshev" </li>
+ * <li> "MLS" </li>
+ * <li> "Hiptmair" </li>
+ * <li> "Amesos-KLU" </li>
+ * <li> "Amesos-Superlu" </li>
+ * <li> "Amesos-UMFPACK" </li>
+ * <li> "Amesos-Superludist" </li>
+ * <li> "Amesos-MUMPS" </li>
+ * <li> "user-defined" </li>
+ * <li> "SuperLU" </li>
+ * <li> "IFPACK-Chebyshev" </li>
+ * <li> "self" </li>
+ * <li> "do-nothing" </li>
+ * <li> "IC" </li>
+ * <li> "ICT" </li>
+ * <li> "ILU" </li>
+ * <li> "ILUT" </li>
+ * <li> "Block Chebyshev" </li>
+ * <li> "IFPACK-Block Chebyshev" </li>
* </ul>
*/
const char *smoother_type;
/**
* Let Trilinos compute a multilevel hierarchy for the solution of a
* linear system with the given matrix. As opposed to the other initialize
- * function above, this function uses an object of type Epetra_CrsMatrixCrs.
+ * function above, this function uses an object of type
+ * Epetra_CrsMatrixCrs.
*/
void initialize (const Epetra_CrsMatrix &matrix,
const AdditionalData &additional_data = AdditionalData());
* format specified in TrilinosWrappers::SparseMatrix.
*
* This function is similar to the one above, but allows the user to set
- * most of the options of the Trilinos ML preconditioner. In order to find out
- * about all the options for ML, we refer to the <a
+ * most of the options of the Trilinos ML preconditioner. In order to find
+ * out about all the options for ML, we refer to the <a
* href=http://trilinos.sandia.gov/packages/ml/mlguide5.pdf>ML user's
* guide</a>. Not all ML options have a corresponding MueLu option.
*/
* <ul>
* <li> The matrix uses only one MPI process.
* <li> The matrix has been initialized with the reinit() method with a
- * DynamicSparsityPattern (that includes the set of locally
- * relevant rows, i.e., the rows that an assembly routine will possibly
- * write into).
+ * DynamicSparsityPattern (that includes the set of locally relevant rows,
+ * i.e., the rows that an assembly routine will possibly write into).
* <li> The matrix has been initialized from a
* TrilinosWrappers::SparsityPattern object that in turn has been
* initialized with the reinit function specifying three index sets, one for
* optional argument @p exchange_data can be used for reinitialization
* with a sparsity pattern that is not fully constructed. This feature is
* only implemented for input sparsity patterns of type
- * DynamicSparsityPattern. If the flag is not set, each processor
- * just sets the elements in the sparsity pattern that belong to its rows.
+ * DynamicSparsityPattern. If the flag is not set, each processor just
+ * sets the elements in the sparsity pattern that belong to its rows.
*
* If the sparsity pattern given to this function is of type
- * DynamicSparsity pattern, then a matrix will be created that
- * allows several threads to write into different rows of the matrix at
- * the same also with MPI, as opposed to most other reinit() methods.
+ * DynamicSparsity pattern, then a matrix will be created that allows
+ * several threads to write into different rows of the matrix at the same
+ * also with MPI, as opposed to most other reinit() methods.
*
* This is a collective operation that needs to be called on all
* processors in order to avoid a dead lock.
* to the deal.II own object. The optional argument @p exchange_data can
* be used for reinitialization with a sparsity pattern that is not fully
* constructed. This feature is only implemented for input sparsity
- * patterns of type DynamicSparsityPattern. If the flag is not
- * set, each processor just sets the elements in the sparsity pattern that
- * belong to its rows.
+ * patterns of type DynamicSparsityPattern. If the flag is not set, each
+ * processor just sets the elements in the sparsity pattern that belong to
+ * its rows.
*
* This is a collective operation that needs to be called on all
* processors in order to avoid a dead lock.
* The second parameter can be used to set the diagonal entry of this row
* to a value different from zero. The default is to set it to zero.
*
- * @note If the matrix is stored in parallel across multiple
- * processors using MPI, this function only touches rows that are
- * locally stored and simply ignores all other row
- * indices. Further, in the context of parallel computations, you
- * will get into trouble if you clear a row while other processors
- * still have pending writes or additions into the same row. In
- * other words, if another processor still wants to add something
- * to an element of a row and you call this function to zero out
- * the row, then the next time you call compress() may add the
- * remote value to the zero you just created. Consequently, you
- * will want to call compress() after you made the last
- * modifications to a matrix and before starting to clear rows.
+ * @note If the matrix is stored in parallel across multiple processors
+ * using MPI, this function only touches rows that are locally stored and
+ * simply ignores all other row indices. Further, in the context of
+ * parallel computations, you will get into trouble if you clear a row
+ * while other processors still have pending writes or additions into the
+ * same row. In other words, if another processor still wants to add
+ * something to an element of a row and you call this function to zero out
+ * the row, then the next time you call compress() may add the remote
+ * value to the zero you just created. Consequently, you will want to call
+ * compress() after you made the last modifications to a matrix and before
+ * starting to clear rows.
*/
void clear_row (const size_type row,
const TrilinosScalar new_diag_value = 0);
* diagonal entries get the same value -- if you want different values for
* the diagonal entries, you have to set them by hand.
*
- * @note If the matrix is stored in parallel across multiple
- * processors using MPI, this function only touches rows that are
- * locally stored and simply ignores all other row
- * indices. Further, in the context of parallel computations, you
- * will get into trouble if you clear a row while other processors
- * still have pending writes or additions into the same row. In
- * other words, if another processor still wants to add something
- * to an element of a row and you call this function to zero out
- * the row, then the next time you call compress() may add the
- * remote value to the zero you just created. Consequently, you
- * will want to call compress() after you made the last
- * modifications to a matrix and before starting to clear rows.
+ * @note If the matrix is stored in parallel across multiple processors
+ * using MPI, this function only touches rows that are locally stored and
+ * simply ignores all other row indices. Further, in the context of
+ * parallel computations, you will get into trouble if you clear a row
+ * while other processors still have pending writes or additions into the
+ * same row. In other words, if another processor still wants to add
+ * something to an element of a row and you call this function to zero out
+ * the row, then the next time you call compress() may add the remote
+ * value to the zero you just created. Consequently, you will want to call
+ * compress() after you made the last modifications to a matrix and before
+ * starting to clear rows.
*/
void clear_rows (const std::vector<size_type> &rows,
const TrilinosScalar new_diag_value = 0);
/**
* Return an iterator pointing to the first element of the matrix.
*
- * The elements accessed by iterators within each row are ordered
- * in the way in which Trilinos stores them, though the
- * implementation guarantees that all elements of one row are
- * accessed before the elements of the next row. If your algorithm
- * relies on visiting elements within one row, you will need to
- * consult with the Trilinos documentation on the order in which
- * it stores data. It is, however, generally not a good and
- * long-term stable idea to rely on the order in which receive
- * elements if you iterate over them.
- *
- * When you iterate over the elements of a parallel matrix, you
- * will only be able to access the locally owned rows. (You can
- * access the other rows as well, but they will look empty.) In
- * that case, you probably want to call the begin() function that
- * takes the row as an argument to limit the range of elements to
- * loop over.
+ * The elements accessed by iterators within each row are ordered in the
+ * way in which Trilinos stores them, though the implementation guarantees
+ * that all elements of one row are accessed before the elements of the
+ * next row. If your algorithm relies on visiting elements within one row,
+ * you will need to consult with the Trilinos documentation on the order
+ * in which it stores data. It is, however, generally not a good and long-
+ * term stable idea to rely on the order in which receive elements if you
+ * iterate over them.
+ *
+ * When you iterate over the elements of a parallel matrix, you will only
+ * be able to access the locally owned rows. (You can access the other
+ * rows as well, but they will look empty.) In that case, you probably
+ * want to call the begin() function that takes the row as an argument to
+ * limit the range of elements to loop over.
*/
const_iterator begin () const;
iterator begin ();
/**
- * Return an iterator pointing the element past the last one of
- * this matrix.
+ * Return an iterator pointing the element past the last one of this
+ * matrix.
*/
const_iterator end () const;
/**
* Return an iterator pointing to the first element of row @p r.
*
- * Note that if the given row is empty, i.e. does not contain any
- * nonzero entries, then the iterator returned by this function
- * equals <tt>end(r)</tt>. The returned iterator may not be
- * dereferencable in that case if neither row @p r nor any of the
- * following rows contain any nonzero entries.
- *
- * The elements accessed by iterators within each row are ordered
- * in the way in which Trilinos stores them, though the
- * implementation guarantees that all elements of one row are
- * accessed before the elements of the next row. If your algorithm
- * relies on visiting elements within one row, you will need to
- * consult with the Trilinos documentation on the order in which
- * it stores data. It is, however, generally not a good and
- * long-term stable idea to rely on the order in which receive
- * elements if you iterate over them.
- *
- * @note When you access the elements of a parallel matrix, you
- * can only access the elements of rows that are actually stored
- * locally. (You can access the other rows as well, but they will
- * look empty.) Even then, if another processor has since written
- * into, or added to, an element of the matrix that is stored on
- * the current processor, then you will still see the old value of
- * this entry unless you have called compress() between modifying
- * the matrix element on the remote processor and accessing it on
- * the current processor. See the documentation of the compress()
- * function for more information.
+ * Note that if the given row is empty, i.e. does not contain any nonzero
+ * entries, then the iterator returned by this function equals
+ * <tt>end(r)</tt>. The returned iterator may not be dereferencable in
+ * that case if neither row @p r nor any of the following rows contain any
+ * nonzero entries.
+ *
+ * The elements accessed by iterators within each row are ordered in the
+ * way in which Trilinos stores them, though the implementation guarantees
+ * that all elements of one row are accessed before the elements of the
+ * next row. If your algorithm relies on visiting elements within one row,
+ * you will need to consult with the Trilinos documentation on the order
+ * in which it stores data. It is, however, generally not a good and long-
+ * term stable idea to rely on the order in which receive elements if you
+ * iterate over them.
+ *
+ * @note When you access the elements of a parallel matrix, you can only
+ * access the elements of rows that are actually stored locally. (You can
+ * access the other rows as well, but they will look empty.) Even then, if
+ * another processor has since written into, or added to, an element of
+ * the matrix that is stored on the current processor, then you will still
+ * see the old value of this entry unless you have called compress()
+ * between modifying the matrix element on the remote processor and
+ * accessing it on the current processor. See the documentation of the
+ * compress() function for more information.
*/
const_iterator begin (const size_type r) const;
iterator begin (const size_type r);
/**
- * Return an iterator pointing the element past the last one of
- * row @p r , or past the end of the entire sparsity pattern if
- * none of the rows after @p r contain any entries at all.
+ * Return an iterator pointing the element past the last one of row @p r ,
+ * or past the end of the entire sparsity pattern if none of the rows
+ * after @p r contain any entries at all.
*
* Note that the end iterator is not necessarily dereferencable. This is
* in particular the case if it is the end iterator for the last row of a
* with the difference that this class can work fully in %parallel according
* to a partitioning of the sparsity pattern rows.
*
- * This class has many similarities to the DynamicSparsityPattern, since
- * it can dynamically add elements to the pattern without any memory being
+ * This class has many similarities to the DynamicSparsityPattern, since it
+ * can dynamically add elements to the pattern without any memory being
* previously reserved for it. However, it also has a method
* SparsityPattern::compress(), that finalizes the pattern and enables its
* use with Trilinos sparse matrices.
* The number of columns entries per row is specified as the maximum
* number of entries argument. This does not need to be an accurate
* number since the entries are allocated dynamically in a similar manner
- * as for the deal.II DynamicSparsityPattern classes, but a good
- * estimate will reduce the setup time of the sparsity pattern.
+ * as for the deal.II DynamicSparsityPattern classes, but a good estimate
+ * will reduce the setup time of the sparsity pattern.
*/
void
reinit (const size_type m,
* Move constructor. Creates a new vector by stealing the internal data
* of the vector @p v.
*
- * @note This constructor is only available if deal.II is configured with
- * C++11 support.
+ * @note This constructor is only available if deal.II is configured
+ * with C++11 support.
*/
Vector (Vector &&v);
#endif
template <typename> class ReinitHelper;
/**
- * A helper class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::Vector.
+ * A helper class internally used in linear_operator.h. Specialization for
+ * TrilinosWrappers::MPI::Vector.
*/
template<>
class ReinitHelper<TrilinosWrappers::MPI::Vector>
};
/**
- * A helper class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::Vector.
+ * A helper class internally used in linear_operator.h. Specialization for
+ * TrilinosWrappers::Vector.
*/
template<>
class ReinitHelper<TrilinosWrappers::Vector>
#ifdef DEAL_II_WITH_CXX11
/**
- * Move constructor. Creates a new vector by stealing the internal data
- * of the vector @p v.
+ * Move constructor. Creates a new vector by stealing the internal data of
+ * the vector @p v.
*
* @note This constructor is only available if deal.II is configured with
* C++11 support.
#ifdef DEAL_II_WITH_CXX11
/**
- * Move the given vector. This operator replaces the present vector with
- * @p v by efficiently swapping the internal data structures.
+ * Move the given vector. This operator replaces the present vector with @p
+ * v by efficiently swapping the internal data structures.
*
- * @note This operator is only available if deal.II is configured with
- * C++11 support.
+ * @note This operator is only available if deal.II is configured with C++11
+ * support.
*/
Vector<Number> &operator= (Vector<Number> &&v);
#endif
private:
/**
- * Allocate and align @p val along 64-byte boundaries. The size
- * of the allocated memory is determined by @p max_vec_size .
+ * Allocate and align @p val along 64-byte boundaries. The size of the
+ * allocated memory is determined by @p max_vec_size .
*/
void allocate();
void initialize(AnyData &results, bool separate_faces = true);
/**
- * Initialize the local data in the DoFInfo object used later
- * for assembling.
+ * Initialize the local data in the DoFInfo object used later for
+ * assembling.
*
* The info object refers to a cell if <code>!face</code>, or else to an
* interior or boundary face.
/**
- * Assemble local matrices into a single global matrix or several
- * global matrices associated with the same DoFHandler. If these global
- * matrix have a block structure, this structure is not used, but rather
- * the global numbering of degrees of freedom.
+ * Assemble local matrices into a single global matrix or several global
+ * matrices associated with the same DoFHandler. If these global matrix
+ * have a block structure, this structure is not used, but rather the
+ * global numbering of degrees of freedom.
*
- * After being initialized with a SparseMatrix object (or another
- * matrix offering the same functionality as SparseMatrix::add())
- * or a vector of such, this class can be used in a
- * MeshWorker::loop() to assemble the cell and face matrices into
- * the global matrix.
+ * After being initialized with a SparseMatrix object (or another matrix
+ * offering the same functionality as SparseMatrix::add()) or a vector of
+ * such, this class can be used in a MeshWorker::loop() to assemble the
+ * cell and face matrices into the global matrix.
*
* If a ConstraintMatrix has been provided during initialization, this
* matrix will be used (ConstraintMatrix::distribute_local_to_global(), to
* be precise) to enter the local matrix into the global sparse matrix.
*
- * The assembler can handle two different types of local
- * data. First, by default, the obvious choice of taking a single
- * local matrix with dimensions equal to the number of degrees of
- * freedom of the cell. Alternatively, a local block structure
- * can be initialized in DoFInfo. After this, the local data will
- * be arranged as an array of n by n FullMatrix blocks (n being
- * the number of blocks in the FESystem used by the DoFHandler in
- * DoFInfo), which are ordered lexicographically with column index
- * fastest in DoFInfo. If the matrix was initialized with a vector
- * of several matrices and local block structure is used, then the
- * first n<sup>2</sup> matrices in LocalResults will be used for
- * the first matrix in this vector, the second set of
- * n<sup>2</sup> for the second, and so on.
+ * The assembler can handle two different types of local data. First, by
+ * default, the obvious choice of taking a single local matrix with
+ * dimensions equal to the number of degrees of freedom of the cell.
+ * Alternatively, a local block structure can be initialized in DoFInfo.
+ * After this, the local data will be arranged as an array of n by n
+ * FullMatrix blocks (n being the number of blocks in the FESystem used by
+ * the DoFHandler in DoFInfo), which are ordered lexicographically with
+ * column index fastest in DoFInfo. If the matrix was initialized with a
+ * vector of several matrices and local block structure is used, then the
+ * first n<sup>2</sup> matrices in LocalResults will be used for the first
+ * matrix in this vector, the second set of n<sup>2</sup> for the second,
+ * and so on.
*
* @ingroup MeshWorker
* @author Guido Kanschat, 2009
void initialize_info(DOFINFO &info, bool face) const;
/**
- * Assemble the local matrices associated with a single cell into the global matrix.
+ * Assemble the local matrices associated with a single cell into the
+ * global matrix.
*/
template<class DOFINFO>
void assemble(const DOFINFO &info);
/**
- * Assemble all local matrices associated with an interior face
- * in the info objects into the global matrix.
+ * Assemble all local matrices associated with an interior face in the
+ * info objects into the global matrix.
*/
template<class DOFINFO>
void assemble(const DOFINFO &info1,
const DOFINFO &info2);
private:
/**
- * Assemble a single matrix <code>M</code> into the element
- * at <code>index</code> in the vector #matrix.
+ * Assemble a single matrix <code>M</code> into the element at
+ * <code>index</code> in the vector #matrix.
*/
void assemble(const FullMatrix<double> &M,
const unsigned int index,
/**
- * Implementation of the error indicator by Kelly, De S. R. Gago, Zienkiewicz and
- * Babuska and its modification for the hp-FEM.
- * This error indicator tries to approximate the error per cell by
- * integration of the jump of the gradient of the solution along the faces of
- * each cell. It can be understood as a gradient recovery estimator; see the
- * survey of Ainsworth and Oden, "A Posteriori Error Estimation in Finite Element
- * Analysis" (Wiley, 2000) for a complete discussion.
+ * Implementation of the error indicator by Kelly, De S. R. Gago, Zienkiewicz
+ * and Babuska and its modification for the hp-FEM. This error indicator tries
+ * to approximate the error per cell by integration of the jump of the
+ * gradient of the solution along the faces of each cell. It can be
+ * understood as a gradient recovery estimator; see the survey of Ainsworth
+ * and Oden, "A Posteriori Error Estimation in Finite Element Analysis"
+ * (Wiley, 2000) for a complete discussion.
*
* In the original Kelly error estimator, the contribution of each face to the
* cell error is scaled with the cell diagonal. In the modified version,
* polynomial degrees of the adjacent elements. The choice between the two is
* done by means of the enumerator, defined within the class.
*
- * @note In spite of the name, Kelly estimator is not truly an a posteriori error
- * estimator, even if applied to the Poisson problem only. It gives good hints
- * for mesh refinement, but the estimate is not to be trusted. For higher
- * order trial spaces the integrals computed here tend to zero faster than the
- * error itself, thus ruling out the values as error estimators. However, the
- * modified version discussed below can be utilised to obtain the reliable
- * error estimator by adding the residual (volume) part.
+ * @note In spite of the name, Kelly estimator is not truly an a posteriori
+ * error estimator, even if applied to the Poisson problem only. It gives good
+ * hints for mesh refinement, but the estimate is not to be trusted. For
+ * higher order trial spaces the integrals computed here tend to zero faster
+ * than the error itself, thus ruling out the values as error estimators.
+ * However, the modified version discussed below can be utilised to obtain the
+ * reliable error estimator by adding the residual (volume) part.
*
* The error estimator really only estimates the error for the generalized
* Poisson equation $-\nabla\cdot a(x) \nabla u = f$ with either Dirichlet
*
* The error estimator returns a vector of estimated errors per cell which can
* be used to feed the GridRefinement::refine_fixed_fraction,
- * GridRefinement::refine_fixed_number, and similar functions. This
- * vector contains elements of data type @p float, rather than @p double,
- * since accuracy is not important in the current context.
+ * GridRefinement::refine_fixed_number, and similar functions. This vector
+ * contains elements of data type @p float, rather than @p double, since
+ * accuracy is not important in the current context.
*
* The full reference for the paper in which this error estimator is defined
* is as follows:
* <h3>Implementation</h3>
*
* In principle, the implementation of the error estimation is simple: let \f[
- * \eta_K^2 = \sum_{F\in\partial K} c_F \int_{\partial K_F} \left[a \frac{\partial
- * u_h}{\partial n}\right]^2 do \f] be the error estimator for cell $K$.
- * $[\cdot]$ denotes the jump of the argument at the face. In the paper of
- * Ainsworth $ c_F=\frac h{24} $, but this factor is a bit esoteric,
+ * \eta_K^2 = \sum_{F\in\partial K} c_F \int_{\partial K_F} \left[a
+ * \frac{\partial u_h}{\partial n}\right]^2 do \f] be the error estimator for
+ * cell $K$. $[\cdot]$ denotes the jump of the argument at the face. In the
+ * paper of Ainsworth $ c_F=\frac h{24} $, but this factor is a bit esoteric,
* stemming from interpolation estimates and stability constants which may
* hold for the Poisson problem, but may not hold for more general situations.
- * Alternatively, we consider the case when $ c_F=\frac {h_F}{2p_F} $,
- * where $ h_F $ is face diagonal and $ p_F=max(p^+,p^-) $ is the
- * maximum polynomial degree of adjacent elements. The choice between the two is
- * done by means of the enumerator, provided as the last argument in all functions.
+ * Alternatively, we consider the case when $ c_F=\frac {h_F}{2p_F} $, where $
+ * h_F $ is face diagonal and $ p_F=max(p^+,p^-) $ is the maximum polynomial
+ * degree of adjacent elements. The choice between the two is done by means of
+ * the enumerator, provided as the last argument in all functions.
*
* To perform the integration, use is made of the FEFaceValues and
* FESubfaceValues classes. The integration is performed by looping over all
* cells and integrating over faces that are not yet treated. This way we
* avoid integration on faces twice, once for each time we visit one of the
* adjacent cells. In a second loop over all cells, we sum up the
- * contributions of the faces (which are the integrated square of the jumps times
- * some factor) of each cell and take the square root.
+ * contributions of the faces (which are the integrated square of the jumps
+ * times some factor) of each cell and take the square root.
*
* The integration is done using a quadrature formula on the face. For linear
* trial functions (FEQ1), the QGauss2 or even the QMidpoint rule will
*
* We store the contribution of each face in a @p map, as provided by the C++
* standard library, with the iterator pointing to that face being the key
- * into the map. When looping the second time over all cells,
- * we have to sum up the contributions of the faces and take the square root.
- * For the Kelly estimator, the multiplication with $\frac h{24}$ is done
- * in the second loop. By doing so we avoid problems to decide with which $h$
- * to multiply, that of the cell on the one or that of the cell on the other
- * side of the face. Whereas for the hp-estimator the @p map stores integrals
- * multiplied by $\frac {h_F}{2p_F}$, which are then summed in the second loop.
+ * into the map. When looping the second time over all cells, we have to sum
+ * up the contributions of the faces and take the square root. For the Kelly
+ * estimator, the multiplication with $\frac h{24}$ is done in the second
+ * loop. By doing so we avoid problems to decide with which $h$ to multiply,
+ * that of the cell on the one or that of the cell on the other side of the
+ * face. Whereas for the hp-estimator the @p map stores integrals multiplied
+ * by $\frac {h_F}{2p_F}$, which are then summed in the second loop.
*
- * $h$ ($h_F$) is taken to be the greatest length of the diagonals of the cell (face).
- * For more or less uniform cells (faces) without deformed angles, this coincides
- * with the diameter of the cell (face).
+ * $h$ ($h_F$) is taken to be the greatest length of the diagonals of the cell
+ * (face). For more or less uniform cells (faces) without deformed angles,
+ * this coincides with the diameter of the cell (face).
*
*
* <h3>Vector-valued functions</h3>
* contribution of the face $F\in\partial K$ looks like \f[ n_F\int_F
* \left|g-a\frac{\partial u_h}{\partial n}\right|^2 ds \f] where $g$ is the
* Neumann boundary function, $n_F=\frac {h}{24}$ and $n_F=\frac {h_F}{p}$ for
- * the Kelly and hp-estimator, respectively.
- * If the finite element is vector-valued, then
- * obviously the function denoting the Neumann boundary conditions needs to be
- * vector-valued as well.
+ * the Kelly and hp-estimator, respectively. If the finite element is vector-
+ * valued, then obviously the function denoting the Neumann boundary
+ * conditions needs to be vector-valued as well.
*
* <li> No other boundary conditions are considered.
* </ul>
* that accepts several in- and output vectors at the same time.
*
* @ingroup numerics
- * @author Wolfgang Bangerth, 1998, 1999, 2000, 2004, 2006, Denis Davydov, 2015;
- * parallelization by Thomas Richter, 2000
+ * @author Wolfgang Bangerth, 1998, 1999, 2000, 2004, 2006, Denis Davydov,
+ * 2015; parallelization by Thomas Richter, 2000
*/
template <int dim, int spacedim=dim>
class KellyErrorEstimator
{
public:
/**
- * The enum type given to the class functions to decide on the scaling factors
- * of the facial integrals.
+ * The enum type given to the class functions to decide on the scaling
+ * factors of the facial integrals.
*/
enum Strategy
{
* the number of threads determined automatically. The parameter is retained
* for compatibility with old versions of the library.
*
- * The @p strategy parameter is used to choose the scaling factor for
- * the integral over cell's faces.
+ * The @p strategy parameter is used to choose the scaling factor for the
+ * integral over cell's faces.
*
* @note If the DoFHandler object given as an argument to this function
* builds on a parallel::distributed::Triangulation, this function skips
* @ref GlossGhostCell).
* If the cell is artificial, we have no access to the solution there and
* functions that evaluate the solution at such a point will trigger an
- * exception of type VectorTools::ExcPointNotAvailableHere. The same
- * kind of exception will also be produced if the cell is a ghost cell: On
- * such cells, one could in principle evaluate the solution, but it becomes
+ * exception of type VectorTools::ExcPointNotAvailableHere. The same kind of
+ * exception will also be produced if the cell is a ghost cell: On such
+ * cells, one could in principle evaluate the solution, but it becomes
* easier if we do not allow to do so because then there is exactly one
* processor in a parallel distributed computation that can indeed evaluate
* the solution. Consequently, it is clear which processor is responsible
* described in the general documentation. This function works on the
* classes that are used to wrap PETSc objects.
*
- * <b>Important:</b> This function is not very efficient: it needs
- * to alternatingly read and write into the matrix, a situation that
- * PETSc does not handle well. In addition, we only get rid of
- * rows corresponding to boundary nodes, but the corresponding case
- * of deleting the respective columns (i.e. if @p eliminate_columns
- * is @p true) is not presently implemented, and probably will never
- * because it is too expensive without direct access to the PETSc
- * data structures. (This leads to the situation where the action
- * indicated by the default value of the last argument is actually
- * not implemented; that argument has <code>true</code> as its
- * default value to stay consistent with the other functions of same
- * name in this class.)
+ * <b>Important:</b> This function is not very efficient: it needs to
+ * alternatingly read and write into the matrix, a situation that PETSc does
+ * not handle well. In addition, we only get rid of rows corresponding to
+ * boundary nodes, but the corresponding case of deleting the respective
+ * columns (i.e. if @p eliminate_columns is @p true) is not presently
+ * implemented, and probably will never because it is too expensive without
+ * direct access to the PETSc data structures. (This leads to the situation
+ * where the action indicated by the default value of the last argument is
+ * actually not implemented; that argument has <code>true</code> as its
+ * default value to stay consistent with the other functions of same name in
+ * this class.)
*
* This function is used in step-17 and step-18.
*/
/**
* Same function as above, but for parallel PETSc matrices.
*
- * @note If the matrix is stored in parallel across multiple
- * processors using MPI, this function only touches rows that are
- * locally stored and simply ignores all other rows. In other words,
- * each processor is responsible for its own rows, and the @p
- * boundary_values argument needs to contain all locally owned rows
- * of the matrix that you want to have treated. (But it can also
- * contain entries for degrees of freedom not owned locally; these
- * will simply be ignored.) Further, in the context of parallel
- * computations, you will get into trouble if you treat a row while
- * other processors still have pending writes or additions into the
- * same row. In other words, if another processor still wants to add
- * something to an element of a row and you call this function to
- * zero out the row, then the next time you call compress() may add
- * the remote value to the zero you just created. Consequently, you
- * will want to call compress() after you made the last
- * modifications to a matrix and before starting to clear rows.
+ * @note If the matrix is stored in parallel across multiple processors
+ * using MPI, this function only touches rows that are locally stored and
+ * simply ignores all other rows. In other words, each processor is
+ * responsible for its own rows, and the @p boundary_values argument needs
+ * to contain all locally owned rows of the matrix that you want to have
+ * treated. (But it can also contain entries for degrees of freedom not
+ * owned locally; these will simply be ignored.) Further, in the context of
+ * parallel computations, you will get into trouble if you treat a row while
+ * other processors still have pending writes or additions into the same
+ * row. In other words, if another processor still wants to add something to
+ * an element of a row and you call this function to zero out the row, then
+ * the next time you call compress() may add the remote value to the zero
+ * you just created. Consequently, you will want to call compress() after
+ * you made the last modifications to a matrix and before starting to clear
+ * rows.
*/
void
apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
* described in the general documentation. This function works on the
* classes that are used to wrap Trilinos objects.
*
- * <b>Important:</b> This function is not very efficient: it needs
- * to alternatingly read and write into the matrix, a situation that
- * Trilinos does not handle well. In addition, we only get rid of
- * rows corresponding to boundary nodes, but the corresponding case
- * of deleting the respective columns (i.e. if @p eliminate_columns
- * is @p true) is not presently implemented, and probably will never
- * because it is too expensive without direct access to the Trilinos
- * data structures. (This leads to the situation where the action
- * indicated by the default value of the last argument is actually
- * not implemented; that argument has <code>true</code> as its
- * default value to stay consistent with the other functions of same
+ * <b>Important:</b> This function is not very efficient: it needs to
+ * alternatingly read and write into the matrix, a situation that Trilinos
+ * does not handle well. In addition, we only get rid of rows corresponding
+ * to boundary nodes, but the corresponding case of deleting the respective
+ * columns (i.e. if @p eliminate_columns is @p true) is not presently
+ * implemented, and probably will never because it is too expensive without
+ * direct access to the Trilinos data structures. (This leads to the
+ * situation where the action indicated by the default value of the last
+ * argument is actually not implemented; that argument has <code>true</code>
+ * as its default value to stay consistent with the other functions of same
* name in this class.)
*/
void
/**
* Same as above, but for parallel matrices and vectors.
*
- * @note If the matrix is stored in parallel across multiple
- * processors using MPI, this function only touches rows that are
- * locally stored and simply ignores all other rows. In other words,
- * each processor is responsible for its own rows, and the @p
- * boundary_values argument needs to contain all locally owned rows
- * of the matrix that you want to have treated. (But it can also
- * contain entries for degrees of freedom not owned locally; these
- * will simply be ignored.) Further, in the context of parallel
- * computations, you will get into trouble if you treat a row while
- * other processors still have pending writes or additions into the
- * same row. In other words, if another processor still wants to add
- * something to an element of a row and you call this function to
- * zero out the row, then the next time you call compress() may add
- * the remote value to the zero you just created. Consequently, you
- * will want to call compress() after you made the last
- * modifications to a matrix and before starting to clear rows.
+ * @note If the matrix is stored in parallel across multiple processors
+ * using MPI, this function only touches rows that are locally stored and
+ * simply ignores all other rows. In other words, each processor is
+ * responsible for its own rows, and the @p boundary_values argument needs
+ * to contain all locally owned rows of the matrix that you want to have
+ * treated. (But it can also contain entries for degrees of freedom not
+ * owned locally; these will simply be ignored.) Further, in the context of
+ * parallel computations, you will get into trouble if you treat a row while
+ * other processors still have pending writes or additions into the same
+ * row. In other words, if another processor still wants to add something to
+ * an element of a row and you call this function to zero out the row, then
+ * the next time you call compress() may add the remote value to the zero
+ * you just created. Consequently, you will want to call compress() after
+ * you made the last modifications to a matrix and before starting to clear
+ * rows.
*/
void
apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
* @endcode
*
* Multiple calls to the function <code>interpolate (const Vector<number> &in,
- * Vector<number> &out)</code> are NOT allowed. Interpolating several functions
- * can be performed in one step by using <tt>void interpolate (const
+ * Vector<number> &out)</code> are NOT allowed. Interpolating several
+ * functions can be performed in one step by using <tt>void interpolate (const
* vector<Vector<number> >&all_in, vector<Vector<number> >&all_out)
* const</tt>, and using the respective @p
* prepare_for_coarsening_and_refinement function taking several vectors as
*
* The parameter @p function_map provides a list of boundary indicators to
* be handled by this function and corresponding boundary value functions.
- * The keys of this map correspond to the number @p boundary_id of
- * the face. numbers::internal_face_boundary_id is an illegal value for
- * this key since it is reserved for interior faces.
+ * The keys of this map correspond to the number @p boundary_id of the face.
+ * numbers::internal_face_boundary_id is an illegal value for this key since
+ * it is reserved for interior faces.
*
* The flags in the last parameter, @p component_mask denote which
* components of the finite element space shall be interpolated. If it is
* $z$-component.
*
* The parameter @p boundary_component corresponds to the number @p
- * boundary_id of the face. numbers::internal_face_boundary_id is an
- * illegal value, since it is reserved for interior faces.
+ * boundary_id of the face. numbers::internal_face_boundary_id is an illegal
+ * value, since it is reserved for interior faces.
*
* The last argument is denoted to compute the normal vector $\vec{n}$ at
* the boundary points.
const hp::MappingCollection<dim, dim> &mapping_collection = hp::StaticMappingQ1<dim>::mapping_collection);
/**
- * This function is an updated version of the project_boundary_values_curl_conforming
- * function. The intention is to fix a problem when using the previous function in
- * conjunction with non-rectangular geometries (i.e. elements with non-rectangular faces).
- * The L2-projection method used has been taken from the paper "Electromagnetic scattering
- * simulation using an H (curl) conforming hp finite element method in three dimensions"
- * by PD Ledger, K Morgan and O Hassan ( Int. J. Num. Meth. Fluids, Volume 53, Issue 8, pages 1267–1296).
+ * This function is an updated version of the
+ * project_boundary_values_curl_conforming function. The intention is to fix
+ * a problem when using the previous function in conjunction with non-
+ * rectangular geometries (i.e. elements with non-rectangular faces). The
+ * L2-projection method used has been taken from the paper "Electromagnetic
+ * scattering simulation using an H (curl) conforming hp finite element
+ * method in three dimensions" by PD Ledger, K Morgan and O Hassan ( Int. J.
+ * Num. Meth. Fluids, Volume 53, Issue 8, pages 1267–1296).
*
- * This function will compute constraints that correspond to Dirichlet boundary conditions of the form
- * $\vec{n}\times\vec{E}=\vec{n}\times\vec{F}$
- * i.e. the tangential components of $\vec{E}$ and $f$ shall coincide.
+ * This function will compute constraints that correspond to Dirichlet
+ * boundary conditions of the form
+ * $\vec{n}\times\vec{E}=\vec{n}\times\vec{F}$ i.e. the tangential
+ * components of $\vec{E}$ and $f$ shall coincide.
*
* <h4>Computing constraints</h4>
*
- * To compute the constraints we use a projection method based upon the paper mentioned
- * above. In 2D this is done in a single stage for the edge-based shape functions, regardless
- * of the order of the finite element. In 3D this is done in two stages, edges first and then
- * faces.
+ * To compute the constraints we use a projection method based upon the
+ * paper mentioned above. In 2D this is done in a single stage for the edge-
+ * based shape functions, regardless of the order of the finite element. In
+ * 3D this is done in two stages, edges first and then faces.
*
- * For each cell, each edge, $e$, is projected by solving the linear system $Ax=b$ where $x$
- * is the vector of contraints on degrees of freedom on the edge and
+ * For each cell, each edge, $e$, is projected by solving the linear system
+ * $Ax=b$ where $x$ is the vector of contraints on degrees of freedom on the
+ * edge and
*
* $A_{ij} = \int_{e} (\vec{s}_{i}\cdot\vec{t})(\vec{s}_{j}\cdot\vec{t}) dS$
*
* $b_{i} = \int_{e} (\vec{s}_{i}\cdot\vec{t})(\vec{F}\cdot\vec{t}) dS$
*
- * with $\vec{s}_{i}$ the $i^{th}$ shape function and $\vec{t}$ the tangent vector.
+ * with $\vec{s}_{i}$ the $i^{th}$ shape function and $\vec{t}$ the tangent
+ * vector.
*
- * Once all edge constraints, $x$, have been computed, we may compute the face constraints
- * in a similar fashion, taking into account the residuals from the edges.
+ * Once all edge constraints, $x$, have been computed, we may compute the
+ * face constraints in a similar fashion, taking into account the residuals
+ * from the edges.
*
- * For each face on the cell, $f$, we solve the linear system $By=c$ where $y$ is the vector of
- * constraints on degrees of freedom on the face and
+ * For each face on the cell, $f$, we solve the linear system $By=c$ where
+ * $y$ is the vector of constraints on degrees of freedom on the face and
*
- * $B_{ij} = \int_{f} (\vec{n} \times \vec{s}_{i}) \cdot (\vec{n} \times \vec{s}_{j}) dS$
+ * $B_{ij} = \int_{f} (\vec{n} \times \vec{s}_{i}) \cdot (\vec{n} \times
+ * \vec{s}_{j}) dS$
*
- * $c_{i} = \int_{f} (\vec{n} \times \vec{r}) \cdot (\vec{n} \times \vec{s}_i) dS$
+ * $c_{i} = \int_{f} (\vec{n} \times \vec{r}) \cdot (\vec{n} \times
+ * \vec{s}_i) dS$
*
- * and $\vec{r} = \vec{F} - \sum_{e \in f} \sum{i \in e} x_{i}\vec{s}_i$, the edge residual.
+ * and $\vec{r} = \vec{F} - \sum_{e \in f} \sum{i \in e} x_{i}\vec{s}_i$,
+ * the edge residual.
*
* The resulting constraints are then given in the solutions $x$ and $y$.
*
* constraints before, the new ones are added or the old ones overwritten,
* if a node of the boundary part to be used was already in the list of
* constraints. This is handled by using inhomogeneous constraints. Please
- * note that when combining adaptive meshes and this kind of constraints, the
- * Dirichlet conditions should be set first, and then completed by hanging
- * node constraints, in order to make sure that the discretization remains
- * consistent. See the discussion on conflicting constraints in the
+ * note that when combining adaptive meshes and this kind of constraints,
+ * the Dirichlet conditions should be set first, and then completed by
+ * hanging node constraints, in order to make sure that the discretization
+ * remains consistent. See the discussion on conflicting constraints in the
* module on
* @ref constraints.
*
* <h4>Arguments to this function></h4>
*
- * This function is explicitly for use with FE_Nedelec elements, or with FESystem
- * elements which contain FE_Nedelec elements. It will throw an exception if called
- * with any other finite element. The user must ensure that FESystem elements are
- * correctly setup when using this function as this check not possible in this case.
+ * This function is explicitly for use with FE_Nedelec elements, or with
+ * FESystem elements which contain FE_Nedelec elements. It will throw an
+ * exception if called with any other finite element. The user must ensure
+ * that FESystem elements are correctly setup when using this function as
+ * this check not possible in this case.
*
- * The second argument of this function denotes the first vector component of the
- * finite element which corresponds to the vector function that you wish to constrain.
- * For example, if we are solving Maxwell's equations in 3D and have components
- * $(E_x,E_y,E_z,B_x,B_y,B_z)$ and we want the boundary conditions
- * $\vec{n}\times\vec{B}=\vec{n}\times\vec{f}$, then @p first_vector_component would
- * be 3. The @p boundary_function must return 6 components in this example, with the first 3
- * corresponding to $\vec{E}$ and the second 3 corresponding to $\vec{B}$.
- * Vectors are implicitly assumed to have exactly <code>dim</code> components
- * that are ordered in the same way as we usually order the coordinate directions,
- * i.e. $x$-, $y$-, and finally $z$-component.
+ * The second argument of this function denotes the first vector component
+ * of the finite element which corresponds to the vector function that you
+ * wish to constrain. For example, if we are solving Maxwell's equations in
+ * 3D and have components $(E_x,E_y,E_z,B_x,B_y,B_z)$ and we want the
+ * boundary conditions $\vec{n}\times\vec{B}=\vec{n}\times\vec{f}$, then @p
+ * first_vector_component would be 3. The @p boundary_function must return 6
+ * components in this example, with the first 3 corresponding to $\vec{E}$
+ * and the second 3 corresponding to $\vec{B}$. Vectors are implicitly
+ * assumed to have exactly <code>dim</code> components that are ordered in
+ * the same way as we usually order the coordinate directions, i.e. $x$-,
+ * $y$-, and finally $z$-component.
*
- * The parameter @p boundary_component corresponds to the number @p boundary_id
- * of the face. numbers::internal_face_boundary_id is an illegal value, since it is
- * reserved for interior faces.
+ * The parameter @p boundary_component corresponds to the number @p
+ * boundary_id of the face. numbers::internal_face_boundary_id is an illegal
+ * value, since it is reserved for interior faces.
*
- * The last argument is denoted to compute the normal vector $\vec{n}$ at the
- * boundary points.
+ * The last argument is denoted to compute the normal vector $\vec{n}$ at
+ * the boundary points.
*
*
* @ingroup constraints
/**
- * hp-namespace version of project_boundary_values_curl_conforming_l2 (above).
+ * hp-namespace version of project_boundary_values_curl_conforming_l2
+ * (above).
*
* @ingroup constraints
*/
* we usually order the coordinate directions, i.e., $x$-, $y$-, and finally
* $z$-component.
*
- * The parameter @p boundary_component corresponds to the @p
- * boundary_id of the faces where the boundary conditions are
- * applied. numbers::internal_face_boundary_id is an illegal value, since it
- * is reserved for interior faces. The @p mapping is used to compute the
- * normal vector $\vec{n}$ at the boundary points.
+ * The parameter @p boundary_component corresponds to the @p boundary_id of
+ * the faces where the boundary conditions are applied.
+ * numbers::internal_face_boundary_id is an illegal value, since it is
+ * reserved for interior faces. The @p mapping is used to compute the normal
+ * vector $\vec{n}$ at the boundary points.
*
* <h4>Computing constraints</h4>
*
* formula only evaluates the two solutions at these particular points,
* choosing this quadrature formula may indicate an error far smaller than
* it actually is.
- * @param[in] norm The norm $X$ shown above that should be computed. If
- * the norm is NormType::Hdiv_seminorm, then the finite element on which this
- * function is called needs to have at least dim vector components,
- * and the divergence will be computed on the first div components.
- * This works, for example, on the finite elements used for the
- * mixed Laplace (step-20) and the Stokes equations (step-22).
+ * @param[in] norm The norm $X$ shown above that should be computed. If the
+ * norm is NormType::Hdiv_seminorm, then the finite element on which this
+ * function is called needs to have at least dim vector components, and the
+ * divergence will be computed on the first div components. This works, for
+ * example, on the finite elements used for the mixed Laplace (step-20) and
+ * the Stokes equations (step-22).
* @param[in] weight The additional argument @p weight allows to evaluate
* weighted norms. The weight function may be scalar, establishing a
* spatially variable weight in the domain for all components equally. This
const Point<spacedim> &point);
/**
- * Evaluate a possibly vector-valued finite element function defined by the
- * given DoFHandler and nodal vector at the given point, and return the
- * (vector) gradient of this function through the last argument.
- *
- * This is a wrapper function using a Q1-mapping for cell boundaries to call
- * the other point_gradient() function.
- *
- * @note If the cell in which the point is found is not locally owned, an
- * exception of type VectorTools::ExcPointNotAvailableHere is thrown.
- */
+ * Evaluate a possibly vector-valued finite element function defined by the
+ * given DoFHandler and nodal vector at the given point, and return the
+ * (vector) gradient of this function through the last argument.
+ *
+ * This is a wrapper function using a Q1-mapping for cell boundaries to call
+ * the other point_gradient() function.
+ *
+ * @note If the cell in which the point is found is not locally owned, an
+ * exception of type VectorTools::ExcPointNotAvailableHere is thrown.
+ */
template <int dim, class InVector, int spacedim>
void
point_gradient (const DoFHandler<dim,spacedim> &dof,
*/
//@{
/**
- * Given a DoFHandler containing at least a spacedim vector field,
- * this function interpolates the Triangulation at the support
- * points of a FE_Q() finite element of the same degree as
- * dh->get_fe().degree.
+ * Given a DoFHandler containing at least a spacedim vector field, this
+ * function interpolates the Triangulation at the support points of a FE_Q()
+ * finite element of the same degree as dh->get_fe().degree.
*
* Curved manifold are respected, and the resulting VECTOR will be
* geometrically consistent.
*
- * The resulting map is guaranteed to be interpolatory at the
- * support points of a FE_Q() finite element of the same degree as
- * dh->get_fe().degree. Notice that this may or may not be
- * meaningful, depending on the FiniteElement you have distribed in
- * dh.
+ * The resulting map is guaranteed to be interpolatory at the support points
+ * of a FE_Q() finite element of the same degree as dh->get_fe().degree.
+ * Notice that this may or may not be meaningful, depending on the
+ * FiniteElement you have distribed in dh.
*
* If the underlying finite element is an FE_Q(1)^spacedim, then the
- * resulting VECTOR is a finite element field representation of the
- * vertices of the Triangulation.
+ * resulting VECTOR is a finite element field representation of the vertices
+ * of the Triangulation.
*
* The optional ComponentMask argument can be used to specify what
- * components of the FiniteElement to use to describe the
- * geometry. If no mask is specified at construction time, then a
- * default one is used, i.e., the first spacedim components of the
- * FiniteElement are assumed to represent the geometry of the
- * problem.
+ * components of the FiniteElement to use to describe the geometry. If no
+ * mask is specified at construction time, then a default one is used, i.e.,
+ * the first spacedim components of the FiniteElement are assumed to
+ * represent the geometry of the problem.
*
* @author Luca Heltai, 2015
*/