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
|
||||
//! \return Number of additional nodes added due to local axis constraints
|
||||
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.
|
||||
//! \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] continuous If \e true, a continuous L2-projection is used
|
||||
virtual bool globalL2projection(Matrix& sField,
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous = false) const;
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous = false) const;
|
||||
|
||||
//! \brief Transfers Gauss point variables from old basis to this patch.
|
||||
//! \param[in] oldBasis The LR-spline basis to transfer from
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
@ -149,14 +149,14 @@ void ASMu2Dmx::initMADOF (const int* sysMadof)
|
||||
|
||||
|
||||
void ASMu2Dmx::extractNodeVec (const Vector& globRes, Vector& nodeVec,
|
||||
unsigned char, int basis) const
|
||||
unsigned char, int basis) const
|
||||
{
|
||||
this->extractNodeVecMx(globRes,nodeVec,basis);
|
||||
}
|
||||
|
||||
|
||||
bool ASMu2Dmx::injectNodeVec (const Vector& nodeRes, Vector& globRes,
|
||||
unsigned char, int basis) const
|
||||
unsigned char, int basis) const
|
||||
{
|
||||
this->injectNodeVecMx(globRes,nodeRes,basis);
|
||||
return true;
|
||||
@ -164,7 +164,7 @@ bool ASMu2Dmx::injectNodeVec (const Vector& nodeRes, Vector& globRes,
|
||||
|
||||
|
||||
bool ASMu2Dmx::getSolution (Matrix& sField, const Vector& locSol,
|
||||
const IntVec& nodes) const
|
||||
const IntVec& nodes) const
|
||||
{
|
||||
return this->getSolutionMx(sField,locSol,nodes);
|
||||
}
|
||||
@ -244,8 +244,8 @@ bool ASMu2Dmx::generateFEMTopology ()
|
||||
|
||||
|
||||
bool ASMu2Dmx::integrate (Integrand& integrand,
|
||||
GlobalIntegral& glInt,
|
||||
const TimeDomain& time)
|
||||
GlobalIntegral& glInt,
|
||||
const TimeDomain& time)
|
||||
{
|
||||
if (m_basis.empty())
|
||||
return true; // silently ignore empty patches
|
||||
@ -309,38 +309,38 @@ bool ASMu2Dmx::integrate (Integrand& integrand,
|
||||
for (int j = 0; j < nGauss; j++)
|
||||
for (int i = 0; i < nGauss; i++, fe.iGP++)
|
||||
{
|
||||
// Local element coordinates of current integration point
|
||||
fe.xi = xg[i];
|
||||
fe.eta = xg[j];
|
||||
// Local element coordinates of current integration point
|
||||
fe.xi = xg[i];
|
||||
fe.eta = xg[j];
|
||||
|
||||
// Parameter values of current integration point
|
||||
fe.u = gpar[0][i];
|
||||
fe.v = gpar[1][j];
|
||||
// Parameter values of current integration point
|
||||
fe.u = gpar[0][i];
|
||||
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());
|
||||
for (size_t i=0; i < m_basis.size(); ++i) {
|
||||
m_basis[i]->computeBasis(fe.u, fe.v, splinex[i], els[i]-1);
|
||||
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
|
||||
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)
|
||||
if (b != (size_t)geoBasis-1)
|
||||
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.t = time.t;
|
||||
X.t = time.t;
|
||||
|
||||
// Evaluate the integrand and accumulate element contributions
|
||||
fe.detJxW *= 0.25*dA*wg[i]*wg[j];
|
||||
PROFILE3("Integrand::evalInt");
|
||||
if (!integrand.evalIntMx(*A,fe,time,X))
|
||||
return false;
|
||||
// Evaluate the integrand and accumulate element contributions
|
||||
fe.detJxW *= 0.25*dA*wg[i]*wg[j];
|
||||
PROFILE3("Integrand::evalInt");
|
||||
if (!integrand.evalIntMx(*A,fe,time,X))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Finalize the element quantities
|
||||
@ -359,8 +359,8 @@ bool ASMu2Dmx::integrate (Integrand& integrand,
|
||||
|
||||
|
||||
bool ASMu2Dmx::integrate (Integrand& integrand, int lIndex,
|
||||
GlobalIntegral& glInt,
|
||||
const TimeDomain& time)
|
||||
GlobalIntegral& glInt,
|
||||
const TimeDomain& time)
|
||||
{
|
||||
if (!m_basis[0] || !m_basis[1])
|
||||
return true; // silently ignore empty patches
|
||||
@ -490,7 +490,7 @@ bool ASMu2Dmx::integrate (Integrand& integrand, int lIndex,
|
||||
// Evaluate the integrand and accumulate element contributions
|
||||
fe.detJxW *= 0.5*dS*wg[i];
|
||||
if (!integrand.evalBouMx(*A,fe,time,X,normal))
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Finalize the element quantities
|
||||
@ -569,7 +569,7 @@ bool ASMu2Dmx::evalSolution (Matrix& sField, const Vector& locSol,
|
||||
|
||||
|
||||
bool ASMu2Dmx::evalSolution (Matrix& sField, const IntegrandBase& integrand,
|
||||
const RealArray* gpar, bool regular) const
|
||||
const RealArray* gpar, bool regular) const
|
||||
{
|
||||
return evalSolution(sField,
|
||||
const_cast<IntegrandBase&>(integrand).getSolution(0),
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
//! \param glbInt The integrated quantity
|
||||
//! \param[in] time Parameters for nonlinear/time-dependent simulations
|
||||
virtual bool integrate(Integrand& integrand,
|
||||
GlobalIntegral& glbInt, const TimeDomain& time);
|
||||
GlobalIntegral& glbInt, const TimeDomain& time);
|
||||
|
||||
//! \brief Evaluates a boundary integral over a patch edge.
|
||||
//! \param integrand Object with problem-specific data and methods
|
||||
@ -96,7 +96,7 @@ public:
|
||||
//! \param glbInt The integrated quantity
|
||||
//! \param[in] time Parameters for nonlinear/time-dependent simulations
|
||||
virtual bool integrate(Integrand& integrand, int lIndex,
|
||||
GlobalIntegral& glbInt, const TimeDomain& time);
|
||||
GlobalIntegral& glbInt, const TimeDomain& time);
|
||||
|
||||
|
||||
// Post-processing methods
|
||||
@ -107,7 +107,7 @@ public:
|
||||
//! \param[in] locSol Solution vector local to current patch
|
||||
//! \param[in] nodes 1-based local node numbers to extract solution for
|
||||
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.
|
||||
//! \param[out] sField Solution field
|
||||
@ -139,29 +139,29 @@ public:
|
||||
//! Otherwise, we assume that it contains the \a u and \a v parameters
|
||||
//! directly for each sampling point.
|
||||
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.
|
||||
//! \param[in] globVec Global solution vector in DOF-order
|
||||
//! \param[out] nodeVec Nodal result vector for this patch
|
||||
//! \param[in] basis Which basis (or 0 for both) to extract nodal values for
|
||||
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.
|
||||
//! \param[in] nodeVec Nodal result vector for this patch
|
||||
//! \param[out] globVec Global solution vector in DOF-order
|
||||
//! \param[in] basis Which basis (or 0 for both) to extract nodal values for
|
||||
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.
|
||||
//! \param[out] sField Secondary solution field control point values
|
||||
//! \param[in] integrand Object with problem-specific data and methods
|
||||
//! \param[in] continuous If \e true, a continuous L2-projection is used
|
||||
virtual bool globalL2projection(Matrix& sField,
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous = false) const;
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous = false) const;
|
||||
|
||||
using ASMu2D::refine;
|
||||
//! \brief Refines the mesh adaptively.
|
||||
|
@ -42,8 +42,8 @@ static void expandTensorGrid (const RealArray* in, RealArray* out)
|
||||
|
||||
|
||||
bool ASMu2Dmx::globalL2projection (Matrix& sField,
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous) const
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous) const
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
el_ofs += elem_sizes[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,
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous) const
|
||||
const IntegrandBase& integrand,
|
||||
bool continuous) const
|
||||
{
|
||||
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
|
||||
int i, j, ig = 1;
|
||||
for (j = 0; j < ng2; j++)
|
||||
for (i = 0; i < ng1; i++, ig++)
|
||||
{
|
||||
// Evaluate the polynomial expansion at current Gauss point
|
||||
lrspline->point(X,gaussPt[0][i],gaussPt[1][j]);
|
||||
evalMonomials(n1,n2,X[0]-G[0],X[1]-G[1],P);
|
||||
for (i = 0; i < ng1; i++, ig++)
|
||||
{
|
||||
// Evaluate the polynomial expansion at current Gauss point
|
||||
lrspline->point(X,gaussPt[0][i],gaussPt[1][j]);
|
||||
evalMonomials(n1,n2,X[0]-G[0],X[1]-G[1],P);
|
||||
#if SP_DEBUG > 2
|
||||
std::cout <<"Greville point: "<< G
|
||||
<<"\nGauss point: "<< gaussPt[0][i] <<", "<< gaussPt[0][j]
|
||||
<<"\nMapped gauss point: "<< X
|
||||
<<"\nP-matrix:"<< P <<"--------------------\n"<< std::endl;
|
||||
std::cout <<"Greville point: "<< G
|
||||
<<"\nGauss point: "<< gaussPt[0][i] <<", "<< gaussPt[0][j]
|
||||
<<"\nMapped gauss point: "<< X
|
||||
<<"\nP-matrix:"<< P <<"--------------------\n"<< std::endl;
|
||||
#endif
|
||||
|
||||
for (k = 1; k <= nPol; k++)
|
||||
{
|
||||
// Accumulate the projection matrix, A += P^t * P
|
||||
for (l = 1; l <= nPol; l++)
|
||||
A(k,l) += P(k)*P(l);
|
||||
for (k = 1; k <= nPol; k++)
|
||||
{
|
||||
// Accumulate the projection matrix, A += P^t * P
|
||||
for (l = 1; l <= nPol; l++)
|
||||
A(k,l) += P(k)*P(l);
|
||||
|
||||
// Accumulate the right-hand-side matrix, B += P^t * sigma
|
||||
for (l = 1; l <= nCmp; l++)
|
||||
B(k,l) += P(k)*sField(l,ig);
|
||||
}
|
||||
}
|
||||
// Accumulate the right-hand-side matrix, B += P^t * sigma
|
||||
for (l = 1; l <= nCmp; l++)
|
||||
B(k,l) += P(k)*sField(l,ig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#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