#include <SpectralLegendreDiscretizationConform.hpp>


Definition at line 41 of file SpectralLegendreDiscretizationConform.hpp.
| SpectralLegendreDiscretizationConform::SpectralLegendreDiscretizationConform | ( | const Problem & | p, | |
| const SpectralMesh & | m, | |||
| BaseMatrix & | a, | |||
| BaseVector & | bb, | |||
| const DegreeOfFreedomSet & | dof, | |||
| const DiscretizationType & | discretizationType | |||
| ) |
Constructor of the discretization
| p | the problem | |
| m | the mesh used for discretization | |
| a | matrix storing discretization | |
| bb | vector that stores second member discretization | |
| dof | degrees of freedom set | |
| discretizationType | type of discretization |
Definition at line 23 of file SpectralLegendreDiscretizationConform.cpp.
00029 : Discretization(discretizationType, 00030 p, a, bb), 00031 __spectralLegendreDiscretizer(p,m,a,bb,dof,discretizationType), 00032 __degreeOfFreedomSet(dof), 00033 __mesh(m) 00034 { 00035 ; 00036 }
| SpectralLegendreDiscretizationConform::~SpectralLegendreDiscretizationConform | ( | ) |
| void SpectralLegendreDiscretizationConform::assembleMatrix | ( | ) | [inline, virtual] |
Assembles the matrix associated to the PDE operators of the PDE problem.
Implements Discretization.
Definition at line 57 of file SpectralLegendreDiscretizationConform.hpp.
References Discretization::__A, Discretization::A(), BaseMatrix::doubleHashedMatrix, UnAssembledMatrix::setDiscretization(), BaseMatrix::unAssembled, and ErrorHandler::unexpected.
00058 { 00059 switch ((this->__A).type()) { 00060 case BaseMatrix::doubleHashedMatrix: { 00061 throw ErrorHandler(__FILE__,__LINE__, 00062 "Spectral Method cannot be used with assembled matrices", 00063 ErrorHandler::unexpected); 00064 } 00065 case BaseMatrix::unAssembled: { 00066 UnAssembledMatrix& A = dynamic_cast<UnAssembledMatrix&>(this->__A); 00067 A.setDiscretization(this); 00068 break; 00069 } 00070 default: { 00071 throw ErrorHandler(__FILE__,__LINE__, 00072 "unexpected matrix type", 00073 ErrorHandler::unexpected); 00074 } 00075 } 00076 }

| void SpectralLegendreDiscretizationConform::timesX | ( | const BaseVector & | u, | |
| BaseVector & | v | |||
| ) | const [inline, virtual] |
Applies directly the operator discretization to the vector X.
| u | input vector | |
| v | |
Implements Discretization.
Definition at line 84 of file SpectralLegendreDiscretizationConform.hpp.
References __spectralLegendreDiscretizer, and SpectralLegendreDiscretizer::timesX().
00085 { 00086 dynamic_cast<Vector<real_t>&>(v)=0; 00087 __spectralLegendreDiscretizer.timesX(u,v); 00088 }

| void SpectralLegendreDiscretizationConform::transposedTimesX | ( | const BaseVector & | u, | |
| BaseVector & | v | |||
| ) | const [inline, virtual] |
Applies directly the operator discretization to the vector X.
| u | input vector | |
| v | |
Implements Discretization.
Definition at line 96 of file SpectralLegendreDiscretizationConform.hpp.
References __spectralLegendreDiscretizer, and SpectralLegendreDiscretizer::transposedTimesX().
00097 { 00098 dynamic_cast<Vector<real_t>&>(v) = 0; 00099 __spectralLegendreDiscretizer.transposedTimesX(u,v); 00100 }

| void SpectralLegendreDiscretizationConform::getDiagonal | ( | BaseVector & | z | ) | const [inline, virtual] |
Computes diagonal of the operator
| z | diagonal of the operator |
Implements Discretization.
Definition at line 107 of file SpectralLegendreDiscretizationConform.hpp.
References __spectralLegendreDiscretizer, and SpectralLegendreDiscretizer::getDiagonal().
00108 { 00109 dynamic_cast<Vector<real_t>&>(z)=0; 00110 __spectralLegendreDiscretizer.getDiagonal(z); 00111 }

| void SpectralLegendreDiscretizationConform::getMultiDiagonal | ( | BaseMatrix & | A | ) | const [inline] |
Computes diagonal of the operator
| A | multi-diagonal matrix |
Definition at line 118 of file SpectralLegendreDiscretizationConform.hpp.
References __spectralLegendreDiscretizer, SpectralLegendreDiscretizer::getMultiDiagonal(), and BaseMatrix::reset().
00119 { 00120 A.reset(); 00121 __spectralLegendreDiscretizer.getMultiDiagonal(A); 00122 }

| void SpectralLegendreDiscretizationConform::assembleSecondMember | ( | ) | [inline, virtual] |
Second member assembling
The elementary vector
Implements Discretization.
Definition at line 128 of file SpectralLegendreDiscretizationConform.hpp.
References Discretization::__b, __spectralLegendreDiscretizer, SpectralLegendreDiscretizer::assembleSecondMember(), Discretization::b(), ffout(), Timer::start(), and Timer::stop().
00129 { 00130 Timer t; 00131 t.start(); 00132 00133 ffout(2) << "- assembling second member\n"; 00134 00136 Vector<real_t>& b = (static_cast<Vector<real_t>&>(this->__b)); 00137 b = 0; 00138 00139 __spectralLegendreDiscretizer.assembleSecondMember(); 00140 00141 ffout(2) << "- assembling second member: done"; 00142 t.stop(); 00143 ffout(3) << " [cost: " << t << ']'; 00144 ffout(2) << '\n'; 00145 }

| void Discretization::setDirichletList | ( | const Vector< bool > & | dirichletList | ) | [inline, inherited] |
Sets dirichlet vertices list
| dirichletList | list of dirichlet vertices |
Definition at line 63 of file Discretization.hpp.
References Discretization::__dirichletList, and ASSERT.
00064 { 00065 ASSERT(__dirichletList == 0); 00066 __dirichletList = &dirichletList; 00067 }
| const Problem& Discretization::problem | ( | ) | const [inline, inherited] |
Read only access to the problem
Definition at line 109 of file Discretization.hpp.
References Discretization::__problem.
Referenced by SpectralLegendreDiscretizationNonConform::_getLocalDiscretizer(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), and FEMDiscretization< GivenMeshType, TypeOfDiscretization >::assembleSecondMember().
00110 { 00111 return __problem; 00112 }
| BaseMatrix& Discretization::A | ( | ) | [inline, inherited] |
Read only access to the discretization type
__A
Definition at line 130 of file Discretization.hpp.
References Discretization::__A.
Referenced by SpectralLegendreDiscretizationNonConform::assembleMatrix(), assembleMatrix(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleMatrix(), and FEMDiscretization< GivenMeshType, TypeOfDiscretization >::assembleMatrix().
00131 { 00132 return __A; 00133 }
| BaseVector& Discretization::b | ( | ) | [inline, inherited] |
Access to the second member
Definition at line 140 of file Discretization.hpp.
References Discretization::__b.
Referenced by SpectralLegendreDiscretizationNonConform::_getLocalDiscretizer(), SpectralLegendreDiscretizationNonConform::assembleSecondMember(), assembleSecondMember(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), and FEMDiscretization< GivenMeshType, TypeOfDiscretization >::assembleSecondMember().
00141 { 00142 return __b; 00143 }
SpectralLegendreDiscretizer SpectralLegendreDiscretizationConform::__spectralLegendreDiscretizer [private] |
Definition at line 45 of file SpectralLegendreDiscretizationConform.hpp.
Referenced by assembleSecondMember(), getDiagonal(), getMultiDiagonal(), timesX(), and transposedTimesX().
Definition at line 47 of file SpectralLegendreDiscretizationConform.hpp.
const SpectralMesh& SpectralLegendreDiscretizationConform::__mesh [private] |
Definition at line 49 of file SpectralLegendreDiscretizationConform.hpp.
const DiscretizationType Discretization::__discretizationType [protected, inherited] |
The full description of the discretization
Reimplemented in SpectralLegendreDiscretizationNonConform.
Definition at line 43 of file Discretization.hpp.
Referenced by FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::FEMDiscretization(), and FEMDiscretization< GivenMeshType, TypeOfDiscretization >::FEMDiscretization().
const Problem& Discretization::__problem [protected, inherited] |
The PDEProblem to discretize.
Definition at line 46 of file Discretization.hpp.
Referenced by Discretization::problem().
BaseMatrix& Discretization::__A [protected, inherited] |
The matrix which will contain the discretization.
Definition at line 49 of file Discretization.hpp.
Referenced by SpectralLegendreDiscretizationNonConform::_getLocalDiscretizer(), Discretization::A(), SpectralLegendreDiscretizationNonConform::assembleMatrix(), assembleMatrix(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleMatrix(), and FEMDiscretization< GivenMeshType, TypeOfDiscretization >::assembleMatrix().
BaseVector& Discretization::__b [protected, inherited] |
The second member.
Definition at line 52 of file Discretization.hpp.
Referenced by SpectralLegendreDiscretizationNonConform::_getLocalDiscretizer(), SpectralLegendreDiscretizationNonConform::assembleSecondMember(), assembleSecondMember(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), FEMDiscretization< GivenMeshType, TypeOfDiscretization >::assembleSecondMember(), and Discretization::b().
const Vector<bool>* Discretization::__dirichletList [protected, inherited] |
elimination dirichlet informations
Definition at line 55 of file Discretization.hpp.
Referenced by Discretization::setDirichletList(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::timesX(), FEMDiscretization< GivenMeshType, TypeOfDiscretization >::timesX(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::transposedTimesX(), and FEMDiscretization< GivenMeshType, TypeOfDiscretization >::transposedTimesX().
1.5.6