From 2c1be557915b4dbfe539c0da20386927b3cc1e39 Mon Sep 17 00:00:00 2001 From: Alex Lindsay Date: Tue, 10 Jun 2025 16:17:46 -0600 Subject: [PATCH 1/2] Setting DofObject data in nodes requires non-const mesh --- include/base/dof_map.h | 2 +- include/numerics/static_condensation_dof_map.h | 4 ++-- src/base/dof_map.C | 2 +- src/numerics/static_condensation_dof_map.C | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/base/dof_map.h b/include/base/dof_map.h index ec8b64f9ef..408b161eb7 100644 --- a/include/base/dof_map.h +++ b/include/base/dof_map.h @@ -1660,7 +1660,7 @@ class DofMap : public DofMapBase, /** * Add a static condensation class */ - void create_static_condensation(const MeshBase & mesh, System & system); + void create_static_condensation(MeshBase & mesh, System & system); /** * Checks whether we have static condensation diff --git a/include/numerics/static_condensation_dof_map.h b/include/numerics/static_condensation_dof_map.h index 88aba32042..203f65f10e 100644 --- a/include/numerics/static_condensation_dof_map.h +++ b/include/numerics/static_condensation_dof_map.h @@ -58,7 +58,7 @@ class Elem; class StaticCondensationDofMap : public DofMapBase { public: - StaticCondensationDofMap(const MeshBase & mesh, System & system, const DofMap & dof_map); + StaticCondensationDofMap(MeshBase & mesh, System & system, const DofMap & dof_map); virtual ~StaticCondensationDofMap(); // @@ -142,7 +142,7 @@ class StaticCondensationDofMap : public DofMapBase /// dofs std::vector _local_uncondensed_dofs; - const MeshBase & _mesh; + MeshBase & _mesh; System & _system; const DofMap & _dof_map; diff --git a/src/base/dof_map.C b/src/base/dof_map.C index a30f2891f7..becd0f34b8 100644 --- a/src/base/dof_map.C +++ b/src/base/dof_map.C @@ -3076,7 +3076,7 @@ std::string DofMap::get_info() const return os.str(); } -void DofMap::create_static_condensation(const MeshBase & mesh, System & sys) +void DofMap::create_static_condensation(MeshBase & mesh, System & sys) { _sc = std::make_unique(mesh, sys, *this); } diff --git a/src/numerics/static_condensation_dof_map.C b/src/numerics/static_condensation_dof_map.C index 09eb4b0230..e6e2766cc5 100644 --- a/src/numerics/static_condensation_dof_map.C +++ b/src/numerics/static_condensation_dof_map.C @@ -28,7 +28,7 @@ namespace libMesh { -StaticCondensationDofMap::StaticCondensationDofMap(const MeshBase & mesh, +StaticCondensationDofMap::StaticCondensationDofMap(MeshBase & mesh, System & system, const DofMap & dof_map) : DofMapBase(dof_map.comm()), From 4bd1f7d02afdf52dd27a2d9a807d507303fca1fc Mon Sep 17 00:00:00 2001 From: Alex Lindsay Date: Tue, 10 Jun 2025 16:20:30 -0600 Subject: [PATCH 2/2] Guard n_old_dofs --- include/base/dof_map_base.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/base/dof_map_base.h b/include/base/dof_map_base.h index abd674c80f..cd1d4f7e03 100644 --- a/include/base/dof_map_base.h +++ b/include/base/dof_map_base.h @@ -116,12 +116,12 @@ class DofMapBase : public ParallelObject virtual void clear(); +#ifdef LIBMESH_ENABLE_AMR /** * \returns The total number of degrees of freedom on old_dof_objects */ dof_id_type n_old_dofs() const { return _n_old_dfs; } -#ifdef LIBMESH_ENABLE_AMR /** * \returns The first old dof index that is local to partition \p proc. */ @@ -200,6 +200,7 @@ inline dof_id_type DofMapBase::n_dofs_on_processor(const processor_id_type proc) return cast_int(_end_df[proc] - _first_df[proc]); } +#ifdef LIBMESH_ENABLE_AMR inline dof_id_type DofMapBase::first_old_dof(const processor_id_type proc) const { libmesh_assert_less(proc, _first_old_df.size()); @@ -211,6 +212,6 @@ inline dof_id_type DofMapBase::end_old_dof(const processor_id_type proc) const libmesh_assert_less(proc, _end_old_df.size()); return _end_old_df[proc]; } - +#endif // LIBMESH_ENABLE_AMR } #endif // LIBMESH_DOF_MAP_BASE_H pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy