From 44e9eedc3b709058960fe3bcb57ef90bc0016362 Mon Sep 17 00:00:00 2001 From: DENEL Bertrand Date: Tue, 10 Dec 2024 20:42:29 -0600 Subject: [PATCH] Fixed compilation errors. --- .../wavePropagation/acous3D_vti_smoke.xml | 2 +- ...TIFletcherAdjointWaveEquationSEMKernel.hpp | 26 +++++++-------- .../AcousticVTIFletcherWaveEquationSEM.cpp | 32 ++++++++++--------- .../AcousticVTIFletcherWaveEquationSEM.hpp | 2 ++ ...ousticVTIFletcherWaveEquationSEMKernel.hpp | 25 ++++++++------- ...icVTIZhangAdjointWaveEquationSEMKernel.hpp | 24 +++++++------- .../AcousticVTIZhangWaveEquationSEM.cpp | 30 ++++++++--------- .../AcousticVTIZhangWaveEquationSEM.hpp | 2 ++ .../AcousticVTIZhangWaveEquationSEMKernel.hpp | 22 +++++++------ 9 files changed, 88 insertions(+), 77 deletions(-) diff --git a/inputFiles/wavePropagation/acous3D_vti_smoke.xml b/inputFiles/wavePropagation/acous3D_vti_smoke.xml index 4305ac12319..02aaa88d916 100644 --- a/inputFiles/wavePropagation/acous3D_vti_smoke.xml +++ b/inputFiles/wavePropagation/acous3D_vti_smoke.xml @@ -89,7 +89,7 @@ - -class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, +class ExplicitAcousticVTIFletcherAdjointSEM : public finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, 1, @@ -93,7 +93,7 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, * @param dt The time interval for the step. * elements to be processed during this kernel launch. */ - ExplicitAcousticSEM( NodeManager & nodeManager, + ExplicitAcousticVTIFletcherAdjointSEM( NodeManager & nodeManager, EdgeManager const & edgeManager, FaceManager const & faceManager, localIndex const targetRegionIndex, @@ -105,14 +105,14 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_p_n( nodeManager.getField< acousticvtifields::Pressure_p_n >() ), - m_q_n( nodeManager.getField< acousticvtifields::Pressure_q_n >() ), - m_stiffnessVector_p( nodeManager.getField< acousticvtifields::StiffnessVector_p >() ), - m_stiffnessVector_q( nodeManager.getField< acousticvtifields::StiffnessVector_q >() ), - m_density( elementSubRegion.template getField< acousticfields::AcousticDensity >() ), - m_vti_epsilon( elementSubRegion.template getField< acousticvtifields::AcousticEpsilon >() ), - m_vti_delta( elementSubRegion.template getField< acousticvtifields::AcousticDelta >() ), - m_vti_sigma( elementSubRegion.template getField< acousticvtifields::AcousticSigma >() ), + m_p_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_p_n >() ), + m_q_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_q_n >() ), + m_stiffnessVector_p( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_p >() ), + m_stiffnessVector_q( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_q >() ), + m_density( elementSubRegion.template getField< geos::fields::acousticfields::AcousticDensity >() ), + m_vti_epsilon( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticEpsilon >() ), + m_vti_delta( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticDelta >() ), + m_vti_sigma( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticSigma >() ), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager ); @@ -276,7 +276,7 @@ using ExplicitAcousticVTIFletcherAdjointSEMFactory = finiteElement::KernelFactor real64 >; -} // namespace acousticVTIFletcherWaveEquationSEMKernels +} // namespace acousticVTIFletcherAdjointWaveEquationSEMKernels } // namespace geos diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.cpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.cpp index 236b9a8be9d..13dc9ba770e 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.cpp @@ -376,6 +376,10 @@ real64 AcousticVTIFletcherWaveEquationSEM::computeTimeStep( real64 & dtOut ) { // TODO: adapt to VTI GEOS_ERROR( "This option (Time Step computation) is not supported" ); + dtOut = 0.; + + return m_timeStep * m_cflFactor; + } @@ -391,14 +395,14 @@ void AcousticVTIFletcherWaveEquationSEM::precomputeSurfaceFieldIndicator( Domain ArrayOfArraysView< localIndex const > const faceToNodeMap = faceManager.nodeList().toViewConst(); /// array of indicators: 1 if a face is on on lateral surface; 0 otherwise - arrayView1d< localIndex > const lateralSurfaceFaceIndicator = faceManager.getField< acoustivtifields::AcousticLateralSurfaceFaceIndicator >(); + arrayView1d< localIndex > const lateralSurfaceFaceIndicator = faceManager.getField< acousticvtifields::AcousticLateralSurfaceFaceIndicator >(); /// array of indicators: 1 if a node is on on lateral surface; 0 otherwise - arrayView1d< localIndex > const lateralSurfaceNodeIndicator = nodeManager.getField< acoustivtifields::AcousticLateralSurfaceNodeIndicator >(); + arrayView1d< localIndex > const lateralSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticLateralSurfaceNodeIndicator >(); /// array of indicators: 1 if a face is on on bottom surface; 0 otherwise - arrayView1d< localIndex > const bottomSurfaceFaceIndicator = faceManager.getField< acoustivtifields::AcousticBottomSurfaceFaceIndicator >(); + arrayView1d< localIndex > const bottomSurfaceFaceIndicator = faceManager.getField< acousticvtifields::AcousticBottomSurfaceFaceIndicator >(); /// array of indicators: 1 if a node is on on bottom surface; 0 otherwise - arrayView1d< localIndex > const bottomSurfaceNodeIndicator = nodeManager.getField< acoustivtifields::AcousticBottomSurfaceNodeIndicator >(); + arrayView1d< localIndex > const bottomSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticBottomSurfaceNodeIndicator >(); // Lateral surfaces fsManager.apply< FaceManager >( time, @@ -544,8 +548,9 @@ void AcousticVTIFletcherWaveEquationSEM::initializePML() void AcousticVTIFletcherWaveEquationSEM::applyPML( real64 const time, DomainPartition & domain ) { + GEOS_UNUSED_VAR(time, domain); GEOS_MARK_FUNCTION; - +#if 0 FieldSpecificationManager & fsManager = FieldSpecificationManager::getInstance(); parametersPML const & param = getReference< parametersPML >( viewKeyStruct::parametersPMLString() ); @@ -617,6 +622,7 @@ void AcousticVTIFletcherWaveEquationSEM::applyPML( real64 const time, DomainPart using FE_TYPE = TYPEOFREF( finiteElement ); /// apply the PML kernel + AcousticPMLSEM:: PMLKernel< FE_TYPE > kernel( finiteElement ); kernel.template launch< EXEC_POLICY, ATOMIC_POLICY > @@ -636,10 +642,11 @@ void AcousticVTIFletcherWaveEquationSEM::applyPML( real64 const time, DomainPart r, grad_n, divV_n ); + } ); } ); } ); - +#endif } real64 AcousticVTIFletcherWaveEquationSEM::explicitStepForward( real64 const & time_n, @@ -687,7 +694,7 @@ real64 AcousticVTIFletcherWaveEquationSEM::explicitStepBackward( real64 const & forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &, MeshLevel & mesh, - arrayView1d< string const > const & regionNames ) + arrayView1d< string const > const & GEOS_UNUSED_PARAM( regionNames ) ) { NodeManager & nodeManager = mesh.getNodeManager(); @@ -705,6 +712,7 @@ real64 AcousticVTIFletcherWaveEquationSEM::explicitStepBackward( real64 const & EventManager const & event = getGroupByPath< EventManager >( "/Problem/Events" ); real64 const & maxTime = event.getReference< real64 >( EventManager::viewKeyStruct::maxTimeString() ); int const maxCycle = int(round( maxTime / dt )); + GEOS_UNUSED_VAR(maxCycle); if( computeGradient && cycleNumber >= 0 ) { @@ -752,7 +760,7 @@ void AcousticVTIFletcherWaveEquationSEM::prepareNextTimestep( MeshLevel & mesh ) void AcousticVTIFletcherWaveEquationSEM::computeUnknowns( real64 const & time_n, real64 const & dt, - DomainPartition & domain, + DomainPartition & GEOS_UNUSED_PARAM( domain), MeshLevel & mesh, arrayView1d< string const > const & regionNames, bool const isForward ) @@ -773,10 +781,6 @@ void AcousticVTIFletcherWaveEquationSEM::computeUnknowns( real64 const & time_n, arrayView1d< real32 > const q_n = nodeManager.getField< acousticvtifields::Pressure_q_n >(); arrayView1d< real32 > const q_np1 = nodeManager.getField< acousticvtifields::Pressure_q_np1 >(); - arrayView1d< real32 > const p_nm1 = nodeManager.getField< acousticfields::Pressure_nm1 >(); - arrayView1d< real32 > const p_n = nodeManager.getField< acousticfields::Pressure_n >(); - arrayView1d< real32 > const p_np1 = nodeManager.getField< acousticfields::Pressure_np1 >(); - arrayView1d< localIndex const > const freeSurfaceNodeIndicator = nodeManager.getField< acousticfields::AcousticFreeSurfaceNodeIndicator >(); arrayView1d< localIndex const > const lateralSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticLateralSurfaceNodeIndicator >(); arrayView1d< localIndex const > const bottomSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticBottomSurfaceNodeIndicator >(); @@ -813,14 +817,12 @@ if( isForward ) //Modification of cycleNember useful when minTime < 0 addSourceToRightHandSide( time_n, rhs ); - /// calculate your time integrators - real64 const dt2 = pow( dt, 2 ); SortedArrayView< localIndex const > const solverTargetNodesSet = m_solverTargetNodesSet.toViewConst(); if( !m_usePML ) { GEOS_MARK_SCOPE ( updateP ); - AcousticTimeSchemeSEM::LeapFrogWithoutPML( dt, p_np1, p_n, p_nm1, mass, stiffnessVector, damping, + AcousticTimeSchemeSEM::LeapFrogWithoutPML( dt, p_np1, p_n, p_nm1, mass, stiffnessVector_p, damping_pp, rhs, freeSurfaceNodeIndicator, solverTargetNodesSet ); } else diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.hpp index 37a531b90cc..e5524f2815b 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEM.hpp @@ -172,6 +172,8 @@ class AcousticVTIFletcherWaveEquationSEM : public WaveSolverBase */ virtual void applyPML( real64 const time, DomainPartition & domain ) override; + void precomputeSurfaceFieldIndicator( DomainPartition & domain ); + /// Pressure_np1 at the receiver location for each time step for each receiver array2d< real32 > m_pressureNp1AtReceivers; diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEMKernel.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEMKernel.hpp index 3ae04ae309a..bd49cc2bfa5 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEMKernel.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIFletcherWaveEquationSEMKernel.hpp @@ -55,14 +55,13 @@ namespace acousticVTIFletcherWaveEquationSEMKernels template< typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE > -class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, +class ExplicAcousticVTIFletcherWaveEquationSEM : public finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, 1, 1 > { public: - /// Alias for the base class; using Base = finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, @@ -81,6 +80,8 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, using Base::m_elemGhostRank; using Base::m_constitutiveUpdate; using Base::m_finiteElementSpace; + + //***************************************************************************** /** @@ -93,7 +94,7 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, * @param dt The time interval for the step. * elements to be processed during this kernel launch. */ - ExplicitAcousticSEM( NodeManager & nodeManager, + ExplicAcousticVTIFletcherWaveEquationSEM ( NodeManager & nodeManager, EdgeManager const & edgeManager, FaceManager const & faceManager, localIndex const targetRegionIndex, @@ -105,14 +106,14 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_p_n( nodeManager.getField< acousticvtifields::Pressure_p_n >() ), - m_q_n( nodeManager.getField< acousticvtifields::Pressure_q_n >() ), - m_stiffnessVector_p( nodeManager.getField< acousticvtifields::StiffnessVector_p >() ), - m_stiffnessVector_q( nodeManager.getField< acousticvtifields::StiffnessVector_q >() ), - m_density( elementSubRegion.template getField< acousticfields::AcousticDensity >() ), - m_vti_epsilon( elementSubRegion.template getField< acousticvtifields::AcousticEpsilon >() ), - m_vti_delta( elementSubRegion.template getField< acousticvtifields::AcousticDelta >() ), - m_vti_sigma( elementSubRegion.template getField< acousticvtifields::AcousticSigma >() ), + m_p_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_p_n >() ), + m_q_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_q_n >() ), + m_stiffnessVector_p( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_p >() ), + m_stiffnessVector_q( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_q >() ), + m_density( elementSubRegion.template getField< geos::fields::acousticfields::AcousticDensity >() ), + m_vti_epsilon( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticEpsilon >() ), + m_vti_delta( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticDelta >() ), + m_vti_sigma( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticSigma >() ), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager ); @@ -267,7 +268,7 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, /// The factory used to construct a ExplicitAcousticVTIFletcher kernel. -using ExplicitAcousticVTIFletcherSEMFactory = finiteElement::KernelFactory< ExplicitAcousticVTIFletcherSEM, +using ExplicitAcousticVTIFletcherSEMFactory = finiteElement::KernelFactory< ExplicAcousticVTIFletcherWaveEquationSEM , real64 >; diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangAdjointWaveEquationSEMKernel.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangAdjointWaveEquationSEMKernel.hpp index 08c5c0d9f15..af4ae60179f 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangAdjointWaveEquationSEMKernel.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangAdjointWaveEquationSEMKernel.hpp @@ -14,7 +14,7 @@ */ /** - * @file AcousticVTIZhangWaveEquationSEMKernel.hpp + * @file AcousticVTIZhangAdjointWaveEquationSEMKernel.hpp */ #ifndef GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_ACOUSTICVTIZHANGADJOINTWAVEEQUATIONSEMKERNEL_HPP_ @@ -32,7 +32,7 @@ namespace geos { /// Namespace to contain the acoustic wave kernels. -namespace acousticVTIZhangWaveEquationSEMKernels +namespace acousticVTIZhangAdjointWaveEquationSEMKernels { /** @@ -55,7 +55,7 @@ namespace acousticVTIZhangWaveEquationSEMKernels template< typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE > -class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, +class ExplicitAcousticVTIZhangAdjointSEM : public finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, 1, @@ -93,7 +93,7 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, * @param dt The time interval for the step. * elements to be processed during this kernel launch. */ - ExplicitAcousticSEM( NodeManager & nodeManager, + ExplicitAcousticVTIZhangAdjointSEM( NodeManager & nodeManager, EdgeManager const & edgeManager, FaceManager const & faceManager, localIndex const targetRegionIndex, @@ -105,13 +105,13 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_p_n( nodeManager.getField< acousticvtifields::Pressure_p_n >() ), - m_q_n( nodeManager.getField< acousticvtifields::Pressure_q_n >() ), - m_stiffnessVector_p( nodeManager.getField< acousticvtifields::StiffnessVector_p >() ), - m_stiffnessVector_q( nodeManager.getField< acousticvtifields::StiffnessVector_q >() ), - m_density( elementSubRegion.template getField< acousticfields::AcousticDensity >() ), - m_vti_epsilon( elementSubRegion.template getField< acousticvtifields::AcousticEpsilon >() ), - m_vti_delta( elementSubRegion.template getField< acousticvtifields::AcousticDelta >() ), + m_p_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_p_n >() ), + m_q_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_q_n >() ), + m_stiffnessVector_p( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_p >() ), + m_stiffnessVector_q( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_q >() ), + m_density( elementSubRegion.template getField< geos::fields::acousticfields::AcousticDensity >() ), + m_vti_epsilon( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticEpsilon >() ), + m_vti_delta( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticDelta >() ), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager ); @@ -265,7 +265,7 @@ using ExplicitAcousticVTIZhangAdjointSEMFactory = finiteElement::KernelFactory< real64 >; -} // namespace acousticVTIZhangWaveEquationSEMKernels +} // namespace acousticVTIZhangAdjointWaveEquationSEMKernels } // namespace geos diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.cpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.cpp index 3879e3e6748..29dc5e4b2b1 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.cpp @@ -374,6 +374,10 @@ real64 AcousticVTIZhangWaveEquationSEM::computeTimeStep( real64 & dtOut ) { // TODO: adapt to VTI GEOS_ERROR( "This option (Time Step computation) is not supported" ); + + dtOut = 0.; + + return m_timeStep * m_cflFactor; } @@ -389,14 +393,14 @@ void AcousticVTIZhangWaveEquationSEM::precomputeSurfaceFieldIndicator( DomainPar ArrayOfArraysView< localIndex const > const faceToNodeMap = faceManager.nodeList().toViewConst(); /// array of indicators: 1 if a face is on on lateral surface; 0 otherwise - arrayView1d< localIndex > const lateralSurfaceFaceIndicator = faceManager.getField< acoustivtifields::AcousticLateralSurfaceFaceIndicator >(); + arrayView1d< localIndex > const lateralSurfaceFaceIndicator = faceManager.getField< acousticvtifields::AcousticLateralSurfaceFaceIndicator >(); /// array of indicators: 1 if a node is on on lateral surface; 0 otherwise - arrayView1d< localIndex > const lateralSurfaceNodeIndicator = nodeManager.getField< acoustivtifields::AcousticLateralSurfaceNodeIndicator >(); + arrayView1d< localIndex > const lateralSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticLateralSurfaceNodeIndicator >(); /// array of indicators: 1 if a face is on on bottom surface; 0 otherwise - arrayView1d< localIndex > const bottomSurfaceFaceIndicator = faceManager.getField< acoustivtifields::AcousticBottomSurfaceFaceIndicator >(); + arrayView1d< localIndex > const bottomSurfaceFaceIndicator = faceManager.getField< acousticvtifields::AcousticBottomSurfaceFaceIndicator >(); /// array of indicators: 1 if a node is on on bottom surface; 0 otherwise - arrayView1d< localIndex > const bottomSurfaceNodeIndicator = nodeManager.getField< acoustivtifields::AcousticBottomSurfaceNodeIndicator >(); + arrayView1d< localIndex > const bottomSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticBottomSurfaceNodeIndicator >(); // Lateral surfaces fsManager.apply< FaceManager >( time, @@ -543,7 +547,9 @@ void AcousticVTIZhangWaveEquationSEM::initializePML() void AcousticVTIZhangWaveEquationSEM::applyPML( real64 const time, DomainPartition & domain ) { GEOS_MARK_FUNCTION; + GEOS_UNUSED_VAR(time, domain); +#if 0 FieldSpecificationManager & fsManager = FieldSpecificationManager::getInstance(); parametersPML const & param = getReference< parametersPML >( viewKeyStruct::parametersPMLString() ); @@ -637,7 +643,7 @@ void AcousticVTIZhangWaveEquationSEM::applyPML( real64 const time, DomainPartiti } ); } ); } ); - +#endif } real64 AcousticVTIZhangWaveEquationSEM::explicitStepForward( real64 const & time_n, @@ -685,7 +691,7 @@ real64 AcousticVTIZhangWaveEquationSEM::explicitStepBackward( real64 const & tim forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &, MeshLevel & mesh, - arrayView1d< string const > const & regionNames ) + arrayView1d< string const > const & GEOS_UNUSED_PARAM( regionNames ) ) { NodeManager & nodeManager = mesh.getNodeManager(); @@ -703,6 +709,7 @@ real64 AcousticVTIZhangWaveEquationSEM::explicitStepBackward( real64 const & tim EventManager const & event = getGroupByPath< EventManager >( "/Problem/Events" ); real64 const & maxTime = event.getReference< real64 >( EventManager::viewKeyStruct::maxTimeString() ); int const maxCycle = int(round( maxTime / dt )); + GEOS_UNUSED_VAR(maxCycle); if( computeGradient && cycleNumber >= 0 ) { @@ -750,7 +757,7 @@ void AcousticVTIZhangWaveEquationSEM::prepareNextTimestep( MeshLevel & mesh ) void AcousticVTIZhangWaveEquationSEM::computeUnknowns( real64 const & time_n, real64 const & dt, - DomainPartition & domain, + DomainPartition & GEOS_UNUSED_PARAM( domain ), MeshLevel & mesh, arrayView1d< string const > const & regionNames, bool const isForward ) @@ -771,10 +778,6 @@ void AcousticVTIZhangWaveEquationSEM::computeUnknowns( real64 const & time_n, arrayView1d< real32 > const q_n = nodeManager.getField< acousticvtifields::Pressure_q_n >(); arrayView1d< real32 > const q_np1 = nodeManager.getField< acousticvtifields::Pressure_q_np1 >(); - arrayView1d< real32 > const p_nm1 = nodeManager.getField< acousticfields::Pressure_nm1 >(); - arrayView1d< real32 > const p_n = nodeManager.getField< acousticfields::Pressure_n >(); - arrayView1d< real32 > const p_np1 = nodeManager.getField< acousticfields::Pressure_np1 >(); - arrayView1d< localIndex const > const freeSurfaceNodeIndicator = nodeManager.getField< acousticfields::AcousticFreeSurfaceNodeIndicator >(); arrayView1d< localIndex const > const lateralSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticLateralSurfaceNodeIndicator >(); arrayView1d< localIndex const > const bottomSurfaceNodeIndicator = nodeManager.getField< acousticvtifields::AcousticBottomSurfaceNodeIndicator >(); @@ -811,14 +814,11 @@ if( isForward ) //Modification of cycleNember useful when minTime < 0 addSourceToRightHandSide( time_n, rhs ); - /// calculate your time integrators - real64 const dt2 = pow( dt, 2 ); - SortedArrayView< localIndex const > const solverTargetNodesSet = m_solverTargetNodesSet.toViewConst(); if( !m_usePML ) { GEOS_MARK_SCOPE ( updateP ); - AcousticTimeSchemeSEM::LeapFrogWithoutPML( dt, p_np1, p_n, p_nm1, mass, stiffnessVector, damping, + AcousticTimeSchemeSEM::LeapFrogWithoutPML( dt, p_np1, p_n, p_nm1, mass, stiffnessVector_p, damping_pp, rhs, freeSurfaceNodeIndicator, solverTargetNodesSet ); } else diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.hpp index d9dc6a9ffb4..d60de8af4dd 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEM.hpp @@ -90,6 +90,8 @@ class AcousticVTIZhangWaveEquationSEM : public WaveSolverBase */ virtual void addSourceToRightHandSide( real64 const & time_n, arrayView1d< real32 > const rhs ); + void precomputeSurfaceFieldIndicator( DomainPartition & domain ); + /** * @brief Initialize Perfectly Matched Layer (PML) information diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEMKernel.hpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEMKernel.hpp index c81d0659c1a..c2cc8e1b669 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEMKernel.hpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIZhangWaveEquationSEMKernel.hpp @@ -35,6 +35,7 @@ namespace geos namespace acousticVTIZhangWaveEquationSEMKernels { + /** * @brief Implements kernels for solving the pseudo-acoustic VTI wave equations * explicit central FD method and SEM @@ -55,7 +56,7 @@ namespace acousticVTIZhangWaveEquationSEMKernels template< typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE > -class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, +class ExplicitAcousticVTIZhangSEM : public finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, 1, @@ -82,6 +83,9 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, using Base::m_constitutiveUpdate; using Base::m_finiteElementSpace; + + + //***************************************************************************** /** * @brief Constructor @@ -93,7 +97,7 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, * @param dt The time interval for the step. * elements to be processed during this kernel launch. */ - ExplicitAcousticSEM( NodeManager & nodeManager, + ExplicitAcousticVTIZhangSEM( NodeManager & nodeManager, EdgeManager const & edgeManager, FaceManager const & faceManager, localIndex const targetRegionIndex, @@ -105,13 +109,13 @@ class ExplicitAcousticSEM : public finiteElement::KernelBase< SUBREGION_TYPE, finiteElementSpace, inputConstitutiveType ), m_nodeCoords( nodeManager.getField< fields::referencePosition32 >() ), - m_p_n( nodeManager.getField< acousticvtifields::Pressure_p_n >() ), - m_q_n( nodeManager.getField< acousticvtifields::Pressure_q_n >() ), - m_stiffnessVector_p( nodeManager.getField< acousticvtifields::StiffnessVector_p >() ), - m_stiffnessVector_q( nodeManager.getField< acousticvtifields::StiffnessVector_q >() ), - m_density( elementSubRegion.template getField< acousticfields::AcousticDensity >() ), - m_vti_epsilon( elementSubRegion.template getField< acousticvtifields::AcousticEpsilon >() ), - m_vti_delta( elementSubRegion.template getField< acousticvtifields::AcousticDelta >() ), + m_p_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_p_n >() ), + m_q_n( nodeManager.getField< geos::fields::acousticvtifields::Pressure_q_n >() ), + m_stiffnessVector_p( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_p >() ), + m_stiffnessVector_q( nodeManager.getField< geos::fields::acousticvtifields::StiffnessVector_q >() ), + m_density( elementSubRegion.template getField< geos::fields::acousticfields::AcousticDensity >() ), + m_vti_epsilon( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticEpsilon >() ), + m_vti_delta( elementSubRegion.template getField< geos::fields::acousticvtifields::AcousticDelta >() ), m_dt( dt ) { GEOS_UNUSED_VAR( edgeManager );