Skip to content

Commit

Permalink
provide base class to fix warning
Browse files Browse the repository at this point in the history
fixes clang 6 warning:
```
/usr/lib/gcc/x86_64-linux-
gnu/4.8/../../../../include/c++/4.8/bits/unique_ptr.h:67:2: warning:
delete called on 'aspect::internal::FunctorBase<2>' that is abstract but
has non-virtual destructor [-Wdelete-non-virtual-dtor]
```
  • Loading branch information
tjhei committed May 3, 2018
1 parent b1d2b13 commit f4e369f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 12 additions & 6 deletions include/aspect/lateral_averaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,25 @@ namespace aspect
setup(const unsigned int q_points);

/**
* This takes @p in material model inputs and @p out outputs (which are filled
* if need_material_properties() == true), an initialized FEValues
* object for a cell, and the current solution vector as inputs.
* Functions in derived classes should then evaluate the desired quantity
* and return the results in the output vector, which is q_points long.
*/
* This takes @p in material model inputs and @p out outputs (which are filled
* if need_material_properties() == true), an initialized FEValues
* object for a cell, and the current solution vector as inputs.
* Functions in derived classes should then evaluate the desired quantity
* and return the results in the output vector, which is q_points long.
*/
virtual
void
operator()(const MaterialModel::MaterialModelInputs<dim> &in,
const MaterialModel::MaterialModelOutputs<dim> &out,
const FEValues<dim> &fe_values,
const LinearAlgebra::BlockVector &solution,
std::vector<double> &output) = 0;

/**
* Provide an (empty) virtual destructor.
*/
virtual
~FunctorBase();
};
}

Expand Down
6 changes: 6 additions & 0 deletions source/simulator/lateral_averaging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ namespace aspect



template <int dim>
FunctorBase<dim>::~FunctorBase()
{}



template <int dim>
void
FunctorBase<dim>::create_additional_material_model_outputs (const unsigned int /*n_points*/,
Expand Down

0 comments on commit f4e369f

Please sign in to comment.