Skip to content
Snippets Groups Projects
Commit 2ee9ad5c authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] Add initialize to local assemblers.

Some of the local assembler initialization cannot
be done in its constructor but after initial conditions
have been set. This function allows such initialization
procedures.
parent fb4137c5
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,13 @@ void LocalAssemblerInterface::setInitialConditions( ...@@ -91,6 +91,13 @@ void LocalAssemblerInterface::setInitialConditions(
setInitialConditionsConcrete(local_x, t); setInitialConditionsConcrete(local_x, t);
} }
void LocalAssemblerInterface::initialize(
std::size_t const /*mesh_item_id*/,
NumLib::LocalToGlobalIndexMap const& /*dof_table*/)
{
initializeConcrete();
}
void LocalAssemblerInterface::preTimestep( void LocalAssemblerInterface::preTimestep(
std::size_t const mesh_item_id, std::size_t const mesh_item_id,
NumLib::LocalToGlobalIndexMap const& dof_table, GlobalVector const& x, NumLib::LocalToGlobalIndexMap const& dof_table, GlobalVector const& x,
......
...@@ -39,6 +39,9 @@ public: ...@@ -39,6 +39,9 @@ public:
NumLib::LocalToGlobalIndexMap const& dof_table, GlobalVector const& x, NumLib::LocalToGlobalIndexMap const& dof_table, GlobalVector const& x,
double const t); double const t);
virtual void initialize(std::size_t const mesh_item_id,
NumLib::LocalToGlobalIndexMap const& dof_table);
virtual void preAssemble(double const /*t*/, virtual void preAssemble(double const /*t*/,
std::vector<double> const& /*local_x*/){}; std::vector<double> const& /*local_x*/){};
...@@ -116,6 +119,8 @@ private: ...@@ -116,6 +119,8 @@ private:
{ {
} }
virtual void initializeConcrete() {}
virtual void preTimestepConcrete(std::vector<double> const& /*local_x*/, virtual void preTimestepConcrete(std::vector<double> const& /*local_x*/,
double const /*t*/, double const /*dt*/) double const /*t*/, double const /*dt*/)
{ {
......
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