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

[PL] Move up _global_assembler.

parent 4d0e314a
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "logog/include/logog.hpp" #include "logog/include/logog.hpp"
#include "AssemblerLib/LocalAssemblerBuilder.h" #include "AssemblerLib/LocalAssemblerBuilder.h"
#include "AssemblerLib/VectorMatrixAssembler.h"
#include "AssemblerLib/LocalDataInitializer.h" #include "AssemblerLib/LocalDataInitializer.h"
#include "FileIO/VtkIO/VtuInterface.h" #include "FileIO/VtkIO/VtuInterface.h"
...@@ -159,10 +158,6 @@ public: ...@@ -159,10 +158,6 @@ public:
*_hydraulic_conductivity, *_hydraulic_conductivity,
_integration_order); _integration_order);
DBUG("Create global assembler.");
_global_assembler.reset(new GlobalAssembler(
*(this->_A), *(this->_rhs), *this->_local_to_global_index_map));
DBUG("Initialize boundary conditions."); DBUG("Initialize boundary conditions.");
MeshGeoToolsLib::MeshNodeSearcher& hydraulic_head_mesh_node_searcher = MeshGeoToolsLib::MeshNodeSearcher& hydraulic_head_mesh_node_searcher =
MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeSearcher( MeshGeoToolsLib::MeshNodeSearcher::getMeshNodeSearcher(
...@@ -235,7 +230,8 @@ public: ...@@ -235,7 +230,8 @@ public:
*this->_rhs = 0; // This resets the whole vector. *this->_rhs = 0; // This resets the whole vector.
// Call global assembler for each local assembly item. // Call global assembler for each local assembly item.
this->_global_setup.execute(*_global_assembler, _local_assemblers); this->_global_setup.execute(*this->_global_assembler,
_local_assemblers);
// Call global assembler for each Neumann boundary local assembler. // Call global assembler for each Neumann boundary local assembler.
for (auto bc : _neumann_bcs) for (auto bc : _neumann_bcs)
...@@ -322,14 +318,6 @@ private: ...@@ -322,14 +318,6 @@ private:
std::vector<LocalAssembler*> _local_assemblers; std::vector<LocalAssembler*> _local_assemblers;
using GlobalAssembler =
AssemblerLib::VectorMatrixAssembler<
typename GlobalSetup::MatrixType,
typename GlobalSetup::VectorType>;
std::unique_ptr<GlobalAssembler> _global_assembler;
/// Global ids in the global matrix/vector where the dirichlet bc is /// Global ids in the global matrix/vector where the dirichlet bc is
/// imposed and their corresponding values. /// imposed and their corresponding values.
struct DirichletBC { struct DirichletBC {
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <string> #include <string>
#include "AssemblerLib/ComputeSparsityPattern.h" #include "AssemblerLib/ComputeSparsityPattern.h"
#include "AssemblerLib/VectorMatrixAssembler.h"
#include "AssemblerLib/LocalToGlobalIndexMap.h" #include "AssemblerLib/LocalToGlobalIndexMap.h"
#include "BaseLib/ConfigTree.h" #include "BaseLib/ConfigTree.h"
#include "MathLib/LinAlg/SetMatrixSparsity.h" #include "MathLib/LinAlg/SetMatrixSparsity.h"
...@@ -77,6 +78,10 @@ public: ...@@ -77,6 +78,10 @@ public:
// create global vectors and linear solver // create global vectors and linear solver
createLinearSolver(getLinearSolverName()); createLinearSolver(getLinearSolverName());
DBUG("Create global assembler.");
_global_assembler.reset(
new GlobalAssembler(*_A, *_rhs, *_local_to_global_index_map));
init(); // Execute proces specific initialization. init(); // Execute proces specific initialization.
} }
...@@ -160,6 +165,12 @@ protected: ...@@ -160,6 +165,12 @@ protected:
GlobalSetup _global_setup; GlobalSetup _global_setup;
using GlobalAssembler =
AssemblerLib::VectorMatrixAssembler<typename GlobalSetup::MatrixType,
typename GlobalSetup::VectorType>;
std::unique_ptr<GlobalAssembler> _global_assembler;
std::unique_ptr<AssemblerLib::LocalToGlobalIndexMap> std::unique_ptr<AssemblerLib::LocalToGlobalIndexMap>
_local_to_global_index_map; _local_to_global_index_map;
......
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