diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 51909e9..3012652 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,48 +1,52 @@ ###################### ## SPECMICP CPP API ## ###################### # Includes # ========= set(COMMON_INCLUDES macros.hpp types.hpp database.hpp specmicp.hpp + reactmicp_core.hpp + reactmicp_saturated.hpp + reactmicp_unsaturated.hpp reactmicp.hpp + ) add_custom_target(common SOURCES ${COMMON_INCLUDES} ) install(FILES ${COMMON_INCLUDES} DESTINATION ${INCLUDE_INSTALL_DIR}/ ) #===========# # Modules # #===========# # Mixed complementarity Solver # include only module add_subdirectory(micpsolver) # SpecMiCP add_subdirectory(specmicp) # Database add_subdirectory(database) # ODE integration, headers-only add_subdirectory(odeint) # dfpmsolver : Parabolic solver for finite element problem, header only add_subdirectory(dfpmsolver) # dfpm : dynaflow+- Finite element solver, mostly headers for now add_subdirectory(dfpm) # Reactive transport solver add_subdirectory(reactmicp) # Utils : stuff that may be used by the other modules add_subdirectory(utils) # Physics :Stuff that may be used by the other modules, but is related to physics add_subdirectory(physics) diff --git a/src/reactmicp.hpp b/src/reactmicp.hpp index 797e4a8..f67cc2a 100644 --- a/src/reactmicp.hpp +++ b/src/reactmicp.hpp @@ -1,77 +1,42 @@ -/*------------------------------------------------------------------------------- +/*------------------------------------------------------------------------------ -Copyright (c) 2014,2015 F. Georget , Princeton University +Copyright (c)2015 F. Georget , 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. ------------------------------------------------------------------------------*/ +------------------------------------------------------------------------------*/ //! \file reactmicp.hpp -//! \brief Include this file to use ReactMiCP -//! -//! This file includes the main headers from ReactMiCP. +//! \brief Include all reactmicp -#include "types.hpp" +// The saturated system -#include "database/database.hpp" -#include "specmicp.hpp" -#include "dfpm/mesh.hpp" +#include "reactmicp_saturated.hpp" -// systems +// The unsaturated system -#include "reactmicp/systems/saturated_react/variables.hpp" -#include "reactmicp/systems/saturated_react/equilibrium_stagger.hpp" -#include "reactmicp/systems/saturated_react/transport_stagger.hpp" -#include "reactmicp/systems/saturated_react/init_variables.hpp" -#include "reactmicp/systems/saturated_react/diffusive_upscaling_stagger.hpp" - -// solver - -#include "reactmicp/solver/reactive_transport_solver.hpp" -#include "reactmicp/solver/reactive_transport_solver_structs.hpp" -#include "reactmicp/solver/staggers_base/upscaling_stagger_base.hpp" -#include "reactmicp/solver/staggers_base/stagger_structs.hpp" -#include "reactmicp/solver/timestepper.hpp" -#include "reactmicp/solver/runner.hpp" - -// output - -#include "utils/io/csv_formatter.hpp" -#include "dfpm/io/meshes.hpp" -#include "reactmicp/io/reactive_transport.hpp" -#include "reactmicp/io/saturated_react.hpp" -#include "physics/io/units.hpp" - -// configuration - -#include "utils/io/yaml.hpp" - -#include "database/io/configuration.hpp" -#include "dfpm/io/configuration.hpp" -#include "reactmicp/io/configuration.hpp" - -#include "utils/timer.hpp" +#include "reactmicp_unsaturated.hpp" diff --git a/src/reactmicp.hpp b/src/reactmicp_core.hpp similarity index 82% copy from src/reactmicp.hpp copy to src/reactmicp_core.hpp index 797e4a8..f0c9a56 100644 --- a/src/reactmicp.hpp +++ b/src/reactmicp_core.hpp @@ -1,77 +1,73 @@ /*------------------------------------------------------------------------------- Copyright (c) 2014,2015 F. Georget , 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. -----------------------------------------------------------------------------*/ -//! \file reactmicp.hpp -//! \brief Include this file to use ReactMiCP +//! \file reactmicp_base.hpp +//! \brief Core files of the reactmicp solver - not standalone //! -//! This file includes the main headers from ReactMiCP. +//! This file includes the main headers from the ReactMiCP solver. + +#ifndef SPECMICP_REACTMICP_CORE_HPP +#define SPECMICP_REACTMICP_CORE_HPP #include "types.hpp" #include "database/database.hpp" #include "specmicp.hpp" #include "dfpm/mesh.hpp" -// systems - -#include "reactmicp/systems/saturated_react/variables.hpp" -#include "reactmicp/systems/saturated_react/equilibrium_stagger.hpp" -#include "reactmicp/systems/saturated_react/transport_stagger.hpp" -#include "reactmicp/systems/saturated_react/init_variables.hpp" -#include "reactmicp/systems/saturated_react/diffusive_upscaling_stagger.hpp" - // solver #include "reactmicp/solver/reactive_transport_solver.hpp" #include "reactmicp/solver/reactive_transport_solver_structs.hpp" #include "reactmicp/solver/staggers_base/upscaling_stagger_base.hpp" #include "reactmicp/solver/staggers_base/stagger_structs.hpp" #include "reactmicp/solver/timestepper.hpp" #include "reactmicp/solver/runner.hpp" // output #include "utils/io/csv_formatter.hpp" #include "dfpm/io/meshes.hpp" #include "reactmicp/io/reactive_transport.hpp" -#include "reactmicp/io/saturated_react.hpp" #include "physics/io/units.hpp" // configuration #include "utils/io/yaml.hpp" #include "database/io/configuration.hpp" #include "dfpm/io/configuration.hpp" #include "reactmicp/io/configuration.hpp" #include "utils/timer.hpp" + +#endif // SPECMICP_REACTMICP_CORE_HPP diff --git a/src/reactmicp.hpp b/src/reactmicp_saturated.hpp similarity index 65% copy from src/reactmicp.hpp copy to src/reactmicp_saturated.hpp index 797e4a8..8242ebc 100644 --- a/src/reactmicp.hpp +++ b/src/reactmicp_saturated.hpp @@ -1,77 +1,55 @@ -/*------------------------------------------------------------------------------- +/*------------------------------------------------------------------------------ -Copyright (c) 2014,2015 F. Georget , Princeton University +Copyright (c)2015 F. Georget , 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. ------------------------------------------------------------------------------*/ +------------------------------------------------------------------------------*/ -//! \file reactmicp.hpp -//! \brief Include this file to use ReactMiCP -//! -//! This file includes the main headers from ReactMiCP. +//! \file reactmicp_saturated.hpp +//! \brief Include this header to use the saturated system of ReactMiCP -#include "types.hpp" +#ifndef SPECMICP_REACTMICP_SATURATED_HPP +#define SPECMICP_REACTMICP_SATURATED_HPP -#include "database/database.hpp" -#include "specmicp.hpp" -#include "dfpm/mesh.hpp" +// Core files + +#include "reactmicp_core.hpp" // systems #include "reactmicp/systems/saturated_react/variables.hpp" #include "reactmicp/systems/saturated_react/equilibrium_stagger.hpp" #include "reactmicp/systems/saturated_react/transport_stagger.hpp" #include "reactmicp/systems/saturated_react/init_variables.hpp" #include "reactmicp/systems/saturated_react/diffusive_upscaling_stagger.hpp" -// solver - -#include "reactmicp/solver/reactive_transport_solver.hpp" -#include "reactmicp/solver/reactive_transport_solver_structs.hpp" -#include "reactmicp/solver/staggers_base/upscaling_stagger_base.hpp" -#include "reactmicp/solver/staggers_base/stagger_structs.hpp" -#include "reactmicp/solver/timestepper.hpp" -#include "reactmicp/solver/runner.hpp" - // output -#include "utils/io/csv_formatter.hpp" -#include "dfpm/io/meshes.hpp" -#include "reactmicp/io/reactive_transport.hpp" #include "reactmicp/io/saturated_react.hpp" -#include "physics/io/units.hpp" - -// configuration - -#include "utils/io/yaml.hpp" - -#include "database/io/configuration.hpp" -#include "dfpm/io/configuration.hpp" -#include "reactmicp/io/configuration.hpp" -#include "utils/timer.hpp" +#endif // SPECMICP_REACTMICP_SATURATED_HPP diff --git a/src/reactmicp.hpp b/src/reactmicp_unsaturated.hpp similarity index 52% copy from src/reactmicp.hpp copy to src/reactmicp_unsaturated.hpp index 797e4a8..6d6373d 100644 --- a/src/reactmicp.hpp +++ b/src/reactmicp_unsaturated.hpp @@ -1,77 +1,55 @@ -/*------------------------------------------------------------------------------- +/*------------------------------------------------------------------------------ -Copyright (c) 2014,2015 F. Georget , Princeton University +Copyright (c)2015 F. Georget , 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. ------------------------------------------------------------------------------*/ +------------------------------------------------------------------------------*/ -//! \file reactmicp.hpp -//! \brief Include this file to use ReactMiCP -//! -//! This file includes the main headers from ReactMiCP. +//! \file reactmicp_unsaturated.hpp +//! \brief The unsaturated system of the ReactMiCP solver -#include "types.hpp" +#ifndef SPECMICP_REACMICP_UNSATURATED_HPP +#define SPECMICP_REACMICP_UNSATURATED_HPP -#include "database/database.hpp" -#include "specmicp.hpp" -#include "dfpm/mesh.hpp" +// Core files -// systems +#include "reactmicp_core.hpp" -#include "reactmicp/systems/saturated_react/variables.hpp" -#include "reactmicp/systems/saturated_react/equilibrium_stagger.hpp" -#include "reactmicp/systems/saturated_react/transport_stagger.hpp" -#include "reactmicp/systems/saturated_react/init_variables.hpp" -#include "reactmicp/systems/saturated_react/diffusive_upscaling_stagger.hpp" +// System -// solver +#include "reactmicp/systems/unsaturated/variables_interface.hpp" -#include "reactmicp/solver/reactive_transport_solver.hpp" -#include "reactmicp/solver/reactive_transport_solver_structs.hpp" -#include "reactmicp/solver/staggers_base/upscaling_stagger_base.hpp" -#include "reactmicp/solver/staggers_base/stagger_structs.hpp" -#include "reactmicp/solver/timestepper.hpp" -#include "reactmicp/solver/runner.hpp" +#include "reactmicp/systems/unsaturated/equilibrium_constraints.hpp" +#include "reactmicp/systems/unsaturated/equilibrium_stagger.hpp" -// output +#include "reactmicp/systems/unsaturated/transport_constraints.hpp" +#include "reactmicp/systems/unsaturated/transport_stagger.hpp" -#include "utils/io/csv_formatter.hpp" -#include "dfpm/io/meshes.hpp" -#include "reactmicp/io/reactive_transport.hpp" -#include "reactmicp/io/saturated_react.hpp" -#include "physics/io/units.hpp" +// Output -// configuration - -#include "utils/io/yaml.hpp" - -#include "database/io/configuration.hpp" -#include "dfpm/io/configuration.hpp" -#include "reactmicp/io/configuration.hpp" - -#include "utils/timer.hpp" +#endif // SPECMICP_REACMICP_UNSATURATED_HPP