Skip to content

Commit

Permalink
move a host func out of a device func
Browse files Browse the repository at this point in the history
  • Loading branch information
sytuannguyen committed Aug 23, 2024
1 parent 89cf92e commit d2b1e2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
8 changes: 6 additions & 2 deletions src/coreComponents/constitutive/solid/PorousSolid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class PorousSolidUpdates : public CoupledSolidUpdates< SOLID_TYPE, BiotPorosity,
BiotPorosity const & porosityModel,
ConstantPermeability const & permModel
):
CoupledSolidUpdates< SOLID_TYPE, BiotPorosity, ConstantPermeability >( solidModel, porosityModel, permModel )
CoupledSolidUpdates< SOLID_TYPE, BiotPorosity, ConstantPermeability >( solidModel, porosityModel, permModel ),
m_drainedLinearTECTable( FunctionManager::getInstance().getGroup< TableFunction >( m_solidUpdate.getDrainedTECTableName() ))

Check warning on line 60 in src/coreComponents/constitutive/solid/PorousSolid.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/PorousSolid.hpp#L60

Added line #L60 was not covered by tests
{}

GEOS_HOST_DEVICE
Expand Down Expand Up @@ -320,7 +321,8 @@ class PorousSolidUpdates : public CoupledSolidUpdates< SOLID_TYPE, BiotPorosity,
}
else
{
TableFunction::KernelWrapper TECWrapper = m_solidUpdate.getTECTableWrapper();
m_drainedLinearTECTable.setInterpolationMethod( TableFunction::InterpolationType::Linear );
TableFunction::KernelWrapper const & TECWrapper = m_drainedLinearTECTable.createKernelWrapper();

Check warning on line 325 in src/coreComponents/constitutive/solid/PorousSolid.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/PorousSolid.hpp#L324-L325

Added lines #L324 - L325 were not covered by tests

real64 const tmpTemperatureArray[1] = {temperature};
real64 dTEC_dT[1] = {0};
Expand Down Expand Up @@ -361,6 +363,8 @@ class PorousSolidUpdates : public CoupledSolidUpdates< SOLID_TYPE, BiotPorosity,

}

private:
TableFunction & m_drainedLinearTECTable;
};

/**
Expand Down
14 changes: 0 additions & 14 deletions src/coreComponents/constitutive/solid/SolidBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,6 @@ class SolidBaseUpdates
return m_drainedTECTableName;

Check warning on line 173 in src/coreComponents/constitutive/solid/SolidBase.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/SolidBase.hpp#L173

Added line #L173 was not covered by tests
}

/**
* @brief Get get TEC Table Wrapper
* @return the TECTableWrapper
*/
GEOS_HOST_DEVICE
TableFunction::KernelWrapper getTECTableWrapper() const
{
FunctionManager & functionManager = FunctionManager::getInstance();
TableFunction & drainedLinearTECTable = functionManager.getGroup< TableFunction >( m_drainedTECTableName );
drainedLinearTECTable.setInterpolationMethod( TableFunction::InterpolationType::Linear );
return drainedLinearTECTable.createKernelWrapper();
}


/**
* @brief Get shear modulus
* @param[in] k Element index.
Expand Down

0 comments on commit d2b1e2a

Please sign in to comment.