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@21138 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Jun 17, 2014
1 parent 1ab5088 commit 7402511
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 40 deletions.
10 changes: 5 additions & 5 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -3072,8 +3072,8 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
case SES_NONLINEAR(__) then
<<
void <%modelname%>Algloop<%index%>::initialize()
{
{
if(_useSparseFormat)
<%modelname%>Algloop<%index%>::initialize(__Asparse);
else
Expand Down Expand Up @@ -3882,7 +3882,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
double* __zDot;
// A matrix
boost::multi_array<double,2> *__A; //dense
typedef double** sparseType;
sparseType *__Asparse; //sparse
Expand All @@ -3893,7 +3893,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
EventHandling& _event_handling;
<%systemname%>* _system;
bool _useSparseFormat;
};
>>
Expand Down Expand Up @@ -4211,7 +4211,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
virtual int getDimRHS() const ;
/// (Re-) initialize the system of equations
virtual void initialize();
template <typename T>
void initialize(T *__A);
Expand Down
44 changes: 22 additions & 22 deletions SimulationRuntime/cpp/Core/System/AlgLoopSolverFactory.cpp
Expand Up @@ -29,33 +29,33 @@ boost::shared_ptr<IAlgLoopSolver> AlgLoopSolverFactory::createAlgLoopSolver(IAlg

if(algLoop->getDimReal() > 0)
{
if(algLoop->isLinear())
{
try
{
string linsolver_name = _global_settings->getSelectedLinSolver();
boost::shared_ptr<ILinSolverSettings> algsolversetting= createLinSolverSettings(linsolver_name);
_linalgsolversettings.push_back(algsolversetting);
if(algLoop->isLinear())
{
try
{
string linsolver_name = _global_settings->getSelectedLinSolver();
boost::shared_ptr<ILinSolverSettings> algsolversetting= createLinSolverSettings(linsolver_name);
_linalgsolversettings.push_back(algsolversetting);


boost::shared_ptr<IAlgLoopSolver> algsolver= createLinSolver(algLoop,linsolver_name,algsolversetting);
_algsolvers.push_back(algsolver);
return algsolver;
}
catch(std::invalid_argument &arg)
{
//the linear solver was not found -> take the nonlinear solver
}
}
boost::shared_ptr<IAlgLoopSolver> algsolver= createLinSolver(algLoop,linsolver_name,algsolversetting);
_algsolvers.push_back(algsolver);
return algsolver;
}
catch(std::invalid_argument &arg)
{
//the linear solver was not found -> take the nonlinear solver
}
}

string nonlinsolver_name = _global_settings->getSelectedNonLinSolver();
boost::shared_ptr<INonLinSolverSettings> algsolversetting= createNonLinSolverSettings(nonlinsolver_name);
_algsolversettings.push_back(algsolversetting);
string nonlinsolver_name = _global_settings->getSelectedNonLinSolver();
boost::shared_ptr<INonLinSolverSettings> algsolversetting= createNonLinSolverSettings(nonlinsolver_name);
_algsolversettings.push_back(algsolversetting);


boost::shared_ptr<IAlgLoopSolver> algsolver= createNonLinSolver(algLoop,nonlinsolver_name,algsolversetting);
_algsolvers.push_back(algsolver);
return algsolver;
boost::shared_ptr<IAlgLoopSolver> algsolver= createNonLinSolver(algLoop,nonlinsolver_name,algsolversetting);
_algsolvers.push_back(algsolver);
return algsolver;
}
else
{
Expand Down
Expand Up @@ -35,7 +35,7 @@
#include <Policies/SolverSettingsOMCFactory.h>
#include <Policies/SystemOMCFactory.h>
#include <Policies/NonLinSolverOMCFactory.h>
#include <Policies/LinSolverOMCFactory.h>
#include <Policies/LinSolverOMCFactory.h>
/*Policy defines*/
typedef SystemOMCFactory<OMCFactory> SimControllerPolicy;
typedef SolverOMCFactory<OMCFactory> ConfigurationPolicy;
Expand Down
12 changes: 6 additions & 6 deletions SimulationRuntime/cpp/Solver/UmfPack/UmfPack.cpp
Expand Up @@ -10,22 +10,22 @@ UmfPack::~UmfPack() {

void UmfPack::initialize()
{
_algLoop->setUseSparseFormat(_umfpackSettings->getUseSparseFormat());
_algLoop->initialize();
std::cerr << "Umfpack-initialize not implemented" << std::endl;
_algLoop->setUseSparseFormat(_umfpackSettings->getUseSparseFormat());
_algLoop->initialize();
std::cerr << "Umfpack-initialize not implemented" << std::endl;
}

void UmfPack::solve()
{
std::cerr << "Umfpack-solve not implemented" << std::endl;
std::cerr << "Umfpack-solve not implemented" << std::endl;
}

IAlgLoopSolver::ITERATIONSTATUS UmfPack::getIterationStatus()
{
return _iterationStatus;
return _iterationStatus;
}

void UmfPack::stepCompleted(double time)
{
std::cerr << "Umfpack-step completed not implemented" << std::endl;
std::cerr << "Umfpack-step completed not implemented" << std::endl;
}
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/UmfPack/UmfPack.h
Expand Up @@ -10,8 +10,8 @@
class UmfPack : public IAlgLoopSolver
{
public:
UmfPack(IAlgLoop* algLoop,ILinSolverSettings* settings);
virtual ~UmfPack();
UmfPack(IAlgLoop* algLoop,ILinSolverSettings* settings);
virtual ~UmfPack();

virtual void initialize();

Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/UmfPack/UmfPackSettings.cpp
Expand Up @@ -8,11 +8,11 @@ UmfPackSettings::~UmfPackSettings() {
}

bool UmfPackSettings::getUseSparseFormat() {
return useSparse;
return useSparse;
}

void UmfPackSettings::setUseSparseFormat(bool value) {
useSparse = value;
useSparse = value;
}

void UmfPackSettings::load(std::string allocator)
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Solver/UmfPack/UmfPackSettings.h
Expand Up @@ -5,8 +5,8 @@
class UmfPackSettings : public ILinSolverSettings
{
public:
UmfPackSettings();
virtual ~UmfPackSettings();
UmfPackSettings();
virtual ~UmfPackSettings();

virtual bool getUseSparseFormat();
virtual void setUseSparseFormat(bool value);
Expand Down

0 comments on commit 7402511

Please sign in to comment.