Skip to content

Commit 9ebcaaf

Browse files
committed
Fix app linking with --disable-second
Now that we can optionally use the LaplacianErrorEstimator in the calculator app, we need for the linker to be able to find its constructor. This should fix a failing devel->master build in the `Test No Second Derivatives` recipe.
1 parent 756f6c3 commit 9ebcaaf

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

src/error_estimation/fourth_error_estimators.C

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,29 @@
1717

1818

1919
#include "libmesh/libmesh_config.h"
20-
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
2120

21+
#include "libmesh/fourth_error_estimators.h"
2222

23-
// C++ includes
24-
#include <algorithm> // for std::fill
25-
#include <cstdlib> // *must* precede <cmath> for proper std:abs() on PGI, Sun Studio CC
26-
#include <cmath> // for sqrt
23+
#include "libmesh/enum_error_estimator_type.h"
2724

25+
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
2826

2927
// Local Includes
3028
#include "libmesh/libmesh_common.h"
31-
#include "libmesh/fourth_error_estimators.h"
3229
#include "libmesh/error_vector.h"
3330
#include "libmesh/fe_base.h"
3431
#include "libmesh/libmesh_logging.h"
3532
#include "libmesh/elem.h"
3633
#include "libmesh/system.h"
3734
#include "libmesh/dense_vector.h"
3835
#include "libmesh/tensor_tools.h"
39-
#include "libmesh/enum_error_estimator_type.h"
4036
#include "libmesh/enum_norm_type.h"
4137

38+
// C++ includes
39+
#include <algorithm> // for std::fill
40+
#include <cstdlib> // *must* precede <cmath> for proper std:abs() on PGI, Sun Studio CC
41+
#include <cmath> // for sqrt
42+
4243
namespace libMesh
4344
{
4445

@@ -157,28 +158,29 @@ LaplacianErrorEstimator::internal_side_integration ()
157158

158159
#else // defined (LIBMESH_ENABLE_SECOND_DERIVATIVES)
159160

160-
#include "libmesh/fourth_error_estimators.h"
161-
162161
namespace libMesh
163162
{
164163

165-
void
166-
LaplacianErrorEstimator::init_context (FEMContext &)
164+
LaplacianErrorEstimator::LaplacianErrorEstimator() :
165+
JumpErrorEstimator()
167166
{
168167
libmesh_error_msg("Error: LaplacianErrorEstimator requires second " \
169168
<< "derivative support; try configuring libmesh with " \
170169
<< "--enable-second");
171170
}
172171

173-
174-
void
175-
LaplacianErrorEstimator::internal_side_integration ()
172+
ErrorEstimatorType
173+
LaplacianErrorEstimator::type() const
176174
{
177-
libmesh_error_msg("Error: LaplacianErrorEstimator requires second " \
178-
<< "derivative support; try configuring libmesh with " \
179-
<< "--enable-second");
175+
return LAPLACIAN;
180176
}
181177

178+
179+
180+
void LaplacianErrorEstimator::init_context (FEMContext &) {}
181+
182+
void LaplacianErrorEstimator::internal_side_integration () {}
183+
182184
} // namespace libMesh
183185

184186
#endif // defined (LIBMESH_ENABLE_SECOND_DERIVATIVES)

0 commit comments

Comments
 (0)