Page MenuHomec4science

switch_basis.hpp
No OneTemporary

File Metadata

Created
Mon, Jul 22, 21:30

switch_basis.hpp

/*-------------------------------------------------------
- Module : database
- File : switch_basis.hpp
- Author : Fabien Georget
Copyright (c) 2014, Fabien Georget, Princeton University
---------------------------------------------------------*/
#ifndef SPECMICP_DATABASE_SWITCHBASIS_HPP
#define SPECMICP_DATABASE_SWITCHBASIS_HPP
//! \file switch_basis.hpp Switch basis
#include <memory>
#include "data_container.hpp"
namespace specmicp {
namespace database {
class BasisSwitcher
{
public:
BasisSwitcher(std::shared_ptr<DataContainer> thedata):
data(thedata)
{}
//! \brief Change the basis
//!
//! @param new_basis list of id of the new basis
//!
//! The new basis is a list of id, id = id_component for no swapping
//! or id = id_aqueous + nb_component for swapping a secondary species
void change_basis(std::vector<int>& new_basis);
private:
//! \brief Swap aqueous parameters during a basis transformation
void swap_aq_param(std::vector<int> new_basis);
//! \brief Swap labels - called during a basis transformation
void swap_labels(std::vector<int> new_basis);
std::shared_ptr<DataContainer> data;
};
} // end namespace database
} // end namespace specmicp
#endif // SPECMICP_DATABASE_SWITCHBASIS_HPP

Event Timeline