Skip to content

Commit

Permalink
uncrustify
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertbk committed May 23, 2024
1 parent 9574a37 commit 9c8c5ee
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using namespace dataRepository;
using namespace fields;

AcousticTTIFletcherWaveEquationSEM::AcousticTTIFletcherWaveEquationSEM( const std::string & name,
Group * const parent ):
Group * const parent ):
WaveSolverBase( name,
parent )
{
Expand Down Expand Up @@ -130,7 +130,7 @@ void AcousticTTIFletcherWaveEquationSEM::postProcessInput()
}

void AcousticTTIFletcherWaveEquationSEM::precomputeSourceAndReceiverTerm( MeshLevel & mesh,
arrayView1d< string const > const & regionNames )
arrayView1d< string const > const & regionNames )
{
GEOS_MARK_FUNCTION;
NodeManager const & nodeManager = mesh.getNodeManager();
Expand Down Expand Up @@ -337,30 +337,30 @@ void AcousticTTIFletcherWaveEquationSEM::initializePostInitialConditionsPreSubGr
AcousticMatricesSEM::DampingMatrix< FE_TYPE > kernelD( finiteElement );
// Damping Matrices are computed as in the VTI case
kernelD.template computeVTIFletcherDampingMatrices< EXEC_POLICY, ATOMIC_POLICY >( elementSubRegion.size(),
nodeCoords,
elemsToFaces,
facesToNodes,
facesDomainBoundaryIndicator,
freeSurfaceFaceIndicator,
lateralSurfaceFaceIndicator,
bottomSurfaceFaceIndicator,
velocity,
density,
vti_epsilon,
vti_delta,
vti_sigma,
damping_pp,
damping_pq,
damping_qp,
damping_qq );
nodeCoords,
elemsToFaces,
facesToNodes,
facesDomainBoundaryIndicator,
freeSurfaceFaceIndicator,
lateralSurfaceFaceIndicator,
bottomSurfaceFaceIndicator,
velocity,
density,
vti_epsilon,
vti_delta,
vti_sigma,
damping_pp,
damping_pq,
damping_qp,
damping_qq );

} );
} );
} );

WaveSolverUtils::initTrace( "seismoTraceReceiver", getName(), m_outputSeismoTrace, m_receiverConstants.size( 0 ), m_receiverIsLocal );
m_seismoCoeff.resize(m_receiverIsLocal.size());
m_seismoCoeff.setValues< EXEC_POLICY >(0.5);
m_seismoCoeff.resize( m_receiverIsLocal.size());
m_seismoCoeff.setValues< EXEC_POLICY >( 0.5 );
}

void AcousticTTIFletcherWaveEquationSEM::precomputeSurfaceFieldIndicator( DomainPartition & domain )
Expand Down Expand Up @@ -537,10 +537,10 @@ void AcousticTTIFletcherWaveEquationSEM::applyPML( real64 const GEOS_UNUSED_PARA
}

