Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77896896
switch_basis.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 17, 01:57
Size
1 KB
Mime Type
text/x-c++
Expires
Mon, Aug 19, 01:57 (2 d)
Engine
blob
Format
Raw Data
Handle
19943418
Attached To
rSPECMICP SpecMiCP / ReactMiCP
switch_basis.hpp
View Options
/*-------------------------------------------------------
- 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
Log In to Comment