Panzer
Version of the Day
Loading...
Searching...
No Matches
adapters-stk
src
Panzer_STK_TransformBCNameForIOSS.cpp
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
#include "
Panzer_STK_TransformBCNameForIOSS.hpp
"
12
#include "
Panzer_String_Utilities.hpp
"
13
#include <algorithm>
14
#include <cctype>
15
16
std::string
panzer_stk::transformBCNameForIOSS
(std::string& name)
17
{
18
// strip off leading and trailing whitespace just in case this comes
19
// in from input file.
20
panzer::trim
(name);
21
22
// replace internal whitespace with underscores and upper case with lower case.
23
std::transform(name.begin(), name.end(), name.begin(),
24
[](
const
char
c)
25
{
26
if (c ==
' '
)
27
return
'_'
;
28
else
29
return char(std::tolower(c));
30
});
31
return
name;
32
}
Panzer_STK_TransformBCNameForIOSS.hpp
Panzer_String_Utilities.hpp
panzer_stk::transformBCNameForIOSS
std::string transformBCNameForIOSS(std::string &bc_name)
Definition
Panzer_STK_TransformBCNameForIOSS.cpp:16
panzer::trim
void trim(std::string &str)
Removes whitespace at beginning and end of string.
Definition
Panzer_String_Utilities.cpp:16
Generated by
1.9.8