To avoid them from showing up in the documentation.
class PointGeometryData
{
public:
+ /**
+ * Only a constructor needed for this class (a struct really)
+ */
PointGeometryData(
const Point<dim> & new_requested_location,
const std::vector<Point<dim>> & new_locations,
// TODO: Do neighbors for dx and povray smooth triangles
-//////////////////////////////////////////////////////////////////////
+//--------------------------------------------------------------------
// Remarks on the implementations
//
// Variable names: in most functions, variable names have been
//
// d1, d2, di Multiplicators for ii to find positions in the
// array of nodes.
-//////////////////////////////////////////////////////////////////////
+//--------------------------------------------------------------------
#include <deal.II/base/data_out_base.h>
#include <deal.II/base/memory_consumption.h>
unsigned int n_nodes;
unsigned int n_cells;
compute_sizes<dim, spacedim>(patches, n_nodes, n_cells);
- ///////////////////////
+ //---------------------
// preamble
if (flags.write_preamble)
{
write_cells(patches, ucd_out);
out << '\n';
- /////////////////////////////
+ //---------------------------
// now write data
if (n_data_sets != 0)
{
write_nodes(patches, dx_out);
}
- ///////////////////////////////
+ //-----------------------------
// first write the coordinates of all vertices
- /////////////////////////////////////////
+ //---------------------------------------
// write cells
out << "object \"cells\" class array type int rank 1 shape "
<< GeometryInfo<dim>::vertices_per_cell << " items " << n_cells;
out << "\"" << '\n' << "attribute \"ref\" string \"positions\"" << '\n';
// TODO:[GK] Patches must be of same size!
- /////////////////////////////
+ //---------------------------
// write neighbor information
if (flags.write_neighbors)
{
out << '\n';
}
}
- /////////////////////////////
+ //---------------------------
// now write data
if (n_data_sets != 0)
{
n_data_sets,
patches[0].data.n_rows()));
- ///////////////////////
+ //---------------------
// preamble
out << "gmvinput ascii" << '\n' << '\n';
Threads::Task<> reorder_task =
Threads::new_task(fun_ptr, patches, data_vectors);
- ///////////////////////////////
+ //-----------------------------
// first make up a list of used vertices along with their coordinates
//
// note that we have to print 3 dimensions
out << '\n';
}
- /////////////////////////////////
+ //-------------------------------
// now for the cells. note that vertices are counted from 1 onwards
out << "cells " << n_cells << '\n';
write_cells(patches, gmv_out);
- ///////////////////////////////////////
+ //-------------------------------------
// data output.
out << "variable" << '\n';
unsigned int n_cells;
compute_sizes<dim, spacedim>(patches, n_nodes, n_cells);
- ///////////
+ //---------
// preamble
{
out
Threads::Task<> reorder_task =
Threads::new_task(fun_ptr, patches, data_vectors);
- ///////////////////////////////
+ //-----------------------------
// first make up a list of used vertices along with their coordinates
}
- ///////////////////////////////////////
+ //-------------------------------------
// data output.
//
// now write the data vectors to @p{out} first make sure that all data is in
Threads::Task<> reorder_task =
Threads::new_task(fun_ptr, patches, data_vectors);
- ///////////////////////////////
+ //-----------------------------
// first make up a list of used vertices along with their coordinates
for (unsigned int d = 1; d <= spacedim; ++d)
{
}
- ///////////////////////////////////////
+ //-------------------------------------
// data output.
//
reorder_task.join();
- /////////////////////////////////
+ //-------------------------------
// now for the cells. note that vertices are counted from 1 onwards
unsigned int first_vertex_of_patch = 0;
unsigned int elem = 0;
AssertDimension(n_data_sets, patches[0].data.n_rows())
}
- ///////////////////////
+ //---------------------
// preamble
{
out << "# vtk DataFile Version 3.0" << '\n'
Threads::Task<> reorder_task =
Threads::new_task(fun_ptr, patches, data_vectors);
- ///////////////////////////////
+ //-----------------------------
// first make up a list of used vertices along with their coordinates
//
// note that we have to print d=1..3 dimensions
out << "POINTS " << n_nodes << " double" << '\n';
write_nodes(patches, vtk_out);
out << '\n';
- /////////////////////////////////
+ //-------------------------------
// now for the cells
out << "CELLS " << n_cells << ' ' << n_points_and_n_cells << '\n';
if (flags.write_higher_order_cells)
}
out << '\n';
- ///////////////////////////////////////
+ //-------------------------------------
// data output.
// now write the data vectors to @p{out} first make sure that all data is in
Threads::Task<> reorder_task =
Threads::new_task(fun_ptr, patches, data_vectors);
- ///////////////////////////////
+ //-----------------------------
// first make up a list of used vertices along with their coordinates
//
// note that according to the standard, we have to print d=1..3 dimensions,
write_nodes(patches, vtu_out);
out << " </DataArray>\n";
out << " </Points>\n\n";
- /////////////////////////////////
+ //-------------------------------
// now for the cells
out << " <Cells>\n";
out << " <DataArray type=\"Int32\" Name=\"connectivity\" format=\""
out << " </Cells>\n";
- ///////////////////////////////////////
+ //-------------------------------------
// data output.
// now write the data vectors to @p{out} first make sure that all data is in
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
template <int dim>
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
template <int dim>
}
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
template <int dim>
CosineFunction<dim>::CosineFunction(const unsigned int n_components)
}
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
template <int dim>
CosineGradFunction<dim>::CosineGradFunction()
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
template <int dim>
double
}
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
double
}
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
LSingularityGradFunction::LSingularityGradFunction()
: Function<2>(2)
Assert(false, ExcNotImplemented());
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
template <int dim>
double
}
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
double
}
}
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
template <int dim>
JumpFunction<dim>::JumpFunction(const Point<dim> &direction,
- //////////////////////////////////////////////////////////////////////
+ //--------------------------------------------------------------------
namespace
{
// Integral of CutOffFunctionLinfty in dimension 1, 2, and 3 when the radius
}
}
- ///////////////////Declaring storage and mappings//////////////////
+ //-----------------Declaring storage and mappings------------------
std::vector<Point<spacedim>> vertices;
std::vector<CellData<dim>> cells;
in >> keyword;
- //////////////////Processing the POINTS section///////////////
+ //----------------Processing the POINTS section---------------
if (keyword == "POINTS")
{
// no cells at all?
Assert(number_cache.n_levels > 0, ExcInternalError());
- ///////////////////////////////////
+ //---------------------------------
// update the number of lines on the different levels in the
// cache
number_cache.n_lines = 0;
using quad_iterator =
typename Triangulation<dim, spacedim>::quad_iterator;
- ///////////////////////////////////
+ //---------------------------------
// update the number of quads on the different levels in the
// cache
number_cache.n_quads = 0;
using hex_iterator =
typename Triangulation<dim, spacedim>::hex_iterator;
- ///////////////////////////////////
+ //---------------------------------
// update the number of hexes on the different levels in the
// cache
number_cache.n_hexes = 0;
--quad_cell_count[child->quad_index(f)];
}
- ///////////////////////////////////////
+ //-------------------------------------
// delete interior quads and lines and the
// interior vertex, depending on the
// refinement case of the cell
triangulation.vertices_used.resize(needed_vertices, false);
}
- ///////////////////////////////////////////
+ //-----------------------------------------
// Before we start with the actual refinement, we do some
// sanity checks if in debug mode. especially, we try to catch
// the notorious problem with lines being twice refined,
}
- ///////////////////////////////////////////
+ //-----------------------------------------
// Before we start with the actual refinement, we do some
// sanity checks if in debug mode. especially, we try to catch
// the notorious problem with lines being twice refined,
ExcInternalError());
#endif
- ///////////////////////////////////////////
+ //-----------------------------------------
// Do refinement on every level
//
// To make life a bit easier, we first refine those lines and
}
- ///////////////////////////////////////
+ //-------------------------------------
// now refine marked quads
- ///////////////////////////////////////
+ //-------------------------------------
// here we encounter several cases:
} // for all quads
} // looped two times over all quads, all quads refined now
- ///////////////////////////////////
+ //---------------------------------
// Now, finally, set up the new
// cells
- ///////////////////////////////////
+ //---------------------------------
typename Triangulation<3, spacedim>::DistortedCellList
cells_with_distorted_children;
{1, 0}}}; // RefinementCase<dim>::cut_y, face_flip=true,
// face_rotation=false and true
- ///////////////////////////////////////
+ //-------------------------------------
//
// in the following we will do the same thing for
// each refinement case: create a new vertex (if
{
case RefinementCase<dim>::cut_x:
{
- //////////////////////////////
+ //----------------------------
//
// RefinementCase<dim>::cut_x
//
case RefinementCase<dim>::cut_y:
{
- //////////////////////////////
+ //----------------------------
//
// RefinementCase<dim>::cut_y
//
case RefinementCase<dim>::cut_z:
{
- //////////////////////////////
+ //----------------------------
//
// RefinementCase<dim>::cut_z
//
case RefinementCase<dim>::cut_xy:
{
- //////////////////////////////
+ //----------------------------
//
// RefinementCase<dim>::cut_xy
//
case RefinementCase<dim>::cut_xz:
{
- //////////////////////////////
+ //----------------------------
//
// RefinementCase<dim>::cut_xz
//
case RefinementCase<dim>::cut_yz:
{
- //////////////////////////////
+ //----------------------------
//
// RefinementCase<dim>::cut_yz
//
case RefinementCase<dim>::cut_xyz:
{
- //////////////////////////////
+ //----------------------------
//
// RefinementCase<dim>::cut_xyz
// isotropic refinement
new_quads[11]->set_line_orientation(
3, line_orientation[13]);
- /////////////////////////////////
+ //-------------------------------
// create the eight new hexes
//
// again first collect some data. here, we need
// needs also take care that it won't tag cells for refinement for
// which some neighbors are more refined or will be refined.
- //////////////////////////////////////
+ //------------------------------------
// STEP 0:
// Only if coarsest_level_1 or patch_level_1 is set: clear all
// coarsen flags on level 1 to avoid level 0 cells being created
bool mesh_changed_in_this_loop = false;
do
{
- //////////////////////////////////////
+ //------------------------------------
// STEP 1:
// do not coarsen a cell if 'most of the neighbors' will be
// refined after the step. This is to prevent the occurrence
}
- //////////////////////////////////////
+ //------------------------------------
// STEP 2:
// eliminate refined islands in the interior and at the
// boundary. since they don't do much harm besides increasing
}
}
- //////////////////////////////////////
+ //------------------------------------
// STEP 3:
// limit the level difference of neighboring cells at each
// vertex.
}
}
- /////////////////////////////////////
+ //-----------------------------------
// STEP 4:
// eliminate unrefined islands. this has higher priority
// since this diminishes the approximation properties not
cell, (smooth_grid & allow_anisotropic_smoothing) != 0);
}
- /////////////////////////////////
+ //-------------------------------
// STEP 5:
// ensure patch level 1.
//
}
}
- //////////////////////////////////
+ //--------------------------------
//
// at the boundary we could end up with cells with negative
// volume or at least with a part, that is negative, if the
// that can happen
this->policy->prevent_distorted_boundary_cells(*this);
- /////////////////////////////////
+ //-------------------------------
// STEP 6:
// take care of the requirement that no
// double refinement is done at each face
}
}
- //////////////////////////////////////
+ //------------------------------------
// STEP 7:
// take care that no double refinement
// is done at each line in 3d or higher
// dimensions.
this->policy->prepare_refinement_dim_dependent(*this);
- //////////////////////////////////////
+ //------------------------------------
// STEP 8:
// make sure that all children of each
// cell are either flagged for coarsening
TriaAccessor<2, 2, 2>::extent_in_direction(const unsigned int axis) const
{
const unsigned int lines[2][2] = {
- {2, 3}, /// Lines along x-axis, see GeometryInfo
- {0, 1}}; /// Lines along y-axis
+ {2, 3}, // Lines along x-axis, see GeometryInfo
+ {0, 1}}; // Lines along y-axis
AssertIndexRange(axis, 2);
TriaAccessor<2, 2, 3>::extent_in_direction(const unsigned int axis) const
{
const unsigned int lines[2][2] = {
- {2, 3}, /// Lines along x-axis, see GeometryInfo
- {0, 1}}; /// Lines along y-axis
+ {2, 3}, // Lines along x-axis, see GeometryInfo
+ {0, 1}}; // Lines along y-axis
AssertIndexRange(axis, 2);
TriaAccessor<3, 3, 3>::extent_in_direction(const unsigned int axis) const
{
const unsigned int lines[3][4] = {
- {2, 3, 6, 7}, /// Lines along x-axis, see GeometryInfo
- {0, 1, 4, 5}, /// Lines along y-axis
- {8, 9, 10, 11}}; /// Lines along z-axis
+ {2, 3, 6, 7}, // Lines along x-axis, see GeometryInfo
+ {0, 1, 4, 5}, // Lines along y-axis
+ {8, 9, 10, 11}}; // Lines along z-axis
AssertIndexRange(axis, 3);
{
namespace PointValueHistoryImplementation
{
- /// Only a constructor needed for this class (a struct really)
template <int dim>
PointGeometryData<dim>::PointGeometryData(
const Point<dim> & new_requested_location,