Stratimikos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Stratimikos_LinearSolverBuilder.cpp
1 // @HEADER
2 // *****************************************************************************
3 // Stratimikos: Thyra-based strategies for linear solvers
4 //
5 // Copyright 2006 NTESS and the Stratimikos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #include "Stratimikos_LinearSolverBuilder_decl.hpp"
11 
12 #ifdef HAVE_STRATIMIKOS_EXPLICIT_INSTANTIATION
13 
14 #include "Stratimikos_LinearSolverBuilder_def.hpp"
15 #include "Teuchos_ExplicitInstantiationHelpers.hpp"
16 
17 namespace Stratimikos {
18 
19 TEUCHOS_MACRO_TEMPLATE_INSTANT_SCALAR_TYPES(STRATIMIKOS_LINEARSOLVERBUILDER_INSTANT)
20 
21 int LinearSolverBuilderHelpers::existingNameIndex(
22  const Teuchos::ArrayView<std::string> namesArray, const std::string &name)
23 {
25  const iter_t iter_begin = namesArray.begin(), iter_end = namesArray.end();
26  const iter_t iter = std::find(iter_begin, iter_end, name);
27  if (iter != iter_end) {
28  return (iter - iter_begin);
29  }
30  return -1;
31 }
32 
33 } // namespace Stratimikos
34 
35 #endif // HAVE_STRATIMIKOS_EXPLICIT_INSTANTIATION
#define TEUCHOS_MACRO_TEMPLATE_INSTANT_SCALAR_TYPES(MACRONAME)
const_pointer const_iterator
TransListIter iter

Generated on Thu Nov 21 2024 09:22:16 for Stratimikos by doxygen 1.8.5