ASMu3D::evaluateBasis: pass vector instead of finite element and basis index
This commit is contained in:
parent
82ccdc49e3
commit
dbc2202b5a
@ -842,8 +842,8 @@ void ASMu3D::getCornerPoints (int iel, PointVec& XC) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ASMu3D::evaluateBasis (int iel, int basis, double u, double v, double w,
|
void ASMu3D::evaluateBasis (int iel, double u, double v, double w,
|
||||||
Vector& N, Matrix& dNdu) const
|
Vector& N, Matrix& dNdu, int basis) const
|
||||||
{
|
{
|
||||||
PROFILE3("ASMu3D::evalBasis(1)");
|
PROFILE3("ASMu3D::evalBasis(1)");
|
||||||
|
|
||||||
@ -864,20 +864,20 @@ void ASMu3D::evaluateBasis (int iel, int basis, double u, double v, double w,
|
|||||||
void ASMu3D::evaluateBasis (int iel, FiniteElement& fe, Matrix& dNdu,
|
void ASMu3D::evaluateBasis (int iel, FiniteElement& fe, Matrix& dNdu,
|
||||||
int basis) const
|
int basis) const
|
||||||
{
|
{
|
||||||
this->evaluateBasis(iel, basis, fe.u, fe.v, fe.w, fe.basis(basis), dNdu);
|
this->evaluateBasis(iel, fe.u, fe.v, fe.w, fe.basis(basis), dNdu, basis);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ASMu3D::evaluateBasis (FiniteElement& fe, Matrix& dNdu,
|
void ASMu3D::evaluateBasis (Vector& N, Matrix& dNdu,
|
||||||
const Matrix& C, const Matrix& B, int basis) const
|
const Matrix& C, const Matrix& B) const
|
||||||
{
|
{
|
||||||
PROFILE3("ASMu3D::evalBasis(BE)");
|
PROFILE3("ASMu3D::evalBasis(BE)");
|
||||||
|
|
||||||
Matrix N = C*B;
|
Matrix CB = C*B;
|
||||||
dNdu.resize(N.rows(),3);
|
dNdu.resize(CB.rows(),3);
|
||||||
fe.basis(basis) = N.getColumn(1);
|
N = CB.getColumn(1);
|
||||||
dNdu.fillColumn(1,N.getColumn(2));
|
dNdu.fillColumn(1,CB.getColumn(2));
|
||||||
dNdu.fillColumn(2,N.getColumn(3));
|
dNdu.fillColumn(2,CB.getColumn(3));
|
||||||
dNdu.fillColumn(3,N.getColumn(4));
|
dNdu.fillColumn(3,CB.getColumn(4));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ASMu3D::evaluateBasis (int iel, FiniteElement& fe,
|
void ASMu3D::evaluateBasis (int iel, FiniteElement& fe,
|
||||||
@ -1766,7 +1766,7 @@ bool ASMu3D::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
|||||||
if (use2ndDer)
|
if (use2ndDer)
|
||||||
this->evaluateBasis(iel, fe, dNdu, d2Ndu2);
|
this->evaluateBasis(iel, fe, dNdu, d2Ndu2);
|
||||||
else
|
else
|
||||||
this->evaluateBasis(fe, dNdu, bezierExtract[iel], B);
|
this->evaluateBasis(fe.basis(1), dNdu, bezierExtract[iel], B);
|
||||||
|
|
||||||
if (iel != lel)
|
if (iel != lel)
|
||||||
{
|
{
|
||||||
@ -2598,8 +2598,7 @@ calculatePrm (FiniteElement& fe,
|
|||||||
B.fillColumn(3, b.dNdv.getColumn(gp+1)*2.0/du[1]);
|
B.fillColumn(3, b.dNdv.getColumn(gp+1)*2.0/du[1]);
|
||||||
B.fillColumn(4, b.dNdw.getColumn(gp+1)*2.0/du[2]);
|
B.fillColumn(4, b.dNdw.getColumn(gp+1)*2.0/du[2]);
|
||||||
|
|
||||||
patch.evaluateBasis(fe, result.dNdu, C, B, basis);
|
patch.evaluateBasis(result.N, result.dNdu, C, B);
|
||||||
result.N = fe.N;
|
|
||||||
} else if (nderiv == 2) {
|
} else if (nderiv == 2) {
|
||||||
patch.evaluateBasis(el, fe, result.dNdu, result.d2Ndu2, basis);
|
patch.evaluateBasis(el, fe, result.dNdu, result.d2Ndu2, basis);
|
||||||
result.N = fe.N;
|
result.N = fe.N;
|
||||||
|
@ -632,12 +632,12 @@ protected:
|
|||||||
void getCornerPoints(int iel, std::vector<utl::Point>& XC) const;
|
void getCornerPoints(int iel, std::vector<utl::Point>& XC) const;
|
||||||
|
|
||||||
//! \brief Evaluate all basis functions and first derivatives on one element
|
//! \brief Evaluate all basis functions and first derivatives on one element
|
||||||
void evaluateBasis(int iel, int basis, double u, double v, double w,
|
void evaluateBasis(int iel, double u, double v, double w,
|
||||||
Vector& N, Matrix& dNdu) const;
|
Vector& N, Matrix& dNdu, int basis = 1) const;
|
||||||
|
|
||||||
//! \brief Evaluate all basis functions and first derivatives on one element
|
//! \brief Evaluate all basis functions and first derivatives on one element
|
||||||
void evaluateBasis(FiniteElement& fe, Matrix& dNdu,
|
void evaluateBasis(Vector& N, Matrix& dNdu,
|
||||||
const Matrix& C, const Matrix& B, int basis = 1) const;
|
const Matrix& C, const Matrix& B) const;
|
||||||
|
|
||||||
//! \brief Evaluate all basis functions and first derivatives on one element
|
//! \brief Evaluate all basis functions and first derivatives on one element
|
||||||
void evaluateBasis(int iel, FiniteElement& fe, Matrix& dNdu,
|
void evaluateBasis(int iel, FiniteElement& fe, Matrix& dNdu,
|
||||||
|
@ -577,7 +577,7 @@ bool ASMu3D::faceL2projection (const DirichletFace& face,
|
|||||||
if (gpar[2].size() > 1) w = param[2] = gpar[2](k3+1);
|
if (gpar[2].size() > 1) w = param[2] = gpar[2](k3+1);
|
||||||
|
|
||||||
// Evaluate basis function derivatives at integration points
|
// Evaluate basis function derivatives at integration points
|
||||||
this->evaluateBasis(iel-1, myGeoBasis, u, v, w, N, dNdu);
|
this->evaluateBasis(iel-1, u, v, w, N, dNdu, myGeoBasis);
|
||||||
|
|
||||||
// Compute basis function derivatives
|
// Compute basis function derivatives
|
||||||
double dJxW = dA*wg[i]*wg[j]*utl::Jacobian(Jac,X,dNdX,Xnod,dNdu,t1,t2);
|
double dJxW = dA*wg[i]*wg[j]*utl::Jacobian(Jac,X,dNdX,Xnod,dNdu,t1,t2);
|
||||||
|
Loading…
Reference in New Issue
Block a user