Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
86c3affb
Commit
86c3affb
authored
Oct 26, 2009
by
henry
Browse files
Added initialising constructor and use it is the BSpline code.
parent
135f8275
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.C
View file @
86c3affb
...
...
@@ -32,7 +32,20 @@ template<class Type>
Foam
::
simpleMatrix
<
Type
>::
simpleMatrix
(
const
label
mSize
)
:
scalarSquareMatrix
(
mSize
),
source_
(
mSize
,
pTraits
<
Type
>::
zero
)
source_
(
mSize
)
{}
template
<
class
Type
>
Foam
::
simpleMatrix
<
Type
>::
simpleMatrix
(
const
label
mSize
,
const
scalar
coeffVal
,
const
Type
&
sourceVal
)
:
scalarSquareMatrix
(
mSize
,
mSize
,
coeffVal
),
source_
(
mSize
,
sourceVal
)
{}
...
...
src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.H
View file @
86c3affb
...
...
@@ -26,7 +26,7 @@ Class
Foam::simpleMatrix
Description
Foam::simpleMatrix
A simple square matrix solver with scalar coefficients.
SourceFiles
simpleMatrix.C
...
...
@@ -75,8 +75,13 @@ public:
// Constructors
//- Construct given size
// Note: this does not initialise the coefficients or the source.
simpleMatrix
(
const
label
);
//- Construct given size and initial values for the
// coefficients and source
simpleMatrix
(
const
label
,
const
scalar
,
const
Type
&
);
//- Construct from components
simpleMatrix
(
const
scalarSquareMatrix
&
,
const
Field
<
Type
>&
);
...
...
@@ -91,11 +96,13 @@ public:
// Access
//- Return access to the source
Field
<
Type
>&
source
()
{
return
source_
;
}
//- Return const-access to the source
const
Field
<
Type
>&
source
()
const
{
return
source_
;
...
...
src/mesh/blockMesh/curvedEdges/BSpline.C
View file @
86c3affb
...
...
@@ -48,7 +48,7 @@ Foam::pointField Foam::BSpline::findKnots
register
scalar
oneSixth
=
1
.
0
/
6
.
0
;
register
scalar
twoThird
=
2
.
0
/
3
.
0
;
simpleMatrix
<
vector
>
M
(
newnKnots
);
simpleMatrix
<
vector
>
M
(
newnKnots
,
0
,
vector
::
zero
);
// set up the matrix
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment