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
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::trim
void trim(std::string &str)
Removes whitespace at beginning and end of string.
Definition:
Panzer_String_Utilities.cpp:16
panzer_stk::transformBCNameForIOSS
std::string transformBCNameForIOSS(std::string &bc_name)
Definition:
Panzer_STK_TransformBCNameForIOSS.cpp:16
Panzer_String_Utilities.hpp
Panzer_STK_TransformBCNameForIOSS.hpp
Generated on Thu Nov 21 2024 09:17:10 for Panzer by
1.8.5