Panzer
Version of the Day
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
disc-fe
src
Panzer_PtrFromStlVector.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Panzer: A partial differential equation assembly
4
// engine for strongly coupled complex multiphysics systems
5
//
6
// Copyright 2011 NTESS and the Panzer contributors.
7
// SPDX-License-Identifier: BSD-3-Clause
8
// *****************************************************************************
9
// @HEADER
10
11
#ifndef PANZER_PTR_FROM_STL_VECTOR_HPP
12
#define PANZER_PTR_FROM_STL_VECTOR_HPP
13
14
#include <vector>
15
16
namespace
panzer {
17
31
template
<
typename
T>
32
inline
T*
ptrFromStlVector
(std::vector<T>& v)
33
{
34
#ifdef _GLIBCXX_DEBUG
35
if
(v.size() > 0)
36
return
&v[0];
37
38
return
NULL;
39
#else
40
return
&v[0];
41
#endif
42
}
43
44
}
45
46
#endif
panzer::ptrFromStlVector
T * ptrFromStlVector(std::vector< T > &v)
Definition:
Panzer_PtrFromStlVector.hpp:32
Generated on Thu Nov 21 2024 09:17:09 for Panzer by
1.8.5