37 #include <lifev/bc_interface/core/bc/BCInterfaceData.hpp> 53 M_mapBase[
"function"] = BCIFunctionParser;
54 M_mapBase[
"functionFile"] = BCIFunctionParserFile;
55 M_mapBase[
"functionSolver"] = BCIFunctionParserSolver;
56 M_mapBase[
"functionFileSolver"] = BCIFunctionParserFileSolver;
57 M_mapBase[
"functionUD"] = BCIFunctionUserDefined;
58 M_mapBase[
"functionSD"] = BCIFunctionSolverDefined;
59 M_mapBase[
"dataInterpolator"] = BCI3DDataInterpolator;
80 M_baseString = data.M_baseString;
81 M_mapBase = data.M_mapBase;
93 BCInterfaceData::
readBC (
const std::string& fileName,
const std::string& dataSection,
const std::string& name )
95 GetPot dataFile ( fileName );
98 readBase ( dataFile, dataSection + name +
"/", M_base, M_baseString );
101 readParameters ( dataFile, ( dataSection + name +
"/parameters" ).c_str() );
107 output <<
"baseString = " << M_baseString << std::endl;
108 output <<
"base = " << M_base.second << std::endl;
110 output <<
"boundary ID = " << M_boundaryID << std::endl;
112 output <<
"Parameters = ";
113 for ( UInt i (0); i <
static_cast<UInt> ( M_parameters.size() ); ++i )
115 output << M_parameters[i] <<
" ";
125 M_baseString = baseString;
126 std::string search =
" ";
127 std::string replace =
"";
129 for( size_t pos = 0; ; pos += replace.length() ) {
130 pos = M_baseString.find( search, pos );
131 if( pos == std::string::npos )
break;
132 M_baseString.erase( pos, search.length() );
133 M_baseString.insert( pos, replace );
143 for ( std::map< std::string, baseList_Type >::iterator j = M_mapBase.begin(); j != M_mapBase.end(); ++j )
144 if ( isBase ( dataFile, ( path + j->first ).c_str(), baseString ) )
146 base.first = j->first;
147 base.second = M_mapBase[j->first];
156 baseString = dataFile ( base,
" " );
166 M_parameters.resize ( parametersSize );
167 for (
UInt j ( 0 ); j < parametersSize; ++j )
169 M_parameters[j] = dataFile ( parameters, 0, j );
void setBaseString(const std::string &baseString)
Set the base string of the boundary condition.
BCInterfaceData - The BCInterface data container.
virtual void readBC(const std::string &fileName, const std::string &dataSection, const std::string &name)
Read parameters for all kind of BC.
bool isBase(const GetPot &dataFile, const char *base, std::string &baseString)
void updateInverseJacobian(const UInt &iQuadPt)
void readParameters(const GetPot &dataFile, const char *parameters)
void readBase(const GetPot &dataFile, const std::string &path, std::pair< std::string, baseList_Type > &base, std::string &baseString)
bool checkVariable(const char *VarName) const
BCInterfaceData(const BCInterfaceData &data)
Copy constructor.
BCInterfaceData & operator=(const BCInterfaceData &data)
Operator =.
virtual void showMe(std::ostream &output=std::cout) const
Display general information about the content of the class.
parametersContainer_Type M_parameters
uint32_type UInt
generic unsigned integer (used mainly for addressing)
BCInterfaceData()
Constructor.
unsigned vector_variable_size(const char *VarName) const