real64 AcousticTTIFletcherWaveEquationSEM::explicitStepForward( real64 const & time_n,
real64 const & dt,
integer cycleNumber,
DomainPartition & domain,
bool computeGradient )
real64 const & dt,
integer cycleNumber,
DomainPartition & domain,
bool computeGradient )
{
real64 dtOut = explicitStepInternal( time_n, dt, cycleNumber, domain );

Expand Down Expand Up @@ -572,10 +572,10 @@ real64 AcousticTTIFletcherWaveEquationSEM::explicitStepForward( real64 const & t


real64 AcousticTTIFletcherWaveEquationSEM::explicitStepBackward( real64 const & GEOS_UNUSED_PARAM( time_n ),
real64 const & GEOS_UNUSED_PARAM( dt ),
integer GEOS_UNUSED_PARAM( cycleNumber ),
DomainPartition & GEOS_UNUSED_PARAM( domain ),
bool GEOS_UNUSED_PARAM( computeGradient ) )
real64 const & GEOS_UNUSED_PARAM( dt ),
integer GEOS_UNUSED_PARAM( cycleNumber ),
DomainPartition & GEOS_UNUSED_PARAM( domain ),
bool GEOS_UNUSED_PARAM( computeGradient ) )
{
GEOS_ERROR( "This option is not supported yet" );
return 0.;
Expand Down Expand Up @@ -615,12 +615,12 @@ void AcousticTTIFletcherWaveEquationSEM::prepareNextTimestep( MeshLevel & mesh )
}

void AcousticTTIFletcherWaveEquationSEM::computeUnknowns( real64 const & GEOS_UNUSED_PARAM( time_n ),
real64 const & dt,
integer cycleNumber,
DomainPartition & GEOS_UNUSED_PARAM( domain ),
MeshLevel & mesh,
arrayView1d< string const > const & regionNames,
bool const isForward )
real64 const & dt,
integer cycleNumber,
DomainPartition & GEOS_UNUSED_PARAM( domain ),
MeshLevel & mesh,
arrayView1d< string const > const & regionNames,
bool const isForward )
{
NodeManager & nodeManager = mesh.getNodeManager();

Expand All @@ -645,7 +645,7 @@ void AcousticTTIFletcherWaveEquationSEM::computeUnknowns( real64 const & GEOS_UN
arrayView1d< real32 > const stiffnessVector_q = nodeManager.getField< acousticvtifields::StiffnessVector_q >();
arrayView1d< real32 > const rhs = nodeManager.getField< acousticfields::ForcingRHS >();

if(isForward)
if( isForward )
{
auto kernelFactory = acousticTTIFletcherWaveEquationSEMKernels::ExplicitAcousticTTIFletcherSEMFactory( dt );

Expand All @@ -658,20 +658,21 @@ void AcousticTTIFletcherWaveEquationSEM::computeUnknowns( real64 const & GEOS_UN
"",
kernelFactory );
}
else{
//Adjoint
GEOS_ERROR( "This option is not supported yet" );
else
{
//Adjoint
GEOS_ERROR( "This option is not supported yet" );
/* auto kernelFactory = acousticTTIFletcherAdjointWaveEquationSEMKernels::ExplicitAdjointAcousticTTIFletcherSEMFactory( dt );
finiteElement::
finiteElement::
regionBasedKernelApplication< EXEC_POLICY,
constitutive::NullModel,
CellElementSubRegion >( mesh,
regionNames,
getDiscretizationName(),
"",
kernelFactory );
*/
*/
}
EventManager const & event = getGroupByPath< EventManager >( "/Problem/Events" );
real64 const & minTime = event.getReference< real64 >( EventManager::viewKeyStruct::minTimeString() );
Expand All @@ -695,11 +696,11 @@ void AcousticTTIFletcherWaveEquationSEM::computeUnknowns( real64 const & GEOS_UN
}

void AcousticTTIFletcherWaveEquationSEM::synchronizeUnknowns( real64 const & time_n,
real64 const & dt,
integer const,
DomainPartition & domain,
MeshLevel & mesh,
arrayView1d< string const > const & )
real64 const & dt,
integer const,
DomainPartition & domain,
MeshLevel & mesh,
arrayView1d< string const > const & )
{
NodeManager & nodeManager = mesh.getNodeManager();

Expand Down Expand Up @@ -741,10 +742,10 @@ void AcousticTTIFletcherWaveEquationSEM::synchronizeUnknowns( real64 const & tim
}

real64 AcousticTTIFletcherWaveEquationSEM::explicitStepInternal( real64 const & time_n,
real64 const & dt,
integer const cycleNumber,
DomainPartition & domain,
bool const ifForward )
real64 const & dt,
integer const cycleNumber,
DomainPartition & domain,
bool const ifForward )
{
GEOS_MARK_FUNCTION;

Expand All @@ -762,10 +763,10 @@ real64 AcousticTTIFletcherWaveEquationSEM::explicitStepInternal( real64 const &
}

void AcousticTTIFletcherWaveEquationSEM::cleanup( real64 const time_n,
integer const cycleNumber,
integer const eventCounter,
real64 const eventProgress,
DomainPartition & domain )
integer const cycleNumber,
integer const eventCounter,
real64 const eventProgress,
DomainPartition & domain )
{
// call the base class cleanup (for reporting purposes)
SolverBase::cleanup( time_n, cycleNumber, eventCounter, eventProgress, domain );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AcousticTTIFletcherWaveEquationSEM : public WaveSolverBase
using ATOMIC_POLICY = AtomicPolicy< EXEC_POLICY >;

AcousticTTIFletcherWaveEquationSEM( const std::string & name,
Group * const parent );
Group * const parent );

virtual ~AcousticTTIFletcherWaveEquationSEM() override;

Expand Down Expand Up @@ -177,7 +177,7 @@ class AcousticTTIFletcherWaveEquationSEM : public WaveSolverBase

/// Pressure_np1 at the receiver location for each time step for each receiver
array2d< real32 > m_pressureNp1AtReceivers;

/// Array of size the number of receivers and full of 0.5 (used for calculating the seismos)
array1d< real32 > m_seismoCoeff;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ template< typename SUBREGION_TYPE,
typename CONSTITUTIVE_TYPE,
typename FE_TYPE >
class ExplicitAcousticTTIFletcherSEM : public finiteElement::KernelBase< SUBREGION_TYPE,
CONSTITUTIVE_TYPE,
FE_TYPE,
1,
1 >
CONSTITUTIVE_TYPE,
FE_TYPE,
1,
1 >
{
public:

Expand Down Expand Up @@ -94,13 +94,13 @@ class ExplicitAcousticTTIFletcherSEM : public finiteElement::KernelBase< SUBREGI
* elements to be processed during this kernel launch.
*/
ExplicitAcousticTTIFletcherSEM( NodeManager & nodeManager,
EdgeManager const & edgeManager,
FaceManager const & faceManager,
localIndex const targetRegionIndex,
SUBREGION_TYPE const & elementSubRegion,
FE_TYPE const & finiteElementSpace,
CONSTITUTIVE_TYPE & inputConstitutiveType,
real64 const dt ):
EdgeManager const & edgeManager,
FaceManager const & faceManager,
localIndex const targetRegionIndex,
SUBREGION_TYPE const & elementSubRegion,
FE_TYPE const & finiteElementSpace,
CONSTITUTIVE_TYPE & inputConstitutiveType,
real64 const dt ):
Base( elementSubRegion,
finiteElementSpace,
inputConstitutiveType ),
Expand Down Expand Up @@ -147,7 +147,7 @@ class ExplicitAcousticTTIFletcherSEM : public finiteElement::KernelBase< SUBREGI
real32 vti_epsi; // (1 + 2*epsilon)
real32 vti_2delta; // 2*delta
real32 vti_f; // f parameter
real32 tti_tilt; //TTI tilt angle
real32 tti_tilt; //TTI tilt angle
real32 tti_azimuth; //TTI azimuth angle
};
//***************************************************************************
Expand Down Expand Up @@ -308,7 +308,7 @@ class ExplicitAcousticTTIFletcherSEM : public finiteElement::KernelBase< SUBREGI

/// The factory used to construct a ExplicitAcousticWaveEquation kernel.
using ExplicitAcousticTTIFletcherSEMFactory = finiteElement::KernelFactory< ExplicitAcousticTTIFletcherSEM,
real64 >;
real64 >;


} // namespace acousticTTIFletcherWaveEquationSEMKernels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ void AcousticTTIZhangWaveEquationSEM::initializePostInitialConditionsPreSubGroup
} );

