VMTK
Loading...
Searching...
No Matches
DifferentialGeometry
vtkvmtkBoundaryConditions.cxx
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: VMTK
4
Module: $RCSfile: vtkvmtkBoundaryConditions.cxx,v $
5
Language: C++
6
Date: $Date: 2005/03/04 11:07:29 $
7
Version: $Revision: 1.2 $
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 "
vtkvmtkBoundaryConditions.h
"
23
#include "vtkObjectFactory.h"
24
25
26
27
vtkvmtkBoundaryConditions::vtkvmtkBoundaryConditions
()
28
{
29
this->
LinearSystem
= NULL;
30
31
this->
BoundaryNodes
= NULL;
32
this->
BoundaryValues
= NULL;
33
}
34
35
vtkvmtkBoundaryConditions::~vtkvmtkBoundaryConditions
()
36
{
37
if
(this->
LinearSystem
)
38
{
39
this->
LinearSystem
->Delete();
40
this->
LinearSystem
= NULL;
41
}
42
43
if
(this->
BoundaryNodes
)
44
{
45
this->
BoundaryNodes
->Delete();
46
this->
BoundaryNodes
= NULL;
47
}
48
49
if
(this->
BoundaryValues
)
50
{
51
this->
BoundaryValues
->Delete();
52
this->
BoundaryValues
= NULL;
53
}
54
}
55
56
void
vtkvmtkBoundaryConditions::Apply
()
57
{
58
if
(this->
LinearSystem
==NULL)
59
{
60
vtkErrorMacro(<<
"Linear system not set!"
);
61
return
;
62
}
63
64
if
(this->
BoundaryNodes
==NULL)
65
{
66
vtkErrorMacro(<<
"Boundary nodes not set!"
);
67
return
;
68
}
69
70
if
(this->
BoundaryValues
==NULL)
71
{
72
vtkErrorMacro(<<
"Boundary values not set!"
);
73
return
;
74
}
75
76
if
(this->
BoundaryNodes
->GetNumberOfIds() != this->BoundaryValues->GetNumberOfTuples())
77
{
78
vtkErrorMacro(<<
"Boundary nodes list and boundary values array do not have the same size!"
);
79
return
;
80
}
81
82
}
83
vtkvmtkBoundaryConditions::~vtkvmtkBoundaryConditions
~vtkvmtkBoundaryConditions()
Definition
vtkvmtkBoundaryConditions.cxx:35
vtkvmtkBoundaryConditions::LinearSystem
vtkvmtkLinearSystem * LinearSystem
Definition
vtkvmtkBoundaryConditions.h:88
vtkvmtkBoundaryConditions::vtkvmtkBoundaryConditions
vtkvmtkBoundaryConditions()
Definition
vtkvmtkBoundaryConditions.cxx:27
vtkvmtkBoundaryConditions::BoundaryValues
vtkDoubleArray * BoundaryValues
Definition
vtkvmtkBoundaryConditions.h:91
vtkvmtkBoundaryConditions::BoundaryNodes
vtkIdList * BoundaryNodes
Definition
vtkvmtkBoundaryConditions.h:90
vtkvmtkBoundaryConditions::Apply
virtual void Apply()
Definition
vtkvmtkBoundaryConditions.cxx:56
vtkvmtkBoundaryConditions.h
Generated by
1.15.0