Cosmetics: swapped tabs with spaces in src/ASM/LR/*
This commit is contained in:
parent
a8bb09061e
commit
3af27da811
File diff suppressed because it is too large
Load Diff
@ -164,7 +164,7 @@ public:
|
|||||||
//! \param[in] project If \e true, the local axis directions are projected
|
//! \param[in] project If \e true, the local axis directions are projected
|
||||||
//! \return Number of additional nodes added due to local axis constraints
|
//! \return Number of additional nodes added due to local axis constraints
|
||||||
virtual size_t constrainEdgeLocal(int dir, bool open, int dof, int code,
|
virtual size_t constrainEdgeLocal(int dir, bool open, int dof, int code,
|
||||||
bool project = false);
|
bool project = false);
|
||||||
|
|
||||||
//! \brief Constrains a corner node identified by the two parameter indices.
|
//! \brief Constrains a corner node identified by the two parameter indices.
|
||||||
//! \param[in] I Parameter index in u-direction
|
//! \param[in] I Parameter index in u-direction
|
||||||
@ -358,8 +358,8 @@ public:
|
|||||||
//! \param[in] integrand Object with problem-specific data and methods
|
//! \param[in] integrand Object with problem-specific data and methods
|
||||||
//! \param[in] continuous If \e true, a continuous L2-projection is used
|
//! \param[in] continuous If \e true, a continuous L2-projection is used
|
||||||
virtual bool globalL2projection(Matrix& sField,
|
virtual bool globalL2projection(Matrix& sField,
|
||||||
const IntegrandBase& integrand,
|
const IntegrandBase& integrand,
|
||||||
bool continuous = false) const;
|
bool continuous = false) const;
|
||||||
|
|
||||||
//! \brief Transfers Gauss point variables from old basis to this patch.
|
//! \brief Transfers Gauss point variables from old basis to this patch.
|
||||||
//! \param[in] oldBasis The LR-spline basis to transfer from
|
//! \param[in] oldBasis The LR-spline basis to transfer from
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
|
|
||||||
ASMu2Dmx::ASMu2Dmx (unsigned char n_s,
|
ASMu2Dmx::ASMu2Dmx (unsigned char n_s,
|
||||||
const std::vector<unsigned char>& n_f)
|
const std::vector<unsigned char>& n_f)
|
||||||
: ASMu2D(n_s), ASMmxBase(n_f)
|
: ASMu2D(n_s), ASMmxBase(n_f)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -149,14 +149,14 @@ void ASMu2Dmx::initMADOF (const int* sysMadof)
|
|||||||
|
|
||||||
|
|
||||||
void ASMu2Dmx::extractNodeVec (const Vector& globRes, Vector& nodeVec,
|
void ASMu2Dmx::extractNodeVec (const Vector& globRes, Vector& nodeVec,
|
||||||
unsigned char, int basis) const
|
unsigned char, int basis) const
|
||||||
{
|
{
|
||||||
this->extractNodeVecMx(globRes,nodeVec,basis);
|
this->extractNodeVecMx(globRes,nodeVec,basis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ASMu2Dmx::injectNodeVec (const Vector& nodeRes, Vector& globRes,
|
bool ASMu2Dmx::injectNodeVec (const Vector& nodeRes, Vector& globRes,
|
||||||
unsigned char, int basis) const
|
unsigned char, int basis) const
|
||||||
{
|
{
|
||||||
this->injectNodeVecMx(globRes,nodeRes,basis);
|
this->injectNodeVecMx(globRes,nodeRes,basis);
|
||||||
return true;
|
return true;
|
||||||
@ -164,7 +164,7 @@ bool ASMu2Dmx::injectNodeVec (const Vector& nodeRes, Vector& globRes,
|
|||||||
|
|
||||||
|
|
||||||
bool ASMu2Dmx::getSolution (Matrix& sField, const Vector& locSol,
|
bool ASMu2Dmx::getSolution (Matrix& sField, const Vector& locSol,
|
||||||
const IntVec& nodes) const
|
const IntVec& nodes) const
|
||||||
{
|
{
|
||||||
return this->getSolutionMx(sField,locSol,nodes);
|
return this->getSolutionMx(sField,locSol,nodes);
|
||||||
}
|
}
|
||||||
@ -244,8 +244,8 @@ bool ASMu2Dmx::generateFEMTopology ()
|
|||||||
|
|
||||||
|
|
||||||
bool ASMu2Dmx::integrate (Integrand& integrand,
|
bool ASMu2Dmx::integrate (Integrand& integrand,
|
||||||
GlobalIntegral& glInt,
|
GlobalIntegral& glInt,
|
||||||
const TimeDomain& time)
|
const TimeDomain& time)
|
||||||
{
|
{
|
||||||
if (m_basis.empty())
|
if (m_basis.empty())
|
||||||
return true; // silently ignore empty patches
|
return true; // silently ignore empty patches
|
||||||
@ -309,38 +309,38 @@ bool ASMu2Dmx::integrate (Integrand& integrand,
|
|||||||
for (int j = 0; j < nGauss; j++)
|
for (int j = 0; j < nGauss; j++)
|
||||||
for (int i = 0; i < nGauss; i++, fe.iGP++)
|
for (int i = 0; i < nGauss; i++, fe.iGP++)
|
||||||
{
|
{
|
||||||
// Local element coordinates of current integration point
|
// Local element coordinates of current integration point
|
||||||
fe.xi = xg[i];
|
fe.xi = xg[i];
|
||||||
fe.eta = xg[j];
|
fe.eta = xg[j];
|
||||||
|
|
||||||
// Parameter values of current integration point
|
// Parameter values of current integration point
|
||||||
fe.u = gpar[0][i];
|
fe.u = gpar[0][i];
|
||||||
fe.v = gpar[1][j];
|
fe.v = gpar[1][j];
|
||||||
|
|
||||||
// Compute basis function derivatives at current integration point
|
// Compute basis function derivatives at current integration point
|
||||||
std::vector<Go::BasisDerivsSf> splinex(m_basis.size());
|
std::vector<Go::BasisDerivsSf> splinex(m_basis.size());
|
||||||
for (size_t i=0; i < m_basis.size(); ++i) {
|
for (size_t i=0; i < m_basis.size(); ++i) {
|
||||||
m_basis[i]->computeBasis(fe.u, fe.v, splinex[i], els[i]-1);
|
m_basis[i]->computeBasis(fe.u, fe.v, splinex[i], els[i]-1);
|
||||||
SplineUtils::extractBasis(splinex[i],fe.basis(i+1),dNxdu[i]);
|
SplineUtils::extractBasis(splinex[i],fe.basis(i+1),dNxdu[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute Jacobian inverse of coordinate mapping and derivatives
|
// Compute Jacobian inverse of coordinate mapping and derivatives
|
||||||
// basis function derivatives w.r.t. Cartesian coordinates
|
// basis function derivatives w.r.t. Cartesian coordinates
|
||||||
fe.detJxW = utl::Jacobian(Jac,fe.grad(geoBasis),Xnod,dNxdu[geoBasis-1]);
|
fe.detJxW = utl::Jacobian(Jac,fe.grad(geoBasis),Xnod,dNxdu[geoBasis-1]);
|
||||||
if (fe.detJxW == 0.0) continue; // skip singular points
|
if (fe.detJxW == 0.0) continue; // skip singular points
|
||||||
for (size_t b = 0; b < m_basis.size(); ++b)
|
for (size_t b = 0; b < m_basis.size(); ++b)
|
||||||
if (b != (size_t)geoBasis-1)
|
if (b != (size_t)geoBasis-1)
|
||||||
fe.grad(b+1).multiply(dNxdu[b],Jac);
|
fe.grad(b+1).multiply(dNxdu[b],Jac);
|
||||||
|
|
||||||
// Cartesian coordinates of current integration point
|
// Cartesian coordinates of current integration point
|
||||||
X = Xnod * fe.basis(geoBasis);
|
X = Xnod * fe.basis(geoBasis);
|
||||||
X.t = time.t;
|
X.t = time.t;
|
||||||
|
|
||||||
// Evaluate the integrand and accumulate element contributions
|
// Evaluate the integrand and accumulate element contributions
|
||||||
fe.detJxW *= 0.25*dA*wg[i]*wg[j];
|
fe.detJxW *= 0.25*dA*wg[i]*wg[j];
|
||||||
PROFILE3("Integrand::evalInt");
|
PROFILE3("Integrand::evalInt");
|
||||||
if (!integrand.evalIntMx(*A,fe,time,X))
|
if (!integrand.evalIntMx(*A,fe,time,X))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finalize the element quantities
|
// Finalize the element quantities
|
||||||
@ -359,8 +359,8 @@ bool ASMu2Dmx::integrate (Integrand& integrand,
|
|||||||
|
|
||||||
|
|
||||||
bool ASMu2Dmx::integrate (Integrand& integrand, int lIndex,
|
bool ASMu2Dmx::integrate (Integrand& integrand, int lIndex,
|
||||||
GlobalIntegral& glInt,
|
GlobalIntegral& glInt,
|
||||||
const TimeDomain& time)
|
const TimeDomain& time)
|
||||||
{
|
{
|
||||||
if (!m_basis[0] || !m_basis[1])
|
if (!m_basis[0] || !m_basis[1])
|
||||||
return true; // silently ignore empty patches
|
return true; // silently ignore empty patches
|
||||||
@ -490,7 +490,7 @@ bool ASMu2Dmx::integrate (Integrand& integrand, int lIndex,
|
|||||||
// Evaluate the integrand and accumulate element contributions
|
// Evaluate the integrand and accumulate element contributions
|
||||||
fe.detJxW *= 0.5*dS*wg[i];
|
fe.detJxW *= 0.5*dS*wg[i];
|
||||||
if (!integrand.evalBouMx(*A,fe,time,X,normal))
|
if (!integrand.evalBouMx(*A,fe,time,X,normal))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finalize the element quantities
|
// Finalize the element quantities
|
||||||
@ -569,7 +569,7 @@ bool ASMu2Dmx::evalSolution (Matrix& sField, const Vector& locSol,
|
|||||||
|
|
||||||
|
|
||||||
bool ASMu2Dmx::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
bool ASMu2Dmx::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
||||||
const RealArray* gpar, bool regular) const
|
const RealArray* gpar, bool regular) const
|
||||||
{
|
{
|
||||||
return evalSolution(sField,
|
return evalSolution(sField,
|
||||||
const_cast<IntegrandBase&>(integrand).getSolution(0),
|
const_cast<IntegrandBase&>(integrand).getSolution(0),
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
//! \param glbInt The integrated quantity
|
//! \param glbInt The integrated quantity
|
||||||
//! \param[in] time Parameters for nonlinear/time-dependent simulations
|
//! \param[in] time Parameters for nonlinear/time-dependent simulations
|
||||||
virtual bool integrate(Integrand& integrand,
|
virtual bool integrate(Integrand& integrand,
|
||||||
GlobalIntegral& glbInt, const TimeDomain& time);
|
GlobalIntegral& glbInt, const TimeDomain& time);
|
||||||
|
|
||||||
//! \brief Evaluates a boundary integral over a patch edge.
|
//! \brief Evaluates a boundary integral over a patch edge.
|
||||||
//! \param integrand Object with problem-specific data and methods
|
//! \param integrand Object with problem-specific data and methods
|
||||||
@ -96,7 +96,7 @@ public:
|
|||||||
//! \param glbInt The integrated quantity
|
//! \param glbInt The integrated quantity
|
||||||
//! \param[in] time Parameters for nonlinear/time-dependent simulations
|
//! \param[in] time Parameters for nonlinear/time-dependent simulations
|
||||||
virtual bool integrate(Integrand& integrand, int lIndex,
|
virtual bool integrate(Integrand& integrand, int lIndex,
|
||||||
GlobalIntegral& glbInt, const TimeDomain& time);
|
GlobalIntegral& glbInt, const TimeDomain& time);
|
||||||
|
|
||||||
|
|
||||||
// Post-processing methods
|
// Post-processing methods
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
//! \param[in] locSol Solution vector local to current patch
|
//! \param[in] locSol Solution vector local to current patch
|
||||||
//! \param[in] nodes 1-based local node numbers to extract solution for
|
//! \param[in] nodes 1-based local node numbers to extract solution for
|
||||||
virtual bool getSolution(Matrix& sField, const Vector& locSol,
|
virtual bool getSolution(Matrix& sField, const Vector& locSol,
|
||||||
const IntVec& nodes) const;
|
const IntVec& nodes) const;
|
||||||
|
|
||||||
//! \brief Evaluates the primary solution field at the given points.
|
//! \brief Evaluates the primary solution field at the given points.
|
||||||
//! \param[out] sField Solution field
|
//! \param[out] sField Solution field
|
||||||
@ -139,29 +139,29 @@ public:
|
|||||||
//! Otherwise, we assume that it contains the \a u and \a v parameters
|
//! Otherwise, we assume that it contains the \a u and \a v parameters
|
||||||
//! directly for each sampling point.
|
//! directly for each sampling point.
|
||||||
virtual bool evalSolution(Matrix& sField, const IntegrandBase& integrand,
|
virtual bool evalSolution(Matrix& sField, const IntegrandBase& integrand,
|
||||||
const RealArray* gpar, bool regular = true) const;
|
const RealArray* gpar, bool regular = true) const;
|
||||||
|
|
||||||
//! \brief Extracts nodal results for this patch from the global vector.
|
//! \brief Extracts nodal results for this patch from the global vector.
|
||||||
//! \param[in] globVec Global solution vector in DOF-order
|
//! \param[in] globVec Global solution vector in DOF-order
|
||||||
//! \param[out] nodeVec Nodal result vector for this patch
|
//! \param[out] nodeVec Nodal result vector for this patch
|
||||||
//! \param[in] basis Which basis (or 0 for both) to extract nodal values for
|
//! \param[in] basis Which basis (or 0 for both) to extract nodal values for
|
||||||
virtual void extractNodeVec(const Vector& globVec, Vector& nodeVec,
|
virtual void extractNodeVec(const Vector& globVec, Vector& nodeVec,
|
||||||
unsigned char = 0, int basis = 0) const;
|
unsigned char = 0, int basis = 0) const;
|
||||||
|
|
||||||
//! \brief Inject nodal results for this patch into a global vector.
|
//! \brief Inject nodal results for this patch into a global vector.
|
||||||
//! \param[in] nodeVec Nodal result vector for this patch
|
//! \param[in] nodeVec Nodal result vector for this patch
|
||||||
//! \param[out] globVec Global solution vector in DOF-order
|
//! \param[out] globVec Global solution vector in DOF-order
|
||||||
//! \param[in] basis Which basis (or 0 for both) to extract nodal values for
|
//! \param[in] basis Which basis (or 0 for both) to extract nodal values for
|
||||||
virtual bool injectNodeVec(const Vector& nodeVec, Vector& globVec,
|
virtual bool injectNodeVec(const Vector& nodeVec, Vector& globVec,
|
||||||
unsigned char = 0, int basis = 0) const;
|
unsigned char = 0, int basis = 0) const;
|
||||||
|
|
||||||
//! \brief Projects the secondary solution using a discrete global L2-norm.
|
//! \brief Projects the secondary solution using a discrete global L2-norm.
|
||||||
//! \param[out] sField Secondary solution field control point values
|
//! \param[out] sField Secondary solution field control point values
|
||||||
//! \param[in] integrand Object with problem-specific data and methods
|
//! \param[in] integrand Object with problem-specific data and methods
|
||||||
//! \param[in] continuous If \e true, a continuous L2-projection is used
|
//! \param[in] continuous If \e true, a continuous L2-projection is used
|
||||||
virtual bool globalL2projection(Matrix& sField,
|
virtual bool globalL2projection(Matrix& sField,
|
||||||
const IntegrandBase& integrand,
|
const IntegrandBase& integrand,
|
||||||
bool continuous = false) const;
|
bool continuous = false) const;
|
||||||
|
|
||||||
using ASMu2D::refine;
|
using ASMu2D::refine;
|
||||||
//! \brief Refines the mesh adaptively.
|
//! \brief Refines the mesh adaptively.
|
||||||
|
@ -42,8 +42,8 @@ static void expandTensorGrid (const RealArray* in, RealArray* out)
|
|||||||
|
|
||||||
|
|
||||||
bool ASMu2Dmx::globalL2projection (Matrix& sField,
|
bool ASMu2Dmx::globalL2projection (Matrix& sField,
|
||||||
const IntegrandBase& integrand,
|
const IntegrandBase& integrand,
|
||||||
bool continuous) const
|
bool continuous) const
|
||||||
{
|
{
|
||||||
if (!m_basis[0] || !m_basis[1]) return true; // silently ignore empty patches
|
if (!m_basis[0] || !m_basis[1]) return true; // silently ignore empty patches
|
||||||
|
|
||||||
@ -158,14 +158,14 @@ bool ASMu2Dmx::globalL2projection (Matrix& sField,
|
|||||||
int jnod = MNPC[iel-1][jj+el_ofs]+1;
|
int jnod = MNPC[iel-1][jj+el_ofs]+1;
|
||||||
for (size_t k=1;k<=nfx[b];++k) {
|
for (size_t k=1;k<=nfx[b];++k) {
|
||||||
A((inod-nod_ofs)*nfx[b]+k+eq_ofs,(jnod-nod_ofs)*nfx[b]+k+eq_ofs) += phi[b][ii]*phi[b][jj]*dJw;
|
A((inod-nod_ofs)*nfx[b]+k+eq_ofs,(jnod-nod_ofs)*nfx[b]+k+eq_ofs) += phi[b][ii]*phi[b][jj]*dJw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (size_t k=1;k<=nfx[b];++k)
|
for (size_t k=1;k<=nfx[b];++k)
|
||||||
B((inod-nod_ofs)*nfx[b]+k+eq_ofs) += phi[b][ii]*sField(k,ip+1)*dJw;
|
B((inod-nod_ofs)*nfx[b]+k+eq_ofs) += phi[b][ii]*sField(k,ip+1)*dJw;
|
||||||
}
|
}
|
||||||
el_ofs += elem_sizes[b];
|
el_ofs += elem_sizes[b];
|
||||||
eq_ofs += nb[b]*nfx[b];
|
eq_ofs += nb[b]*nfx[b];
|
||||||
nod_ofs += nb[b];
|
nod_ofs += nb[b];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,8 +96,8 @@ LR::LRSpline* ASMu2D::evalSolution (const IntegrandBase& integrand) const
|
|||||||
|
|
||||||
|
|
||||||
bool ASMu2D::globalL2projection (Matrix& sField,
|
bool ASMu2D::globalL2projection (Matrix& sField,
|
||||||
const IntegrandBase& integrand,
|
const IntegrandBase& integrand,
|
||||||
bool continuous) const
|
bool continuous) const
|
||||||
{
|
{
|
||||||
if (!lrspline) return true; // silently ignore empty patches
|
if (!lrspline) return true; // silently ignore empty patches
|
||||||
|
|
||||||
@ -339,29 +339,29 @@ LR::LRSplineSurface* ASMu2D::scRecovery (const IntegrandBase& integrand) const
|
|||||||
// Loop over the Gauss points in current knot-span
|
// Loop over the Gauss points in current knot-span
|
||||||
int i, j, ig = 1;
|
int i, j, ig = 1;
|
||||||
for (j = 0; j < ng2; j++)
|
for (j = 0; j < ng2; j++)
|
||||||
for (i = 0; i < ng1; i++, ig++)
|
for (i = 0; i < ng1; i++, ig++)
|
||||||
{
|
{
|
||||||
// Evaluate the polynomial expansion at current Gauss point
|
// Evaluate the polynomial expansion at current Gauss point
|
||||||
lrspline->point(X,gaussPt[0][i],gaussPt[1][j]);
|
lrspline->point(X,gaussPt[0][i],gaussPt[1][j]);
|
||||||
evalMonomials(n1,n2,X[0]-G[0],X[1]-G[1],P);
|
evalMonomials(n1,n2,X[0]-G[0],X[1]-G[1],P);
|
||||||
#if SP_DEBUG > 2
|
#if SP_DEBUG > 2
|
||||||
std::cout <<"Greville point: "<< G
|
std::cout <<"Greville point: "<< G
|
||||||
<<"\nGauss point: "<< gaussPt[0][i] <<", "<< gaussPt[0][j]
|
<<"\nGauss point: "<< gaussPt[0][i] <<", "<< gaussPt[0][j]
|
||||||
<<"\nMapped gauss point: "<< X
|
<<"\nMapped gauss point: "<< X
|
||||||
<<"\nP-matrix:"<< P <<"--------------------\n"<< std::endl;
|
<<"\nP-matrix:"<< P <<"--------------------\n"<< std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (k = 1; k <= nPol; k++)
|
for (k = 1; k <= nPol; k++)
|
||||||
{
|
{
|
||||||
// Accumulate the projection matrix, A += P^t * P
|
// Accumulate the projection matrix, A += P^t * P
|
||||||
for (l = 1; l <= nPol; l++)
|
for (l = 1; l <= nPol; l++)
|
||||||
A(k,l) += P(k)*P(l);
|
A(k,l) += P(k)*P(l);
|
||||||
|
|
||||||
// Accumulate the right-hand-side matrix, B += P^t * sigma
|
// Accumulate the right-hand-side matrix, B += P^t * sigma
|
||||||
for (l = 1; l <= nCmp; l++)
|
for (l = 1; l <= nCmp; l++)
|
||||||
B(k,l) += P(k)*sField(l,ig);
|
B(k,l) += P(k)*sField(l,ig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SP_DEBUG > 2
|
#if SP_DEBUG > 2
|
||||||
|
2186
src/ASM/LR/ASMu3D.C
2186
src/ASM/LR/ASMu3D.C
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user