MCPcopy Create free account
hub / github.com/KratosMultiphysics/Kratos / CleanFunctionName

Method CleanFunctionName

kratos/sources/code_location.cpp:59–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59std::string CodeLocation::CleanFunctionName() const
60{
61 std::string clean_function_name(mFunctionName);
62
63 // Applying filters. Note that The sequence is important
64 // NOTE: Please add new fliters at the end of the list!!
65 RemoveNamespace(clean_function_name, "Kratos");
66 RemoveNamespace(clean_function_name, "std");
67 ReduceTemplateArgumentsToFirstN(clean_function_name, "ublas::vector", 1);
68 ReduceTemplateArgumentsToFirstN(clean_function_name, "ublas::matrix", 1);
69 ReduceTemplateArgumentsToFirstN(clean_function_name, "iterators::indirect_iterator", 1);
70 ReduceTemplateArgumentsToFirstN(clean_function_name, "PointerVectorSet", 1);
71 ReduceTemplateArgumentsToFirstN(clean_function_name, "basic_string", 1);
72 ReplaceAll(clean_function_name, "__int64", "int");
73 ReplaceAll(clean_function_name, "basic_string<char,...>", "string");
74 ReduceTemplateArgumentsToFirstN(clean_function_name, "compressed_matrix", 0);
75 ReplaceAll(clean_function_name, "ublas::vector<double,...>", "Vector");
76 ReplaceAll(clean_function_name, "ublas::DenseMatrix<double,...>", "Matrix");
77 ReduceTemplateArgumentsToFirstN(clean_function_name, "ResidualBasedBlockBuilderAndSolver", 1);
78 ReduceTemplateArgumentsToFirstN(clean_function_name, "ResidualBasedLinearStrategy", 1);
79 ReplaceAll(clean_function_name, "Dof<double>", "Dof");
80 ReplaceAll(clean_function_name, "Node", "Node");
81
82 return clean_function_name;
83}
84
85void CodeLocation::RemoveNamespace(std::string& FunctionName, const std::string& Namespace)
86{

Callers 15

SolveFunction · 0.80
CreateFunction · 0.80
SetDofListFunction · 0.80
SetSlaveDofsVectorFunction · 0.80
SetMasterDofsVectorFunction · 0.80
SetLocalSystemFunction · 0.80
ApplyRHSConstraintsFunction · 0.80
CreateFunction · 0.80
BuildRHSAndSolveMethod · 0.80

Calls

no outgoing calls

Tested by 2