[pism/pism] 1fcf54: Clean up IceModelVec classes

0 views
Skip to first unread message

Constantine Khrulev

unread,
Oct 6, 2021, 4:31:35 PM10/6/21
to pism....@gmail.com
Branch: refs/heads/dev
Home: https://github.com/pism/pism
Commit: 1fcf5472992b41443f1708e3f614bff97dc6e5ab
https://github.com/pism/pism/commit/1fcf5472992b41443f1708e3f614bff97dc6e5ab
Author: Constantine Khrulev <ckhr...@alaska.edu>
Date: 2021-10-06 (Wed, 06 Oct 2021)

Changed paths:
M examples/inverse/pismi.py
M site-packages/PISM/invert/ssa.py
M site-packages/PISM/sia.py
M site-packages/PISM/ssa.py
M src/age/AgeModel.cc
M src/coupler/frontalmelt/DischargeGiven.cc
M src/coupler/frontalmelt/DischargeRouting.cc
M src/coupler/frontalmelt/FrontalMelt.cc
M src/coupler/ocean/Pico.cc
M src/coupler/ocean/PicoGeometry.cc
M src/energy/BTU_Full.cc
M src/energy/EnergyModel.cc
M src/energy/TemperatureModel.cc
M src/energy/btutest.cc
M src/fracturedensity/FractureDensity.cc
M src/fracturedensity/FractureDensity.hh
M src/frontretreat/FrontRetreat.cc
M src/frontretreat/calving/EigenCalving.cc
M src/frontretreat/calving/HayhurstCalving.cc
M src/frontretreat/calving/StressCalving.cc
M src/frontretreat/calving/StressCalving.hh
M src/frontretreat/calving/vonMisesCalving.cc
M src/frontretreat/util/remove_narrow_tongues.cc
M src/geometry/GeometryEvolution.cc
M src/geometry/grounded_cell_fraction.cc
M src/geometry/part_grid_threshold_thickness.cc
M src/geometry/part_grid_threshold_thickness.hh
M src/hydrology/EmptyingProblem.cc
M src/hydrology/Hydrology.cc
M src/hydrology/Routing.cc
M src/icebin/IBIceModel.cc
M src/icemodel/IceModel.cc
M src/icemodel/IceModel.hh
M src/icemodel/diagnostics.cc
M src/icemodel/energy.cc
M src/icemodel/frontretreat.cc
M src/icemodel/viewers.cc
M src/inverse/IPTaoTikhonovProblem.hh
M src/inverse/IP_SSATaucTaoTikhonovProblemLCL.cc
M src/inverse/IP_SSATaucTikhonovGNSolver.cc
M src/pythonbindings/IceModelVec2V.py
M src/pythonbindings/PISM.i
M src/pythonbindings/pism_IceModelVec.i
M src/regional/IceRegionalModel.cc
M src/regional/SIAFD_Regional.cc
M src/regional/SSAFD_Regional.cc
M src/stressbalance/ShallowStressBalance.cc
M src/stressbalance/StressBalance.cc
M src/stressbalance/StressBalance.hh
M src/stressbalance/StressBalance_diagnostics.cc
M src/stressbalance/WeertmanSliding.cc
M src/stressbalance/blatter/Blatter.cc
M src/stressbalance/blatter/Blatter.hh
M src/stressbalance/sia/BedSmoother.cc
M src/stressbalance/ssa/SSA.cc
M src/stressbalance/ssa/SSAFD.cc
M src/stressbalance/ssa/SSAFD.hh
M src/stressbalance/ssa/SSAFEM.hh
M src/util/Diagnostic.hh
R src/util/Field.hh
A src/util/IceModelVec2.hh
R src/util/IceModelVec2Struct.hh
M src/util/IceModelVec2V.hh
M src/util/IceModelVec_impl.hh
M src/util/IceModelVec_inline.hh
M src/util/Poisson.cc
R src/util/StarStencil.hh
M src/util/VariableMetadata.cc
M src/util/VariableMetadata.hh
M src/util/iceModelVec.cc
M src/util/iceModelVec.hh
M src/util/iceModelVec2.cc
M src/util/iceModelVec2T.cc
M src/util/iceModelVec2T.hh
M src/util/iceModelVec2V.cc
M src/util/iceModelVec3.cc
M src/util/iceModelVec_helpers.hh
M src/util/io/PNCFile.cc
M src/util/node_types.cc
M src/util/options.cc
M src/util/pism_utilities.cc
A src/util/stencils.hh
M src/verification/iCMthermo.cc
M test/bed_smoother.py
M test/blatter_verification.py
M test/mass_transport.py
M test/miscellaneous.py
M test/regression/hydrology_steady_test.py

Log Message:
-----------
Clean up IceModelVec classes

- Lazy initialization

- to allocate IceModelVec::vec()
- to allocate IceModelVec::dm()

- Rename

- std::dynamic_pointer_cast wrappers to "Cast"
- IceModelVec2Int::int_star() and int_box() to star and box
- IceModelVec2Struct to IceModelVec2 and remove the old IceModelVec2
- copy_2d() and add_2d() to vec::copy() and vec::add()

- Remove

- The second ("special z axis") IceModelVec3 constructor
- IceModelVec::copy_from_vec()
- Field.hh
- IceModelVec::copy_from()
- IceModelVec::update_ghosts(destination)

