Skip to content

Commit

Permalink
Fixed CI computation.
Browse files Browse the repository at this point in the history
  • Loading branch information
CusiniM committed Jan 16, 2025
1 parent da7b7fa commit f1555ab
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/coreComponents/finiteVolume/TwoPointFluxApproximation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void TwoPointFluxApproximation::computeFractureStencil( MeshLevel & mesh ) const
string const & regionName = region.getName();
addFractureFractureConnectionsDFM( mesh, regionName );
addFractureMatrixConnectionsDFM( mesh, regionName );
} else if ( region.subRegionType() == SurfaceElementRegion::SurfaceSubRegionType::embeddedSurfaceElement )
} else if ( region.subRegionType() == SurfaceElementRegion::SurfaceSubRegionType::embeddedElement )
{
string const & regionName = region.getName();
addFractureFractureConnectionsEDFM( mesh, regionName );
Expand Down Expand Up @@ -553,7 +553,7 @@ void TwoPointFluxApproximation::addFractureMatrixConnectionsEDFM( MeshLevel & me

EmbeddedSurfaceSubRegion & fractureSubRegion = fractureRegion.getUniqueSubRegion< EmbeddedSurfaceSubRegion >();

computeConnectivityIndex( elemManager, mesh.getNodeManager();, embeddedSurfaceSubRegion );
computeConnectivityIndex( elemManager, mesh.getNodeManager(), fractureSubRegion );

ElementRegionManager::ElementViewAccessor< arrayView1d< real64 const > > hydraulicAperture =
elemManager.constructViewAccessor< array1d< real64 >, arrayView1d< real64 const > >( fields::flow::hydraulicAperture::key() );
Expand Down Expand Up @@ -623,7 +623,7 @@ void TwoPointFluxApproximation::computeConnectivityIndex( ElementRegionManager &
{
auto kernelVariant = createKernel( subRegion.getElementType(), nodeManager, subRegion, embeddedSurfaceSubRegion );

std::visit( [&] ( auto & kernel )
std::visit( [&] ( auto kernel )
{
using KERNEL_TYPE = decltype( kernel );
KERNEL_TYPE::template launchCIComputationKernel< parallelDevicePolicy< >, KERNEL_TYPE >( kernel );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#include "mesh/MeshFields.hpp"
#include "mesh/mpiCommunications/CommunicationTools.hpp"
#include "mesh/mpiCommunications/MPI_iCommData.hpp"

#include "mesh/mpiCommunications/NeighborCommunicator.hpp"
#include "mesh/MeshLevel.hpp"

namespace geos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef GEOS_PHYSICSSOLVERS_SURFACEGENERATION_EMBEDDEDSURFACESPARALLELSYNCHRONIZATION_HPP_
#define GEOS_PHYSICSSOLVERS_SURFACEGENERATION_EMBEDDEDSURFACESPARALLELSYNCHRONIZATION_HPP_

#include "common/DataTypes.hpp"

namespace geos
{
Expand Down
8 changes: 4 additions & 4 deletions src/coreComponents/mesh/generators/VTKUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,11 @@ AllMeshes redistributeByCellGraph( AllMeshes & input,
finalFractures[fractureName] = finalFracMesh;
}

// Matteo: Create edfmMeshPartitions using newPartitions and the map between the global cell ids and the global edfm fracture cell ids
// vtkSmartPointer< vtkPartitionedDataSet > const edfmSplitMesh = splitMeshByPartition( input.getEmbeddedSurfaceBlocks(), numRanks, edfmMeshPartitions.toViewConst() );
// vtkSmartPointer< vtkUnstructuredGrid > finalEDFMMesh = vtk::redistribute( *edfmSplitMesh, MPI_COMM_GEOS );
// Ouassim: just add the edfm mesh at the moment and see.
// Create edfmMeshPartitions using newPartitions and the map between the global cell ids and the global edfm fracture cell ids
vtkSmartPointer< vtkPartitionedDataSet > const edfmSplitMesh = splitMeshByPartition( input.getEmbeddedSurfaceBlocks(), numRanks, edfmMeshPartitions.toViewConst() );
vtkSmartPointer< vtkUnstructuredGrid > finalEDFMMesh = vtk::redistribute( *edfmSplitMesh, MPI_COMM_GEOS );
// auto edfmMesh = input.getEmbeddedSurfaceBlocks();
auto finalEDFMMesh = input.getEmbeddedSurfaceBlocks();
return AllMeshes( finalMesh, finalFractures, finalEDFMMesh );
}

Expand Down
24 changes: 12 additions & 12 deletions src/coreComponents/mesh/utilities/CIcomputationKernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,11 @@ class CIcomputationKernel
arrayView1d< real64 > const m_connectivityIndex;
};

using KernelVariant = std::variant< CIcomputationKernel< H1_Hexahedron_Lagrange1_GaussLegendre2 >,
CIcomputationKernel< H1_Wedge_Lagrange1_Gauss6 >,
CIcomputationKernel< H1_Tetrahedron_Lagrange1_Gauss1 >,
CIcomputationKernel< H1_Pyramid_Lagrange1_Gauss5 > >;
using KernelVariant = std::variant< CIcomputationKernel< finiteElement::H1_Hexahedron_Lagrange1_GaussLegendre2 >,
CIcomputationKernel< finiteElement::H1_Wedge_Lagrange1_Gauss6 >,
CIcomputationKernel< finiteElement::H1_Tetrahedron_Lagrange1_Gauss1 >,
CIcomputationKernel< finiteElement::H1_Pyramid_Lagrange1_Gauss5 > >;


KernelVariant createKernel( ElementType elemType,
NodeManager const & nodeManager,
Expand All @@ -245,16 +246,15 @@ KernelVariant createKernel( ElementType elemType,
switch ( elemType )
{
case ElementType::Tetrahedron:
return CIcomputationKernel<H1_Tetrahedron_Lagrange1_Gauss1>( nodeManager, subRegion, esr );
return CIcomputationKernel<finiteElement::H1_Tetrahedron_Lagrange1_Gauss1>( nodeManager, subRegion, esr );
case ElementType::Hexahedron:
return CIcomputationKernel<H1_Hexahedron_Lagrange1_GaussLegendre2>( nodeManager, subRegion, esr );
case ElementType::Pyramid
return CIcomputationKernel<H1_Pyramid_Lagrange1_Gauss5>( nodeManager, subRegion, esr );
case ElementType::Wedge
return CIcomputationKernel<H1_Wedge_VEM_Gauss1>( nodeManager, subRegion, esr );
return CIcomputationKernel<finiteElement::H1_Hexahedron_Lagrange1_GaussLegendre2>( nodeManager, subRegion, esr );
case ElementType::Pyramid:
return CIcomputationKernel<finiteElement::H1_Pyramid_Lagrange1_Gauss5>( nodeManager, subRegion, esr );
case ElementType::Wedge:
return CIcomputationKernel<finiteElement::H1_Wedge_Lagrange1_Gauss6>( nodeManager, subRegion, esr );
default:
GEOS_ERROR( "Unknown element type" );
return {};
GEOS_THROW( "Element type not supported", std::runtime_error );
}
}

Expand Down

0 comments on commit f1555ab

Please sign in to comment.