VMTK
Loading...
Searching...
No Matches
DifferentialGeometry
vtkvmtkFEAssembler.cxx
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: VMTK
4
Module: $RCSfile: vtkvmtkFEAssembler.cxx,v $
5
Language: C++
6
Date: $Date: 2005/11/15 17:39:25 $
7
Version: $Revision: 1.3 $
8
9
Copyright (c) Luca Antiga, David Steinman. All rights reserved.
10
See LICENSE file for details.
11
12
Portions of this code are covered under the VTK copyright.
13
See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
14
for details.
15
16
This software is distributed WITHOUT ANY WARRANTY; without even
17
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18
PURPOSE. See the above copyright notices for more information.
19
20
=========================================================================*/
21
22
#include "
vtkvmtkFEAssembler.h
"
23
#include "
vtkvmtkGaussQuadrature.h
"
24
#include "
vtkvmtkFEShapeFunctions.h
"
25
#include "vtkObjectFactory.h"
26
27
28
29
vtkvmtkFEAssembler::vtkvmtkFEAssembler
()
30
{
31
this->
DataSet
= NULL;
32
this->
Matrix
= NULL;
33
this->
RHSVector
= NULL;
34
this->
SolutionVector
= NULL;
35
this->
NumberOfVariables
= 1;
36
this->
QuadratureOrder
= 1;
37
}
38
39
vtkvmtkFEAssembler::~vtkvmtkFEAssembler
()
40
{
41
if
(this->
DataSet
)
42
{
43
this->
DataSet
->Delete();
44
this->
DataSet
= NULL;
45
}
46
if
(this->
Matrix
)
47
{
48
this->
Matrix
->Delete();
49
this->
Matrix
= NULL;
50
}
51
if
(this->
RHSVector
)
52
{
53
this->
RHSVector
->Delete();
54
this->
RHSVector
= NULL;
55
}
56
if
(this->
SolutionVector
)
57
{
58
this->
SolutionVector
->Delete();
59
this->
SolutionVector
= NULL;
60
}
61
}
62
63
void
vtkvmtkFEAssembler::Initialize
(
int
numberOfVariables)
64
{
65
this->
NumberOfVariables
= numberOfVariables;
66
67
this->
Matrix
->AllocateRowsFromDataSet(this->
DataSet
,this->
NumberOfVariables
);
68
69
this->
RHSVector
->Allocate(this->
DataSet
->GetNumberOfPoints(),this->NumberOfVariables);
70
this->
RHSVector
->Fill(0.0);
71
72
this->
SolutionVector
->Allocate(this->
DataSet
->GetNumberOfPoints(),this->NumberOfVariables);
73
this->
SolutionVector
->Fill(0.0);
74
}
75
76
void
vtkvmtkFEAssembler::DeepCopy
(
vtkvmtkFEAssembler
*src)
77
{
78
this->
DataSet
->DeepCopy(src->
DataSet
);
79
this->
Matrix
->DeepCopy(src->
Matrix
);
80
this->
RHSVector
->DeepCopy(src->
RHSVector
);
81
this->
SolutionVector
->DeepCopy(src->
SolutionVector
);
82
this->
NumberOfVariables
= src->
NumberOfVariables
;
83
this->
QuadratureOrder
= src->
QuadratureOrder
;
84
}
85
86
void
vtkvmtkFEAssembler::ShallowCopy
(
vtkvmtkFEAssembler
*src)
87
{
88
this->
DataSet
= src->
DataSet
;
89
this->
DataSet
->Register(
this
);
90
this->
Matrix
= src->
Matrix
;
91
this->
Matrix
->Register(
this
);
92
this->
RHSVector
= src->
RHSVector
;
93
this->
RHSVector
->Register(
this
);
94
this->
SolutionVector
= src->
SolutionVector
;
95
this->
SolutionVector
->Register(
this
);
96
this->
NumberOfVariables
= src->
NumberOfVariables
;
97
this->
QuadratureOrder
= src->
QuadratureOrder
;
98
}
99
vtkvmtkFEAssembler::QuadratureOrder
int QuadratureOrder
Definition
vtkvmtkFEAssembler.h:128
vtkvmtkFEAssembler::vtkvmtkFEAssembler
vtkvmtkFEAssembler()
Definition
vtkvmtkFEAssembler.cxx:29
vtkvmtkFEAssembler::Matrix
vtkvmtkSparseMatrix * Matrix
Definition
vtkvmtkFEAssembler.h:123
vtkvmtkFEAssembler::ShallowCopy
void ShallowCopy(vtkvmtkFEAssembler *src)
Definition
vtkvmtkFEAssembler.cxx:86
vtkvmtkFEAssembler::DeepCopy
void DeepCopy(vtkvmtkFEAssembler *src)
Definition
vtkvmtkFEAssembler.cxx:76
vtkvmtkFEAssembler::RHSVector
vtkvmtkDoubleVector * RHSVector
Definition
vtkvmtkFEAssembler.h:124
vtkvmtkFEAssembler::DataSet
vtkDataSet * DataSet
Definition
vtkvmtkFEAssembler.h:122
vtkvmtkFEAssembler::SolutionVector
vtkvmtkDoubleVector * SolutionVector
Definition
vtkvmtkFEAssembler.h:125
vtkvmtkFEAssembler::Initialize
void Initialize(int numberOfVariables)
Definition
vtkvmtkFEAssembler.cxx:63
vtkvmtkFEAssembler::NumberOfVariables
int NumberOfVariables
Definition
vtkvmtkFEAssembler.h:127
vtkvmtkFEAssembler::~vtkvmtkFEAssembler
~vtkvmtkFEAssembler()
Definition
vtkvmtkFEAssembler.cxx:39
vtkvmtkFEAssembler.h
vtkvmtkFEShapeFunctions.h
vtkvmtkGaussQuadrature.h
Generated by
1.15.0