From 76a6139bfc9303c0ac9c50b80ce19f9af3d8d782 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 29 Aug 2023 15:35:56 +0200 Subject: [PATCH] changed: no reason to override write in ASMuxDmx we can just use the ASMuxD implementation --- src/ASM/LR/ASMu2D.C | 7 +++++-- src/ASM/LR/ASMu2Dmx.C | 11 ----------- src/ASM/LR/ASMu2Dmx.h | 2 -- src/ASM/LR/ASMu3D.C | 7 +++++-- src/ASM/LR/ASMu3Dmx.C | 11 ----------- src/ASM/LR/ASMu3Dmx.h | 2 -- 6 files changed, 10 insertions(+), 30 deletions(-) diff --git a/src/ASM/LR/ASMu2D.C b/src/ASM/LR/ASMu2D.C index 70342373..c626ac1a 100644 --- a/src/ASM/LR/ASMu2D.C +++ b/src/ASM/LR/ASMu2D.C @@ -147,11 +147,14 @@ bool ASMu2D::read (std::istream& is) } -bool ASMu2D::write (std::ostream& os, int) const +bool ASMu2D::write (std::ostream& os, int basis) const { if (!lrspline) return false; + if (basis > static_cast(this->getNoBasis())) return false; + const LR::LRSplineSurface* spline = this->getBasis(basis); + if (!spline) return false; - os << *lrspline; + os << *spline; return os.good(); } diff --git a/src/ASM/LR/ASMu2Dmx.C b/src/ASM/LR/ASMu2Dmx.C index 690ee45e..f1b6a01e 100644 --- a/src/ASM/LR/ASMu2Dmx.C +++ b/src/ASM/LR/ASMu2Dmx.C @@ -93,17 +93,6 @@ bool ASMu2Dmx::readBasis (std::istream& is, size_t basis) } -bool ASMu2Dmx::write (std::ostream& os, int basis) const -{ - if (basis == -1) - os << *projB; - else - os << *m_basis[basis-1]; - - return os.good(); -} - - void ASMu2Dmx::clear (bool retainGeometry) { if (!retainGeometry) { diff --git a/src/ASM/LR/ASMu2Dmx.h b/src/ASM/LR/ASMu2Dmx.h index 5ecda19d..69f1ff8e 100644 --- a/src/ASM/LR/ASMu2Dmx.h +++ b/src/ASM/LR/ASMu2Dmx.h @@ -75,8 +75,6 @@ public: //! \brief Reads a basis from the given input stream. virtual bool readBasis(std::istream& is, size_t basis); - //! \brief Writes the geometry/basis of the patch to given stream. - virtual bool write(std::ostream& os, int basis) const; //! \brief Generates the finite element topology data for the patch. //! \details The data generated are the element-to-node connectivity array, diff --git a/src/ASM/LR/ASMu3D.C b/src/ASM/LR/ASMu3D.C index eaf885e5..a8da492e 100644 --- a/src/ASM/LR/ASMu3D.C +++ b/src/ASM/LR/ASMu3D.C @@ -136,11 +136,14 @@ bool ASMu3D::read (std::istream& is) } -bool ASMu3D::write (std::ostream& os, int) const +bool ASMu3D::write (std::ostream& os, int basis) const { if (!lrspline) return false; + if (basis > static_cast(this->getNoBasis())) return false; + const LR::LRSplineVolume* spline = this->getBasis(basis); + if (!spline) return false; - os << *lrspline; + os << *spline; return os.good(); } diff --git a/src/ASM/LR/ASMu3Dmx.C b/src/ASM/LR/ASMu3Dmx.C index 925558be..49924a92 100644 --- a/src/ASM/LR/ASMu3Dmx.C +++ b/src/ASM/LR/ASMu3Dmx.C @@ -96,17 +96,6 @@ bool ASMu3Dmx::readBasis (std::istream& is, size_t basis) } -bool ASMu3Dmx::write (std::ostream& os, int basis) const -{ - if (basis == -1) - os << *projB; - else - os << *m_basis[basis-1]; - - return os.good(); -} - - void ASMu3Dmx::clear (bool retainGeometry) { if (!retainGeometry) { diff --git a/src/ASM/LR/ASMu3Dmx.h b/src/ASM/LR/ASMu3Dmx.h index c16df3e5..bd401e43 100644 --- a/src/ASM/LR/ASMu3Dmx.h +++ b/src/ASM/LR/ASMu3Dmx.h @@ -75,8 +75,6 @@ public: //! \brief Reads a basis from the given input stream. virtual bool readBasis(std::istream& is, size_t basis); - //! \brief Writes the geometry/basis of the patch to given stream. - virtual bool write(std::ostream& os, int basis) const; //! \brief Generates the finite element topology data for the patch. //! \details The data generated are the element-to-node connectivity array,