Skip to content

Commit 5c5f192

Browse files
committed
add guard
1 parent 8734ae6 commit 5c5f192

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

include/base_interface.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ class BaseInterface : public ParameterAcceptor, public SimulatorAccess<dim,space
176176
FEValuesCache<dim,spacedim> &scratch,
177177
CopyData &data) const;
178178

179+
#ifdef DEAL_II_WITH_TRILINOS
179180
/**
180181
* Compute linear operators needed by the problem: - @p system_op
181182
* represents the system matrix associated to the Newton's
@@ -208,11 +209,14 @@ class BaseInterface : public ParameterAcceptor, public SimulatorAccess<dim,space
208209
LinearOperator<LATrilinos::VectorType> &system_op,
209210
LinearOperator<LATrilinos::VectorType> &prec_op,
210211
LinearOperator<LATrilinos::VectorType> &prec_op_finer) const;
212+
#endif //DEAL_II_WITH_TRILINOS
211213

214+
#ifdef DEAL_II_WITH_PETSC
212215
virtual void compute_system_operators(const std::vector<shared_ptr<typename LAPETSc::BlockMatrix> >,
213216
LinearOperator<LAPETSc::VectorType> &system_op,
214217
LinearOperator<LAPETSc::VectorType> &prec_op,
215218
LinearOperator<LAPETSc::VectorType> &prec_op_finer) const;
219+
#endif //DEAL_II_WITH_PETSC
216220

217221
/**
218222
* Compute linear operators needed by the problem. When using

source/base_interface.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ compute_system_operators(const std::vector<shared_ptr<typename LADealII::BlockMa
202202
LinearOperator<typename LADealII::VectorType> &) const
203203
{}
204204

205-
205+
#ifdef DEAL_II_WITH_TRILINOS
206206
template <int dim, int spacedim, typename LAC>
207207
void
208208
BaseInterface<dim,spacedim,LAC>::
@@ -213,8 +213,9 @@ compute_system_operators(const std::vector<shared_ptr<LATrilinos::BlockMatrix> >
213213
{
214214
Assert(false, ExcPureFunctionCalled ());
215215
}
216+
#endif //DEAL_II_WITH_TRILINOS
216217

217-
218+
#ifdef DEAL_II_WITH_PETSC
218219
template <int dim, int spacedim, typename LAC>
219220
void
220221
BaseInterface<dim,spacedim,LAC>::
@@ -225,6 +226,7 @@ compute_system_operators(const std::vector<shared_ptr<LAPETSc::BlockMatrix> >,
225226
{
226227
Assert(false, ExcPureFunctionCalled ());
227228
}
229+
#endif //DEAL_II_WITH_PETSC
228230

229231
template<int dim, int spacedim, typename LAC>
230232
void

0 commit comments

Comments
 (0)