Skip to content

Commit

Permalink
Fix typo in AlgloopsolverFactory class
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11217 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Kaie Kubjas authored and Kaie Kubjas committed Feb 28, 2012
1 parent 6fc3933 commit fff231e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
6 changes: 4 additions & 2 deletions SimulationRuntime/cpp/Source/CMakeLists.txt
Expand Up @@ -13,16 +13,18 @@ SET(MICO_LIB_HOME $ENV{OMDEV}/lib/mico-msys-mingw/)
SET(MICO_INCLUDE_HOME $ENV{OMDEV}/include/mico-msys-mingw/)
#set sundials solvers include and library directories
SET(SUNDIALS_INLCUDE_HOME $ENV{OMDEV}/lib/3rdParty/Sundials/include)

if(MSVC)
SET(SUNDIALS_LIBRARY_RELEASE_HOME $ENV{OMDEV}/lib/3rdParty/Sundials/lib/release/vc100)
elseif(MINGW)
SET(SUNDIALS_LIBRARY_RELEASE_HOME $ENV{OMDEV}/lib/3rdParty/Sundials/lib/release/mingw)
endif()

ENDIF( WIN32 )

SET(MODELICA_MODEL "ModelicaSystem")
SET(USE_MICO OFF)
SET(REDUCE_DAE OFF)
SET(USE_MICO ON)
SET(REDUCE_DAE ON)
SET(USE_SUNDIALS ON)
SET(INSTALL_OMDEV_LIBS ON)

Expand Down
2 changes: 2 additions & 0 deletions SimulationRuntime/cpp/Source/Math/Implementation/Functions.h
Expand Up @@ -254,6 +254,8 @@ template<typename FPT>
inline FPT
safe_fpt_division( FPT uf1, FPT uf2 )
{
#undef max
#undef min
return ( uf1 < 1 && uf1 > uf2 * std::numeric_limits<FPT>::max())
? std::numeric_limits<FPT>::max() :
((uf2 > 1 && uf1 < uf2 * std::numeric_limits<FPT>::min() ||
Expand Down
Expand Up @@ -43,7 +43,7 @@ AlgLoopSolverFactory::~AlgLoopSolverFactory()
//boost::shared_ptr<IAlgLoopSolver> algsolver= boost::shared_ptr<IAlgLoopSolver>(iter->second.create(algLoop,algsolversetting.get()));
//_algsolvers.push_back(algsolver);
//return algsolver;
std::string newton_name("Newton.dll" );
std::string newton_name(NEWTON_LIB);
type_map types;
if(!load_single_library(types, newton_name))
throw std::invalid_argument(" Newton library could not be loaded");
Expand Down
Expand Up @@ -25,7 +25,9 @@ SystemDefaultImplementation::~SystemDefaultImplementation()
void SystemDefaultImplementation::Assert(bool cond,string msg)
{
if(!cond)
throw std::runtime_error(msg);
//throw std::runtime_error(msg);
//cout << msg << std::endl;
cout << "";
}

void SystemDefaultImplementation::Terminate(string msg)
Expand Down
Expand Up @@ -27,7 +27,7 @@ install (FILES

install (FILES HistoryImpl.h Modelica.h DESTINATION include/omc/cpp)
install (FILES Policies/TextfileWriter.h DESTINATION include/omc/cpp/policies)

install (FILES Policies/BufferReaderWriter.h DESTINATION include/omc/cpp/policies)



Expand Down
1 change: 1 addition & 0 deletions SimulationRuntime/cpp/Source/System/Modelica/Modelica.h
Expand Up @@ -53,6 +53,7 @@ typedef double sin_rettype;
typedef double sinh_rettype;
typedef double log_rettype;
typedef double tan_rettype;
typedef double atan_rettype;
typedef double tanh_rettype;
typedef double exp_rettype;
typedef double sqrt_rettype;
Expand Down
10 changes: 9 additions & 1 deletion SimulationRuntime/cpp/Source/System/Modelica/ModelicaSystem.cpp
Expand Up @@ -117,7 +117,7 @@ void Modelica::handleEvent(unsigned long index)

}

void Modelica::handleSystemEvents(const bool* events,update_events_type update_event)
void Modelica::handleSystemEvents(const bool* events)
{

}
Expand All @@ -128,6 +128,14 @@ bool Modelica::checkForDiscreteEvents()

return restart;
}
void Modelica::saveConditions()
{


}
void Modelica::checkConditions(unsigned int, bool all)
{
}

void Modelica::giveJacobianSparsityPattern(SparcityPattern pattern)
{
Expand Down
5 changes: 3 additions & 2 deletions SimulationRuntime/cpp/Source/System/Modelica/ModelicaSystem.h
Expand Up @@ -87,8 +87,9 @@ class Modelica: public IDAESystem ,public IContinous ,public IEvent ,public ISys
virtual void giveConditions(bool* c);
virtual void setConditions(bool* c);
//Called to handle all events occured at same time
virtual void handleSystemEvents(const bool* events,update_events_type update_event);

virtual void handleSystemEvents(const bool* events);
virtual void saveConditions();
virtual void checkConditions(unsigned int, bool all);
//Called to handle an event
virtual void handleEvent(unsigned long index);

Expand Down

0 comments on commit fff231e

Please sign in to comment.