Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
solidInternalEnergyModelName="rockInternalEnergy"
/>

<DruckerPrager
<!-- SPHINX_DRUCKERPRAGER_SOLID -->
<DruckerPrager
name="rockSolid"
defaultDensity="2700"
defaultBulkModulus="0.5e9"
Expand All @@ -63,7 +64,8 @@
defaultFrictionAngle="15.27"
defaultDilationAngle="0.0"
defaultHardeningRate="0.0"
defaultDrainedLinearTEC="3e-7"/>
defaultDrainedLinearTEC="3e-7"/>
<!-- SPHINX_DRUCKERPRAGER_SOLID_END -->

<BiotPorosity
name="rockPorosity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@
solidInternalEnergyModelName="rockInternalEnergy"
/>

<ElasticIsotropic
<!-- SPHINX_ELASTIC_SOLID -->
<ElasticIsotropic
name="rockSolid"
defaultDensity="2700"
defaultBulkModulus="0.5e9"
defaultShearModulus="0.3e9"
defaultDrainedLinearTEC="3e-7"/>
defaultDrainedLinearTEC="3e-7"/>
<!-- SPHINX_ELASTIC_SOLID_END -->

<BiotPorosity
name="rockPorosity"
Expand Down
4 changes: 4 additions & 0 deletions inputFiles/thermoPoromechanics/ThermoMech_1DCooling_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
functionName="timeFunction"
scale="1.0"/>

<!-- SPHINX_CONSTRAINTS -->
<FieldSpecification
name="xconstraint"
fieldName="totalDisplacement"
Expand All @@ -73,14 +74,17 @@
component="2"
objectPath="nodeManager"
setNames="{ zneg }"/>
<!-- SPHINX_CONSTRAINTS_END -->
</FieldSpecifications>

<Functions>
<!-- SPHINX_COOLING_RAMP -->
<TableFunction
name="timeFunction"
inputVarNames="{ time }"
coordinates="{ 0, 1e-10, 100.0 }"
values="{ 100.0, 100.0, 20.0 }"/>
<!-- SPHINX_COOLING_RAMP_END -->
</Functions>

<Tasks>
Expand Down
14 changes: 11 additions & 3 deletions src/cmake/GeosxMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,22 @@ endmacro()
## KEY <key to use when looking up the kernel specification in the JSON object>
## RESULT <name of the variable to store the list of generated files in>
## SPLIT <delimiter used to split the instantiation strings into lists>
## JSON <name of the JSON object variable> )
## JSON <name of the JSON object variable>
## LIST_TEMPLATE <path to the dispatch type list template> )
##
## This function generates kernel files from a template.
## The kernel specification is looked up in a JSON object using the provided key.
## The list of generated files is stored in the provided variable in the parent scope.
## The delimiter is used to split the instantiation strings into lists of symbol values.
## The JSON object is expected to be defined in the calling scope.
## The dispatch type list template will be used to generate a list of types for dispatch of the
## kernel. If this is not specified KernelDispatchTypeList.hpp.template in the parent directory
## will be used.
##
##------------------------------------------------------------------------------
function(generateKernels)
set(options)
set(oneValueArgs TEMPLATE KEY HEADERS SOURCES SPLIT JSON)
set(oneValueArgs TEMPLATE KEY HEADERS SOURCES SPLIT JSON LIST_TEMPLATE)
set(multiValueArgs)

cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
Expand Down Expand Up @@ -309,7 +313,11 @@ function(generateKernels)
set(generatedFileName "${CMAKE_BINARY_DIR}/include/${relativeSourceDir}/${localRelDir}/${KERNEL_GROUP_NAME}DispatchTypeList.hpp")
string(REPLACE "coreComponents/" "" generatedFileName "${generatedFileName}")
message(STATUS "Generating file: ${generatedFileName}")
configure_file(../KernelDispatchTypeList.hpp.template "${generatedFileName}" @ONLY)
set(LIST_TEMPLATE "${ARG_LIST_TEMPLATE}")
if ("${LIST_TEMPLATE}" STREQUAL "")
set(LIST_TEMPLATE "../KernelDispatchTypeList.hpp.template")
endif()
configure_file(${LIST_TEMPLATE} "${generatedFileName}" @ONLY)
list(APPEND generatedHeadersList ${generatedFileName})

