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
wenqing
ogs
Commits
d556c635
Commit
d556c635
authored
8 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[T] only create mesh once
parent
f0ea6074
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tests/NumLib/TestExtrapolation.cpp
+11
-11
11 additions, 11 deletions
Tests/NumLib/TestExtrapolation.cpp
with
11 additions
and
11 deletions
Tests/NumLib/TestExtrapolation.cpp
+
11
−
11
View file @
d556c635
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include
"MathLib/LinAlg/LinAlg.h"
#include
"MathLib/LinAlg/LinAlg.h"
#include
"MeshLib/MeshGenerators/MeshGenerator.h"
#include
"MeshLib/MeshGenerators/MeshGenerator.h"
#include
"MeshLib/IO/writeMeshToFile.h"
#include
"NumLib/DOF/DOFTableUtil.h"
#include
"NumLib/DOF/DOFTableUtil.h"
#include
"NumLib/DOF/MatrixProviderUser.h"
#include
"NumLib/DOF/MatrixProviderUser.h"
...
@@ -31,7 +32,6 @@
...
@@ -31,7 +32,6 @@
namespace
namespace
{
{
template
<
typename
ShapeMatrices
>
template
<
typename
ShapeMatrices
>
void
interpolateNodalValuesToIntegrationPoints
(
void
interpolateNodalValuesToIntegrationPoints
(
std
::
vector
<
double
>
const
&
local_nodal_values
,
std
::
vector
<
double
>
const
&
local_nodal_values
,
...
@@ -45,7 +45,7 @@ void interpolateNodalValuesToIntegrationPoints(
...
@@ -45,7 +45,7 @@ void interpolateNodalValuesToIntegrationPoints(
}
}
}
}
}
}
// anonymous namespace
class
LocalAssemblerDataInterface
:
public
NumLib
::
ExtrapolatableElement
class
LocalAssemblerDataInterface
:
public
NumLib
::
ExtrapolatableElement
{
{
...
@@ -171,6 +171,7 @@ public:
...
@@ -171,6 +171,7 @@ public:
{
{
auto
const
extrapolatables
=
auto
const
extrapolatables
=
NumLib
::
makeExtrapolatable
(
_local_assemblers
,
method
);
NumLib
::
makeExtrapolatable
(
_local_assemblers
,
method
);
_extrapolator
->
extrapolate
(
extrapolatables
);
_extrapolator
->
extrapolate
(
extrapolatables
);
_extrapolator
->
calculateResiduals
(
extrapolatables
);
_extrapolator
->
calculateResiduals
(
extrapolatables
);
...
@@ -234,19 +235,18 @@ TEST(NumLib, DISABLED_Extrapolation)
...
@@ -234,19 +235,18 @@ TEST(NumLib, DISABLED_Extrapolation)
* x.
* x.
*/
*/
const
double
mesh_length
=
1.0
;
const
std
::
size_t
mesh_elements_in_each_direction
=
5
;
// generate mesh
std
::
unique_ptr
<
MeshLib
::
Mesh
>
mesh
(
MeshLib
::
MeshGenerator
::
generateRegularHexMesh
(
mesh_length
,
mesh_elements_in_each_direction
));
for
(
unsigned
integration_order
:
{
2
,
3
,
4
})
for
(
unsigned
integration_order
:
{
2
,
3
,
4
})
{
{
namespace
LinAlg
=
MathLib
::
LinAlg
;
namespace
LinAlg
=
MathLib
::
LinAlg
;
const
double
mesh_length
=
1.0
;
const
double
mesh_elements_in_each_direction
=
5.0
;
// generate mesh
std
::
unique_ptr
<
MeshLib
::
Mesh
>
mesh
(
MeshLib
::
MeshGenerator
::
generateRegularHexMesh
(
mesh_length
,
mesh_elements_in_each_direction
));
auto
const
nnodes
=
mesh
->
getNumberOfNodes
();
auto
const
nnodes
=
mesh
->
getNumberOfNodes
();
auto
const
nelements
=
mesh
->
getNumberOfElements
();
auto
const
nelements
=
mesh
->
getNumberOfElements
();
DBUG
(
"number of nodes: %lu, number of elements: %lu"
,
nnodes
,
nelements
);
DBUG
(
"number of nodes: %lu, number of elements: %lu"
,
nnodes
,
nelements
);
...
...
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