changed: mark readPatches const and public

This commit is contained in:
Arne Morten Kvarving 2016-06-30 15:10:03 +02:00 committed by Knut Morten Okstad
parent 291c5b410d
commit 1045f7df04
8 changed files with 32 additions and 29 deletions

View File

@ -494,7 +494,7 @@ ASMbase* SIM1D::readPatch (std::istream& isp, int pchInd,
bool SIM1D::readPatches (std::istream& isp, PatchVec& patches, bool SIM1D::readPatches (std::istream& isp, PatchVec& patches,
const char* whiteSpace) const char* whiteSpace) const
{ {
ASMbase* pch = nullptr; ASMbase* pch = nullptr;
for (int pchInd = 1; isp.good(); pchInd++) for (int pchInd = 1; isp.good(); pchInd++)

View File

@ -50,6 +50,13 @@ public:
virtual ASMbase* readPatch(std::istream& isp, int pchInd, virtual ASMbase* readPatch(std::istream& isp, int pchInd,
const CharVec& unf) const; const CharVec& unf) const;
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace) const;
//! \brief Evaluates the primary solution at the given point. //! \brief Evaluates the primary solution at the given point.
//! \param[in] psol Primary solution vector //! \param[in] psol Primary solution vector
//! \param[in] u Parameter of the point to evaluate at //! \param[in] u Parameter of the point to evaluate at
@ -84,13 +91,6 @@ protected:
//! \param is The file stream to read from //! \param is The file stream to read from
virtual bool parse(char* keyWord, std::istream& is); virtual bool parse(char* keyWord, std::istream& is);
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace);
//! \brief Preprocesses a user-defined Dirichlet boundary property. //! \brief Preprocesses a user-defined Dirichlet boundary property.
//! \param[in] patch 1-based index of the patch to receive the property //! \param[in] patch 1-based index of the patch to receive the property
//! \param[in] lndx Local index of the boundary item to receive the property //! \param[in] lndx Local index of the boundary item to receive the property

View File

@ -689,7 +689,7 @@ ASMbase* SIM2D::readPatch (std::istream& isp, int pchInd,
bool SIM2D::readPatches (std::istream& isp, PatchVec& patches, bool SIM2D::readPatches (std::istream& isp, PatchVec& patches,
const char* whiteSpace) const char* whiteSpace) const
{ {
ASMbase* pch = nullptr; ASMbase* pch = nullptr;
for (int pchInd = 1; isp.good(); pchInd++) for (int pchInd = 1; isp.good(); pchInd++)

View File

@ -63,6 +63,13 @@ public:
virtual ASMbase* readPatch(std::istream& isp, int pchInd, virtual ASMbase* readPatch(std::istream& isp, int pchInd,
const CharVec& unf) const; const CharVec& unf) const;
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace) const;
//! \brief Evaluates the primary solution at the given point. //! \brief Evaluates the primary solution at the given point.
//! \param[in] psol Primary solution vector //! \param[in] psol Primary solution vector
//! \param[in] u First parameter of the point to evaluate at //! \param[in] u First parameter of the point to evaluate at
@ -89,12 +96,6 @@ protected:
//! \param is The file stream to read from //! \param is The file stream to read from
virtual bool parse(char* keyWord, std::istream& is); virtual bool parse(char* keyWord, std::istream& is);
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace);
//! \brief Reads global node data for a patch from given input stream. //! \brief Reads global node data for a patch from given input stream.
//! \param[in] isn The input stream to read from //! \param[in] isn The input stream to read from
//! \param[in] pchInd 0-based index of the patch to read node data for //! \param[in] pchInd 0-based index of the patch to read node data for

View File

@ -703,7 +703,7 @@ ASMbase* SIM3D::readPatch (std::istream& isp, int pchInd,
bool SIM3D::readPatches (std::istream& isp, PatchVec& patches, bool SIM3D::readPatches (std::istream& isp, PatchVec& patches,
const char* whiteSpace) const char* whiteSpace) const
{ {
ASMbase* pch = nullptr; ASMbase* pch = nullptr;
for (int pchInd = 1; isp.good(); pchInd++) for (int pchInd = 1; isp.good(); pchInd++)

View File

@ -58,6 +58,13 @@ public:
virtual ASMbase* readPatch(std::istream& isp, int pchInd, virtual ASMbase* readPatch(std::istream& isp, int pchInd,
const CharVec& unf) const; const CharVec& unf) const;
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace) const;
//! \brief Evaluates the primary solution at the given point. //! \brief Evaluates the primary solution at the given point.
//! \param[in] psol Primary solution vector //! \param[in] psol Primary solution vector
//! \param[in] u First parameter of the point to evaluate at //! \param[in] u First parameter of the point to evaluate at
@ -85,12 +92,6 @@ protected:
//! \param is The file stream to read from //! \param is The file stream to read from
virtual bool parse(char* keyWord, std::istream& is); virtual bool parse(char* keyWord, std::istream& is);
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace);
//! \brief Reads global node data for a patch from given input stream. //! \brief Reads global node data for a patch from given input stream.
//! \param[in] isn The input stream to read from //! \param[in] isn The input stream to read from
//! \param[in] pchInd 0-based index of the patch to read node data for //! \param[in] pchInd 0-based index of the patch to read node data for

View File

@ -651,6 +651,13 @@ public:
virtual ASMbase* readPatch(std::istream& isp, int pchInd, virtual ASMbase* readPatch(std::istream& isp, int pchInd,
const CharVec& unf = CharVec()) const = 0; const CharVec& unf = CharVec()) const = 0;
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace = "") const = 0;
//! \brief Returns a scalar function associated with \a code. //! \brief Returns a scalar function associated with \a code.
RealFunc* getSclFunc(int code) const; RealFunc* getSclFunc(int code) const;
@ -666,12 +673,6 @@ protected:
//! \brief Initializes for integration of Neumann terms for a given property. //! \brief Initializes for integration of Neumann terms for a given property.
virtual bool initNeumann(size_t) { return true; } virtual bool initNeumann(size_t) { return true; }
//! \brief Reads patches from given input stream.
//! \param[in] isp The input stream to read from
//! \param[out] patches Array of patches that were read
//! \param[in] whiteSpace For message formatting
virtual bool readPatches(std::istream& isp, PatchVec& patches,
const char* whiteSpace = "") = 0;
//! \brief Reads global node data for a patch from given input stream. //! \brief Reads global node data for a patch from given input stream.
//! \param[in] isn The input stream to read from //! \param[in] isn The input stream to read from
//! \param[in] pchInd 0-based index of the patch to read node data for //! \param[in] pchInd 0-based index of the patch to read node data for

View File

@ -38,7 +38,7 @@ public:
{ return nullptr; } { return nullptr; }
protected: protected:
//! \brief Reads patches from given input stream. //! \brief Reads patches from given input stream.
virtual bool readPatches(std::istream&,SIMdependency::PatchVec&,const char*) virtual bool readPatches(std::istream&,SIMdependency::PatchVec&,const char*) const
{ return false; } { return false; }
//! \brief Preprocesses a user-defined Dirichlet boundary property. //! \brief Preprocesses a user-defined Dirichlet boundary property.
virtual bool addConstraint(int,int,int,int,int,int&,char) virtual bool addConstraint(int,int,int,int,int,int&,char)