Add log info message for tracer loading
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <opm/common/utility/OpmInputError.hpp>
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/T.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/TracerConfig.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
@@ -49,6 +50,7 @@ TracerConfig::TracerConfig(const UnitSystem& unit_system, const Deck& deck)
|
||||
using TR = ParserKeywords::TRACER;
|
||||
if (deck.hasKeyword<TR>()) {
|
||||
const auto& keyword = deck.getKeyword<TR>();
|
||||
OpmLog::info(OpmInputError::format("Initializing tracers from {keyword} in {file} line {line}", keyword.location()));
|
||||
for (const auto& record : keyword) {
|
||||
const auto& name = record.getItem<TR::NAME>().get<std::string>(0);
|
||||
Phase phase = phase_from_string(record.getItem<TR::FLUID>().get<std::string>(0));
|
||||
@@ -61,7 +63,9 @@ TracerConfig::TracerConfig(const UnitSystem& unit_system, const Deck& deck)
|
||||
|
||||
std::string tracer_field = "TBLKF" + name;
|
||||
if (deck.hasKeyword(tracer_field)) {
|
||||
auto concentration = deck.getKeyword(tracer_field).getRecord(0).getItem(0).getData<double>();
|
||||
const auto& tracer_keyword = deck.getKeyword(tracer_field);
|
||||
auto concentration = tracer_keyword.getRecord(0).getItem(0).getData<double>();
|
||||
OpmLog::info(OpmInputError::format("Loading tracer concentration from {keyword} in {file} line {line}", tracer_keyword.location()));
|
||||
for (auto& c : concentration)
|
||||
c *= inv_volume;
|
||||
|
||||
@@ -71,7 +75,9 @@ TracerConfig::TracerConfig(const UnitSystem& unit_system, const Deck& deck)
|
||||
|
||||
std::string tracer_table = "TVDPF" + name;
|
||||
if (deck.hasKeyword(tracer_table)) {
|
||||
const auto& deck_item = deck.getKeyword(tracer_table).getRecord(0).getItem(0);
|
||||
const auto& tracer_keyword = deck.getKeyword(tracer_table);
|
||||
const auto& deck_item = tracer_keyword.getRecord(0).getItem(0);
|
||||
OpmLog::info(OpmInputError::format("Loading tracer table from {keyword} in {file} line {line}", tracer_keyword.location()));
|
||||
this->tracers.emplace_back(name, phase, TracerVdTable(deck_item, inv_volume));
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user