mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
cleaned up storagebin headers.
cleaned up ssassemblage.h headers. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3867 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
0a91aa5bec
commit
e65ab2ea73
@ -8,12 +8,12 @@
|
||||
#include <list> // std::list
|
||||
#include <vector> // std::vector
|
||||
|
||||
#include "SSassemblageSS.h"
|
||||
//#include "NameDouble.h"
|
||||
//class cxxSSassemblageSS;
|
||||
//#include "SSassemblageSS.h"
|
||||
#include "NameDouble.h"
|
||||
class cxxSSassemblageSS;
|
||||
|
||||
#include "cxxMix.h"
|
||||
//class cxxMix;
|
||||
//#include "cxxMix.h"
|
||||
class cxxMix;
|
||||
|
||||
class cxxSSassemblage:public cxxNumKeyword
|
||||
{
|
||||
|
||||
269
StorageBin.cxx
269
StorageBin.cxx
@ -12,8 +12,21 @@
|
||||
#include <fstream>
|
||||
#include <iostream> // std::cout std::cerr
|
||||
#include "Utils.h" // define first
|
||||
#include "NameDouble.h"
|
||||
#include "StorageBin.h"
|
||||
#include "System.h"
|
||||
#include "SSassemblage.h"
|
||||
#include "Solution.h"
|
||||
#include "Exchange.h"
|
||||
#include "GasPhase.h"
|
||||
#include "cxxKinetics.h"
|
||||
#include "PPassemblage.h"
|
||||
#include "SSassemblageSS.h"
|
||||
#include "SSassemblage.h"
|
||||
#include "Surface.h"
|
||||
#include "cxxMix.h"
|
||||
#include "Reaction.h"
|
||||
#include "Temperature.h"
|
||||
|
||||
#define EXTERNAL extern
|
||||
#include "global.h"
|
||||
#include "phqalloc.h"
|
||||
@ -100,7 +113,261 @@ cxxStorageBin::cxxStorageBin(struct Use *use_ptr)
|
||||
cxxStorageBin::~cxxStorageBin()
|
||||
{
|
||||
}
|
||||
cxxSolution *
|
||||
cxxStorageBin::getSolution(int n_user)
|
||||
{
|
||||
if (this->Solutions.find(n_user) != this->Solutions.end())
|
||||
{
|
||||
return (&(this->Solutions.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setSolution(int n_user, cxxSolution * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Solutions[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeSolution(int n_user)
|
||||
{
|
||||
Solutions.erase(n_user);
|
||||
}
|
||||
|
||||
cxxExchange *
|
||||
cxxStorageBin::getExchange(int n_user)
|
||||
{
|
||||
if (this->Exchangers.find(n_user) != this->Exchangers.end())
|
||||
{
|
||||
return (&(this->Exchangers.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setExchange(int n_user, cxxExchange * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Exchangers[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeExchange(int n_user)
|
||||
{
|
||||
Exchangers.erase(n_user);
|
||||
}
|
||||
|
||||
cxxPPassemblage *
|
||||
cxxStorageBin::getPPassemblage(int n_user)
|
||||
{
|
||||
if (this->PPassemblages.find(n_user) != this->PPassemblages.end())
|
||||
{
|
||||
return (&(this->PPassemblages.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setPPassemblage(int n_user, cxxPPassemblage * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
PPassemblages[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removePPassemblage(int n_user)
|
||||
{
|
||||
PPassemblages.erase(n_user);
|
||||
}
|
||||
|
||||
cxxGasPhase *
|
||||
cxxStorageBin::getGasPhase(int n_user)
|
||||
{
|
||||
if (this->GasPhases.find(n_user) != this->GasPhases.end())
|
||||
{
|
||||
return (&(this->GasPhases.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setGasPhase(int n_user, cxxGasPhase * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
GasPhases[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeGasPhase(int n_user)
|
||||
{
|
||||
GasPhases.erase(n_user);
|
||||
}
|
||||
|
||||
cxxSSassemblage *
|
||||
cxxStorageBin::getSSassemblage(int n_user)
|
||||
{
|
||||
if (this->SSassemblages.find(n_user) != this->SSassemblages.end())
|
||||
{
|
||||
return (&(this->SSassemblages.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setSSassemblage(int n_user, cxxSSassemblage * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
SSassemblages[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeSSassemblage(int n_user)
|
||||
{
|
||||
SSassemblages.erase(n_user);
|
||||
}
|
||||
|
||||
cxxKinetics *
|
||||
cxxStorageBin::getKinetics(int n_user)
|
||||
{
|
||||
if (this->Kinetics.find(n_user) != this->Kinetics.end())
|
||||
{
|
||||
return (&(this->Kinetics.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setKinetics(int n_user, cxxKinetics * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Kinetics[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeKinetics(int n_user)
|
||||
{
|
||||
Kinetics.erase(n_user);
|
||||
}
|
||||
|
||||
cxxSurface *
|
||||
cxxStorageBin::getSurface(int n_user)
|
||||
{
|
||||
if (this->Surfaces.find(n_user) != this->Surfaces.end())
|
||||
{
|
||||
return (&(this->Surfaces.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setSurface(int n_user, cxxSurface * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Surfaces[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeSurface(int n_user)
|
||||
{
|
||||
Surfaces.erase(n_user);
|
||||
}
|
||||
|
||||
cxxMix *
|
||||
cxxStorageBin::getMix(int n_user)
|
||||
{
|
||||
if (this->Mixes.find(n_user) != this->Mixes.end())
|
||||
{
|
||||
return (&(this->Mixes.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setMix(int n_user, cxxMix * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Mixes[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeMix(int n_user)
|
||||
{
|
||||
Mixes.erase(n_user);
|
||||
}
|
||||
|
||||
cxxReaction *
|
||||
cxxStorageBin::getReaction(int n_user)
|
||||
{
|
||||
if (this->Reactions.find(n_user) != this->Reactions.end())
|
||||
{
|
||||
return (&(this->Reactions.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setReaction(int n_user, cxxReaction * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Reactions[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeReaction(int n_user)
|
||||
{
|
||||
Reactions.erase(n_user);
|
||||
}
|
||||
|
||||
cxxTemperature *
|
||||
cxxStorageBin::getTemperature(int n_user)
|
||||
{
|
||||
if (this->Temperatures.find(n_user) != this->Temperatures.end())
|
||||
{
|
||||
return (&(this->Temperatures.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void
|
||||
cxxStorageBin::setTemperature(int n_user, cxxTemperature * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Temperatures[n_user] = *entity;
|
||||
}
|
||||
void
|
||||
cxxStorageBin::removeTemperature(int n_user)
|
||||
{
|
||||
Temperatures.erase(n_user);
|
||||
}
|
||||
|
||||
const std::map < int, cxxSolution > &
|
||||
cxxStorageBin::getSolutions() const
|
||||
{
|
||||
return this->Solutions;
|
||||
};
|
||||
const std::map < int, cxxExchange > &
|
||||
cxxStorageBin::getExchangers() const
|
||||
{
|
||||
return this->Exchangers;
|
||||
};
|
||||
const std::map < int, cxxGasPhase > &
|
||||
cxxStorageBin::getGasPhases() const
|
||||
{
|
||||
return this->GasPhases;
|
||||
};
|
||||
const std::map < int, cxxKinetics > &
|
||||
cxxStorageBin::getKinetics() const
|
||||
{
|
||||
return this->Kinetics;
|
||||
};
|
||||
const std::map < int, cxxPPassemblage > &
|
||||
cxxStorageBin::getPPassemblages() const
|
||||
{
|
||||
return this->PPassemblages;
|
||||
};
|
||||
const std::map < int, cxxSSassemblage > &
|
||||
cxxStorageBin::getSSassemblages() const
|
||||
{
|
||||
return this->SSassemblages;
|
||||
};
|
||||
const std::map < int, cxxSurface > &
|
||||
cxxStorageBin::getSurfaces() const
|
||||
{
|
||||
return this->Surfaces;
|
||||
};
|
||||
void
|
||||
cxxStorageBin::import_phreeqc(void)
|
||||
//
|
||||
|
||||
278
StorageBin.h
278
StorageBin.h
@ -1,29 +1,26 @@
|
||||
#if !defined(STORAGEBIN_H_INCLUDED)
|
||||
#define STORAGEBIN_H_INCLUDED
|
||||
|
||||
#include "Utils.h"
|
||||
#include "Parser.h"
|
||||
#include "Solution.h"
|
||||
#include "Exchange.h"
|
||||
#include "GasPhase.h"
|
||||
#include "cxxKinetics.h"
|
||||
#include "PPassemblage.h"
|
||||
//#include "SSassemblage.h"
|
||||
class NameDouble;
|
||||
class cxxSSassemblageSS;
|
||||
#include "Surface.h"
|
||||
#include "System.h"
|
||||
//#include "cxxMix.h"
|
||||
class cxxMix;
|
||||
#include "Reaction.h"
|
||||
#include "Temperature.h"
|
||||
|
||||
#include <cassert> // assert
|
||||
#include <map> // std::map
|
||||
#include <string> // std::string
|
||||
#include <list> // std::list
|
||||
#include <vector> // std::vector
|
||||
|
||||
//#include "Utils.h"
|
||||
//#include "Parser.h"
|
||||
|
||||
class cxxSolution;
|
||||
class cxxExchange;
|
||||
class cxxGasPhase;
|
||||
class cxxKinetics;
|
||||
class cxxPPassemblage;
|
||||
class cxxSSassemblage;
|
||||
class cxxSurface;
|
||||
#include "System.h"
|
||||
class cxxReaction;
|
||||
class cxxTemperature;
|
||||
|
||||
|
||||
class cxxStorageBin
|
||||
{
|
||||
|
||||
@ -40,195 +37,45 @@ class cxxStorageBin
|
||||
|
||||
void remove(int n);
|
||||
|
||||
cxxSolution *getSolution(int n_user)
|
||||
{
|
||||
if (this->Solutions.find(n_user) != this->Solutions.end())
|
||||
{
|
||||
return (&(this->Solutions.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setSolution(int n_user, cxxSolution * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Solutions[n_user] = *entity;
|
||||
}
|
||||
void removeSolution(int n_user)
|
||||
{
|
||||
Solutions.erase(n_user);
|
||||
}
|
||||
cxxSolution *getSolution(int n_user);
|
||||
void setSolution(int n_user, cxxSolution * entity);
|
||||
void removeSolution(int n_user);
|
||||
|
||||
cxxExchange *getExchange(int n_user)
|
||||
{
|
||||
if (this->Exchangers.find(n_user) != this->Exchangers.end())
|
||||
{
|
||||
return (&(this->Exchangers.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setExchange(int n_user, cxxExchange * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Exchangers[n_user] = *entity;
|
||||
}
|
||||
void removeExchange(int n_user)
|
||||
{
|
||||
Exchangers.erase(n_user);
|
||||
}
|
||||
cxxExchange *getExchange(int n_user);
|
||||
void setExchange(int n_user, cxxExchange * entity);
|
||||
void removeExchange(int n_user);
|
||||
|
||||
cxxPPassemblage *getPPassemblage(int n_user)
|
||||
{
|
||||
if (this->PPassemblages.find(n_user) != this->PPassemblages.end())
|
||||
{
|
||||
return (&(this->PPassemblages.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setPPassemblage(int n_user, cxxPPassemblage * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
PPassemblages[n_user] = *entity;
|
||||
}
|
||||
void removePPassemblage(int n_user)
|
||||
{
|
||||
PPassemblages.erase(n_user);
|
||||
}
|
||||
cxxPPassemblage *getPPassemblage(int n_user);
|
||||
void setPPassemblage(int n_user, cxxPPassemblage * entity);
|
||||
void removePPassemblage(int n_user);
|
||||
|
||||
cxxGasPhase *getGasPhase(int n_user)
|
||||
{
|
||||
if (this->GasPhases.find(n_user) != this->GasPhases.end())
|
||||
{
|
||||
return (&(this->GasPhases.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setGasPhase(int n_user, cxxGasPhase * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
GasPhases[n_user] = *entity;
|
||||
}
|
||||
void removeGasPhase(int n_user)
|
||||
{
|
||||
GasPhases.erase(n_user);
|
||||
}
|
||||
cxxGasPhase *getGasPhase(int n_user);
|
||||
void setGasPhase(int n_user, cxxGasPhase * entity);
|
||||
void removeGasPhase(int n_user);
|
||||
|
||||
cxxSSassemblage *getSSassemblage(int n_user)
|
||||
{
|
||||
if (this->SSassemblages.find(n_user) != this->SSassemblages.end())
|
||||
{
|
||||
return (&(this->SSassemblages.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setSSassemblage(int n_user, cxxSSassemblage * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
SSassemblages[n_user] = *entity;
|
||||
}
|
||||
void removeSSassemblage(int n_user)
|
||||
{
|
||||
SSassemblages.erase(n_user);
|
||||
}
|
||||
cxxSSassemblage *getSSassemblage(int n_user);
|
||||
void setSSassemblage(int n_user, cxxSSassemblage * entity);
|
||||
void removeSSassemblage(int n_user);
|
||||
|
||||
cxxKinetics *getKinetics(int n_user)
|
||||
{
|
||||
if (this->Kinetics.find(n_user) != this->Kinetics.end())
|
||||
{
|
||||
return (&(this->Kinetics.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setKinetics(int n_user, cxxKinetics * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Kinetics[n_user] = *entity;
|
||||
}
|
||||
void removeKinetics(int n_user)
|
||||
{
|
||||
Kinetics.erase(n_user);
|
||||
}
|
||||
cxxKinetics *getKinetics(int n_user);
|
||||
void setKinetics(int n_user, cxxKinetics * entity);
|
||||
void removeKinetics(int n_user);
|
||||
|
||||
cxxSurface *getSurface(int n_user)
|
||||
{
|
||||
if (this->Surfaces.find(n_user) != this->Surfaces.end())
|
||||
{
|
||||
return (&(this->Surfaces.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setSurface(int n_user, cxxSurface * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Surfaces[n_user] = *entity;
|
||||
}
|
||||
void removeSurface(int n_user)
|
||||
{
|
||||
Surfaces.erase(n_user);
|
||||
}
|
||||
cxxSurface *getSurface(int n_user);
|
||||
void setSurface(int n_user, cxxSurface * entity);
|
||||
void removeSurface(int n_user);
|
||||
|
||||
cxxMix *getMix(int n_user)
|
||||
{
|
||||
if (this->Mixes.find(n_user) != this->Mixes.end())
|
||||
{
|
||||
return (&(this->Mixes.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setMix(int n_user, cxxMix * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Mixes[n_user] = *entity;
|
||||
}
|
||||
void removeMix(int n_user)
|
||||
{
|
||||
Mixes.erase(n_user);
|
||||
}
|
||||
cxxMix *getMix(int n_user);
|
||||
void setMix(int n_user, cxxMix * entity);
|
||||
void removeMix(int n_user);
|
||||
|
||||
cxxReaction *getReaction(int n_user)
|
||||
{
|
||||
if (this->Reactions.find(n_user) != this->Reactions.end())
|
||||
{
|
||||
return (&(this->Reactions.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setReaction(int n_user, cxxReaction * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Reactions[n_user] = *entity;
|
||||
}
|
||||
void removeReaction(int n_user)
|
||||
{
|
||||
Reactions.erase(n_user);
|
||||
}
|
||||
cxxReaction *getReaction(int n_user);
|
||||
void setReaction(int n_user, cxxReaction * entity);
|
||||
void removeReaction(int n_user);
|
||||
|
||||
cxxTemperature *getTemperature(int n_user)
|
||||
{
|
||||
if (this->Temperatures.find(n_user) != this->Temperatures.end())
|
||||
{
|
||||
return (&(this->Temperatures.find(n_user)->second));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
void setTemperature(int n_user, cxxTemperature * entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
return;
|
||||
Temperatures[n_user] = *entity;
|
||||
}
|
||||
void removeTemperature(int n_user)
|
||||
{
|
||||
Temperatures.erase(n_user);
|
||||
}
|
||||
cxxTemperature *getTemperature(int n_user);
|
||||
void setTemperature(int n_user, cxxTemperature * entity);
|
||||
void removeTemperature(int n_user);
|
||||
|
||||
void setSystem(struct Use *use_ptr);
|
||||
|
||||
@ -246,34 +93,13 @@ class cxxStorageBin
|
||||
//cxxSolution *mix_cxxSolutions(cxxMix &mixmap);
|
||||
cxxExchange *mix_cxxExchange(cxxMix & mixmap);
|
||||
|
||||
const std::map < int, cxxSolution > &getSolutions() const
|
||||
{
|
||||
return this->Solutions;
|
||||
};
|
||||
const std::map < int, cxxExchange > &getExchangers() const
|
||||
{
|
||||
return this->Exchangers;
|
||||
};
|
||||
const std::map < int, cxxGasPhase > &getGasPhases() const
|
||||
{
|
||||
return this->GasPhases;
|
||||
};
|
||||
const std::map < int, cxxKinetics > &getKinetics() const
|
||||
{
|
||||
return this->Kinetics;
|
||||
};
|
||||
const std::map < int, cxxPPassemblage > &getPPassemblages() const
|
||||
{
|
||||
return this->PPassemblages;
|
||||
};
|
||||
const std::map < int, cxxSSassemblage > &getSSassemblages() const
|
||||
{
|
||||
return this->SSassemblages;
|
||||
};
|
||||
const std::map < int, cxxSurface > &getSurfaces() const
|
||||
{
|
||||
return this->Surfaces;
|
||||
};
|
||||
const std::map < int, cxxSolution > &getSolutions() const;
|
||||
const std::map < int, cxxExchange > &getExchangers() const;
|
||||
const std::map < int, cxxGasPhase > &getGasPhases() const;
|
||||
const std::map < int, cxxKinetics > &getKinetics() const;
|
||||
const std::map < int, cxxPPassemblage > &getPPassemblages() const;
|
||||
const std::map < int, cxxSSassemblage > &getSSassemblages() const;
|
||||
const std::map < int, cxxSurface > &getSurfaces() const;
|
||||
|
||||
#ifdef USE_MPI
|
||||
void mpi_send(int n, int task_number);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user