fix connectPatch for mixed Lagrangian ASMs

new parameters were added to the virtual method
it was supposed to override.

oh 'override' my 'override' how i miss you.
This commit is contained in:
Arne Morten Kvarving
2017-02-15 12:06:36 +01:00
parent 0b8041788d
commit fcc9d8cc10
4 changed files with 22 additions and 12 deletions

View File

@@ -194,8 +194,8 @@ bool ASMs2DmxLag::generateFEMTopology ()
}
bool ASMs2DmxLag::connectPatch (int edge, ASMs2D& neighbor,
int nedge, bool revers)
bool ASMs2DmxLag::connectPatch (int edge, ASMs2D& neighbor, int nedge, bool revers,
int basis, bool coordCheck, int thick)
{
ASMs2DmxLag* neighMx = dynamic_cast<ASMs2DmxLag*>(&neighbor);
if (!neighMx) return false;
@@ -203,8 +203,9 @@ bool ASMs2DmxLag::connectPatch (int edge, ASMs2D& neighbor,
size_t nb1=0;
size_t nb2=0;
for (size_t i = 1;i <= nxx.size(); ++i) {
if (!this->connectBasis(edge,neighbor,nedge,revers,i,nb1,nb2))
return false;
if (basis == 0 || i == (size_t)basis)
if (!this->connectBasis(edge,neighbor,nedge,revers,i,nb1,nb2,coordCheck,thick))
return false;
nb1 += nb[i-1];
nb2 += neighMx->nb[i-1];
}

View File

@@ -69,8 +69,11 @@ public:
//! \param neighbor The neighbor patch
//! \param[in] nedge Local edge index of neighbor patch, in range [1,4]
//! \param[in] revers Indicates whether the two edges have opposite directions
virtual bool connectPatch(int edge, ASMs2D& neighbor, int nedge,
bool revers = false);
//! \param[in] basis The basis to connect (for mixed problems)
//! \param[in] coordCheck False to disable coordinate checks (periodic connections)
//! \param[in] thick Thickness of connection
virtual bool connectPatch(int edge, ASMs2D& neighbor, int nedge, bool revers,
int basis = 0, bool coordCheck = true, int thick = 1);
//! \brief Makes two opposite boundary edges periodic.
//! \param[in] dir Parameter direction defining the periodic edges

View File

@@ -214,8 +214,9 @@ bool ASMs3DmxLag::generateFEMTopology ()
}
bool ASMs3DmxLag::connectPatch (int face, ASMs3D& neighbor,
int nface, int norient)
bool ASMs3DmxLag::connectPatch (int face, ASMs3D& neighbor, int nface,
int norient, int basis,
bool coordCheck, int thick)
{
ASMs3DmxLag* neighMx = dynamic_cast<ASMs3DmxLag*>(&neighbor);
if (!neighMx) return false;
@@ -229,8 +230,10 @@ bool ASMs3DmxLag::connectPatch (int face, ASMs3D& neighbor,
size_t nb1=0;
size_t nb2=0;
for (size_t i = 1;i <= nxx.size(); ++i) {
if (!this->connectBasis(face,neighbor,nface,norient,i,nb1,nb2))
return false;
if (basis == 0 || i == (size_t)basis)
if (!this->connectBasis(face,neighbor,nface,norient,i,nb1,nb2,coordCheck,thick))
return false;
nb1 += nb[i-1];
nb2 += neighMx->nb[i-1];
}

View File

@@ -69,8 +69,11 @@ public:
//! \param neighbor The neighbor patch
//! \param[in] nface Local face index of neighbor patch, in range [1,6]
//! \param[in] norient Relative face orientation flag (see class ASMs3D)
virtual bool connectPatch(int face, ASMs3D& neighbor, int nface,
int norient = 0);
//! \param[in] basis Which basis to connect, or 0 for all.
//! \param[in] coordCheck False to disable coordinate checks (periodic connections)
//! \param[in] thick Thickness of connection
virtual bool connectPatch(int face, ASMs3D& neighbor, int nface, int norient,
int basis = 0, bool coordCheck = true, int thick = 1);
//! \brief Makes two opposite boundary faces periodic.
//! \param[in] dir Parameter direction defining the periodic faces