Serves as the base class that stores nodes, value, and the linear system composing a boundary condition.
More...
#include <vtkvmtkBoundaryConditions.h>
Serves as the base class that stores nodes, value, and the linear system composing a boundary condition.
vtkvmtkBoundaryConditions holds the three ingredients needed to impose a boundary condition on a finite-element linear system: the vtkvmtkLinearSystem to modify, the list of node (row) ids the condition applies to (BoundaryNodes), and the prescribed value at each of those nodes (BoundaryValues). Apply() checks that all three are consistently set (in particular that BoundaryNodes and BoundaryValues have the same length) but performs no actual modification of the linear system; concrete subclasses (e.g. vtkvmtkDirichletBoundaryConditions) override Apply() to carry out the specific boundary condition type.
- See also
- vtkvmtkDirichletBoundaryConditions, vtkvmtkLinearSystem, vtkvmtkEllipticProblem
Definition at line 44 of file vtkvmtkBoundaryConditions.h.
◆ Superclass
◆ vtkvmtkBoundaryConditions()
| vtkvmtkBoundaryConditions::vtkvmtkBoundaryConditions |
( |
| ) |
|
|
protected |
Definition at line 27 of file vtkvmtkBoundaryConditions.cxx.
28 {
30
33 }
vtkvmtkLinearSystem * LinearSystem
vtkDoubleArray * BoundaryValues
vtkIdList * BoundaryNodes
◆ ~vtkvmtkBoundaryConditions()
| vtkvmtkBoundaryConditions::~vtkvmtkBoundaryConditions |
( |
| ) |
|
|
protected |
◆ IsTypeOf()
| int vtkvmtkBoundaryConditions::IsTypeOf |
( |
const char * | type | ) |
|
|
static |
◆ IsA()
| virtual int vtkvmtkBoundaryConditions::IsA |
( |
const char * | type | ) |
|
|
virtual |
◆ SafeDownCast()
◆ NewInstanceInternal()
| virtual vtkObjectBase * vtkvmtkBoundaryConditions::NewInstanceInternal |
( |
| ) |
const |
|
protectedvirtual |
◆ NewInstance()
◆ SetLinearSystem()
Set/get the linear system that the boundary condition is applied to when Apply() is called.
◆ GetLinearSystem()
Set/get the linear system that the boundary condition is applied to when Apply() is called.
◆ SetBoundaryNodes()
| virtual void vtkvmtkBoundaryConditions::SetBoundaryNodes |
( |
vtkIdList * | | ) |
|
|
virtual |
Set/get the list of node (linear system row) ids that the boundary condition applies to, in the same order as BoundaryValues.
◆ GetBoundaryNodes()
| virtual vtkIdList * vtkvmtkBoundaryConditions::GetBoundaryNodes |
( |
| ) |
|
|
virtual |
Set/get the list of node (linear system row) ids that the boundary condition applies to, in the same order as BoundaryValues.
◆ SetBoundaryValues()
| virtual void vtkvmtkBoundaryConditions::SetBoundaryValues |
( |
vtkDoubleArray * | | ) |
|
|
virtual |
Set/get the prescribed value at each node listed in BoundaryNodes, one value per node and in the same order.
◆ GetBoundaryValues()
| virtual vtkDoubleArray * vtkvmtkBoundaryConditions::GetBoundaryValues |
( |
| ) |
|
|
virtual |
Set/get the prescribed value at each node listed in BoundaryNodes, one value per node and in the same order.
◆ Apply()
| void vtkvmtkBoundaryConditions::Apply |
( |
| ) |
|
|
virtual |
Impose the boundary condition on LinearSystem. This base class implementation only validates that LinearSystem, BoundaryNodes, and BoundaryValues are set and mutually consistent (same number of nodes and values); subclasses override this method to actually modify the system matrix and right-hand side.
Reimplemented in vtkvmtkDirichletBoundaryConditions.
Definition at line 56 of file vtkvmtkBoundaryConditions.cxx.
57 {
59 {
60 vtkErrorMacro(<< "Linear system not set!");
61 return;
62 }
63
65 {
66 vtkErrorMacro(<< "Boundary nodes not set!");
67 return;
68 }
69
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 }
◆ LinearSystem
◆ BoundaryNodes
| vtkIdList* vtkvmtkBoundaryConditions::BoundaryNodes |
|
protected |
◆ BoundaryValues
| vtkDoubleArray* vtkvmtkBoundaryConditions::BoundaryValues |
|
protected |
The documentation for this class was generated from the following files: