Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
ElementCondenser.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2014 Sandia Corporation. */
3 /* This software is released under the license detailed */
4 /* in the file, LICENSE, which is located in the top-level Nalu */
5 /* directory structure */
6 /*------------------------------------------------------------------------*/
7 #ifndef ElementCondenser_h
8 #define ElementCondenser_h
9 
10 #include <Teuchos_BLAS.hpp>
11 #include <Teuchos_LAPACK.hpp>
12 #include <Teuchos_SerialDenseVector.hpp>
13 #include <Teuchos_SerialDenseMatrix.hpp>
14 #include <Teuchos_SerialDenseSolver.hpp>
15 
16 
17 namespace sierra {
18 namespace nalu {
19 
20  struct ElementDescription;
21 
23  {
24  public:
26 
27  void condense(
28  double* lhs,
29  const double* rhs,
30  double* r_lhs,
31  double* r_rhs
32  );
33 
35  double* lhs,
36  const double* boundary_values,
37  const double* rhs,
38  double* interior_values
39  );
40 
41  int num_boundary_nodes() { return nb_; }
42  int num_internal_nodes() { return ni_; }
43  int nodes_per_element() { return ne_; }
44 
45  private:
46  void chunk(const double* lhs, const double* rhs, double* b_lhs, double* b_rhs);
47  void chunk_lower(const double* lhs, const double* rhs);
48 
49  Teuchos::BLAS<int,double> blas_;
50  Teuchos::LAPACK<int,double> lapack_;
51 
52  std::vector<double> lhsBB_;
53  std::vector<double> lhsIB_;
54  std::vector<double> lhsBI_;
55  std::vector<double> lhsII_;
56  std::vector<double> rhsI_;
57  std::vector<int> ipiv_;
58  int nb_;
59  int ni_;
60  int ne_;
61 
62  };
63 
64 } // namespace nalu
65 } // namespace Sierra
66 
67 #endif
Definition: ElementDescription.h:27
std::vector< double > lhsIB_
Definition: ElementCondenser.h:53
Definition: ABLForcingAlgorithm.C:26
std::vector< double > lhsBI_
Definition: ElementCondenser.h:54
std::vector< double > rhsI_
Definition: ElementCondenser.h:56
std::vector< double > lhsBB_
Definition: ElementCondenser.h:52
int ne_
Definition: ElementCondenser.h:60
Teuchos::BLAS< int, double > blas_
Definition: ElementCondenser.h:49
ElementCondenser(const ElementDescription &elem)
Definition: ElementCondenser.C:27
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
std::vector< double > lhsII_
Definition: ElementCondenser.h:55
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
int num_internal_nodes()
Definition: ElementCondenser.h:42
std::vector< int > ipiv_
Definition: ElementCondenser.h:57
Teuchos::LAPACK< int, double > lapack_
Definition: ElementCondenser.h:50
int num_boundary_nodes()
Definition: ElementCondenser.h:41
void compute_interior_update(double *lhs, const double *boundary_values, const double *rhs, double *interior_values)
Definition: ElementCondenser.C:151
int nb_
Definition: ElementCondenser.h:58
void chunk_lower(const double *lhs, const double *rhs)
void chunk(const double *lhs, const double *rhs, double *b_lhs, double *b_rhs)
void condense(double *lhs, const double *rhs, double *r_lhs, double *r_rhs)
Definition: ElementCondenser.C:68
int nodes_per_element()
Definition: ElementCondenser.h:43
Definition: ElementCondenser.h:22
int ni_
Definition: ElementCondenser.h:59