Page MenuHomec4science

transport_constraints.hpp
No OneTemporary

File Metadata

Created
Sun, Jul 28, 12:16

transport_constraints.hpp

/*-------------------------------------------------------------------------------
Copyright (c) 2015 F. Georget <fabieng@princeton.edu>, Princeton University
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------*/
#ifndef SPECMICP_REACTMICP_TRANSPORTCONSTRAINTS_HPP
#define SPECMICP_REACTMICP_TRANSPORTCONSTRAINTS_HPP
//! \file unsaturated/transport_constraints.hpp
//! \brief Constraints for the transport equations
#include "../../../types.hpp"
#include <vector>
#include <initializer_list>
namespace specmicp {
namespace reactmicp {
namespace systems {
namespace unsaturated {
//! \brief Constraints for the transport equations
class SPECMICP_DLL_PUBLIC TransportConstraints
{
public:
TransportConstraints() {}
//! \brief Set the fixed nodes
void set_fixed_nodes(const std::vector<index_t>& fixed_nodes) {
m_fixed_nodes = fixed_nodes;
}
//! \brief Set the gas nodes
void set_gas_nodes(const std::vector<index_t>& gas_nodes) {
m_gas_nodes = gas_nodes;
}
//! \brief Add a fixed node
void add_fixed_node(index_t node) {
m_fixed_nodes.push_back(node);
}
//! \brief Add a gas node
//!
//! A gas node is a node with S_l = 0
void add_gas_node(index_t node) {
m_gas_nodes.push_back(node);
}
//! \brief Return the list of fixed nodes
const std::vector<index_t>& fixed_nodes() const {
return m_fixed_nodes;
}
//! \brief Return the list of gas nodes
const std::vector<index_t>& gas_nodes() const {
return m_gas_nodes;
}
private:
std::vector<index_t> m_fixed_nodes;
std::vector<index_t> m_gas_nodes;
};
} //end namespace unsaturated
} //end namespace systems
} //end namespace reactmicp
} //end namespace specmicp
#endif // SPECMICP_REACTMICP_TRANSPORTCONSTRAINTS_HPP

Event Timeline