Skip to content

Implemented dispatch for mimetic inner product selection #1190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e77a0ed
implemented dispatch for mimetic inner product selection
francoishamon Oct 5, 2020
4f5c758
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Oct 14, 2020
3a9ac63
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Oct 20, 2020
5c486c4
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Nov 3, 2020
183f40c
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Nov 8, 2020
38713fb
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Nov 20, 2020
8fe286d
addressed Sergey's comments
francoishamon Nov 23, 2020
dc77310
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Nov 30, 2020
857c254
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Dec 1, 2020
925abe4
update integratedTests submodule
francoishamon Dec 1, 2020
e7d3173
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Dec 1, 2020
e24eb79
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Dec 3, 2020
e2ee31e
added the ip by BeiraoDaVeiga, Lipnikov, Manzini
francoishamon Dec 10, 2020
8571d66
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Dec 10, 2020
cb69bfb
add missing file
francoishamon Dec 10, 2020
1cb1b52
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Dec 10, 2020
83dc24d
hybridMimeticDiscretization does not inherit from FluxApproximationBa…
francoishamon Dec 11, 2020
3f71d6a
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Dec 15, 2020
a938ef3
fixed compilation error
francoishamon Dec 16, 2020
ed39c60
Merge branch 'develop' into feature/hamon/newHybridFVMInnerProduct
francoishamon Dec 21, 2020
e178e94
update integratedTests submodule
francoishamon Dec 21, 2020
6fdfa53
updated integratedTests submodule
francoishamon Dec 21, 2020
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
2 changes: 1 addition & 1 deletion integratedTests
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ localToGlobalMap globalIndex_array
nodeList geosx_InterObjectRelation< LvArray_ArrayOfArrays< long, long, LvArray_ChaiBuffer > > (no description available)
K_IC real64_array2d :ref:`DATASTRUCTURE_SurfaceGenerator` Critical Stress Intensity Factor :math:`K_{IC}` in the plane of the face.
SIFonFace real64_array :ref:`DATASTRUCTURE_SurfaceGenerator` Calculated Stress Intensity Factor on the face.
TransMultiplier real64_array :ref:`DATASTRUCTURE_TwoPointFluxApproximation` An array that holds the transmissibility multipliers
TransMultiplier real64_array :ref:`DATASTRUCTURE_HybridMimeticDiscretization`, :ref:`DATASTRUCTURE_TwoPointFluxApproximation` An array that holds the transmissibility multipliers
childIndex localIndex_array :ref:`DATASTRUCTURE_SurfaceGenerator` Index of child within the mesh object it is registered on.
degreeFromCrackTip integer_array :ref:`DATASTRUCTURE_SurfaceGenerator` Distance to the crack tip in terms of topological distance. (i.e. how many nodes are along the path to the closest node that is on the crack surface.
deltaFacePressure real64_array :ref:`DATASTRUCTURE_SinglePhaseHybridFVM` An array that holds the accumulated pressure updates at the faces.
Expand Down
11 changes: 6 additions & 5 deletions src/coreComponents/fileIO/schema/docs/FiniteVolume.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@


========================= ==== ======= ====================================
Name Type Default Description
========================= ==== ======= ====================================
TwoPointFluxApproximation node :ref:`XML_TwoPointFluxApproximation`
========================= ==== ======= ====================================
=========================== ==== ======= ======================================
Name Type Default Description
=========================== ==== ======= ======================================
HybridMimeticDiscretization node :ref:`XML_HybridMimeticDiscretization`
TwoPointFluxApproximation node :ref:`XML_TwoPointFluxApproximation`
=========================== ==== ======= ======================================


11 changes: 6 additions & 5 deletions src/coreComponents/fileIO/schema/docs/FiniteVolume_other.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@


========================= ==== ==============================================
Name Type Description
========================= ==== ==============================================
TwoPointFluxApproximation node :ref:`DATASTRUCTURE_TwoPointFluxApproximation`
========================= ==== ==============================================
=========================== ==== ================================================
Name Type Description
=========================== ==== ================================================
HybridMimeticDiscretization node :ref:`DATASTRUCTURE_HybridMimeticDiscretization`
TwoPointFluxApproximation node :ref:`DATASTRUCTURE_TwoPointFluxApproximation`
=========================== ==== ================================================


Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


================ ====== ======== ===================================================
Name Type Default Description
================ ====== ======== ===================================================
coefficientName string required Name of coefficient field
innerProductType string required Type of inner product used in the hybrid FVM solver
name string required A name is required for any non-unique nodes
================ ====== ======== ===================================================


Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


=============== ============ ================================ ====================================================
Name Type Registered On Description
=============== ============ ================================ ====================================================
TransMultiplier real64_array :ref:`DATASTRUCTURE_FaceManager` An array that holds the transmissibility multipliers
=============== ============ ================================ ====================================================


9 changes: 9 additions & 0 deletions src/coreComponents/fileIO/schema/schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,18 @@ the relative residual norm satisfies:
</xsd:simpleType>
<xsd:complexType name="FiniteVolumeType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="HybridMimeticDiscretization" type="HybridMimeticDiscretizationType" />
<xsd:element name="TwoPointFluxApproximation" type="TwoPointFluxApproximationType" />
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="HybridMimeticDiscretizationType">
<!--coefficientName => Name of coefficient field-->
<xsd:attribute name="coefficientName" type="string" use="required" />
<!--innerProductType => Type of inner product used in the hybrid FVM solver-->
<xsd:attribute name="innerProductType" type="string" use="required" />
<!--name => A name is required for any non-unique nodes-->
<xsd:attribute name="name" type="string" use="required" />
</xsd:complexType>
<xsd:complexType name="TwoPointFluxApproximationType">
<!--areaRelTol => Relative tolerance for area calculations.-->
<xsd:attribute name="areaRelTol" type="real64" default="1e-08" />
Expand Down
4 changes: 3 additions & 1 deletion src/coreComponents/fileIO/schema/schema.xsd.other
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@
</xsd:complexType>
<xsd:complexType name="FiniteVolumeType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="HybridMimeticDiscretization" type="HybridMimeticDiscretizationType" />
<xsd:element name="TwoPointFluxApproximation" type="TwoPointFluxApproximationType" />
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="HybridMimeticDiscretizationType" />
<xsd:complexType name="TwoPointFluxApproximationType">
<!--cellStencil => (no description available)-->
<xsd:attribute name="cellStencil" type="geosx_CellElementStencilTPFA" />
Expand Down Expand Up @@ -1189,7 +1191,7 @@
<xsd:attribute name="K_IC" type="real64_array2d" />
<!--SIFonFace => Calculated Stress Intensity Factor on the face. => SurfaceGenerator-->
<xsd:attribute name="SIFonFace" type="real64_array" />
<!--TransMultiplier => An array that holds the transmissibility multipliers => TwoPointFluxApproximation-->
<!--TransMultiplier => An array that holds the transmissibility multipliers => HybridMimeticDiscretization, TwoPointFluxApproximation-->
<xsd:attribute name="TransMultiplier" type="real64_array" />
<!--childIndex => Index of child within the mesh object it is registered on. => SurfaceGenerator-->
<xsd:attribute name="childIndex" type="localIndex_array" />
Expand Down
13 changes: 11 additions & 2 deletions src/coreComponents/finiteVolume/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ set( finiteVolume_headers
FluxApproximationBase.hpp
TwoPointFluxApproximation.hpp
FluxStencil.hpp
HybridFVMInnerProduct.hpp
HybridMimeticDiscretization.hpp
MimeticInnerProductDispatch.hpp
mimeticInnerProducts/MimeticInnerProductBase.hpp
mimeticInnerProducts/QuasiTPFAInnerProduct.hpp
mimeticInnerProducts/QuasiRTInnerProduct.hpp
mimeticInnerProducts/TPFAInnerProduct.hpp
mimeticInnerProducts/SimpleInnerProduct.hpp
mimeticInnerProducts/BdVLMInnerProduct.hpp
mimeticInnerProducts/MimeticInnerProductHelpers.hpp
)
#
# Specify all sources
Expand All @@ -22,7 +30,8 @@ set( finiteVolume_sources
FaceElementStencil.cpp
FiniteVolumeManager.cpp
FluxApproximationBase.cpp
TwoPointFluxApproximation.cpp
TwoPointFluxApproximation.cpp
HybridMimeticDiscretization.cpp
)

if ( BUILD_OBJ_LIBS )
Expand Down
30 changes: 28 additions & 2 deletions src/coreComponents/finiteVolume/FiniteVolumeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "FiniteVolumeManager.hpp"

#include "finiteVolume/FluxApproximationBase.hpp"
#include "finiteVolume/HybridMimeticDiscretization.hpp"
#include "mesh/MeshForLoopInterface.hpp"
#include "rajaInterface/GEOS_RAJA_Interface.hpp"

Expand All @@ -40,8 +41,16 @@ FiniteVolumeManager::~FiniteVolumeManager()

Group * FiniteVolumeManager::CreateChild( string const & childKey, string const & childName )
{
std::unique_ptr< FluxApproximationBase > approx = FluxApproximationBase::CatalogInterface::Factory( childKey, childName, this );
return this->RegisterGroup< FluxApproximationBase >( childName, std::move( approx ));
if( childKey == HybridMimeticDiscretization::CatalogName() )
{
std::unique_ptr< HybridMimeticDiscretization > hm = std::make_unique< HybridMimeticDiscretization >( childName, this );
return this->RegisterGroup< HybridMimeticDiscretization >( childName, std::move( hm ) );
}
else
{
std::unique_ptr< FluxApproximationBase > approx = FluxApproximationBase::CatalogInterface::Factory( childKey, childName, this );
return this->RegisterGroup< FluxApproximationBase >( childName, std::move( approx ));
}
}


Expand All @@ -52,6 +61,13 @@ void FiniteVolumeManager::ExpandObjectCatalogs()
{
CreateChild( catalogIter.first, catalogIter.first );
}
// Then do the same thing for the HybridMimeticDiscretization
for( auto & catalogIter: HybridMimeticDiscretization::GetCatalog())
{
string const childName = catalogIter.first;
std::unique_ptr< HybridMimeticDiscretization > hm = std::make_unique< HybridMimeticDiscretization >( childName, this );
this->RegisterGroup< HybridMimeticDiscretization >( childName, std::move( hm ) );
}
}


