}
-#if deal_II_dimension == 2
double
measure (const TriaAccessor<2,2,2> &accessor)
return (-x[1]*y[0]+x[1]*y[3]+y[0]*x[2]+x[0]*y[1]-x[0]*y[2]-y[1]*x[3]-x[2]*y[3]+x[3]*y[2])/2;
}
-#endif
-
-#if deal_II_dimension == 3
double
measure (const TriaAccessor<3, 3, 3> &accessor)
vertex_indices);
}
-#endif
template <int structdim, int dim, int spacedim>
}
-#if deal_II_dimension == 1
template <>
double TriaAccessor<1,1,1>::extent_in_direction(const unsigned int axis) const
return this->diameter();
}
-#elif deal_II_dimension == 2
template <>
double TriaAccessor<2,2,2>::extent_in_direction(const unsigned int axis) const
this->line(lines[axis][1])->diameter());
}
-#elif deal_II_dimension == 3
template <>
double TriaAccessor<3,3,3>::extent_in_direction(const unsigned int axis) const
std::max(lengths[2], lengths[3]));
}
-#else
-
-// Not implemented for higher dimensions
-
-#endif
/*------------------------ Functions: CellAccessor<1> -----------------------*/
-#if deal_II_dimension == 1
template <>
bool CellAccessor<1>::point_inside (const Point<1> &p) const
-#endif
-
/*------------------------ Functions: CellAccessor<2> -----------------------*/
-#if deal_II_dimension == 2
template <>
bool CellAccessor<2>::point_inside (const Point<2> &p) const
}
-#endif
/*------------------------ Functions: CellAccessor<3> -----------------------*/
-#if deal_II_dimension == 3
template <>
bool CellAccessor<3>::point_inside (const Point<3> &p) const
}
-#endif
/*------------------------ Functions: CellAccessor<dim,spacedim> -----------------------*/
Assert (this->present_level > 0, TriaAccessorExceptions::ExcCellHasNoParent ());
TriaIterator<CellAccessor<dim,spacedim> >
q (this->tria, this->present_level-1, this->parent_index ());
-
+
return q;
}
// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331
// explicit instantiations
-template class TriaAccessorBase<1,deal_II_dimension>;
-#if deal_II_dimension >= 2
-template class TriaAccessorBase<2,deal_II_dimension>;
-#endif
-#if deal_II_dimension >= 3
-template class TriaAccessorBase<3,deal_II_dimension>;
-#endif
-
-template class TriaAccessor<1,deal_II_dimension,deal_II_dimension>;
-#if deal_II_dimension >= 2
-template class TriaAccessor<2,deal_II_dimension,deal_II_dimension>;
-#endif
-#if deal_II_dimension >= 3
-template class TriaAccessor<3,deal_II_dimension,deal_II_dimension>;
-#endif
-
-
-template class CellAccessor<deal_II_dimension>;
-template class TriaRawIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension> >;
-template class TriaRawIterator<CellAccessor<deal_II_dimension> >;
-template class TriaIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension> >;
-template class TriaIterator<CellAccessor<deal_II_dimension> >;
-template class TriaActiveIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension> >;
-template class TriaActiveIterator<CellAccessor<deal_II_dimension> >;
-
-
-#if deal_II_dimension >= 2
-template class TriaRawIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension> >;
-template class TriaIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension> >;
-template class TriaActiveIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension> >;
-#endif
-
-#if deal_II_dimension >= 3
-template class TriaRawIterator<TriaAccessor<3, deal_II_dimension, deal_II_dimension> >;
-template class TriaIterator<TriaAccessor<3, deal_II_dimension, deal_II_dimension> >;
-template class TriaActiveIterator<TriaAccessor<3, deal_II_dimension, deal_II_dimension> >;
-#endif
-
-#if deal_II_dimension == 1
-template class TriaAccessorBase<1,deal_II_dimension,2>;
-template class TriaAccessorBase<1,deal_II_dimension,3>;
-
-template class TriaAccessor<1,deal_II_dimension,2>;
-template class TriaAccessor<1,deal_II_dimension,3>;
-#endif
-#if deal_II_dimension == 2
-template class TriaAccessorBase<1,deal_II_dimension,3>;
-template class TriaAccessorBase<2,deal_II_dimension,3>;
-
-template class TriaAccessor<1,deal_II_dimension,3>;
-template class TriaAccessor<2,deal_II_dimension,3>;
-#endif
-
-#if deal_II_dimension != 3
-template class CellAccessor<deal_II_dimension, deal_II_dimension+1>;
-template class TriaRawIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension+1> >;
-template class TriaRawIterator<CellAccessor<deal_II_dimension, deal_II_dimension+1> >;
-template class TriaIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension+1> >;
-template class TriaIterator<CellAccessor<deal_II_dimension, deal_II_dimension+1> >;
-template class TriaActiveIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension+1> >;
-template class TriaActiveIterator<CellAccessor<deal_II_dimension, deal_II_dimension+1> >;
-
-
-#if deal_II_dimension == 2
-template class TriaRawIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension+1> >;
-template class TriaIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension+1> >;
-template class TriaActiveIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension+1> >;
-#endif
-
-#endif
+#include "tria_accessor.inst"
DEAL_II_NAMESPACE_CLOSE
--- /dev/null
+//---------------------------------------------------------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//---------------------------------------------------------------------------
+
+
+for (deal_II_dimension : DIMENSIONS)
+ {
+// Remark: The explicit instantiations for "TriaAccessor" were moved
+// to the top of this source file. The reason is a slightly buggy version
+// of the Apple gcc v.3.3.
+// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331
+ template class TriaAccessorBase<1,deal_II_dimension>;
+#if deal_II_dimension >= 2
+ template class TriaAccessorBase<2,deal_II_dimension>;
+#endif
+#if deal_II_dimension >= 3
+ template class TriaAccessorBase<3,deal_II_dimension>;
+#endif
+
+ template class TriaAccessor<1,deal_II_dimension,deal_II_dimension>;
+#if deal_II_dimension >= 2
+ template class TriaAccessor<2,deal_II_dimension,deal_II_dimension>;
+#endif
+#if deal_II_dimension >= 3
+ template class TriaAccessor<3,deal_II_dimension,deal_II_dimension>;
+#endif
+
+
+ template class CellAccessor<deal_II_dimension>;
+ template class TriaRawIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension> >;
+ template class TriaRawIterator<CellAccessor<deal_II_dimension> >;
+ template class TriaIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension> >;
+ template class TriaIterator<CellAccessor<deal_II_dimension> >;
+ template class TriaActiveIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension> >;
+ template class TriaActiveIterator<CellAccessor<deal_II_dimension> >;
+
+
+#if deal_II_dimension >= 2
+ template class TriaRawIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension> >;
+ template class TriaIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension> >;
+ template class TriaActiveIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension> >;
+#endif
+
+#if deal_II_dimension >= 3
+ template class TriaRawIterator<TriaAccessor<3, deal_II_dimension, deal_II_dimension> >;
+ template class TriaIterator<TriaAccessor<3, deal_II_dimension, deal_II_dimension> >;
+ template class TriaActiveIterator<TriaAccessor<3, deal_II_dimension, deal_II_dimension> >;
+#endif
+
+#if deal_II_dimension == 1
+ template class TriaAccessorBase<1,deal_II_dimension,2>;
+ template class TriaAccessorBase<1,deal_II_dimension,3>;
+
+ template class TriaAccessor<1,deal_II_dimension,2>;
+ template class TriaAccessor<1,deal_II_dimension,3>;
+#endif
+#if deal_II_dimension == 2
+ template class TriaAccessorBase<1,deal_II_dimension,3>;
+ template class TriaAccessorBase<2,deal_II_dimension,3>;
+
+ template class TriaAccessor<1,deal_II_dimension,3>;
+ template class TriaAccessor<2,deal_II_dimension,3>;
+#endif
+
+#if deal_II_dimension != 3
+ template class CellAccessor<deal_II_dimension, deal_II_dimension+1>;
+ template class TriaRawIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension+1> >;
+ template class TriaRawIterator<CellAccessor<deal_II_dimension, deal_II_dimension+1> >;
+ template class TriaIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension+1> >;
+ template class TriaIterator<CellAccessor<deal_II_dimension, deal_II_dimension+1> >;
+ template class TriaActiveIterator<TriaAccessor<1, deal_II_dimension, deal_II_dimension+1> >;
+ template class TriaActiveIterator<CellAccessor<deal_II_dimension, deal_II_dimension+1> >;
+
+
+#if deal_II_dimension == 2
+ template class TriaRawIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension+1> >;
+ template class TriaIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension+1> >;
+ template class TriaActiveIterator<TriaAccessor<2, deal_II_dimension, deal_II_dimension+1> >;
+#endif
+
+#endif
+ }
+
+
}
-#if deal_II_dimension > 1
template <int dim, int spacedim>
Point<spacedim>
}
}
-#else
+
template <>
Point<1>
-#endif
template <int dim, int spacedim>
void
}
-#if deal_II_dimension < 3
template <int dim, int spacedim>
Point<spacedim>
return Point<spacedim>();
}
-#if deal_II_dimension == 2
+
template <>
Point<3>
StraightBoundary<2,3>::
return compute_new_point_on_quad<2> (quad);
}
-#endif
-#else
+
template <>
Point<3>
return compute_new_point_on_quad<3> (quad);
}
-#endif
-#if deal_II_dimension == 1
-
template <>
void
StraightBoundary<1>::
points[i] = (1-x)*vertices[0] + x*vertices[1];
}
-#else
+
template <int dim, int spacedim>
points[i] = (1-x)*vertices[0] + x*vertices[1];
}
-#endif
-
-#if deal_II_dimension < 3
template <int dim, int spacedim>
void
Assert(false, ExcImpossibleInDim(dim));
}
-#else
+
template <>
void
}
}
-#endif
-#if deal_II_dimension == 2
template <>
void
x * vertices[3]) * y;
}
}
-#endif
-
-#if deal_II_dimension == 1
template <>
void
Assert (false, ExcNotImplemented());
}
-#endif
-
-#if deal_II_dimension == 2
template <>
void
Assert(false, ExcNotImplemented());
}
-#endif
-#if deal_II_dimension == 3
-
template <>
void
StraightBoundary<3>::
};
}
-#endif
template <int dim, int spacedim>
// explicit instantiations
-template class Boundary<deal_II_dimension>;
-template class StraightBoundary<deal_II_dimension>;
-
-#if deal_II_dimension == 1 || deal_II_dimension == 2
-template class Boundary<deal_II_dimension, deal_II_dimension+1>;
-template class StraightBoundary<deal_II_dimension, deal_II_dimension+1>;
-#endif
+#include "tria_boundary.inst"
DEAL_II_NAMESPACE_CLOSE
--- /dev/null
+//---------------------------------------------------------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//---------------------------------------------------------------------------
+
+for (deal_II_dimension : DIMENSIONS)
+ {
+ template class Boundary<deal_II_dimension>;
+ template class StraightBoundary<deal_II_dimension>;
+
+#if deal_II_dimension == 1 || deal_II_dimension == 2
+ template class Boundary<deal_II_dimension, deal_II_dimension+1>;
+ template class StraightBoundary<deal_II_dimension, deal_II_dimension+1>;
+#endif
+ }
+
+
#include <base/tensor.h>
#include <cmath>
-DEAL_II_NAMESPACE_OPEN
+DEAL_II_NAMESPACE_OPEN
}
-#if deal_II_dimension >=3
template<>
Point<3>
point_on_axis);
}
-#endif
template <int dim>
}
-#if deal_II_dimension == 3
template <>
void
}
}
-#endif
template <int dim>
-#if deal_II_dimension == 1
template <>
void
Assert (false, ExcImpossibleInDim(1));
}
-#endif
template <int dim>
}
-#if deal_II_dimension == 3
-template<int dim>
-Point<dim>
-ConeBoundary<dim>::
-get_new_point_on_quad (const typename Triangulation<dim>::quad_iterator &quad) const
+template <>
+Point<3>
+ConeBoundary<3>::
+get_new_point_on_quad (const Triangulation<3>::quad_iterator &quad) const
{
+ const int dim = 3;
+
const Point<dim> axis = x_1 - x_0;
// Compute the middle point of the
// quad.
return middle_p + get_radius (middle_p) * (middle - middle_p) / (middle - middle_p).norm ();
}
-#else
+
template<int dim>
Point<dim>
return Point<dim>();
}
-#endif
+
template<int dim>
void
}
-#if deal_II_dimension == 3
+
template<>
void
}
}
-#endif
+
template <int dim>
void
}
-#if deal_II_dimension == 1
+
template<>
void
Assert (false, ExcImpossibleInDim (1));
}
-#endif
+
template<int dim>
void
-#if deal_II_dimension == 1
-
template <>
Point<1>
HyperBallBoundary<1,1>::
return Point<2>();
}
-#endif
-
template <int dim, int spacedim>
}
-#if deal_II_dimension == 1
template <>
void
Assert (false, ExcImpossibleInDim(1));
}
-#endif
template <int dim, int spacedim>
}
}
-#if deal_II_dimension == 3
+
template <>
void
}
}
-#endif
-#if deal_II_dimension == 2
-
template <>
void
HyperBallBoundary<2,3>::get_intermediate_points_on_quad (
}
}
-#endif
+
template <int dim, int spacedim>
void
-#if deal_II_dimension == 1
-
template <>
void
HyperBallBoundary<1>::
Assert (false, ExcImpossibleInDim(1));
}
-#endif
template <int dim, int spacedim>
-#if deal_II_dimension == 1
-
template <>
Point<1>
HalfHyperBallBoundary<1>::
return Point<1>();
}
-#endif
-
template <int dim>
}
-#if deal_II_dimension == 1
template <>
void
Assert (false, ExcInternalError());
}
-#endif
-
-#if deal_II_dimension == 1
template <>
void
Assert (false, ExcImpossibleInDim(1));
}
-#endif
template <int dim>
-#if deal_II_dimension == 1
-
template <>
Point<1>
HalfHyperShellBoundary<1>::
return Point<1>();
}
-#endif
-#if deal_II_dimension == 1
-
template <>
void
HalfHyperShellBoundary<1>::
Assert (false, ExcInternalError());
}
-#endif
-
-#if deal_II_dimension == 1
-
template <>
void
HalfHyperShellBoundary<1>::
Assert (false, ExcImpossibleInDim(1));
}
-#endif
+
// explicit instantiations
-template class CylinderBoundary<deal_II_dimension>;
-template class ConeBoundary<deal_II_dimension>;
-template class HyperBallBoundary<deal_II_dimension>;
-template class HalfHyperBallBoundary<deal_II_dimension>;
-template class HyperShellBoundary<deal_II_dimension>;
-template class HalfHyperShellBoundary<deal_II_dimension>;
-
-#if deal_II_dimension != 3
-template class HyperBallBoundary<deal_II_dimension,deal_II_dimension+1>;
-#endif
+#include "tria_boundary_lib.inst"
DEAL_II_NAMESPACE_CLOSE
--- /dev/null
+//---------------------------------------------------------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//---------------------------------------------------------------------------
+
+for (deal_II_dimension : DIMENSIONS)
+ {
+ template class CylinderBoundary<deal_II_dimension>;
+ template class ConeBoundary<deal_II_dimension>;
+ template class HyperBallBoundary<deal_II_dimension>;
+ template class HalfHyperBallBoundary<deal_II_dimension>;
+ template class HyperShellBoundary<deal_II_dimension>;
+ template class HalfHyperShellBoundary<deal_II_dimension>;
+
+#if deal_II_dimension != 3
+ template class HyperBallBoundary<deal_II_dimension,deal_II_dimension+1>;
+#endif
+ }
+
+
// $Id$
// Version: $Name$
//
-// Copyright (C) 2006 by the deal.II authors
+// Copyright (C) 2006, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
namespace Triangulation
{
-#if deal_II_dimension == 1
-
unsigned int
TriaFaces<1>::memory_consumption () const
{
return 0;
}
-#endif
-
-#if deal_II_dimension == 2
unsigned int
TriaFaces<2>::memory_consumption () const
return MemoryConsumption::memory_consumption (lines);
}
-#endif
-
-#if deal_II_dimension == 3
unsigned int
TriaFaces<3>::memory_consumption () const
return (MemoryConsumption::memory_consumption (quads) +
MemoryConsumption::memory_consumption (lines) );
}
-
-#endif
-
}
}