# The list of generated files is returned by setting the variable in the parent scope
Expand Down
37 changes: 18 additions & 19 deletions src/coreComponents/constitutiveDrivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,7 @@ set( constitutiveDrivers_headers
set( constitutiveDrivers_sources
ConstitutiveDriver.cpp
fluid/multiFluid/PVTDriver.cpp
fluid/multiFluid/constant/PVTDriverRunTestInvariantImmiscibleFluid.cpp
fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp
fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp
fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp
fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp
fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp
fluid/multiFluid/compositional/PVTDriverRunTestCompositionalKValueLohrenzBrayClarkViscosity.cpp
fluid/multiFluid/compositional/PVTDriverRunTestCompositionalKValuePhillipsBrine.cpp
fluid/multiFluid/compositional/PVTDriverRunTestCompositionalThreePhaseLohrenzBrayClarkViscosity.cpp
fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp
fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhasePhillipsBrine.cpp
fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp
relativePermeability/RelpermDriver.cpp
relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp
relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp
relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp
relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp
relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp
relativePermeability/RelpermDriverTableRelativeRunTest.cpp
relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp
solid/TriaxialDriver.cpp
)

Expand All @@ -64,6 +45,24 @@ set( dependencyList ${parallelDeps} constitutive events )
geos_decorate_link_dependencies( LIST decoratedDependencies
DEPENDENCIES ${dependencyList} )

file( READ "${CMAKE_CURRENT_LIST_DIR}/kernelSpecs.json" kernelSpecs )
set( kernelTemplateFileList
fluid/multiFluid/PVTDriverRunTestFluid.cpp.template
relativePermeability/RelpermDriverRunTestRelPerm.cpp.template)

foreach( kernelTemplateFile ${kernelTemplateFileList} )
get_filename_component( jsonKey ${kernelTemplateFile} NAME_WE )
generateKernels( TEMPLATE ${kernelTemplateFile}
JSON kernelSpecs
KEY ${jsonKey}
HEADERS headerFiles
SOURCES sourceFiles
LIST_TEMPLATE ${CMAKE_CURRENT_LIST_DIR}/DriverDispatchTypeList.hpp.template )

list(APPEND constitutiveDrivers_headers ${headerFiles})
list(APPEND constitutiveDrivers_sources ${sourceFiles})
endforeach()

blt_add_library( NAME constitutiveDrivers
SOURCES ${constitutiveDrivers_sources}
HEADERS ${constitutiveDrivers_headers}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* ------------------------------------------------------------------------------------------------------------
* SPDX-License-Identifier: LGPL-2.1-only
*
* Copyright (c) 2018-2019 Lawrence Livermore National Security LLC
* Copyright (c) 2018-2019 The Board of Trustees of the Leland Stanford Junior University
* Copyright (c) 2018-2019 Total, S.A
* Copyright (c) 2019- GEOSX Contributors
* All rights reserved
*
* See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
* ------------------------------------------------------------------------------------------------------------
*/

/**
* @file @KERNEL_GROUP_NAME@DispatchTypeList.hpp
*/

#ifndef GEOS_@KERNEL_GROUP_NAME@_DISPATCHTYPELIST_HPP
#define GEOS_@KERNEL_GROUP_NAME@_DISPATCHTYPELIST_HPP

#include "common/TypeDispatch.hpp"

namespace geos
{

using namespace constitutive;

using @KERNEL_GROUP_NAME@DispatchTypeList = types::TypeList<
@typeCombinationList@
>;

} // namespace geos

#endif //GEOS_@KERNEL_GROUP_NAME@_DISPATCHTYPELIST_HPP

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
* ------------------------------------------------------------------------------------------------------------
*/

/*
* PVTDriverRunTestFluid_@FLUID@.cpp
*/

#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp"
#include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp"
#include "constitutive/fluid/multifluid/MultiFluidSelector.hpp"

namespace geos
{
template void PVTDriver::runTest< constitutive::CO2BrineEzrokhiFluid >( constitutive::CO2BrineEzrokhiFluid &, arrayView2d< real64 > const & );
using namespace constitutive;
template void PVTDriver::runTest< @FLUID@ >( @FLUID@ &, arrayView2d< real64 > const & );
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading