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).
Combined add and inner product for vectors: add_and_dot
- Implemented a new method add_and_dot for all vector classes (deal.II's vectors,
block vectors, PETSc, Trilinos vectors)
- Specialized function for deal.II vector that does add_and_dot in one sweep over
the data by a new AddAndDot struct that is passed to the accumulate function. This
also extends the other structs for inner products and norms by one (unused) argument.
- New tests for this feature.
- Added new do_vectorized operation to all accumulation operations that uses the
operations of VectorizedArray<double/float> for the sums. This helps to reduce the
operations and thus increase performance when memory transfer is not the limit.
This functionality is called in the regular part of the accumulate function which
now sits in its own method 'accumulate_regular' (length divisible by 32). This
functionality can unfortunately not be realized by the OPENMP_SIMD pragma recently
introduced because that leads to non-reproducible results when the vector memory
starts at different memory locations. VectorizedArray is only supported on some
platforms and thus this functionality may not be available everywhere. However, good
code will be generated unconditionally (except on old machines from around 2004-2008
where unaligned reads also from aligned memory are slow, but those are not relevant
any more).
- To implemented vectorized pow operations, I also added a std::pow function for
VectorizedArray.
- The memory for parallel::distributed::Vector is now allocated to 64 byte boundaries
just as is the memory of Vector<Number>.
Andrea Mola [Thu, 23 Oct 2014 11:03:35 +0000 (13:03 +0200)]
new test for NormalToMeshProjectionBoundary added
Fixed indentation.
Attempt to fix create tria test.
Second attempt. This is the correct output.
Added create_tria_00.
Added supersimple test.
attempt to fix the normal projection tests that were failing by switching to wigley.igs surface (instead of side.igs which seemed to have something weird)
switching to wigley.iges in create_tria_01.cc too
added test normal_to_mesh_projection_02.cc on surface mesh refinement with projection normal to mesh direction. in the process, this highlited a bug in the boundary_lib.cc implementation of normalToMeshBoundary. Now also the results of step-54 look even better
Fixed output for iges write functions.
Added two simple tests.
Fixed a little the documentation, and improved slightly step-54.
Luca Heltai [Thu, 16 Oct 2014 19:30:30 +0000 (21:30 +0200)]
Fixed also last comments by @bangerth, using std::tuple where appropriate. We split also some of the functions in utilities.h into two different parts, one of which is transparent to the underlying OpenCASCADE structures.
Andrea Mola [Tue, 14 Oct 2014 15:45:03 +0000 (17:45 +0200)]
step-54 is now completed (it only needs comments). three different projectors have now been created in boundary_lib: normal, directional and normal_to_mesh. to adjust tolerances, a new method retrieving tolerances from a shape has been added
Fixed indentation.
fixed some problems with residual calls to Pnt() (now Point()) and axis_ intersection() (now line_intersection()) functions in boundary_lib. files coarse_sphere and coarse_circle removed from step-54 directory. also parameters.prm has been removed, and n_cycles value is asigned in an hard coded way
all input and output files have been converted to .vtk
added comments to step-54.cc
fixed all the notes by luca exept for that on the closest point function
amola [Thu, 2 Oct 2014 10:41:10 +0000 (12:41 +0200)]
an attempt to improve opencascade directional projection with informations on local normal
an other attempt to improve opencascade directional projection with informations on local normal
version with directional projection depending on normals of surrounding points is now working. to this end, a method has been added to utilities, to return differential forms (normal and mean curvature) along with closest point on the CAD surface
trying to improve the directional projection
improved cell refinement on CAD with directional projector, by adding a separated treatment for case with 2 or 8 surrounding points (edge or cell refinement). the 2 points case uses some infos about the surface normal, the 8 case comes up with an approximated cell normal
This patch uses signals to determine whether a current iterate
satisfies the convergence criterion. Currently, the only slot that
is connected to a signal is the SolverControl::check() function,
but users will be able to connect different slots there as well,
closely monitoring the convergence process.
Timo Heister [Thu, 23 Oct 2014 11:05:03 +0000 (07:05 -0400)]
Merge pull request #206 from bangerth/remove-faulty-test
The test verifies that it doesn't matter whether we first call
DoFHandler::distribute_dofs() and then DoFHandler::distribute_mg_dofs(),
or the other way around. But we have recently changed the behavior
to require exactly this order, so part of the test is no longer of interest.
The test verifies that it doesn't matter whether we first call
DoFHandler::distribute_dofs() and then DoFHandler::distribute_mg_dofs(),
or the other way around. But we have recently changed the behavior
to require exactly this order, so this part of the test is no longer of interest.
Timo Heister [Wed, 22 Oct 2014 20:30:45 +0000 (16:30 -0400)]
Merge pull request #207 from bangerth/fix-test
We have recently allowed that one can set a vector to zero, even if it has
ghost elements. But this test verified that we throw an exception in this
case. Remove this one test.
We have recently allowed that one can set a vector to zero, even if it has
ghost elements. But this test verified that we throw an exception in this
case. Remove this one test.