Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
c425c436
Commit
c425c436
authored
Apr 14, 2022
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Forbid MeshLineNodeBoundary in dimension 1
parent
f0766980
No related branches found
No related tags found
1 merge request
!140
Change referenced item list policy
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mesh/MeshLineNodeBoundary.cpp
+0
-9
0 additions, 9 deletions
src/mesh/MeshLineNodeBoundary.cpp
src/mesh/MeshLineNodeBoundary.hpp
+2
-0
2 additions, 0 deletions
src/mesh/MeshLineNodeBoundary.hpp
src/mesh/MeshRandomizer.cpp
+20
-8
20 additions, 8 deletions
src/mesh/MeshRandomizer.cpp
with
22 additions
and
17 deletions
src/mesh/MeshLineNodeBoundary.cpp
+
0
−
9
View file @
c425c436
...
@@ -34,14 +34,6 @@ MeshLineNodeBoundary<Dimension>::_checkBoundaryIsLine(const TinyVector<Dimension
...
@@ -34,14 +34,6 @@ MeshLineNodeBoundary<Dimension>::_checkBoundaryIsLine(const TinyVector<Dimension
}
}
}
}
template
<
>
template
<
>
TinyVector
<
1
>
MeshLineNodeBoundary
<
1
>::
_getDirection
(
const
Mesh
<
Connectivity
<
1
>>&
)
{
throw
UnexpectedError
(
"MeshLineNodeBoundary makes no sense in dimension 1"
);
}
template
<
>
template
<
>
template
<
>
template
<
>
TinyVector
<
2
>
TinyVector
<
2
>
...
@@ -142,6 +134,5 @@ getMeshLineNodeBoundary(const Mesh<Connectivity<Dimension>>& mesh, const IBounda
...
@@ -142,6 +134,5 @@ getMeshLineNodeBoundary(const Mesh<Connectivity<Dimension>>& mesh, const IBounda
throw
NormalError
(
ost
.
str
());
throw
NormalError
(
ost
.
str
());
}
}
template
MeshLineNodeBoundary
<
1
>
getMeshLineNodeBoundary
(
const
Mesh
<
Connectivity
<
1
>>&
,
const
IBoundaryDescriptor
&
);
template
MeshLineNodeBoundary
<
2
>
getMeshLineNodeBoundary
(
const
Mesh
<
Connectivity
<
2
>>&
,
const
IBoundaryDescriptor
&
);
template
MeshLineNodeBoundary
<
2
>
getMeshLineNodeBoundary
(
const
Mesh
<
Connectivity
<
2
>>&
,
const
IBoundaryDescriptor
&
);
template
MeshLineNodeBoundary
<
3
>
getMeshLineNodeBoundary
(
const
Mesh
<
Connectivity
<
3
>>&
,
const
IBoundaryDescriptor
&
);
template
MeshLineNodeBoundary
<
3
>
getMeshLineNodeBoundary
(
const
Mesh
<
Connectivity
<
3
>>&
,
const
IBoundaryDescriptor
&
);
This diff is collapsed.
Click to expand it.
src/mesh/MeshLineNodeBoundary.hpp
+
2
−
0
View file @
c425c436
...
@@ -9,6 +9,8 @@ class [[nodiscard]] MeshLineNodeBoundary final
...
@@ -9,6 +9,8 @@ class [[nodiscard]] MeshLineNodeBoundary final
:
public
MeshNodeBoundary
<
Dimension
>
// clazy:exclude=copyable-polymorphic
:
public
MeshNodeBoundary
<
Dimension
>
// clazy:exclude=copyable-polymorphic
{
{
public:
public:
static_assert
(
Dimension
>
1
,
"MeshNodeBoundary makes only sense in dimension greater than 1"
);
using
Rd
=
TinyVector
<
Dimension
,
double
>
;
using
Rd
=
TinyVector
<
Dimension
,
double
>
;
private:
private:
...
...
This diff is collapsed.
Click to expand it.
src/mesh/MeshRandomizer.cpp
+
20
−
8
View file @
c425c436
...
@@ -96,6 +96,7 @@ class MeshRandomizerHandler::MeshRandomizer
...
@@ -96,6 +96,7 @@ class MeshRandomizerHandler::MeshRandomizer
});
});
}
else
if
constexpr
(
std
::
is_same_v
<
BCType
,
AxisBoundaryCondition
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
BCType
,
AxisBoundaryCondition
>
)
{
if
constexpr
(
Dimension
>
1
)
{
const
Rd
&
t
=
bc
.
direction
();
const
Rd
&
t
=
bc
.
direction
();
const
Rdxd
txt
=
tensorProduct
(
t
,
t
);
const
Rdxd
txt
=
tensorProduct
(
t
,
t
);
...
@@ -107,6 +108,9 @@ class MeshRandomizerHandler::MeshRandomizer
...
@@ -107,6 +108,9 @@ class MeshRandomizerHandler::MeshRandomizer
shift
[
node_id
]
=
txt
*
shift
[
node_id
];
shift
[
node_id
]
=
txt
*
shift
[
node_id
];
});
});
}
else
{
throw
UnexpectedError
(
"AxisBoundaryCondition make no sense in dimension 1"
);
}
}
else
if
constexpr
(
std
::
is_same_v
<
BCType
,
FixedBoundaryCondition
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
BCType
,
FixedBoundaryCondition
>
)
{
const
Array
<
const
NodeId
>&
node_list
=
bc
.
nodeList
();
const
Array
<
const
NodeId
>&
node_list
=
bc
.
nodeList
();
...
@@ -300,6 +304,14 @@ class MeshRandomizerHandler::MeshRandomizer<Dimension>::AxisBoundaryCondition
...
@@ -300,6 +304,14 @@ class MeshRandomizerHandler::MeshRandomizer<Dimension>::AxisBoundaryCondition
~
AxisBoundaryCondition
()
=
default
;
~
AxisBoundaryCondition
()
=
default
;
};
};
template
<
>
class
MeshRandomizerHandler
::
MeshRandomizer
<
1
>::
AxisBoundaryCondition
{
public:
AxisBoundaryCondition
()
=
default
;
~
AxisBoundaryCondition
()
=
default
;
};
template
<
size_t
Dimension
>
template
<
size_t
Dimension
>
class
MeshRandomizerHandler
::
MeshRandomizer
<
Dimension
>::
FixedBoundaryCondition
class
MeshRandomizerHandler
::
MeshRandomizer
<
Dimension
>::
FixedBoundaryCondition
{
{
...
...
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