Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Özgür Ozan Sen
ogs
Commits
80563864
Commit
80563864
authored
8 years ago
by
Norihiro Watanabe
Browse files
Options
Downloads
Patches
Plain Diff
template paramter NIntPts in LocalAssemblerTraitsFixed is actually NNodes
parent
48a61d63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ProcessLib/LocalAssemblerTraits.h
+27
-27
27 additions, 27 deletions
ProcessLib/LocalAssemblerTraits.h
with
27 additions
and
27 deletions
ProcessLib/LocalAssemblerTraits.h
+
27
−
27
View file @
80563864
...
...
@@ -20,14 +20,14 @@ namespace detail
* both for fixed-size and dynamically allocated Eigen matrices.
*
* \tparam ShpPol the shape matrix policy used
* \tparam N
IntPts
the number of
integration point
s for the FEM element
* \tparam N
Nodes
the number of
node
s for the FEM element
* \tparam NodalDOF the number of d.o.f. per node.
* If zero, this struct's methods will determine the size of
* the generated Eigen::block's at runtime. If non-zero, the
* size will be determined at compile-time.
* \tparam Dim global spatial dimension
*/
template
<
typename
ShpPol
,
unsigned
N
IntPt
s
,
unsigned
NodalDOF
,
unsigned
Dim
>
template
<
typename
ShpPol
,
unsigned
N
Node
s
,
unsigned
NodalDOF
,
unsigned
Dim
>
struct
LocalAssemblerTraitsFixed
{
private:
...
...
@@ -46,10 +46,10 @@ public:
// and use the same shape fucntions.
//! Local matrix for the given number of d.o.f.\ per node and number of
//! integration points
using
LocalMatrix
=
Matrix
<
N
IntPt
s
*
NodalDOF
,
N
IntPt
s
*
NodalDOF
>
;
using
LocalMatrix
=
Matrix
<
N
Node
s
*
NodalDOF
,
N
Node
s
*
NodalDOF
>
;
//! Local vector for the given number of d.o.f.\ per node and number of
//! integration points
using
LocalVector
=
Vector
<
N
IntPt
s
*
NodalDOF
>
;
using
LocalVector
=
Vector
<
N
Node
s
*
NodalDOF
>
;
//! Local vector for one component of one process variable.
//! The size is the number of nodes in the element.
...
...
@@ -111,20 +111,20 @@ public:
return
mat
.
block
(
top
,
left
,
nrows
,
ncols
);
}
//! Get a block \c N
IntPt
s x \c N
IntPt
s whose upper left corner is at \c top and \c left.
//! Get a block \c N
Node
s x \c N
Node
s whose upper left corner is at \c top and \c left.
template
<
typename
Mat
>
static
typename
std
::
enable_if
<
NodalDOF
!=
0
,
decltype
(
std
::
declval
<
const
Mat
>
().
template
block
<
N
IntPts
,
NIntPt
s
>(
0u
,
0u
))
decltype
(
std
::
declval
<
const
Mat
>
().
template
block
<
N
Nodes
,
NNode
s
>(
0u
,
0u
))
>::
type
blockShpShp
(
Mat
const
&
mat
,
unsigned
top
,
unsigned
left
,
unsigned
nrows
,
unsigned
ncols
)
{
assert
(
nrows
==
N
IntPt
s
&&
ncols
==
N
IntPt
s
);
assert
(
nrows
==
N
Node
s
&&
ncols
==
N
Node
s
);
(
void
)
nrows
;
(
void
)
ncols
;
return
mat
.
template
block
<
N
IntPts
,
NIntPt
s
>(
top
,
left
);
return
mat
.
template
block
<
N
Nodes
,
NNode
s
>(
top
,
left
);
}
//! Get a block \c N
IntPt
s x \c N
IntPt
s whose upper left corner is at \c top and \c left.
//! Get a block \c N
Node
s x \c N
Node
s whose upper left corner is at \c top and \c left.
template
<
typename
Mat
>
static
typename
std
::
enable_if
<
NodalDOF
==
0
,
...
...
@@ -136,20 +136,20 @@ public:
assert
(
nrows
==
ncols
);
return
mat
.
block
(
top
,
left
,
nrows
,
ncols
);
}
//! Get a block \c N
IntPt
s x \c N
IntPt
s whose upper left corner is at \c top and \c left.
//! Get a block \c N
Node
s x \c N
Node
s whose upper left corner is at \c top and \c left.
template
<
typename
Mat
>
static
typename
std
::
enable_if
<
NodalDOF
!=
0
,
decltype
(
std
::
declval
<
Mat
>
().
template
block
<
N
IntPts
,
NIntPt
s
>(
0u
,
0u
))
decltype
(
std
::
declval
<
Mat
>
().
template
block
<
N
Nodes
,
NNode
s
>(
0u
,
0u
))
>::
type
blockShpShp
(
Mat
&
mat
,
unsigned
top
,
unsigned
left
,
unsigned
nrows
,
unsigned
ncols
)
{
assert
(
nrows
==
N
IntPt
s
&&
ncols
==
N
IntPt
s
);
assert
(
nrows
==
N
Node
s
&&
ncols
==
N
Node
s
);
(
void
)
nrows
;
(
void
)
ncols
;
return
mat
.
template
block
<
N
IntPts
,
NIntPt
s
>(
top
,
left
);
return
mat
.
template
block
<
N
Nodes
,
NNode
s
>(
top
,
left
);
}
//! Get a block \c N
IntPt
s x \c N
IntPt
s whose upper left corner is at \c top and \c left.
//! Get a block \c N
Node
s x \c N
Node
s whose upper left corner is at \c top and \c left.
template
<
typename
Mat
>
static
typename
std
::
enable_if
<
NodalDOF
==
0
,
...
...
@@ -162,19 +162,19 @@ public:
return
mat
.
block
(
top
,
left
,
nrows
,
ncols
);
}
//! Get a block \c N
IntPt
s x 1 starting at the \c top'th row.
//! Get a block \c N
Node
s x 1 starting at the \c top'th row.
template
<
typename
Vec
>
static
typename
std
::
enable_if
<
NodalDOF
!=
0
,
decltype
(
std
::
declval
<
const
Vec
>
().
template
block
<
N
IntPt
s
,
1
>(
0u
,
0u
))
decltype
(
std
::
declval
<
const
Vec
>
().
template
block
<
N
Node
s
,
1
>(
0u
,
0u
))
>::
type
blockShp
(
Vec
const
&
vec
,
unsigned
top
,
unsigned
nrows
)
{
assert
(
nrows
==
N
IntPt
s
);
assert
(
nrows
==
N
Node
s
);
(
void
)
nrows
;
return
vec
.
template
block
<
N
IntPt
s
,
1
>(
top
,
0
);
return
vec
.
template
block
<
N
Node
s
,
1
>(
top
,
0
);
}
//! Get a block \c N
IntPt
s x 1 starting at the \c top'th row.
//! Get a block \c N
Node
s x 1 starting at the \c top'th row.
template
<
typename
Vec
>
static
typename
std
::
enable_if
<
NodalDOF
==
0
,
...
...
@@ -184,19 +184,19 @@ public:
{
return
vec
.
block
(
top
,
0
,
nrows
,
1
);
}
//! Get a block \c N
IntPt
s x 1 starting at the \c top'th row.
//! Get a block \c N
Node
s x 1 starting at the \c top'th row.
template
<
typename
Vec
>
static
typename
std
::
enable_if
<
NodalDOF
!=
0
,
decltype
(
std
::
declval
<
Vec
>
().
template
block
<
N
IntPt
s
,
1
>(
0u
,
0u
))
decltype
(
std
::
declval
<
Vec
>
().
template
block
<
N
Node
s
,
1
>(
0u
,
0u
))
>::
type
blockShp
(
Vec
&
vec
,
unsigned
top
,
unsigned
nrows
)
{
assert
(
nrows
==
N
IntPt
s
);
assert
(
nrows
==
N
Node
s
);
(
void
)
nrows
;
return
vec
.
template
block
<
N
IntPt
s
,
1
>(
top
,
0
);
return
vec
.
template
block
<
N
Node
s
,
1
>(
top
,
0
);
}
//! Get a block \c N
IntPt
s x 1 starting at the \c top'th row.
//! Get a block \c N
Node
s x 1 starting at the \c top'th row.
template
<
typename
Vec
>
static
typename
std
::
enable_if
<
NodalDOF
==
0
,
...
...
@@ -213,15 +213,15 @@ public:
#ifndef OGS_EIGEN_DYNAMIC_SHAPE_MATRICES
template
<
typename
ShpPol
,
unsigned
N
IntPt
s
,
unsigned
NodalDOF
,
unsigned
Dim
>
using
LocalAssemblerTraits
=
detail
::
LocalAssemblerTraitsFixed
<
ShpPol
,
N
IntPt
s
,
NodalDOF
,
Dim
>
;
template
<
typename
ShpPol
,
unsigned
N
Node
s
,
unsigned
NodalDOF
,
unsigned
Dim
>
using
LocalAssemblerTraits
=
detail
::
LocalAssemblerTraitsFixed
<
ShpPol
,
N
Node
s
,
NodalDOF
,
Dim
>
;
static_assert
(
OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG
==
0
,
"Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES."
" Maybe you forgot to include some header file."
);
#else
template
<
typename
ShpPol
,
unsigned
N
IntPt
s
,
unsigned
NodalDOF
,
unsigned
Dim
>
template
<
typename
ShpPol
,
unsigned
N
Node
s
,
unsigned
NodalDOF
,
unsigned
Dim
>
using
LocalAssemblerTraits
=
detail
::
LocalAssemblerTraitsFixed
<
ShapeMatrixPolicyType
<
void
,
0
>
,
0
,
0
,
0
>
;
static_assert
(
OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG
==
1
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment