[cig-commits] r1403 - trunk/aspect/source/mesh_refinement
bangerth at dealii.org
bangerth at dealii.org
Fri Nov 30 15:08:52 PST 2012
Author: bangerth
Date: 2012-11-30 16:08:52 -0700 (Fri, 30 Nov 2012)
New Revision: 1403
Modified:
trunk/aspect/source/mesh_refinement/composition.cc
trunk/aspect/source/mesh_refinement/temperature.cc
Log:
Simplify some code.
Modified: trunk/aspect/source/mesh_refinement/composition.cc
===================================================================
--- trunk/aspect/source/mesh_refinement/composition.cc 2012-11-30 22:02:48 UTC (rev 1402)
+++ trunk/aspect/source/mesh_refinement/composition.cc 2012-11-30 23:08:52 UTC (rev 1403)
@@ -42,15 +42,14 @@
{
Vector<float> this_indicator (indicators.size());
- std::vector<bool> composition_component (dim+2+this->n_compositional_fields(), false);
- composition_component[dim+2+c] = true;
+ const FEValuesExtractors::Scalar this_composition (dim+2+this->n_compositional_fields());
KellyErrorEstimator<dim>::estimate (this->get_dof_handler(),
//TODO: Replace the 2 by something reasonable, adjusted to the polynomial degree
QGauss<dim-1>(2),
typename FunctionMap<dim>::type(),
this->get_solution(),
this_indicator,
- composition_component,
+ this->get_dof_handler().get_fe().component_mask(this_composition),
0,
0,
this->get_triangulation().locally_owned_subdomain());
Modified: trunk/aspect/source/mesh_refinement/temperature.cc
===================================================================
--- trunk/aspect/source/mesh_refinement/temperature.cc 2012-11-30 22:02:48 UTC (rev 1402)
+++ trunk/aspect/source/mesh_refinement/temperature.cc 2012-11-30 23:08:52 UTC (rev 1403)
@@ -38,15 +38,14 @@
"compositional fields are active!"));
indicators = 0;
- std::vector<bool> temperature_component (dim+2+this->n_compositional_fields(), false);
- temperature_component[dim+2] = true;
+ const FEValuesExtractors::Scalar temperature (dim+1);
KellyErrorEstimator<dim>::estimate (this->get_dof_handler(),
//TODO: Replace the 2 by something reasonable, adjusted to the polynomial degree
QGauss<dim-1>(2),
typename FunctionMap<dim>::type(),
this->get_solution(),
indicators,
- temperature_component,
+ this->get_dof_handler().get_fe().component_mask(temperature),
0,
0,
this->get_triangulation().locally_owned_subdomain());
More information about the CIG-COMMITS
mailing list