GRINS-0.8.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-2017 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
27 
28 // libMesh
29 #include "libmesh/patch_recovery_error_estimator.h"
30 
31 namespace GRINS
32 {
34  const ErrorEstimatorOptions& estimator_options,
35  libMesh::AdjointResidualErrorEstimator& estimator )
36  {
37  libMesh::PatchRecoveryErrorEstimator*
38  p1 = new libMesh::PatchRecoveryErrorEstimator;
39 
40  estimator.primal_error_estimator().reset( p1 );
41 
42  libMesh::PatchRecoveryErrorEstimator*
43  p2 = new libMesh::PatchRecoveryErrorEstimator;
44 
45  estimator.dual_error_estimator().reset( p2 );
46 
47  bool patch_reuse = estimator_options.patch_reuse();
48  estimator.primal_error_estimator()->error_norm.set_type( 0, libMesh::H1_SEMINORM );
49  p1->set_patch_reuse( patch_reuse );
50 
51  estimator.dual_error_estimator()->error_norm.set_type( 0, libMesh::H1_SEMINORM );
52  p2->set_patch_reuse( patch_reuse );
53  }
54 
56  const ErrorEstimatorOptions& estimator_options,
57  libMesh::AdjointRefinementEstimator& estimator )
58  {
59  estimator.number_h_refinements = estimator_options.n_adjoint_h_refinements();
60  estimator.number_p_refinements = estimator_options.n_adjoint_p_refinements();
61  }
62 
63 } // end namespace GRINS
virtual void set_adjoint_estimator_options(const GetPot &input, const ErrorEstimatorOptions &estimator_options, libMesh::AdjointResidualErrorEstimator &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.

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1