GEOS
LaplaceFEM.hpp
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 Total, S.A
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
16 #ifndef GEOS_PHYSICSSOLVERS_SIMPLEPDE_LAPLACE_FEM_HPP_
17 #define GEOS_PHYSICSSOLVERS_SIMPLEPDE_LAPLACE_FEM_HPP_
18 
19 #include "physicsSolvers/simplePDE/LaplaceBaseH1.hpp" // a base class shared by all Laplace solvers
20 
21 namespace geos
22 {
23 
24 // Like most physics solvers, the Laplace solver derives from a generic PhysicsSolverBase class.
25 // The base class is densely Doxygen-commented and worth a look if you have not done so already.
26 // Most important system assembly steps, linear and non-linear resolutions, and time-stepping mechanisms
27 // are implemented at the PhysicsSolverBase class level and can thus be used in Laplace without needing reimplementation.
28 
29 //START_SPHINX_INCLUDE_BEGINCLASS
30 class LaplaceFEM : public LaplaceBaseH1
31 {
32 public:
34  LaplaceFEM() = delete;
35 
38  LaplaceFEM( const string & name,
39  Group * const parent );
40 
42  virtual ~LaplaceFEM() override;
43 
46  static string catalogName() { return "LaplaceFEM"; }
50  string getCatalogName() const override { return catalogName(); }
51 
52 //END_SPHINX_INCLUDE_BEGINCLASS
53 // /**
54 // * @defgroup Solver Interface Functions
55 // *
56 // * These functions provide the primary interface that is required for derived classes
57 // */
58 // /**@{*/
59 
60 //START_SPHINX_INCLUDE_SOLVERINTERFACE
61  virtual void
63  DofManager & dofManager,
65  ParallelVector & rhs,
66  ParallelVector & solution,
67  bool const setSparsity = false ) override;
68 
69  virtual void
70  assembleSystem( real64 const time,
71  real64 const dt,
72  DomainPartition & domain,
73  DofManager const & dofManager,
75  arrayView1d< real64 > const & localRhs ) override;
76 
77 //END_SPHINX_INCLUDE_SOLVERINTERFACE
78 
81 };
82 } /* namespace geos */
83 
84 #endif /* GEOS_PHYSICSSOLVERS_SIMPLEPDE_LAPLACE_FEM_HPP_ */
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
Definition: DofManager.hpp:44
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
static string catalogName()
Definition: LaplaceFEM.hpp:46
virtual void setupSystem(DomainPartition &domain, DofManager &dofManager, CRSMatrix< real64, globalIndex > &localMatrix, ParallelVector &rhs, ParallelVector &solution, bool const setSparsity=false) override
Set up the linear system (DOF indices and sparsity patterns)
string getCatalogName() const override
Definition: LaplaceFEM.hpp:50
virtual ~LaplaceFEM() override
Destructor.
LaplaceFEM(const string &name, Group *const parent)
LaplaceFEM()=delete
The default nullary constructor is disabled to avoid compiler auto-generation:
virtual void assembleSystem(real64 const time, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
function to assemble the linear system matrix and rhs
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:180
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Definition: DataTypes.hpp:310
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
LvArray::CRSMatrix< T, COL_INDEX, localIndex, LvArray::ChaiBuffer > CRSMatrix
Alias for CRS Matrix class.
Definition: DataTypes.hpp:306
LAInterface::ParallelVector ParallelVector
Alias for ParallelVector.