Commit 2c68e01c authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov

Merge branch 'LIEExtrapolationImprovement' into 'master'

LIE extrapolation improvements.

See merge request !3117
parents 0b0256e5 2f8afa40
Pipeline #1442 passed with stages
in 83 minutes and 48 seconds
......@@ -150,6 +150,12 @@ void LocalLinearLeastSquaresExtrapolator::extrapolateElement(
extrapolatables.getIntegrationPointValues(
element_index, t, x, dof_table, _integration_point_values_cache);
// Empty vector means to ignore the values and not to change the counts.
if (integration_point_values.empty())
{
return;
}
auto const& N_0 = extrapolatables.getShapeMatrix(element_index, 0);
auto const num_nodes = static_cast<unsigned>(N_0.cols());
auto const num_values =
......
......@@ -61,15 +61,6 @@ public:
const double t, double const dt,
Eigen::VectorXd const& local_x) override;
Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
const unsigned integration_point) const override
{
auto const& N = _ip_data[integration_point].N_p;
// assumes N is stored contiguously in memory
return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
}
private:
void assembleWithJacobianConcrete(double const t, double const dt,
Eigen::VectorXd const& local_x,
......
......@@ -17,7 +17,6 @@
#include "MeshLib/Elements/Element.h"
#include "NumLib/Extrapolation/ExtrapolatableElement.h"
#include "ProcessLib/LocalAssemblerInterface.h"
namespace ProcessLib
......@@ -27,8 +26,7 @@ namespace LIE
namespace HydroMechanics
{
class HydroMechanicsLocalAssemblerInterface
: public ProcessLib::LocalAssemblerInterface,
public NumLib::ExtrapolatableElement
: public ProcessLib::LocalAssemblerInterface
{
public:
HydroMechanicsLocalAssemblerInterface(MeshLib::Element const& element,
......
......@@ -58,15 +58,6 @@ public:
}
}
Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
const unsigned integration_point) const override
{
auto const& N = _ip_data[integration_point].N_u;
// assumes N is stored contiguously in memory
return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
}
protected:
void assembleWithJacobianConcrete(double const t, double const dt,
Eigen::VectorXd const& local_x,
......
......@@ -222,15 +222,14 @@ private:
std::vector<double> const& getIntPtSigma(
std::vector<double>& cache, std::size_t const /*component*/) const
{
cache.resize(_ip_data.size());
cache.resize(0);
return cache;
}
std::vector<double> const& getIntPtEpsilon(
std::vector<double>& cache, std::size_t const /*component*/) const
{
cache.resize(_ip_data.size());
cache.resize(0);
return cache;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment