https://gitlab.opengeosys.org/ogs/ogs.git
Revision 51776d6c14a467757f2c52e4dd1c750d40472391 authored by Dmitry Yu. Naumov on 09 July 2021, 07:29:27 UTC, committed by Dmitry Yu. Naumov on 09 July 2021, 07:29:27 UTC
[CL] Use MPL to input amounts of ion exchanging species

This MR enables using the MPL to input the amounts (or molalities) of ion exchanging species as opposed to defining these quantities inside the `<chemical_system>` tag, which is what is currently possible.

This MR partially resolves issue #3164 (after this, more MRs will be added to fully resolve the issue).

1. [x] Feature description was added to the [changelog](https://gitlab.opengeosys.org/ogs/ogs/-/wikis/Release-notes-6.4.1)
2. [x] Tests covering your feature were added?
3. [ ] Any new feature or behavior change was documented?

See merge request ogs/ogs!3695
2 parent s 08e6faf + 31dc566
Raw File
Tip revision: 51776d6c14a467757f2c52e4dd1c750d40472391 authored by Dmitry Yu. Naumov on 09 July 2021, 07:29:27 UTC
Merge branch 'MoveExchangeToMPL' into 'master'
Tip revision: 51776d6
Station.h
/**
 * \file
 * \author Karsten Rink
 * \date   2010-07-01
 * \brief  Definition of the Station class.
 *
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#pragma once

#include <memory>
#include <string>

#include "Point.h"
#include "SensorData.h"

namespace GeoLib
{
/**
 * \ingroup GeoLib
 *
 * \brief A Station (observation site) is basically a Point with some additional information.
 *
 * Additional information is largely optional (except for a name, but even this may be empty).
 * It may include a name, a stratigraphy (only for the derived class StationBore),
 * time series data from data loggers (as a SensorData-object), etc.
 *
 * \sa StationBorehole, SensorData
 */
class Station : public Point
{
public:
    /**
     * \brief Constructor
     *
     * Constructor initialising a Station object
     * \param x The x-coordinate of the station.
     * \param y The y-coordinate of the station.
     * \param z The z-coordinate of the station.
     * \param name The name of the station.
     */
    explicit Station(double x = 0.0, double y = 0.0, double z = 0.0,
                     std::string name = "");

    explicit Station(Point* coords, std::string name = "");

    /**
     * Constructor copies the source object
     * @param src the Station object that should be copied
     */
    Station(Station const& src);

    /// Returns the name of the station.
    std::string const& getName() const { return _name; }

    void setName(std::string const& name) { _name = name; }

    /// Creates a Station-object from information contained in a string (assuming the string has the right format)
    static Station* createStation(const std::string &line);

    /// Creates a new station object based on the given parameters.
    static Station* createStation(const std::string &name, double x, double y, double z);

    /// Returns the specific value for this station
    double getStationValue() const { return this->_station_value; }

    /// Allows to set a specific value for this station (e.g. for classification)
    void setStationValue(double station_value) { this->_station_value = station_value; }

    /// Allows to add sensor data from a CSV file to the observation site
    void addSensorDataFromCSV(const std::string& file_name)
    {
        _sensor_data.reset(new SensorData(file_name));
    }

    /// Returns all the sensor data for this observation site
    const SensorData* getSensorData() const { return _sensor_data.get(); }

private:
    std::string _name;
    double _station_value{0.0};
    std::unique_ptr<SensorData> _sensor_data{nullptr};
};

bool isStation(GeoLib::Point const* pnt);
}  // namespace GeoLib
back to top