Improved comparison operators for TriaAccessorBase
The previous commit was a bit too aggressive because it is still useful to catch the case when comparing iterators to two different triangulations (leading to infinite loops).
Therefore, I now merely extended the assertion to not trigger when one of the two objects is default constructed, i.e., does contain a null pointer to tria. The comparison then does not need tria == a.tria because invalid iterators use invalid cell and level index, too (leading to !=).
Allow comparison == and != of TriaAccessorBase with different tria
It is well-defined to check for equality and inequality of TriaAccessorBase (cell_iterator types) that belong to different triangulations. Those are simply unequal. This is necessary e.g. for comparing with a default constructed cell_iterator variable. Of course, operator < is still undefined.
Daniel Arndt [Wed, 19 Nov 2014 20:14:12 +0000 (21:14 +0100)]
Implement rotation for vector valued dofs on periodic bc
This commit completes the interface for periodic boundary conditions. It
exposes the interpolation matrix (that is internally used to satisfy
hanging node constraints on periodic boundaries) and provides a possibility
to generate it from a rotation matrix and an index for the vector component
in question (in a similar vein as we already do this for different vector
valued finite elements).
Enable vectorization of vector updates in Chebyshev preconditioner
Use DEAL_II_OPENMP_SIMD_PRAGMA annotation. To avoid a bug in gcc, use an additional
boolean in the 'if' statement that avoids checking factor1 == Number().
Denis Davydov [Thu, 13 Nov 2014 09:17:55 +0000 (10:17 +0100)]
fixed a bug in set_matrix_mode.
STSetMatMode shall be called only after transformation_data->st
is initialised. Thus, we need to store the desired STMatMode
untill set_context is called from the solver object.
For historical reason, GridTools::distort_random() is not deterministic in that if
you call it twice on the same mesh, it will produce different results. This is because
we call rand() which carries around internal state. On the other hand, for the newly
implemented parallel algorithm, we can ensure that this isn't the case by creating
our own random number generator that we start from the same seed every time.
Andrea Mola [Wed, 12 Nov 2014 13:30:55 +0000 (14:30 +0100)]
added namespace and () to the read_STEP and write_STEP name functions in the doc/changes.h file; removed some extra empty line from the function implementation in utilities.cc
Matthias Maier [Wed, 12 Nov 2014 00:37:20 +0000 (01:37 +0100)]
Allow default paths for opencascade detection
OPENCASCADE_DIR is just a hint and might be invalid.
(In FindTRILINOS.cmake the full path is known due to the inclusion of the
Trilinos project configuration. Thus, those options ensure that no wrong
library is accidentally picked up.)
This was supposed to work in a backward compatible way but I broke
it for everyone who didn't explicitly #included the old base/std_cxx1x/*h
headers but got stuff through indirect #includes.
Reformat and rewrite parts of the documentation to make it fit more our
currently preferred style (in particular, of documenting whole code blocks as
opposed to individual lines).
We don't actually want to use any kind of finite element here at all,
but need to because FEValues requires us to when all we want are the
JxW values. FE_Nothing is cheaper to construct than FE_DGQ(0), so
use it in GridTools::volume().
For historical (and probably not very good) reasons, finite element classes
have a second template argument denoting the space dimension. FE_Nothing never
got this argument and so it wasn't possible to use it in codimension-one
situations. This patch adds the second argument to make it possible to use
it in these situations.
There is not much that one can test this element with, other than ensure that it
compiles. The next commit will actually use the element in a concrete situation.
Adjust tests that fail due to vectorized accumulation
Commit c7f3054 changed the order of summation in inner products and norms because
these operations are now done in vectorized form. The affected tests show spurious
changes in the last digit.
To improve, the following changes were made:
- error_estimator_0?: The output was scaled by l1 norm which is unsafe. These tests
should only test error estimation and hence the scaling is done by linfty_norm
which will never depend on roundoff. Note that we output up to 7 digits of a float
which notoriously runs into roundoff issues.
- mesh_3d_12 also outputs 6-7 digits of a float. Changed the accuray of output to 5
digits.
- q_dg0_projection was deleted because it FE_Q_DG0 has a singular mass matrix and thus
the final solution on the face can be anything. Note e.g. how different the previous
solutions for Intel/non-Intel compilers were -> no good test.
Timo Heister [Wed, 5 Nov 2014 15:41:11 +0000 (10:41 -0500)]
Merge pull request #221 from kronbichler/master
Fix a compiler warning with gcc-4.9.
gcc-4.9 seems to be able to see that accessing R[1] in 1D is out of bound
for spacedim == 1 but it can omit the warning if accessed inside a switch
statement. Fix this warning (even though we won't use SphericalManifold
for spacedim == 1).
gcc-4.9 seems to be able to see that accessing p[1] in 1D is out of bound
for spacedim == 1 but it can omit the warning if accessed inside a switch
statement. Fix this warning (even though we won't use SphericalManifold
for spacedim == 1).