- Replace

- IceModelVecXX::allocate_copy() with duplicate()
- IceModelVec2S::set_to_magnitude() with stand alone functions
- IceModelVec2S::mask_by() by a stand alone function apply_mask()

- Add

- sum(), min(), max(), absmax() as stand-alone functions
- diff_{x,y} as stand-alone functions

- Clean up IceModelVec3::set_column()

- Don't try to be smart about copying data
The problem is that we don't always know if ghosts of *inputs* are up to date.

- More clarity about begin_access_use_dof (IceModelVec2, Vec2Stag, and Vec3 need this; others do not.)

- Move stencil structs into util/stencils.hh


Commit: c3d9d54beb32d903a88c40d502bb86249e11bdfc
https://github.com/pism/pism/commit/c3d9d54beb32d903a88c40d502bb86249e11bdfc
Author: Constantine Khrulev <ckhr...@alaska.edu>
Date: 2021-10-06 (Wed, 06 Oct 2021)

Changed paths:
M examples/inverse/pismi.py
M site-packages/PISM/invert/ssa.py
M site-packages/PISM/sia.py
M site-packages/PISM/ssa.py
M src/age/AgeModel.cc
M src/coupler/frontalmelt/DischargeGiven.cc
M src/coupler/frontalmelt/DischargeRouting.cc
M src/coupler/frontalmelt/FrontalMelt.cc
M src/coupler/ocean/Pico.cc
M src/coupler/ocean/PicoGeometry.cc
M src/energy/BTU_Full.cc
M src/energy/EnergyModel.cc
M src/energy/TemperatureModel.cc
M src/energy/btutest.cc
M src/fracturedensity/FractureDensity.cc
M src/fracturedensity/FractureDensity.hh
M src/frontretreat/FrontRetreat.cc
M src/frontretreat/calving/EigenCalving.cc
M src/frontretreat/calving/HayhurstCalving.cc
M src/frontretreat/calving/StressCalving.cc
M src/frontretreat/calving/StressCalving.hh
M src/frontretreat/calving/vonMisesCalving.cc
M src/frontretreat/util/remove_narrow_tongues.cc
M src/geometry/GeometryEvolution.cc
M src/geometry/grounded_cell_fraction.cc
M src/geometry/part_grid_threshold_thickness.cc
M src/geometry/part_grid_threshold_thickness.hh
M src/hydrology/EmptyingProblem.cc
M src/hydrology/Hydrology.cc
M src/hydrology/Routing.cc
M src/icebin/IBIceModel.cc
M src/icemodel/IceModel.cc
M src/icemodel/IceModel.hh
M src/icemodel/diagnostics.cc
M src/icemodel/energy.cc
M src/icemodel/frontretreat.cc
M src/icemodel/viewers.cc
M src/inverse/IPTaoTikhonovProblem.hh
M src/inverse/IP_SSATaucTaoTikhonovProblemLCL.cc
M src/inverse/IP_SSATaucTikhonovGNSolver.cc
M src/pythonbindings/IceModelVec2V.py
M src/pythonbindings/PISM.i
M src/pythonbindings/pism_IceModelVec.i
M src/regional/IceRegionalModel.cc
M src/regional/SIAFD_Regional.cc
M src/regional/SSAFD_Regional.cc
M src/stressbalance/ShallowStressBalance.cc
M src/stressbalance/StressBalance.cc
M src/stressbalance/StressBalance.hh
M src/stressbalance/StressBalance_diagnostics.cc
M src/stressbalance/WeertmanSliding.cc
M src/stressbalance/blatter/Blatter.cc
M src/stressbalance/blatter/Blatter.hh
M src/stressbalance/sia/BedSmoother.cc
M src/stressbalance/ssa/SSA.cc
M src/stressbalance/ssa/SSAFD.cc
M src/stressbalance/ssa/SSAFD.hh
M src/stressbalance/ssa/SSAFEM.hh
M src/util/Diagnostic.hh
R src/util/Field.hh
A src/util/IceModelVec2.hh
R src/util/IceModelVec2Struct.hh
M src/util/IceModelVec2V.hh
M src/util/IceModelVec_impl.hh
M src/util/IceModelVec_inline.hh
M src/util/Poisson.cc
R src/util/StarStencil.hh
M src/util/VariableMetadata.cc
M src/util/VariableMetadata.hh
M src/util/iceModelVec.cc
M src/util/iceModelVec.hh
M src/util/iceModelVec2.cc
M src/util/iceModelVec2T.cc
M src/util/iceModelVec2T.hh
M src/util/iceModelVec2V.cc
M src/util/iceModelVec3.cc
M src/util/iceModelVec_helpers.hh
M src/util/io/PNCFile.cc
M src/util/node_types.cc
M src/util/options.cc
M src/util/pism_utilities.cc
A src/util/stencils.hh
M src/verification/iCMthermo.cc
M test/bed_smoother.py
M test/blatter_verification.py
M test/mass_transport.py
M test/miscellaneous.py
M test/regression/hydrology_steady_test.py

Log Message:
-----------
Merge branch 'ckhrulev/vec-cleanup' into dev


Compare: https://github.com/pism/pism/compare/c6d15fc7f934...c3d9d54beb32
Reply all
Reply to author
Forward
0 new messages