From: Matthias Maier Date: Tue, 7 Jun 2022 22:36:04 +0000 (-0500) Subject: base/polynomials_bdm: rewrap comments and remove dead code X-Git-Tag: v9.4.0-rc1~54^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=800d3a15274aec52b55e00c8cd9068307fac5e7c;p=dealii.git base/polynomials_bdm: rewrap comments and remove dead code --- diff --git a/source/base/polynomials_bdm.cc b/source/base/polynomials_bdm.cc index 1302106c75..0fc44c86b0 100644 --- a/source/base/polynomials_bdm.cc +++ b/source/base/polynomials_bdm.cc @@ -81,11 +81,8 @@ PolynomialsBDM::evaluate( const unsigned int n_sub = polynomial_space.n(); - // guard access to the scratch - // arrays in the following block - // using a mutex to make sure they - // are not used by multiple threads - // at once + // guard access to the scratch arrays in the following block using a + // mutex to make sure they are not used by multiple threads at once { std::lock_guard lock(mutex); @@ -93,11 +90,8 @@ PolynomialsBDM::evaluate( p_grads.resize((grads.size() == 0) ? 0 : n_sub); p_grad_grads.resize((grad_grads.size() == 0) ? 0 : n_sub); - // Compute values of complete space - // and insert into tensors. Result - // will have first all polynomials - // in the x-component, then y and - // z. + // Compute values of complete space and insert into tensors. Result + // will have first all polynomials in the x-component, then y and z. polynomial_space.evaluate(unit_point, p_values, p_grads, @@ -121,13 +115,10 @@ PolynomialsBDM::evaluate( grad_grads[i + j * n_sub][j] = p_grad_grads[i]; } - // This is the first polynomial not - // covered by the P_k subspace + // This is the first polynomial not covered by the P_k subspace unsigned int start = dim * n_sub; - // Store values of auxiliary - // polynomials and their three - // derivatives + // Store values of auxiliary polynomials and their three derivatives std::vector> monovali(dim, std::vector(4)); std::vector> monovalk(dim, std::vector(4)); @@ -175,16 +166,11 @@ PolynomialsBDM::evaluate( } else // dim == 3 { - // The number of curls in each - // component. Note that the - // table in BrezziFortin91 has - // a typo, but the text has the - // right basis - - // Note that the next basis - // function is always obtained - // from the previous by cyclic - // rotation of the coordinates + // The number of curls in each component. Note that the table in + // BrezziFortin91 has a typo, but the text has the right basis + + // Note that the next basis function is always obtained from the + // previous by cyclic rotation of the coordinates const unsigned int n_curls = monomials.size() - 1; for (unsigned int i = 0; i < n_curls; ++i, start += dim) { @@ -361,73 +347,6 @@ PolynomialsBDM::evaluate( } -/* -template -void -PolynomialsBDM::compute_node_matrix (Table<2,double>& A) const -{ - std::vector > moment_weight(2); - for (unsigned int i=0;i(i); - - QGauss qface(polynomial_space.degree()+1); - - std::vector > values(n()); - std::vector > grads; - std::vector > grad_grads; - values.resize(n()); - - for (unsigned int face=0;face<2*dim;++face) - { - double orientation = 1.; - if ((face==0) || (face==3)) - orientation = -1.; - - for (unsigned int k=0;k p; - switch (face) - { - case 2: - p(1) = 1.; - case 0: - p(0) = x; - break; - case 1: - p(0) = 1.; - case 3: - p(1) = x; - break; - } -// std::cerr << p -// << '\t' << moment_weight[0].value(x) -// << '\t' << moment_weight[1].value(x); - - compute (p, values, grads, grad_grads); - - for (unsigned int i=0;i unsigned int PolynomialsBDM::n_polynomials(const unsigned int k)