WaveSolverUtils::initTrace( "seismoTraceReceiver", getName(), m_outputSeismoTrace, m_receiverConstants.size( 0 ), m_receiverIsLocal );
m_seismoCoeff.resize(m_receiverIsLocal.size());
m_seismoCoeff.setValues< EXEC_POLICY >(0.5);
m_seismoCoeff.resize( m_receiverIsLocal.size());
m_seismoCoeff.setValues< EXEC_POLICY >( 0.5 );
}

void AcousticTTIZhangWaveEquationSEM::precomputeSurfaceFieldIndicator( DomainPartition & domain )
Expand Down Expand Up @@ -642,7 +642,7 @@ void AcousticTTIZhangWaveEquationSEM::computeUnknowns( real64 const & GEOS_UNUSE
arrayView1d< real32 > const stiffnessVector_q = nodeManager.getField< acousticvtifields::StiffnessVector_q >();
arrayView1d< real32 > const rhs = nodeManager.getField< acousticfields::ForcingRHS >();

if(isForward)
if( isForward )
{
auto kernelFactory = acousticTTIZhangWaveEquationSEMKernels::ExplicitAcousticTTIZhangSEMFactory( dt );

Expand All @@ -655,20 +655,21 @@ void AcousticTTIZhangWaveEquationSEM::computeUnknowns( real64 const & GEOS_UNUSE
"",
kernelFactory );
}
else{
//Adjoint
GEOS_ERROR( "This option is not supported yet" );
else
{
//Adjoint
GEOS_ERROR( "This option is not supported yet" );
/* auto kernelFactory = acousticTTIZhangAdjointWaveEquationSEMKernels::ExplicitAdjointAcousticTTIZhangSEMFactory( dt );
finiteElement::
finiteElement::
regionBasedKernelApplication< EXEC_POLICY,
constitutive::NullModel,
CellElementSubRegion >( mesh,
regionNames,
getDiscretizationName(),
"",
kernelFactory );
*/
*/
}
EventManager const & event = getGroupByPath< EventManager >( "/Problem/Events" );
real64 const & minTime = event.getReference< real64 >( EventManager::viewKeyStruct::minTimeString() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class AcousticTTIZhangWaveEquationSEM : public WaveSolverBase

/// Pressure_np1 at the receiver location for each time step for each receiver
array2d< real32 > m_pressureNp1AtReceivers;

/// Array of size the number of receivers and full of 0.5 (used for calculating the seismos)
array1d< real32 > m_seismoCoeff;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class ExplicitAcousticTTIZhangSEM : public finiteElement::KernelBase< SUBREGION_
real32 invDensity;
real32 vti_epsi; // (1 + 2*epsilon)
real32 vti_sqrtDelta; // sqrt(1 + 2*delta)
real32 tti_tilt; //TTI tilt angle
real32 tti_tilt; //TTI tilt angle
real32 tti_azimuth; //TTI azimuth angle
};
//***************************************************************************
Expand Down

0 comments on commit 9c8c5ee

Please sign in to comment.