Skip to content

Commit

Permalink
fix for nonlin solver selection in cpp template
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15036 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
niklwors committed Feb 1, 2013
1 parent 9c513f2 commit cf8a00f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Compiler/Template/CodegenCpp.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
# /I - Include Directories
# /DNOMINMAX - Define NOMINMAX (does what it says)
# /TP - Use C++ Compiler
CFLAGS= /Od /EHa /MP /fp:except /I"<%makefileParams.omhome%>/include/omc/cpp/Core/" /I"<%makefileParams.omhome%>/include/omc/cpp/" -I"$(BOOST_INCLUDE)" /I. /DNOMINMAX /TP /DNO_INTERACTIVE_DEPENDENCY
CFLAGS= /Od /EHa /MP /fp:except /I"<%makefileParams.omhome%>/include/omc/cpp/Core/" /I"<%makefileParams.omhome%>/include/omc/cpp/" -I"$(BOOST_INCLUDE)" /I. /DNOMINMAX /TP /DNO_INTERACTIVE_DEPENDENCY

# /ZI enable Edit and Continue debug info
CDFLAGS = /ZI
Expand Down Expand Up @@ -214,6 +214,7 @@ FUNCTIONFILE=Functions.cpp
>>
end simulationMakefile;


template simulationCppFile(SimCode simCode)
"Generates code for main cpp file for simulation target."
::=
Expand Down Expand Up @@ -260,8 +261,8 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
std::string algsolver_name(SYSTEM_LIB);
if(!load_single_library(types, algsolver_name))
throw std::invalid_argument("Algsolver library could not be loaded");
std::map<std::string, factory<IAlgLoopSolverFactory> >::iterator iter;
std::map<std::string, factory<IAlgLoopSolverFactory> >& factories(types.get());
std::map<std::string, factory<IAlgLoopSolverFactory,IGlobalSettings&> >::iterator iter;
std::map<std::string, factory<IAlgLoopSolverFactory,IGlobalSettings&> >& factories(types.get());
iter = factories.find("AlgLoopSolverFactory");
if (iter ==factories.end())
{
Expand Down Expand Up @@ -3865,9 +3866,10 @@ template generateAlgloopsolvers(list<SimEqSystem> allEquations,SimCode simCode)
;separator="\n")

<<
_algLoopSolverFactory = boost::shared_ptr<IAlgLoopSolverFactory>(iter->second.create());
_algLoopSolverFactory = boost::shared_ptr<IAlgLoopSolverFactory>(iter->second.create(globalSettings));
<%algloopsolver%>
>>
>>

end generateAlgloopsolvers;


Expand Down

0 comments on commit cf8a00f

Please sign in to comment.