Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20874 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed May 28, 2014
1 parent 6dbc72c commit d6a16a2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 34 deletions.
22 changes: 11 additions & 11 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -223,7 +223,7 @@ case SIMCODE(modelInfo=MODELINFO(__)) then
<<
#pragma once
#include "OMCpp<%fileNamePrefix%>.h"

<%if Flags.isSet(Flags.WRITE_TO_BUFFER) then
<<
#include "ReduceDAE/Interfaces/IReduceDAE.h"
Expand All @@ -233,7 +233,7 @@ case SIMCODE(modelInfo=MODELINFO(__)) then
>>
else
<<

typedef HistoryImpl<TextFileWriter,<%numAlgvars(modelInfo)%>+<%numInOutvars(modelInfo)%>+<%numAliasvars(modelInfo)%>+<%numStatevars(modelInfo)%>,<%numDerivativevars(modelInfo)%>,0> HistoryImplType;

>>%>
Expand Down Expand Up @@ -1332,7 +1332,7 @@ OFILES=$(CPPFILES:.cpp=.o)
.PHONY: <%lastIdentOfPath(modelInfo.name)%> $(CPPFILES)

<%fileNamePrefix%>: $(MAINFILE) $(OFILES)
<%\t%>$(CXX) -shared -I. -o $(SYSTEMOBJ) $(OFILES) $(CPPFLAGS) $(LDSYTEMFLAGS) <%dirExtra%> <%libsPos1%> <%libsPos2%>
<%\t%>$(CXX) -shared -I. -o $(SYSTEMOBJ) $(OFILES) $(CPPFLAGS) $(LDSYTEMFLAGS) <%dirExtra%> <%libsPos1%> <%libsPos2%>
<%\t%>$(CXX) $(CPPFLAGS) -I. -o $(MAINOBJ) $(MAINFILE) $(LDMAINFLAGS)
<% if boolNot(stringEq(makefileParams.platform, "win32")) then
<<
Expand Down Expand Up @@ -5478,8 +5478,8 @@ end initValst;
/*
template initValst(Text &varDecls , list<SimVar> varsLst, SimCode simCode, Context context) ::=
varsLst |> sv as SIMVAR(__) =>
let &preExp = buffer ""
let &varDeclsCref = buffer ""
let &preExp = buffer ""
let &varDeclsCref = buffer ""
match initialValue
case SOME(v) then
match daeExp(v, contextOther, &preExp, &varDecls,simCode)
Expand Down Expand Up @@ -5508,8 +5508,8 @@ end initValst;
/*
template initAliasValst(Text &varDecls ,list<SimVar> varsLst, SimCode simCode, Context context) ::=
varsLst |> sv as SIMVAR(__) =>
let &preExp = buffer ""
let &varDeclsCref = buffer ""
let &preExp = buffer ""
let &varDeclsCref = buffer ""
match initialValue
case SOME(v) then
match daeExp(v, contextOther, &preExp, &varDecls,simCode)
Expand Down Expand Up @@ -5547,12 +5547,12 @@ template initAliasValst(Text &varDecls ,Text type,list<SimVar> varsLst, SimCode
case vStr as "(0)" then
'<%preExp%>
set<%type%>StartValue(<%getAliasVarName(sv.aliasvar, simCode,context)%>,<%vStr%>,"<%cref(sv.name)%>");'
case vStr as "" then
'<%preExp%>
set<%type%>StartValue(<%getAliasVarName(sv.aliasvar, simCode,context)%>,<%vStr%>,"<%cref(sv.name)%>");'
case vStr then
'<%preExp%>
set<%type%>StartValue(<%getAliasVarName(sv.aliasvar, simCode,context)%>,<%vStr%>,"<%cref(sv.name)%>");'
Expand Down Expand Up @@ -7892,7 +7892,7 @@ template crefStartValueType2(DAE.Type ty)
case T_BOOL(__) then 'Bool'
else "error start value type"
end match


end crefStartValueType2;

Expand Down
Expand Up @@ -7,12 +7,12 @@
#include <System/AlgLoopSolverFactory.h>


template <class T>
template <class T>
void InitVars<T>::setStartValue(T variable,string key)
{
_start_values[key] = variable;
};
template <class T>
template <class T>
T InitVars<T>::getGetStartValue(string key)
{
return _start_values[key];
Expand Down Expand Up @@ -458,15 +458,15 @@ double SystemDefaultImplementation::delay(unsigned int expr_id,double expr_value
{
var=val;
_bool_start_values.setStartValue(val,key);

}
void SystemDefaultImplementation::setIntStartValue(int& var,int val, string key)
{
var=val;
var=val;
_int_start_values.setStartValue(val,key);

}


/*
template int SystemDefaultImplementation::getStartValue(int variable,string key);
Expand Down
8 changes: 4 additions & 4 deletions SimulationRuntime/cpp/Core/System/tpl.cpp
Expand Up @@ -8,13 +8,13 @@
//template class boost::shared_ptr<ISimData>;
template class boost::multi_array<double,2>;
template class boost::multi_array<double,1>;
template class boost::multi_array<int,2>;
template class boost::multi_array<int,2>;
template class boost::multi_array<int,1>;
template class ublas::vector<double>;
template class ublas::vector<int>;
template class ublas::vector<int>;
template class uBlas::compressed_matrix<double, uBlas::column_major, 0, uBlas::unbounded_array<int>, uBlas::unbounded_array<double> > ;
template class std::vector<int>;
template class std::vector<double>;
template class std::vector<int>;
template class std::vector<double>;
template class unordered_map<string,unsigned int>;
template class map<unsigned int,string>;
template class vector<string>;
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Include/Core/Modelica.h
Expand Up @@ -134,4 +134,4 @@ typedef boost::function<void (unordered_map<string,unsigned int>&,unordered_map<
#include <Math/Utility.h>
#include "HistoryImpl.h"
#include "DataExchange/Policies/TextfileWriter.h"

8 changes: 4 additions & 4 deletions SimulationRuntime/cpp/Include/Core/ModelicaDefine.h
Expand Up @@ -34,13 +34,13 @@ typedef double coshRetType;
//extern template class boost::shared_ptr<ISimData>;
extern template class boost::multi_array<double,2>;
extern template class boost::multi_array<double,1>;
extern template class boost::multi_array<int,2>;
extern template class boost::multi_array<int,2>;
extern template class boost::multi_array<int,1>;
extern template class ublas::vector<double>;
extern template class ublas::vector<int>;
extern template class ublas::vector<int>;
extern template class uBlas::compressed_matrix<double, uBlas::column_major, 0, uBlas::unbounded_array<int>, uBlas::unbounded_array<double> > ;
extern template class std::vector<int>;
extern template class std::vector<double>;
extern template class std::vector<int>;
extern template class std::vector<double>;
extern template class unordered_map<string,unsigned int>;
extern template class map<unsigned int,string>;
extern template class vector<string>;
Expand Down
Expand Up @@ -34,7 +34,7 @@ Copyright (c) 2008, OSMC

//typedef boost::unordered_map<std::string, boost::any> SValuesMap;

template <class T>
template <class T>
class InitVars
{
public:
Expand Down Expand Up @@ -128,15 +128,15 @@ class BOOST_EXTENSION_SYSTEM_DECL SystemDefaultImplementation
void storeTime(double time);
double delay(unsigned int expr_id,double expr_value, double delayTime, double delayMax);
bool isConsistent();


double getRealStartValue(string key);
bool getBoolStartValue(string key);
int getIntStartValue(string key);
void setRealStartValue(double& var,double val,string key);
void setBoolStartValue(bool& var,bool val, string key);
void setIntStartValue(int& var,int val, string key);

double
_simTime; ///< current simulation time (given by the solver)

Expand Down Expand Up @@ -170,8 +170,8 @@ class BOOST_EXTENSION_SYSTEM_DECL SystemDefaultImplementation
InitVars<double> _real_start_values;
InitVars<int> _int_start_values;
InitVars<bool> _bool_start_values;


EventHandling _event_handling;

typedef boost::circular_buffer<double> buffer_type;
Expand All @@ -183,4 +183,3 @@ class BOOST_EXTENSION_SYSTEM_DECL SystemDefaultImplementation
};



Expand Up @@ -49,7 +49,7 @@
#include <SimulationSettings/IGlobalSettings.h>
#include <SimController/ISimController.h> */
#include <SimCoreFactory/OMCFactory/OMCFactory.h>

#else
#error "operating system not supported"
#endif

0 comments on commit d6a16a2

Please sign in to comment.