From: Lei Qiao Date: Fri, 27 Feb 2015 06:10:04 +0000 (-0600) Subject: format indentation and delete deprecated code X-Git-Tag: v8.3.0-rc1~412^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=114fd5c53489845162425571bb3ee044fece4a49;p=dealii.git format indentation and delete deprecated code --- diff --git a/examples/step-33/step-33.cc b/examples/step-33/step-33.cc index 007196a6ef..c2854effd7 100644 --- a/examples/step-33/step-33.cc +++ b/examples/step-33/step-33.cc @@ -231,7 +231,6 @@ namespace Step33 static void compute_flux_matrix (const InputVector &W, std::array , EulerEquations::n_components > &flux) -// Number (&flux)[n_components][dim]) { // First compute the pressure that appears in the flux matrix, and then // compute the first dim columns of the matrix that @@ -269,15 +268,12 @@ namespace Step33 // $\alpha$. It's form has also been given already in the introduction: template static - void numerical_normal_flux (const Point &normal, - const InputVector &Wplus, - const InputVector &Wminus, - const double alpha, + void numerical_normal_flux (const Point &normal, + const InputVector &Wplus, + const InputVector &Wminus, + const double alpha, std::array < Number, n_components> &normal_flux) -// Number (&normal_flux)[n_components]) { -// Number iflux[n_components][dim]; -// Number oflux[n_components][dim]; std::array , EulerEquations::n_components > iflux, oflux; compute_flux_matrix (Wplus, iflux); @@ -306,8 +302,7 @@ namespace Step33 template static void compute_forcing_vector (const InputVector &W, - std::array < Number, n_components> &forcing) -// Number (&forcing)[n_components]) + std::array < Number, n_components> &forcing) { const double gravity = -1.0; @@ -1773,29 +1768,17 @@ namespace Step33 // that we compute the flux matrices and right hand sides in terms of // autodifferentiation variables, so that the Jacobian contributions can // later easily be computed from it: -// typedef Sacado::Fad::DFad FluxMatrix[EulerEquations::n_components][dim]; -// FluxMatrix *flux = new FluxMatrix[n_q_points]; std::vector < - std::array , dim>, EulerEquations::n_components > -// std::array , EulerEquations::n_components>, dim > - > flux(n_q_points); - - -// typedef double FluxMatrixOld[EulerEquations::n_components][dim]; -// FluxMatrixOld *flux_old = new FluxMatrixOld[n_q_points]; + std::array , dim>, EulerEquations::n_components > + > flux(n_q_points); std::vector < - std::array , EulerEquations::n_components > - > flux_old(n_q_points); - -// typedef Sacado::Fad::DFad ForcingVector[EulerEquations::n_components]; -// ForcingVector *forcing = new ForcingVector[n_q_points]; + std::array , EulerEquations::n_components > + > flux_old(n_q_points); std::vector < std::array< Sacado::Fad::DFad, EulerEquations::n_components> > forcing(n_q_points); -// typedef double ForcingVectorOld[EulerEquations::n_components]; -// ForcingVectorOld *forcing_old = new ForcingVectorOld[n_q_points]; std::vector < std::array< double, EulerEquations::n_components> > forcing_old(n_q_points); for (unsigned int q=0; q NormalFlux[EulerEquations::n_components]; -// NormalFlux *normal_fluxes; = new NormalFlux[n_q_points]; std::vector< std::array < Sacado::Fad::DFad, EulerEquations::n_components> > normal_fluxes(n_q_points); - -// typedef double NormalFluxOld[EulerEquations::n_components]; -// NormalFluxOld *normal_fluxes_old = new NormalFluxOld[n_q_points]; - std::vector< std::array < double, EulerEquations::n_components> > normal_fluxes_old(n_q_points); double alpha; @@ -2113,9 +2084,6 @@ namespace Step33 right_hand_side(dof_indices[i]) -= R_i.val(); } - -// delete[] normal_fluxes; -// delete[] normal_fluxes_old; }