Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85611840
database_cemdata.cpp
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
Mon, Sep 30, 07:51
Size
1 KB
Mime Type
text/x-c
Expires
Wed, Oct 2, 07:51 (2 d)
Engine
blob
Format
Raw Data
Handle
21183100
Attached To
rSPECMICP SpecMiCP / ReactMiCP
database_cemdata.cpp
View Options
#include "catch.hpp"
#include "specmicp_database/database.hpp"
#include "specmicp_common/timer.hpp"
#include <iostream>
using namespace specmicp;
using namespace specmicp::database;
TEST_CASE("Cemdata database", "[Cemdata],[Reader],[Selector]")
{
Timer reader_timer;
Database the_database(TEST_CEMDATA_PATH);
reader_timer.stop();
std::cout << "Reading cemdata database : " << reader_timer.elapsed_time()*1000 << "ms (Ref 2ms)" << std::endl;
RawDatabasePtr raw_data = the_database.get_database();
SECTION("Reading")
{
REQUIRE(the_database.is_valid());
}
SECTION("Oxydo-reduction")
{
Timer oxy_timer;
the_database.remove_half_cell_reactions({"SO4[2-]"});
oxy_timer.stop();
std::cout << "Removing half cell reactions for SO4[2-] : " << oxy_timer.elapsed_time()*1000<< "ms (Ref 0.06ms)" << std::endl;
REQUIRE(the_database.is_valid());
REQUIRE(the_database.aqueous_label_to_id("HS[-]") == no_species);
REQUIRE(the_database.gas_label_to_id("H2S(g)") == no_species);
}
}
TEST_CASE("Other db", "[reader]")
{
SECTION("Momas")
{
Database the_database(TEST_MOMAS_PATH);
}
}
Event Timeline
Log In to Comment