Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
ba988fbc
Commit
ba988fbc
authored
Nov 02, 2018
by
Ned Coltman
Committed by
Timo Koch
Nov 13, 2018
Browse files
[Cleanup][Multidomain][Facet] rename facet multidomain tests
parent
70f5cc15
Changes
15
Hide whitespace changes
Inline
Side-by-side
test/multidomain/facet/1p_1p/analytical/CMakeLists.txt
View file @
ba988fbc
dune_symlink_to_source_files
(
FILES
"grids"
"
facetcoupling_1p1p
.input"
"convergencetest.py"
)
dune_symlink_to_source_files
(
FILES
"grids"
"
params
.input"
"convergencetest.py"
)
# executable for tpfa tests
add_executable
(
test_facetcoupling_tpfa_1p1p EXCLUDE_FROM_ALL test_facetcoupling_fv_1p1p.cc
)
target_compile_definitions
(
test_facetcoupling_tpfa_1p1p PUBLIC BULKTYPETAG=OnePBulkTpfa LOWDIMTYPETAG=OnePLowDimTpfa
)
# exectuable for box tests
add_executable
(
test_facetcoupling_box_1p1p EXCLUDE_FROM_ALL test_facetcoupling_fv_1p1p.cc
)
target_compile_definitions
(
test_facetcoupling_box_1p1p PUBLIC BULKTYPETAG=OnePBulkBox LOWDIMTYPETAG=OnePLowDimBox
)
dune_add_test
(
NAME test_facet_1p1p_tpfa_convergence
dune_add_test
(
NAME test_md_facet_1p1p_tpfa_convergence
CMAKE_GUARD
"( dune-foamgrid_FOUND AND dune-alugrid_FOUND AND gmsh_FOUND AND HAVE_UMFPACK )"
TARGET test_facetcoupling_tpfa_1p1p
SOURCES main.cc
COMPILE_DEFINITIONS BULKTYPETAG=OnePBulkTpfa LOWDIMTYPETAG=OnePLowDimTpfa
COMMAND ./convergencetest.py
CMD_ARGS test_facet
coupling_tpfa_1p1p
1e-4
)
CMD_ARGS test_
md_
facet
_1p1p_tpfa_convergence
1e-4
)
dune_add_test
(
NAME test_facet_1p1p_box_convergence
dune_add_test
(
NAME test_
md_
facet_1p1p_box_convergence
CMAKE_GUARD
"( dune-foamgrid_FOUND AND dune-alugrid_FOUND AND gmsh_FOUND AND HAVE_UMFPACK )"
TARGET test_facetcoupling_box_1p1p
SOURCES main.cc
COMPILE_DEFINITIONS BULKTYPETAG=OnePBulkBox LOWDIMTYPETAG=OnePLowDimBox
COMMAND ./convergencetest.py
CMD_ARGS test_facetcoupling_box_1p1p 1e-4
)
set
(
CMAKE_BUILD_TYPE Release
)
CMD_ARGS test_md_facet_1p1p_box_convergence 1e-4
)
#install sources
install
(
FILES
test_facetcoupling_fv_1p1p
.cc
bulkP
roblem.hh
lowdim
problem.hh
main
.cc
p
roblem
_bulk
.hh
proble
m_lowdi
m.hh
spatialparams.hh
convergencetest.py
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/dumux/test/multidomain/facet/1p_1p/analytical
)
test/multidomain/facet/1p_1p/analytical/convergencetest.py
View file @
ba988fbc
...
...
@@ -50,7 +50,8 @@ for permIndex in range(0, len(k)):
tmpGeoFile
.
close
()
subprocess
.
call
([
'gmsh'
,
'-2'
,
'grids/tmp.geo'
])
subprocess
.
call
([
'./'
+
execName
,
'facetcoupling_1p1p.input'
,
subprocess
.
call
([
'./'
+
execName
,
'params.input'
,
'-Vtk.OutputName'
,
execName
,
'-Grid.File'
,
'grids/tmp.msh'
,
'-Grid.NumElemsPerSide'
,
str
(
int
(
cells
)),
'-LowDim.SpatialParams.Permeability'
,
str
(
k
[
permIndex
]),
...
...
test/multidomain/facet/1p_1p/analytical/
test_facetcoupling_fv_1p1p
.cc
→
test/multidomain/facet/1p_1p/analytical/
main
.cc
View file @
ba988fbc
...
...
@@ -28,8 +28,8 @@
#include
<dune/common/parallel/mpihelper.hh>
#include
<dune/geometry/quadraturerules.hh>
#include
"
bulk
problem.hh"
#include
"
lowdim
problem.hh"
#include
"problem
_bulk
.hh"
#include
"proble
m_lowdi
m.hh"
#include
<dumux/common/properties.hh>
#include
<dumux/common/parameters.hh>
...
...
@@ -266,7 +266,7 @@ int main(int argc, char** argv) try
bulkGridVariables
->
init
(
x
[
bulkId
]);
lowDimGridVariables
->
init
(
x
[
lowDimId
]);
// intialize the vtk output module
// intialize the vtk output module
ll
const
auto
bulkDM
=
BulkFVGridGeometry
::
discMethod
==
DiscretizationMethod
::
box
?
Dune
::
VTK
::
nonconforming
:
Dune
::
VTK
::
conforming
;
using
BulkSolutionVector
=
std
::
decay_t
<
decltype
(
x
[
bulkId
])
>
;
using
LowDimSolutionVector
=
std
::
decay_t
<
decltype
(
x
[
lowDimId
])
>
;
...
...
test/multidomain/facet/1p_1p/analytical/
facetcoupling_1p1p
.input
→
test/multidomain/facet/1p_1p/analytical/
params
.input
View file @
ba988fbc
...
...
@@ -8,12 +8,12 @@ NumElemsPerSide = 25
File = ./grids/hybridgrid.msh
[Bulk]
Problem.Name = 1p_1p_bulk
SpatialParams.Permeability = 1
Problem.Name = bulk
[LowDim]
SpatialParams.Permeability = 1e4
Problem.Name =
1p_1p_
lowdim
Problem.Name = lowdim
[L2Error]
QuadratureOrder = 1
...
...
@@ -23,3 +23,6 @@ NumericDifference.BaseEpsilon = 1e10
[Output]
EnableVTK = false # do not write .vtk files per default
[Vtk]
OutputName = test_md_facet_1p1p
test/multidomain/facet/1p_1p/analytical/
bulk
problem.hh
→
test/multidomain/facet/1p_1p/analytical/problem
_bulk
.hh
View file @
ba988fbc
...
...
@@ -95,11 +95,21 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
public:
OnePBulkProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
const
std
::
string
&
paramGroup
=
""
)
const
std
::
string
&
paramGroup
=
"
Bulk
"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
lowDimPermeability_
(
getParam
<
Scalar
>
(
"LowDim.SpatialParams.Permeability"
))
,
aperture_
(
getParam
<
Scalar
>
(
"Problem.FractureAperture"
))
{}
{
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
}
/*!
* \brief The problem name.
*/
const
std
::
string
&
name
()
const
{
return
problemName_
;
}
//! Specifies the type of boundary condition at a given position
BoundaryTypes
boundaryTypesAtPos
(
const
GlobalPosition
&
globalPos
)
const
...
...
@@ -191,6 +201,7 @@ private:
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
Scalar
lowDimPermeability_
;
Scalar
aperture_
;
std
::
string
problemName_
;
};
}
// end namespace Dumux
...
...
test/multidomain/facet/1p_1p/analytical/
lowdim
problem.hh
→
test/multidomain/facet/1p_1p/analytical/proble
m_lowdi
m.hh
View file @
ba988fbc
...
...
@@ -95,10 +95,20 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
public:
OnePLowDimProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
const
std
::
string
&
paramGroup
=
""
)
const
std
::
string
&
paramGroup
=
"
LowDim
"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
aperture_
(
getParam
<
Scalar
>
(
"Problem.FractureAperture"
))
{}
{
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
}
/*!
* \brief The problem name.
*/
const
std
::
string
&
name
()
const
{
return
problemName_
;
}
//! Specifies the type of boundary condition at a given position
BoundaryTypes
boundaryTypesAtPos
(
const
GlobalPosition
&
globalPos
)
const
...
...
@@ -159,6 +169,7 @@ public:
private:
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
Scalar
aperture_
;
std
::
string
problemName_
;
};
}
// end namespace Dumux
...
...
test/multidomain/facet/1p_1p/threedomain/CMakeLists.txt
View file @
ba988fbc
dune_symlink_to_source_files
(
FILES
"grids"
"
facetcoupling_1p1p_threedomain
.input"
)
dune_symlink_to_source_files
(
FILES
"grids"
"
params
.input"
)
dune_add_test
(
NAME test_facet
coupling_tpfa
_1p1p_threedomain
SOURCES
test_facetcoupling_tpfa_1p1p_threedo
main.cc
dune_add_test
(
NAME test_
md_
facet_1p1p_threedomain
_tpfa
SOURCES main.cc
CMAKE_GUARD
"( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
COMMAND
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files
${
CMAKE_SOURCE_DIR
}
/test/references/facetcoupling_1p1p_threedomain_bulk.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/test_1p_1p_bulk-00001.vtu
${
CMAKE_SOURCE_DIR
}
/test/references/facetcoupling_1p1p_threedomain_facet.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/test_1p_1p_facet-00001.vtu
${
CMAKE_SOURCE_DIR
}
/test/references/facetcoupling_1p1p_threedomain_edge.vtp
${
CMAKE_CURRENT_BINARY_DIR
}
/test_1p_1p_edge-00001.vtp
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_facetcoupling_tpfa_1p1p_threedomain facetcoupling_1p1p_threedomain.input"
)
--files
${
CMAKE_SOURCE_DIR
}
/test/references/test_md_facet_1p1p_threedomain_tpfa_bulk-reference.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/test_md_facet_1p1p_threedomain_tpfa_bulk-00001.vtu
${
CMAKE_SOURCE_DIR
}
/test/references/test_md_facet_1p1p_threedomain_tpfa_facet-reference.vtu
${
CMAKE_CURRENT_BINARY_DIR
}
/test_md_facet_1p1p_threedomain_tpfa_facet-00001.vtu
${
CMAKE_SOURCE_DIR
}
/test/references/test_md_facet_1p1p_threedomain_tpfa_edge-reference.vtp
${
CMAKE_CURRENT_BINARY_DIR
}
/test_md_facet_1p1p_threedomain_tpfa_edge-00001.vtp
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_md_facet_1p1p_threedomain_tpfa params.input
-Vtk.OutputName test_md_facet_1p1p_threedomain_tpfa"
)
set
(
CMAKE_BUILD_TYPE Release
)
#install sources
install
(
FILES
test_facetcoupling_tpfa_1p1p_threedo
main.cc
bulkP
roblem.hh
facet
problem.hh
edge
problem.hh
main.cc
p
roblem
_bulk
.hh
problem
_facet
.hh
problem
_edge
.hh
spatialparams.hh
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/dumux/test/multidomain/facet/1p_1p/threedomain
)
test/multidomain/facet/1p_1p/threedomain/
test_facetcoupling_tpfa_1p1p_threedo
main.cc
→
test/multidomain/facet/1p_1p/threedomain/main.cc
View file @
ba988fbc
...
...
@@ -32,9 +32,9 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/common/defaultusagemessage.hh>
#include
"
bulk
problem.hh"
#include
"
facet
problem.hh"
#include
"
edge
problem.hh"
#include
"problem
_bulk
.hh"
#include
"problem
_facet
.hh"
#include
"problem
_edge
.hh"
#include
<dumux/assembly/diffmethod.hh>
...
...
@@ -178,8 +178,10 @@ int main(int argc, char** argv) try
using
BulkSolutionVector
=
std
::
decay_t
<
decltype
(
x
[
bulkId
])
>
;
using
FacetSolutionVector
=
std
::
decay_t
<
decltype
(
x
[
facetId
])
>
;
using
EdgeSolutionVector
=
std
::
decay_t
<
decltype
(
x
[
edgeId
])
>
;
// intialize the vtk output module
VtkOutputModule
<
BulkGridVariables
,
BulkSolutionVector
>
bulkVtkWriter
(
*
bulkGridVariables
,
x
[
bulkId
],
bulkProblem
->
name
());
VtkOutputModule
<
FacetGridVariables
,
FacetSolutionVector
>
facetVtkWriter
(
*
facetGridVariables
,
x
[
facetId
],
facetProblem
->
name
());
VtkOutputModule
<
FacetGridVariables
,
FacetSolutionVector
>
facetVtkWriter
(
*
facetGridVariables
,
x
[
facetId
],
facetProblem
->
name
());
VtkOutputModule
<
EdgeGridVariables
,
EdgeSolutionVector
>
edgeVtkWriter
(
*
edgeGridVariables
,
x
[
edgeId
],
edgeProblem
->
name
());
// Add model specific output fields
...
...
test/multidomain/facet/1p_1p/threedomain/
facetcoupling_1p1p_threedomain
.input
→
test/multidomain/facet/1p_1p/threedomain/
params
.input
View file @
ba988fbc
...
...
@@ -5,7 +5,7 @@ EnableGravity = false
File = ./grids/grid.msh
[Bulk]
Problem.Name =
test_1p_1p_
bulk
Problem.Name = bulk
SpatialParams.Permeability = 1
FacetCoupling.Xi = 1.0
...
...
@@ -14,11 +14,14 @@ Aperture = 1e-2
[Facet]
SpatialParams.Permeability = 1e3
Problem.Name =
test_1p_1p_
facet
Problem.Name = facet
Problem.Aperture = 1e-2
FacetCoupling.Xi = 1.0
[Edge]
SpatialParams.Permeability = 1e5
Problem.Name =
test_1p_1p_
edge
Problem.Name = edge
Problem.Aperture = 1e-3
[Vtk]
OutputName = test_md_facet_1p1p_threedomain_tpfa
test/multidomain/facet/1p_1p/threedomain/
bulk
problem.hh
→
test/multidomain/facet/1p_1p/threedomain/problem
_bulk
.hh
View file @
ba988fbc
...
...
@@ -96,9 +96,19 @@ public:
//! The constructor
OnePBulkProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
const
std
::
string
&
paramGroup
=
""
)
const
std
::
string
&
paramGroup
=
"
Bulk
"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
{}
{
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
}
/*!
* \brief The problem name.
*/
const
std
::
string
&
name
()
const
{
return
problemName_
;
}
//! Specifies the kind of boundary condition on a given boundary position.
BoundaryTypes
boundaryTypesAtPos
(
const
GlobalPosition
&
globalPos
)
const
...
...
@@ -152,6 +162,7 @@ public:
{
couplingManagerPtr_
=
cm
;
}
private:
std
::
string
problemName_
;
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
};
...
...
test/multidomain/facet/1p_1p/threedomain/
edge
problem.hh
→
test/multidomain/facet/1p_1p/threedomain/problem
_edge
.hh
View file @
ba988fbc
...
...
@@ -100,11 +100,20 @@ public:
//! The constructor
OnePEdgeProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
const
std
::
string
&
paramGroup
=
""
)
const
std
::
string
&
paramGroup
=
"
Edge
"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
{
const
auto
a
=
getParam
<
Scalar
>
(
"Extrusion.Aperture"
);
exFactor_
=
a
*
a
;
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
}
/*!
* \brief The problem name.
*/
const
std
::
string
&
name
()
const
{
return
problemName_
;
}
//!Specifies the type of boundary condition on a boundary position
...
...
@@ -152,6 +161,7 @@ public:
private:
Scalar
exFactor_
;
std
::
string
problemName_
;
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
};
...
...
test/multidomain/facet/1p_1p/threedomain/
facet
problem.hh
→
test/multidomain/facet/1p_1p/threedomain/problem
_facet
.hh
View file @
ba988fbc
...
...
@@ -100,10 +100,20 @@ public:
//! The constructor
OnePFacetProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
const
std
::
string
&
paramGroup
=
""
)
const
std
::
string
&
paramGroup
=
"
Facet
"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
aperture_
(
getParam
<
Scalar
>
(
"Extrusion.Aperture"
))
{}
{
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
}
/*!
* \brief The problem name.
*/
const
std
::
string
&
name
()
const
{
return
problemName_
;
}
//! Specifies the kind of boundary condition at a boundary position
BoundaryTypes
boundaryTypesAtPos
(
const
GlobalPosition
&
globalPos
)
const
...
...
@@ -165,6 +175,7 @@ public:
private:
Scalar
aperture_
;
std
::
string
problemName_
;
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
};
...
...
test/references/
facetcoupling
_1p1p_threedomain_
bulk
.vtu
→
test/references/
test_md_facet
_1p1p_threedomain_
tpfa_bulk-reference
.vtu
View file @
ba988fbc
File moved
test/references/
facetcoupling
_1p1p_threedomain_
edg
e.vtp
→
test/references/
test_md_facet
_1p1p_threedomain_
tpfa_edge-referenc
e.vtp
View file @
ba988fbc
File moved
test/references/
facetcoupling
_1p1p_threedomain_
facet
.vtu
→
test/references/
test_md_facet
_1p1p_threedomain_
tpfa_facet-reference
.vtu
View file @
ba988fbc
File moved
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment