Skip to content

Commit 50275b7

Browse files
Merge pull request #861 from baagaard-usgs/fix-compilation-warnings
Fix compilation warnings
2 parents bc2b2d0 + f26c750 commit 50275b7

11 files changed

+72
-68
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"dm",
4040
"drucker",
4141
"elastoplastic",
42+
"Gmsh",
4243
"Knepley",
4344
"neumann",
4445
"nodeset",

CHANGES.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@ The version numbers are in the form `MAJOR.MINOR.PATCH`, where major releases in
1313
* Add displacement scale and improve the names of the other scales.
1414
* The time scale for poroelasticity is derived from the other scales and nominal material properties.
1515
* Add discussion of nondimensionalization for each of the governing equations.
16-
* Update default solver tolerances consistent with new nondimensionalization scales.
16+
* Update default solver tolerances consistent with the new nondimensionalization scales.
1717
* Add option to use adaptive time stepping and update examples `reverse-2d` Steps 7 and 8 and `magma-2d` Step 1 to demonstrate its use.
18-
* Update solver settings for elasticity for better scalability with problem size.
19-
* ASCII mesh format
20-
* Changed `group` to `vertex-group`; remove `group` `type`.
21-
* Renamed `VertexGroup` to `BoundaryGroup` in `meshio.gmsh_utils` and changed default behavior to not be recursive (generate "face" groups, not "vertex" groups).
18+
* Update multi-grid preconditioner solver settings for elasticity for better scalability with problem size.
19+
* Mesh formats
20+
* Add support for use of Cubit side sets and Gmsh physical groups with edges (2D) and surfaces (3D). Use of Cubit vertex sets and Gmsh physical groups with vertices are deprecated and support for them will be removed in version 6.0.0.
21+
* Use of Cubit side sets and Gmsh physical groups with curves (2D) and surfaces (3D) are using
22+
* ASCII mesh format
23+
* Changed `group` to `vertex-group`; remove `group` `type`.
24+
* Renamed `VertexGroup` to `BoundaryGroup` in `meshio.gmsh_utils` and changed default behavior to not be recursive (generate "face" groups, not "vertex" groups).
2225
* Use the VTU (XML) format for VTK files instead of the legacy ASCII format.
2326
* Material `description` property is no longer used; a deprecation warning is printed to stdout if it is specified. This feature will be removed in v6.0.
2427
* Internal labels for meshes and fields are now derived from the Pyre component name and identifier.
25-
* Update PETSc to 3.23.1
28+
* Update PETSc to 3.24.0
2629
* **Added**
2730
* Improved documentation for `pylith_eqinfo` and illustrate use in `examples/strikdslip-2d`, `examples/crustal-strikeslip-2d`, and `examples/crustal-strikeslip-3d`.
2831
* Added `pylith_convertmesh` for converting Cubit and Gmsh files to the PETSc HDF5 mesh format.

libsrc/pylith/fekernels/IsotropicLinearGenMaxwell.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
#include "pylith/fekernels/IsotropicLinearGenMaxwell.hh" // Implementation of object methods.
1616

17-
const PylithInt pylith::fekernels::IsotropicLinearGenMaxwell::numParallel = 3;
17+
// const PylithInt pylith::fekernels::IsotropicLinearGenMaxwell::numParallel = 3;
1818

1919
// End of file

