Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90665283
sparse_solver.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Nov 3, 17:05
Size
4 KB
Mime Type
text/x-c++
Expires
Tue, Nov 5, 17:05 (2 d)
Engine
blob
Format
Raw Data
Handle
22025614
Attached To
rAKA akantu
sparse_solver.hh
View Options
/**
* @file sparse_solver.hh
*
* @author Aurelia Isabel Cuba Ramos <aurelia.cubaramos@epfl.ch>
* @author Nicolas Richart <nicolas.richart@epfl.ch>
*
* @date creation: Fri Jun 18 2010
* @date last modification: Tue Jan 19 2016
*
* @brief interface for solvers
*
* @section LICENSE
*
* Copyright (©) 2010-2012, 2014, 2015 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "aka_memory.hh"
//#include "data_accessor.hh"
#include "parsable.hh"
#include "static_communicator.hh"
/* -------------------------------------------------------------------------- */
#ifndef __AKANTU_SOLVER_HH__
#define __AKANTU_SOLVER_HH__
namespace akantu {
enum SolverParallelMethod {
_not_parallel,
_fully_distributed,
_master_slave_distributed
};
class DOFManager;
}
__BEGIN_AKANTU__
class SparseSolver : protected Memory,
public Parsable,
public CommunicatorEventHandler {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
SparseSolver(DOFManager & dof_manager, const ID & matrix_id,
const ID & id = "solver", const MemoryID & memory_id = 0);
virtual ~SparseSolver();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
/// initialize the solver
virtual void initialize() = 0;
virtual void analysis(){};
virtual void factorize(){};
virtual void solve(){};
protected:
virtual void destroyInternalData(){};
public:
virtual void beforeStaticSolverDestroy();
void createSynchronizerRegistry();
/* ------------------------------------------------------------------------ */
/* Data Accessor inherited members */
/* ------------------------------------------------------------------------ */
public:
virtual void onCommunicatorFinalize();
// inline virtual UInt getNbDataForDOFs(const Array<UInt> & dofs,
// SynchronizationTag tag) const;
// inline virtual void packDOFData(CommunicationBuffer & buffer,
// const Array<UInt> & dofs,
// SynchronizationTag tag) const;
// inline virtual void unpackDOFData(CommunicationBuffer & buffer,
// const Array<UInt> & dofs,
// SynchronizationTag tag);
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected:
/// manager handling the dofs for this SparseMatrix solver
DOFManager & _dof_manager;
/// The id of the associated matrix
ID matrix_id;
/// How to parallelize the solve
SolverParallelMethod parallel_method;
/// Communicator used by the solver
const StaticCommunicator & communicator;
};
__END_AKANTU__
#endif /* __AKANTU_SOLVER_HH__ */
Event Timeline
Log In to Comment