added: weak scalar Laplacian to ResidualOps
This commit is contained in:
parent
f6e08a4048
commit
0798ab4c8f
@ -268,3 +268,11 @@ void EqualOrderOperators::Residual::Divergence(Vector& EV, const FiniteElement&
|
||||
EV(i) += scale*div*fe.basis(basis)(i)*fe.detJxW;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EqualOrderOperators::Residual::Laplacian(Vector& EV, const FiniteElement& fe,
|
||||
const Vec3& dUdX, double scale, int basis)
|
||||
{
|
||||
size_t nsd = fe.grad(basis).cols();
|
||||
fe.grad(basis).multiply(Vector(dUdX.ptr(),nsd), EV, scale*fe.detJxW, 1);
|
||||
}
|
||||
|
@ -177,6 +177,17 @@ public:
|
||||
const Tensor& dUdX, double scale=1.0,
|
||||
size_t basis=1);
|
||||
|
||||
//! \brief Compute a laplacian term in a residual vector.
|
||||
//! \param EV The element vector to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] dUdX Current solution gradient
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] stress Whether to add extra stress formulation terms
|
||||
//! \param[in] basis Basis to use
|
||||
static void Laplacian(Vector& EV, const FiniteElement& fe,
|
||||
const Vec3& dUdX, double scale=1.0,
|
||||
int basis=1);
|
||||
|
||||
//! \brief Compute a laplacian term in a residual vector.
|
||||
//! \param EV The element vector to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
|
Loading…
Reference in New Issue
Block a user