libsrc/pylith/fekernels/IsotropicLinearGenMaxwell.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class pylith::fekernels::IsotropicLinearGenMaxwell {
8484
// PUBLIC MEMBERS /////////////////////////////////////////////////////////////////////////////
8585
public:
8686

87-
static const PylithInt numParallel;
87+
static const PylithInt numParallel = 3;
8888

8989
struct Context {
9090
PylithReal shearModulus;

libsrc/pylith/materials/Elasticity.cc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -472,30 +472,30 @@ pylith::materials::Elasticity::_setKernelsResidual(pylith::feassemble::Integrato
472472
default:
473473
PYLITH_COMPONENT_LOGICERROR("Unknown case (bitUse=" << bitUse << ") for residual kernels.");
474474
} // switch
475-
const PetscPointFn* r1 = _rheology->getKernelf1v(coordsys);
475+
PetscPointFn* r1 = _rheology->getKernelf1v(coordsys);
476476

477477
std::vector<ResidualKernels> kernels;
478478
switch (_formulation) {
479479
case QUASISTATIC: {
480-
const PetscPointFn* f0u = r0;
481-
const PetscPointFn* f1u = r1;
480+
PetscPointFn* f0u = r0;
481+
PetscPointFn* f1u = r1;
482482

483483
kernels.resize(1);
484484
kernels[0] = ResidualKernels("displacement", pylith::feassemble::Integrator::LHS, f0u, f1u);
485485
break;
486486
} // QUASISTATIC
487487
case DYNAMIC: {
488488
// Displacement
489-
const PetscPointFn* f0u = pylith::fekernels::DispVel::f0u;
490-
const PetscPointFn* f1u = NULL;
491-
const PetscPointFn* g0u = pylith::fekernels::DispVel::g0u;
492-
const PetscPointFn* g1u = NULL;
489+
PetscPointFn* f0u = pylith::fekernels::DispVel::f0u;
490+
PetscPointFn* f1u = NULL;
491+
PetscPointFn* g0u = pylith::fekernels::DispVel::g0u;
492+
PetscPointFn* g1u = NULL;
493493

494494
// Velocity
495-
const PetscPointFn* f0v = pylith::fekernels::Elasticity::f0v;
496-
const PetscPointFn* f1v = NULL;
497-
const PetscPointFn* g0v = r0;
498-
const PetscPointFn* g1v = r1;
495+
PetscPointFn* f0v = pylith::fekernels::Elasticity::f0v;
496+
PetscPointFn* f1v = NULL;
497+
PetscPointFn* g0v = r0;
498+
PetscPointFn* g1v = r1;
499499

500500
kernels.resize(4);
501501
kernels[0] = ResidualKernels("displacement", pylith::feassemble::Integrator::LHS, f0u, f1u);
@@ -506,16 +506,16 @@ pylith::materials::Elasticity::_setKernelsResidual(pylith::feassemble::Integrato
506506
} // DYNAMIC
507507
case DYNAMIC_IMEX: {
508508
// Displacement
509-
const PetscPointFn* f0u = pylith::fekernels::DispVel::f0u;
510-
const PetscPointFn* f1u = NULL;
511-
const PetscPointFn* g0u = pylith::fekernels::DispVel::g0u;
512-
const PetscPointFn* g1u = NULL;
509+
PetscPointFn* f0u = pylith::fekernels::DispVel::f0u;
510+
PetscPointFn* f1u = NULL;
511+
PetscPointFn* g0u = pylith::fekernels::DispVel::g0u;
512+
PetscPointFn* g1u = NULL;
513513

514514
// Velocity
515-
const PetscPointFn* f0v = pylith::fekernels::DispVel::f0v;
516-
const PetscPointFn* f1v = NULL;
517-
const PetscPointFn* g0v = r0;
518-
const PetscPointFn* g1v = r1;
515+
PetscPointFn* f0v = pylith::fekernels::DispVel::f0v;
516+
PetscPointFn* f1v = NULL;
517+
PetscPointFn* g0v = r0;
518+
PetscPointFn* g1v = r1;
519519

520520
kernels.resize(4);
521521
kernels[0] = ResidualKernels("displacement", pylith::feassemble::Integrator::LHS, f0u, f1u);
@@ -638,7 +638,7 @@ pylith::materials::Elasticity::_setKernelsDerivedField(pylith::feassemble::Integ
638638
kernels[0] = ProjectKernels("cauchy_stress", _rheology->getKernelCauchyStressVector(coordsys));
639639

640640
const int spaceDim = coordsys->getSpaceDim();
641-
const PetscPointFn* strainKernel =
641+
PetscPointFn* strainKernel =
642642
(3 == spaceDim) ? pylith::fekernels::Elasticity3D::infinitesimalStrain_asVector :
643643
(2 == spaceDim) ? pylith::fekernels::ElasticityPlaneStrain::infinitesimalStrain_asVector :
644644
NULL;

libsrc/pylith/materials/IncompressibleElasticity.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,12 @@ pylith::materials::IncompressibleElasticity::_setKernelsResidual(pylith::feassem
328328
} // switch
329329

330330
// Displacement
331-
const PetscPointFn* f0u = r0;
332-
const PetscPointFn* f1u = _rheology->getKernelf1u(coordsys);
331+
PetscPointFn* f0u = r0;
332+
PetscPointFn* f1u = _rheology->getKernelf1u(coordsys);
333333

334334
// Pressure
335-
const PetscPointFn* f0p = _rheology->getKernelf0p(coordsys);
336-
const PetscPointFn* f1p = NULL;
335+
PetscPointFn* f0p = _rheology->getKernelf0p(coordsys);
336+
PetscPointFn* f1p = NULL;
337337

338338
std::vector<ResidualKernels> kernels(2);
339339
kernels[0] = ResidualKernels("displacement", pylith::feassemble::Integrator::LHS, f0u, f1u);
@@ -429,7 +429,7 @@ pylith::materials::IncompressibleElasticity::_setKernelsDerivedField(pylith::fea
429429
kernels[0] = ProjectKernels("cauchy_stress", _rheology->getKernelCauchyStressVector(coordsys));
430430

431431
const int spaceDim = coordsys->getSpaceDim();
432-
const PetscPointFn* strainKernel =
432+
PetscPointFn* strainKernel =
433433
(3 == spaceDim) ? pylith::fekernels::Elasticity3D::infinitesimalStrain_asVector :
434434
(2 == spaceDim) ? pylith::fekernels::ElasticityPlaneStrain::infinitesimalStrain_asVector :
435435
NULL;

libsrc/pylith/materials/IsotropicLinearGenMaxwell.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ pylith::materials::IsotropicLinearGenMaxwell::addKernelsUpdateStateVars(std::vec
224224
PYLITH_COMPONENT_DEBUG("addKernelsUpdateStateVars(kernels="<<kernels<<", coordsys="<<coordsys<<")");
225225

226226
const int spaceDim = coordsys->getSpaceDim();
227-
const PetscPointFn* funcViscousStrain =
227+
PetscPointFn* funcViscousStrain =
228228
(3 == spaceDim) ? pylith::fekernels::IsotropicLinearGenMaxwell3D::viscousStrain_infinitesimalStrain_asVector :
229229
(2 == spaceDim) ? pylith::fekernels::IsotropicLinearGenMaxwellPlaneStrain::viscousStrain_infinitesimalStrain_asVector :
230230
NULL;
231-
const PetscPointFn* funcTotalStrain =
231+
PetscPointFn* funcTotalStrain =
232232
(3 == spaceDim) ? pylith::fekernels::Elasticity3D::infinitesimalStrain_asVector :
233233
(2 == spaceDim) ? pylith::fekernels::ElasticityPlaneStrain::infinitesimalStrain_asVector :
234234
NULL;

libsrc/pylith/materials/IsotropicLinearMaxwell.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ pylith::materials::IsotropicLinearMaxwell::addKernelsUpdateStateVars(std::vector
223223
PYLITH_COMPONENT_DEBUG("addKernelsUpdateStateVars(kernels="<<kernels<<", coordsys="<<coordsys<<")");
224224

225225
const int spaceDim = coordsys->getSpaceDim();
226-
const PetscPointFn* funcViscousStrain =
226+
PetscPointFn* funcViscousStrain =
227227
(3 == spaceDim) ? pylith::fekernels::IsotropicLinearMaxwell3D::viscousStrain_infinitesimalStrain_asVector :
228228
(2 == spaceDim) ? pylith::fekernels::IsotropicLinearMaxwellPlaneStrain::viscousStrain_infinitesimalStrain_asVector :
229229
NULL;
230-
const PetscPointFn* funcTotalStrain =
230+
PetscPointFn* funcTotalStrain =
231231
(3 == spaceDim) ? pylith::fekernels::Elasticity3D::infinitesimalStrain_asVector :
232232
(2 == spaceDim) ? pylith::fekernels::ElasticityPlaneStrain::infinitesimalStrain_asVector :
233233
NULL;

libsrc/pylith/materials/IsotropicLinearPoroelasticity.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ pylith::materials::IsotropicLinearPoroelasticity::addKernelsUpdateStateVarsImpli
634634
if (_useStateVars) {
635635
const int spaceDim = coordsys->getSpaceDim();
636636

637-
const PetscPointFn* funcPorosity =
637+
PetscPointFn* funcPorosity =
638638
(3 == spaceDim) ? pylith::fekernels::IsotropicLinearPoroelasticity3D::updatePorosityImplicit :
639639
(2 == spaceDim) ? pylith::fekernels::IsotropicLinearPoroelasticityPlaneStrain::updatePorosityImplicit :
640640
NULL;
@@ -660,7 +660,7 @@ pylith::materials::IsotropicLinearPoroelasticity::addKernelsUpdateStateVarsExpli
660660
if (_useStateVars) {
661661
const int spaceDim = coordsys->getSpaceDim();
662662

663-
const PetscPointFn* funcPorosity =
663+
PetscPointFn* funcPorosity =
664664
(3 == spaceDim) ? pylith::fekernels::IsotropicLinearPoroelasticity3D::updatePorosityExplicit :
665665
(2 == spaceDim) ? pylith::fekernels::IsotropicLinearPoroelasticityPlaneStrain::updatePorosityExplicit :
666666
NULL;

libsrc/pylith/materials/IsotropicPowerLaw.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ pylith::materials::IsotropicPowerLaw::addKernelsUpdateStateVars(std::vector<Proj
227227
PYLITH_COMPONENT_DEBUG("addKernelsUpdateStateVars(kernels="<<kernels<<", coordsys="<<coordsys<<")");
228228

229229
const int spaceDim = coordsys->getSpaceDim();
230-
const PetscPointFn* funcViscousStrain =
230+
PetscPointFn* funcViscousStrain =
231231
(!_useReferenceState && 3 == spaceDim) ? pylith::fekernels::IsotropicPowerLaw3D::viscousStrain_infinitesimalStrain_asVector :
232232
(!_useReferenceState && 2 == spaceDim) ? pylith::fekernels::IsotropicPowerLawPlaneStrain::viscousStrain_infinitesimalStrain_asVector :
233233
(_useReferenceState && 3 == spaceDim) ? pylith::fekernels::IsotropicPowerLaw3D::viscousStrain_infinitesimalStrain_refState_asVector :
234234
(_useReferenceState && 2 == spaceDim) ? pylith::fekernels::IsotropicPowerLawPlaneStrain::viscousStrain_infinitesimalStrain_refState_asVector :
235235
NULL;
236-
const PetscPointFn* funcDeviatoricStress =
236+
PetscPointFn* funcDeviatoricStress =
237237
(!_useReferenceState && 3 == spaceDim) ? pylith::fekernels::IsotropicPowerLaw3D::deviatoricStress_infinitesimalStrain_asVector :
238238
(!_useReferenceState && 2 == spaceDim) ? pylith::fekernels::IsotropicPowerLawPlaneStrain::deviatoricStress_infinitesimalStrain_asVector :
239239
(_useReferenceState && 3 == spaceDim) ? pylith::fekernels::IsotropicPowerLaw3D::deviatoricStress_infinitesimalStrain_refState_asVector :

0 commit comments

Comments
 (0)