Skip to content
Snippets Groups Projects
Commit 5e9d0140 authored by renchao.lu's avatar renchao.lu
Browse files

[PL] Get interpolated local solution.

parent 27a40299
No related branches found
No related tags found
No related merge requests found
...@@ -70,6 +70,12 @@ public: ...@@ -70,6 +70,12 @@ public:
std::vector<NumLib::LocalToGlobalIndexMap const*> const& dof_table, std::vector<NumLib::LocalToGlobalIndexMap const*> const& dof_table,
std::vector<double>& cache) const = 0; std::vector<double>& cache) const = 0;
virtual std::vector<double> const& getInterpolatedLocalSolution(
const double /*t*/,
std::vector<GlobalVector*> const& int_pt_x,
std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
std::vector<double>& cache) const = 0;
protected: protected:
CoupledSolutionsForStaggeredScheme* _coupled_solutions{nullptr}; CoupledSolutionsForStaggeredScheme* _coupled_solutions{nullptr};
}; };
...@@ -891,6 +897,24 @@ public: ...@@ -891,6 +897,24 @@ public:
return flux; return flux;
} }
std::vector<double> const& getInterpolatedLocalSolution(
const double /*t*/,
std::vector<GlobalVector*> const& int_pt_x,
std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
std::vector<double>& cache) const override
{
assert(_process_data.chemical_process_data);
assert(int_pt_x.size() == 1);
cache.clear();
auto const ele_id = _element.getID();
auto const& indices = _process_data.chemical_process_data
->chemical_system_index_map[ele_id];
cache = int_pt_x[0]->get(indices);
return cache;
}
private: private:
MeshLib::Element const& _element; MeshLib::Element const& _element;
ComponentTransportProcessData const& _process_data; ComponentTransportProcessData const& _process_data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment