Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
7a0440d
remove operations from FiniteElementBase
rrsettgast Jul 13, 2025
7e40dad
remove numSupportPoints templated function in FiniteElementBase
rrsettgast Jul 14, 2025
53c986b
remove option to precalculate shape functions....this is never advant…
rrsettgast Jul 14, 2025
5e51028
fixed some compilation issues from last commit
rrsettgast Jul 14, 2025
4417ef0
intermediate commit
rrsettgast Sep 16, 2025
89e9006
split Qk_Hexahedron_Lagrange_GaussLobatto
rrsettgast Sep 17, 2025
9fee34c
got most of the tricky issues worked out
rrsettgast Sep 20, 2025
fa32b01
compile success
rrsettgast Sep 22, 2025
7da397c
some cleanup
rrsettgast Sep 22, 2025
ea7c523
more cleanup
rrsettgast Sep 22, 2025
8af705f
Merge branch 'develop' into feature/reworkFiniteElement
wrtobin Sep 22, 2025
438fefa
general device compilation macro
wrtobin Sep 22, 2025
7078650
Refactor BB_Tetrahedron and Pk_Pyramid_BCD classes to implement a new…
wrtobin Sep 22, 2025
ed956c0
uncrustify
wrtobin Sep 22, 2025
470c347
mostly documentation, adding/relocating aliases into correct compilat…
wrtobin Sep 22, 2025
72bd2ad
uncrustify
wrtobin Sep 22, 2025
b8f4622
Merge branch 'develop' into feature/reworkFiniteElement
wrtobin Sep 22, 2025
67baf34
gpu build fixes, test fixes, warning suppression on cuda platforms, u…
wrtobin Sep 22, 2025
fef8a8f
removing erroneous leftover device compile guard
wrtobin Sep 23, 2025
abdc817
copilot review
wrtobin Sep 23, 2025
73774aa
remove decorators from FiniteElementBase
wrtobin Sep 23, 2025
2ca01c8
uncrustify
wrtobin Sep 23, 2025
8c408ab
uncomment lassen basic_string error lines
wrtobin Sep 23, 2025
443a555
mostly just consistency in data member and struct type usage from bas…
wrtobin Sep 23, 2025
bb73345
consistency, remove m_detJ from CellElementSubregion, on-the-fly mass…
wrtobin Sep 26, 2025
769a37e
cleanup
wrtobin Sep 26, 2025
4b143da
merge develop
wrtobin Sep 26, 2025
b317236
removing unused vars leftover during mass kernel work
wrtobin Sep 26, 2025
9761d10
why
wrtobin Sep 26, 2025
3943b1d
removing dNdX precalc and dealing with surface generator force calc f…
wrtobin Sep 29, 2025
b6beaa7
python branch for temp restartcheck suppression to verify the rest of…
wrtobin Sep 29, 2025
32ccfc7
fix stress indexing error
wrtobin Oct 3, 2025
572e66b
Merge branch 'develop' into feature/reworkFiniteElement
rrsettgast Dec 4, 2025
03b07a2
update PVT hash
rrsettgast Dec 4, 2025
5d8c8ae
add weight to calcJacobian function
rrsettgast Dec 5, 2025
ee6f156
update calcJacobian doxy to reflect `wxdetj` return value, vem eleme…
wrtobin Dec 5, 2025
07100e9
uncrustify
wrtobin Dec 5, 2025
e559800
unused var macros got dropped
wrtobin Dec 5, 2025
3d7b07a
`::template MeshData`
wrtobin Dec 5, 2025
130bf84
whoops
wrtobin Dec 5, 2025
199ee5e
wait how was that compiling
wrtobin Dec 5, 2025
9116dbf
since its a serial policy just swap to host lambda to avoid nested ho…
wrtobin Dec 5, 2025
81a34a0
Merge branch 'develop' into feature/reworkFiniteElement
rrsettgast Dec 8, 2025
8e37993
change streak job to streak2
rrsettgast Dec 8, 2025
b1b560b
change certificates for streak change
rrsettgast Dec 8, 2025
b33aa7c
revert to streak, with use of only a single runner specified
rrsettgast Dec 8, 2025
eedf4af
revert to streak, with use of only a single runner specified
rrsettgast Dec 8, 2025
82c00d1
Modify determinant return to include basis weights
rrsettgast Dec 11, 2025
59faff8
remove weight when not available
rrsettgast Dec 11, 2025
9d2c555
Simplify return value in Qk_Hexahedron_Lagrange_GaussLobatto
rrsettgast Dec 11, 2025
e702a25
Merge branch 'develop' into feature/reworkFiniteElement
rrsettgast Dec 12, 2025
a242e20
revert LvArray to develop
rrsettgast Dec 12, 2025
4530459
adding nan checks to problem failing in CI (cannot recreate locally) …
wrtobin Dec 12, 2025
c05afd0
change for loop in AcousticWaveEquationSEM to raja loop
rrsettgast Dec 15, 2025
50c4f82
Refactor AcousticWaveEquationSEM to use ApplyFreeSurfaceBCKernel for …
wrtobin Dec 15, 2025
ee3a9ad
Merge branch 'develop' into feature/reworkFiniteElement
rrsettgast Jan 5, 2026
11f0735
Merge branch 'develop' into feature/reworkFiniteElement
rrsettgast Jan 24, 2026
a6f9424
Merge branch 'develop' into feature/reworkFiniteElement
rrsettgast Jan 28, 2026
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
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ blt_add_executable( NAME geosx
${extraComponentsLinkList}
${externalComponentsLinkList} )

if(APPLE)
target_link_options(geosx PRIVATE "-Wl,-export_dynamic")
endif()


# Seems to be required on some CMake versions (e.g. 3.16) to get enforce device linking
if( ${ENABLE_HYPRE_DEVICE} STREQUAL "CUDA" )
set_target_properties( geosx PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS TRUE )
Expand Down
2 changes: 1 addition & 1 deletion src/cmake/thirdparty/SetupGeosxThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ if( ${CMAKE_VERSION} VERSION_LESS "3.19" )
set( PYTHON_AND_VERSION Python3 )
set( PYTHON_OPTIONAL_COMPONENTS)
else()
set( PYTHON_AND_VERSION Python3 3.6.0...<4 )
set( PYTHON_AND_VERSION Python3 3.6.0...<4.0.0 )
set( PYTHON_OPTIONAL_COMPONENTS OPTIONAL_COMPONENTS Development NumPy)
endif()
if(ENABLE_PYGEOSX)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void TwoPhaseImmiscibleFluid::KernelWrapper::
{
using Deriv = constitutive::multifluid::DerivativeOffset;

LvArray::forValuesInSlice( phaseDensity.derivs, []( real64 & val ) { val = 0.0; } );
// LvArray::forValuesInSlice( phaseDensity.derivs, []( real64 & val ) { val = 0.0; } );
Copy link
Collaborator

@wrtobin wrtobin Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were giving the strange basic_string __host__ only call from device context on lassen with clang-13, cuda-11.8

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can just comment this out can we?


for( integer iph = 0; iph < 2; ++iph )
{
Expand All @@ -274,7 +274,7 @@ void TwoPhaseImmiscibleFluid::KernelWrapper::
{
using Deriv = constitutive::multifluid::DerivativeOffset;

LvArray::forValuesInSlice( phaseViscosity.derivs, []( real64 & val ) { val = 0.0; } );
// LvArray::forValuesInSlice( phaseViscosity.derivs, []( real64 & val ) { val = 0.0; } );

for( integer iph = 0; iph < 2; ++iph )
{
Expand Down
1 change: 1 addition & 0 deletions src/coreComponents/finiteElement/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ set( finiteElement_headers
LinearFormUtilities.hpp
PDEUtilities.hpp
elementFormulations/FiniteElementBase.hpp
elementFormulations/FiniteElementOperators.hpp
elementFormulations/H1_Hexahedron_Lagrange1_GaussLegendre2.hpp
elementFormulations/H1_Pyramid_Lagrange1_Gauss5.hpp
elementFormulations/H1_QuadrilateralFace_Lagrange1_GaussLegendre2.hpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "LvArray/src/tensorOps.hpp"
#include "FiniteElementDispatch.hpp"


namespace geos
{

Expand All @@ -42,8 +41,6 @@ string const detJ = "detJ";
}
}



class FiniteElementDiscretization : public dataRepository::Group
{
public:
Expand Down Expand Up @@ -157,7 +154,7 @@ FiniteElementDiscretization::
typename FE_TYPE::StackVariables feStack;
finiteElement.template setup< FE_TYPE >( k, meshData, feStack );
real64 xLocal[numNodesPerElem][3];
localIndex numSupportPoints = finiteElement.template numSupportPoints< FE_TYPE >( feStack );
localIndex numSupportPoints = finiteElement.getNumSupportPoints( feStack );
for( localIndex a=0; a< numSupportPoints; ++a )
{
localIndex const nodeIndex = elemsToNodes[ k][ a ];
Expand All @@ -183,7 +180,6 @@ FiniteElementDiscretization::

}


} /* namespace geos */

#endif /* GEOS_FINITEELEMENT_FINITEELEMENTDISCRETIZATION_HPP_ */
16 changes: 7 additions & 9 deletions src/coreComponents/finiteElement/FiniteElementDispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ struct FiniteElementDispatchHandler< FE_TYPE, FE_TYPES... >
dispatch3D( FiniteElementBase const & input,
LAMBDA && lambda )
{
if( auto const * const ptr = dynamic_cast< FE_TYPE const * >(&input) )
if( auto const * const ptr = dynamic_cast< FE_TYPE const * >(&input)->getImpl() )
{
lambda( *ptr );
}
Expand All @@ -174,7 +174,7 @@ struct FiniteElementDispatchHandler< FE_TYPE, FE_TYPES... >
dispatch3D( FiniteElementBase & input,
LAMBDA && lambda )
{
if( auto * const ptr = dynamic_cast< FE_TYPE * >(&input) )
if( auto * const ptr = dynamic_cast< FE_TYPE * >(&input)->getImpl() )
{
lambda( *ptr );
}
Expand All @@ -189,7 +189,7 @@ struct FiniteElementDispatchHandler< FE_TYPE, FE_TYPES... >
dispatch2D( FiniteElementBase const & input,
LAMBDA && lambda )
{
if( auto const * const ptr = dynamic_cast< FE_TYPE const * >(&input) )
if( auto const * const ptr = dynamic_cast< FE_TYPE const * >(&input)->getImpl() )
{
lambda( *ptr );
}
Expand All @@ -207,19 +207,19 @@ void
dispatchlowOrder3D( FiniteElementBase const & input,
LAMBDA && lambda )
{
if( auto const * const ptr1 = dynamic_cast< H1_Hexahedron_Lagrange1_GaussLegendre2 const * >(&input) )
if( auto const * const ptr1 = dynamic_cast< H1_Hexahedron_Lagrange1_GaussLegendre2 const * >(&input)->getImpl() )
{
lambda( *ptr1 );
}
else if( auto const * const ptr2 = dynamic_cast< H1_Wedge_Lagrange1_Gauss6 const * >(&input) )
else if( auto const * const ptr2 = dynamic_cast< H1_Wedge_Lagrange1_Gauss6 const * >(&input)->getImpl() )
{
lambda( *ptr2 );
}
else if( auto const * const ptr3 = dynamic_cast< H1_Tetrahedron_Lagrange1_Gauss1 const * >(&input) )
else if( auto const * const ptr3 = dynamic_cast< H1_Tetrahedron_Lagrange1_Gauss1 const * >(&input)->getImpl() )
{
lambda( *ptr3 );
}
else if( auto const * const ptr4 = dynamic_cast< H1_Pyramid_Lagrange1_Gauss5 const * >(&input) )
else if( auto const * const ptr4 = dynamic_cast< H1_Pyramid_Lagrange1_Gauss5 const * >(&input)->getImpl() )
{
lambda( *ptr4 );
}
Expand All @@ -233,6 +233,4 @@ dispatchlowOrder3D( FiniteElementBase const & input,

} // namespace geos



#endif /* GEOS_FINITEELEMENT_FINITEELEMENTDISPATCH_HPP_ */
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ namespace geos
namespace finiteElement
{

namespace
{
template< int ORDER >
constexpr int BB_Tetrahedron_NumNodes = ( ORDER + 1 ) * ( ORDER + 2 ) * ( ORDER + 3 ) / 6;
}

/**
* This class contains the kernel accessible functions specific to the
* Bernstein-Bézier (BB) modal any-order tetrahedron finite element with
Expand All @@ -42,33 +48,37 @@ namespace finiteElement
* by 0<=l1,l2,l3,l3<=1, l1+l2+l3+l4=1
*/
template< int ORDER >
class BB_Tetrahedron final : public FiniteElementBase
class BB_Tetrahedron_impl : public FiniteElementBase_impl< BB_Tetrahedron_NumNodes< ORDER >,
4,
BB_Tetrahedron_NumNodes< ORDER > >
{
public:
/// Convenience alias for base class type.
using Base = FiniteElementBase_impl< BB_Tetrahedron_NumNodes< ORDER >,
4,
BB_Tetrahedron_NumNodes< ORDER > >;

/// The order of the finite element.
static constexpr int order = ORDER;
/// struct to hold stack variables.
struct StackVariables {};

/// The number of shape functions per element.
constexpr static localIndex numNodes = ( ORDER + 1 ) * ( ORDER + 2 ) * ( ORDER + 3 ) / 6;
using Base::numNodes;

/// The number of shape functions per face
constexpr static localIndex numNodesPerFace = ( ORDER + 1 ) * ( ORDER + 2 ) / 2;
/// The number of quadrature points per element.
using Base::numQuadraturePoints;

/// The maximum number of support points per element.
constexpr static localIndex maxSupportPoints = numNodes;
using Base::maxSupportPoints;

/// The number of quadrature points per element.
constexpr static localIndex numQuadraturePoints = numNodes;

/** @cond Doxygen_Suppress */
USING_FINITEELEMENTBASE
/** @endcond Doxygen_Suppress */
/// The order of the finite element.
static constexpr int order = ORDER;

virtual ~BB_Tetrahedron() = default;
/// The number of shape functions per face
constexpr static localIndex numNodesPerFace = ( ORDER + 1 ) * ( ORDER + 2 ) / 2;

/// @copydoc FiniteElementBase_impl::getNumQuadraturePoints()
GEOS_HOST_DEVICE
virtual localIndex getNumQuadraturePoints() const override
static localIndex getNumQuadraturePoints()
{
return numQuadraturePoints;
}
Expand All @@ -86,16 +96,18 @@ class BB_Tetrahedron final : public FiniteElementBase
return numQuadraturePoints;
}

/// @copydoc FiniteElementBase_impl::getNumSupportPoints()
GEOS_HOST_DEVICE
GEOS_FORCE_INLINE
virtual localIndex getNumSupportPoints() const override
static localIndex getNumSupportPoints()
{
return numNodes;
}

/// @copydoc FiniteElementBase_impl::getMaxSupportPoints()
GEOS_HOST_DEVICE
GEOS_FORCE_INLINE
virtual localIndex getMaxSupportPoints() const override
static localIndex getMaxSupportPoints()
{
return maxSupportPoints;
}
Expand All @@ -122,7 +134,6 @@ class BB_Tetrahedron final : public FiniteElementBase
GEOS_HOST_DEVICE
GEOS_FORCE_INLINE
static real64 jacobianDeterminant( real64 const (&X)[4][3] )

{
real64 m[3][3] = {};
for( int i = 0; i < 3; i++ )
Expand Down Expand Up @@ -1320,21 +1331,81 @@ class BB_Tetrahedron final : public FiniteElementBase

};

/**
* Tetrahedron element with Bernstein-Bézier basis functions of order 1.
*/
/// @copydoc BB_Tetrahedron_impl
template< int ORDER >
class BB_Tetrahedron final : public BB_Tetrahedron_impl< ORDER >, public FiniteElementBase
{
public:

/// The Implementation type
using ImplType = BB_Tetrahedron_impl< ORDER >;

/// The number of nodes per element.
using ImplType::numNodes;

/// The max number of support points per element.
using ImplType::maxSupportPoints;

/// The number of quadrature points per element.
using ImplType::numQuadraturePoints;

BB_Tetrahedron():
FiniteElementBase( numNodes,
maxSupportPoints,
numQuadraturePoints )
{ }

#ifdef __CUDACC__
#pragma diag_push
#pragma nv_diag_suppress 20012
#endif
GEOS_HOST_DEVICE
virtual ~BB_Tetrahedron() override final = default;
#ifdef __CUDACC__
#pragma diag_pop
#endif

/**
* @brief Get the device-compatible implementation type.
* @return A pointer to the device-compatible implementation type.
*/
ImplType * getImpl()
{
return static_cast< ImplType * >(this);
}

/**
* @brief Get the device-compatible implementation type.
* @return A pointer to the device-compatible implementation type.
*/
ImplType const * getImpl() const
{
return static_cast< ImplType const * >(this);
}

};

/// Tetrahedron element with Bernstein-Bézier basis functions of order 1.
using BB1_Tetrahedron = BB_Tetrahedron< 1 >;
/**
* Tetrahedron element with Bernstein-Bézier basis functions of order 2.
*/
/// Tetrahedron element with Bernstein-Bézier basis functions of order 2.
using BB2_Tetrahedron = BB_Tetrahedron< 2 >;
/**
* Tetrahedron element with Bernstein-Bézier basis functions of order 3.
*/
/// Tetrahedron element with Bernstein-Bézier basis functions of order 3.
using BB3_Tetrahedron = BB_Tetrahedron< 3 >;

//using BB4_Tetrahedron = BB_Tetrahedron< 4 >;
//using BB5_Tetrahedron = BB_Tetrahedron< 5 >;


/// Tetrahedron element with Bernstein-Bézier basis functions of order 1.
using BB1_Tetrahedron_impl = BB_Tetrahedron_impl< 1 >;
/// Tetrahedron element with Bernstein-Bézier basis functions of order 2.
using BB2_Tetrahedron_impl = BB_Tetrahedron_impl< 2 >;
/// Tetrahedron element with Bernstein-Bézier basis functions of order 3.
using BB3_Tetrahedron_impl = BB_Tetrahedron_impl< 3 >;

// using BB2_Tetrahedron_impl = BB_Tetrahedron_impl< 4 >;
// using BB3_Tetrahedron_impl = BB_Tetrahedron_impl< 5 >;

}
}

Expand Down
Loading
Loading