Expand All @@ -65,5 +81,15 @@ FluxApproximationBase & FiniteVolumeManager::getFluxApproximation( std::string c
return getGroupReference< FluxApproximationBase >( name );
}

HybridMimeticDiscretization const & FiniteVolumeManager::getHybridMimeticDiscretization( std::string const & name ) const
{
return getGroupReference< HybridMimeticDiscretization >( name );
}

HybridMimeticDiscretization & FiniteVolumeManager::getHybridMimeticDiscretization( std::string const & name )
{
return getGroupReference< HybridMimeticDiscretization >( name );
}


} // namespace geosx
13 changes: 13 additions & 0 deletions src/coreComponents/finiteVolume/FiniteVolumeManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace geosx

class DomainPartition;
class FluxApproximationBase;
class HybridMimeticDiscretization;

/**
* @class FiniteVolumeManager
Expand Down Expand Up @@ -70,6 +71,18 @@ class FiniteVolumeManager : public dataRepository::Group
*/
FluxApproximationBase & getFluxApproximation( string const & name );

/**
* @brief Return the HybridMimeticDiscretization associated with the provided name.
* @param[in] name the provided name
* @return the HybridMimeticDiscretization associated with the provided name
*/
HybridMimeticDiscretization const & getHybridMimeticDiscretization( string const & name ) const;

/**
* @copydoc getHybridMimeticDiscretization( string const & ) const
*/
HybridMimeticDiscretization & getHybridMimeticDiscretization( string const & name );

private:

};
Expand Down
Loading