Skip to content

Commit

Permalink
fix unit tests compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tjb-ltk committed Jan 13, 2025
1 parent 75c359b commit 3d43c09
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 147 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "common/DataTypes.hpp"
#include "common/GEOS_RAJA_Interface.hpp"
#include "constitutive/fluid/singlefluid/SingleFluidLayouts.hpp"

namespace geos
{
Expand All @@ -48,25 +49,6 @@ struct MobilityKernel
dMob_dPres = dDens_dP / visc - mob / visc * dVisc_dP; // tjb keep
}

// Thermal version
GEOS_HOST_DEVICE
inline
static void
old_compute( real64 const & dens,
real64 const & dDens_dP, // tjb
real64 const & dDens_dT, // tjb
real64 const & visc,
real64 const & dVisc_dP, // tjb
real64 const & dVisc_dT, // tjb
real64 & mob,
real64 & dMob_dPres,
real64 & dMob_dTemp )
{
mob = dens / visc;
dMob_dPres = dDens_dP / visc - mob / visc * dVisc_dP;
dMob_dTemp = dDens_dT / visc - mob / visc * dVisc_dT;
}

// Value-only (no derivatives) version
GEOS_HOST_DEVICE
inline
Expand Down
63 changes: 60 additions & 3 deletions src/coreComponents/schema/schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@
<xsd:selector xpath="SolidMechanicsLagrangeContact" />
<xsd:field xpath="@name" />
</xsd:unique>
<xsd:unique name="SolversSolidMechanicsLagrangeContactBubbleStabUniqueName">
<xsd:selector xpath="SolidMechanicsLagrangeContactBubbleStab" />
<xsd:field xpath="@name" />
</xsd:unique>
<xsd:unique name="SolversSolidMechanicsLagrangianSSLEUniqueName">
<xsd:selector xpath="SolidMechanicsLagrangianSSLE" />
<xsd:field xpath="@name" />
Expand Down Expand Up @@ -2149,7 +2153,7 @@ the relative residual norm satisfies:
<xsd:attribute name="levelNames" type="string_array" default="{}" />
<!--logLevel => Log level-->
<xsd:attribute name="logLevel" type="integer" default="0" />
<!--numberOfTargetProcesses => Aggregate output data to be written.-->
<!--numberOfTargetProcesses => Number of output aggregate files to be written.-->
<xsd:attribute name="numberOfTargetProcesses" type="integer" default="1" />
<!--onlyPlotSpecifiedFieldNames => If this flag is equal to 1, then we only plot the fields listed in `fieldNames`. Otherwise, we plot all the fields with the required `plotLevel`, plus the fields listed in `fieldNames`-->
<xsd:attribute name="onlyPlotSpecifiedFieldNames" type="integer" default="0" />
Expand Down Expand Up @@ -2230,6 +2234,7 @@ the relative residual norm satisfies:
<xsd:element name="SolidMechanicsAugmentedLagrangianContact" type="SolidMechanicsAugmentedLagrangianContactType" />
<xsd:element name="SolidMechanicsEmbeddedFractures" type="SolidMechanicsEmbeddedFracturesType" />
<xsd:element name="SolidMechanicsLagrangeContact" type="SolidMechanicsLagrangeContactType" />
<xsd:element name="SolidMechanicsLagrangeContactBubbleStab" type="SolidMechanicsLagrangeContactBubbleStabType" />
<xsd:element name="SolidMechanicsLagrangianSSLE" type="SolidMechanicsLagrangianSSLEType" />
<xsd:element name="SolidMechanics_LagrangianFEM" type="SolidMechanics_LagrangianFEMType" />
<xsd:element name="SolidMechanics_MPM" type="SolidMechanics_MPMType" />
Expand Down Expand Up @@ -3156,7 +3161,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m
<!--maxNumResolves => Value to indicate how many resolves may be executed to perform surface generation after the execution of flow and mechanics solver. -->
<xsd:attribute name="maxNumResolves" type="integer" default="10" />
<!--newFractureInitializationType => Type of new fracture element initialization. Can be Pressure or Displacement. -->
<xsd:attribute name="newFractureInitializationType" type="geos_HydrofractureSolver_lt_geos_SinglePhasePoromechanics_lt_geos_SinglePhaseBase_cm_-geos_SolidMechanicsLagrangianFEM_gt__gt__InitializationType" default="Pressure" />
<xsd:attribute name="newFractureInitializationType" type="geos_HydrofractureSolver_lt_geos_SinglePhasePoromechanics_lt_geos_SinglePhaseBase_cm_-geos_SolidMechanicsLagrangianFEM_gt_-_gt__InitializationType" default="Pressure" />
<!--solidSolverName => Name of the solid solver used by the coupled solver-->
<xsd:attribute name="solidSolverName" type="groupNameRef" use="required" />
<!--stabilizationMultiplier => Constant multiplier of stabilization strength-->
Expand All @@ -3179,7 +3184,7 @@ Local- Add jump stabilization on interior of macro elements-->
<!--name => A name is required for any non-unique nodes-->
<xsd:attribute name="name" type="groupName" use="required" />
</xsd:complexType>
<xsd:simpleType name="geos_HydrofractureSolver_lt_geos_SinglePhasePoromechanics_lt_geos_SinglePhaseBase_cm_-geos_SolidMechanicsLagrangianFEM_gt__gt__InitializationType">
<xsd:simpleType name="geos_HydrofractureSolver_lt_geos_SinglePhasePoromechanics_lt_geos_SinglePhaseBase_cm_-geos_SolidMechanicsLagrangianFEM_gt_-_gt__InitializationType">
<xsd:restriction base="xsd:string">
<xsd:pattern value=".*[\[\]`$].*|Pressure|Displacement" />
</xsd:restriction>
Expand Down Expand Up @@ -4251,6 +4256,58 @@ Level 0 outputs no specific information for this solver. Higher levels require m
<!--timeIntegrationOption => Time integration method. Options are:
* QuasiStatic
* ImplicitDynamic
* ExplicitDynamic-->
<xsd:attribute name="timeIntegrationOption" type="geos_SolidMechanicsLagrangianFEM_TimeIntegrationOption" default="ExplicitDynamic" />
<!--writeLinearSystem => Write matrix, rhs, solution to screen ( = 1) or file ( = 2).-->
<xsd:attribute name="writeLinearSystem" type="integer" default="0" />
<!--name => A name is required for any non-unique nodes-->
<xsd:attribute name="name" type="groupName" use="required" />
</xsd:complexType>
<xsd:complexType name="SolidMechanicsLagrangeContactBubbleStabType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="LinearSolverParameters" type="LinearSolverParametersType" maxOccurs="1" />
<xsd:element name="NonlinearSolverParameters" type="NonlinearSolverParametersType" maxOccurs="1" />
</xsd:choice>
<!--cflFactor => Factor to apply to the `CFL condition <http://en.wikipedia.org/wiki/Courant-Friedrichs-Lewy_condition>`_ when calculating the maximum allowable time step. Values should be in the interval (0,1] -->
<xsd:attribute name="cflFactor" type="real64" default="0.5" />
<!--contactPenaltyStiffness => Value of the penetration penalty stiffness. Units of Pressure/length-->
<xsd:attribute name="contactPenaltyStiffness" type="real64" default="0" />
<!--discretization => Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified.-->
<xsd:attribute name="discretization" type="groupNameRef" use="required" />
<!--initialDt => Initial time-step value required by the solver to the event manager.-->
<xsd:attribute name="initialDt" type="real64" default="1e+99" />
<!--logLevel => Sets the level of information to write in the standard output (the console typically).
Level 0 outputs no specific information for this solver. Higher levels require more outputs.
1
- Line search information
- Solution information (scaling, maximum changes, quality check)
- Convergence information
- Time step information
- Linear solver information
- Nonlinear solver information
- Solver timers information
2
- The summary of declared fields and coupling-->
<xsd:attribute name="logLevel" type="integer" default="0" />
<!--massDamping => Value of mass based damping coefficient. -->
<xsd:attribute name="massDamping" type="real64" default="0" />
<!--maxNumResolves => Value to indicate how many resolves may be executed after some other event is executed. For example, if a SurfaceGenerator is specified, it will be executed after the mechanics solve. However if a new surface is generated, then the mechanics solve must be executed again due to the change in topology.-->
<xsd:attribute name="maxNumResolves" type="integer" default="10" />
<!--newmarkBeta => Value of :math:`\beta` in the Newmark Method for Implicit Dynamic time integration option. This should be pow(newmarkGamma+0.5,2.0)/4.0 unless you know what you are doing.-->
<xsd:attribute name="newmarkBeta" type="real64" default="0.25" />
<!--newmarkGamma => Value of :math:`\gamma` in the Newmark Method for Implicit Dynamic time integration option-->
<xsd:attribute name="newmarkGamma" type="real64" default="0.5" />
<!--stiffnessDamping => Value of stiffness based damping coefficient. -->
<xsd:attribute name="stiffnessDamping" type="real64" default="0" />
<!--strainTheory => Indicates whether or not to use `Infinitesimal Strain Theory <https://en.wikipedia.org/wiki/Infinitesimal_strain_theory>`_, or `Finite Strain Theory <https://en.wikipedia.org/wiki/Finite_strain_theory>`_. Valid Inputs are:
0 - Infinitesimal Strain
1 - Finite Strain-->
<xsd:attribute name="strainTheory" type="integer" default="0" />
<!--targetRegions => Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager.-->
<xsd:attribute name="targetRegions" type="groupNameRef_array" use="required" />
<!--timeIntegrationOption => Time integration method. Options are:
* QuasiStatic
* ImplicitDynamic
* ExplicitDynamic-->
<xsd:attribute name="timeIntegrationOption" type="geos_SolidMechanicsLagrangianFEM_TimeIntegrationOption" default="ExplicitDynamic" />
<!--writeLinearSystem => Write matrix, rhs, solution to screen ( = 1) or file ( = 2).-->
Expand Down
Loading

0 comments on commit 3d43c09

Please sign in to comment.