GRINS-0.7.0
adjoint_error_estimator_factories.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 // These classes
28 
29 // libMesh
30 #include "libmesh/patch_recovery_error_estimator.h"
31 
32 namespace GRINS
33 {
35  const ErrorEstimatorOptions& estimator_options,
36  libMesh::AdjointResidualErrorEstimator& estimator )
37  {
38  libMesh::PatchRecoveryErrorEstimator*
39  p1 = new libMesh::PatchRecoveryErrorEstimator;
40 
41  estimator.primal_error_estimator().reset( p1 );
42 
43  libMesh::PatchRecoveryErrorEstimator*
44  p2 = new libMesh::PatchRecoveryErrorEstimator;
45 
46  estimator.dual_error_estimator().reset( p2 );
47 
48  bool patch_reuse = estimator_options.patch_reuse();
49  estimator.primal_error_estimator()->error_norm.set_type( 0, libMesh::H1_SEMINORM );
50  p1->set_patch_reuse( patch_reuse );
51 
52  estimator.dual_error_estimator()->error_norm.set_type( 0, libMesh::H1_SEMINORM );
53  p2->set_patch_reuse( patch_reuse );
54  }
55 
57  const ErrorEstimatorOptions& estimator_options,
58  libMesh::AdjointRefinementEstimator& estimator )
59  {
60  estimator.number_h_refinements = estimator_options.n_adjoint_h_refinements();
61  estimator.number_p_refinements = estimator_options.n_adjoint_p_refinements();
62  }
63 
64  // Instantiate adjoint ErrorEstimator factories
68 
72 
73 } // end namespace GRINS
AdjointRefinementErrorEstimatorFactory grins_factory_adjoint_refinement_estimator(StrategiesParsing::adjoint_refinement_error_estimator())
virtual void set_adjoint_estimator_options(const GetPot &input, const ErrorEstimatorOptions &estimator_options, libMesh::AdjointResidualErrorEstimator &estimator)
static std::string adjoint_residual_error_estimator()
AdjointResidualErrorEstimatorFactory grins_factory_adjoint_residual_estimator(StrategiesParsing::adjoint_residual_error_estimator())
unsigned char n_adjoint_p_refinements() const
GRINS namespace.
unsigned char n_adjoint_h_refinements() const
virtual void set_adjoint_estimator_options(const GetPot &input, const ErrorEstimatorOptions &estimator_options, libMesh::AdjointRefinementEstimator &estimator)
Container for ErrorEstimator options.
static std::string adjoint_refinement_error_estimator()

Generated on Thu Jun 2 2016 21:52:28 for GRINS-0.7.0 by  doxygen 1.8.10