Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GILLES Sebastien
MoReFEM
Commits
d1808580
Commit
d1808580
authored
Oct 16, 2019
by
GILLES Sebastien
Browse files
#1292 Stokes: 2 operators ok
parent
684f7873
Changes
3
Hide whitespace changes
Inline
Side-by-side
Sources/OperatorInstances/VariationalOperator/BilinearForm/Local/ScalarDivVectorial.cpp
View file @
d1808580
...
...
@@ -89,17 +89,17 @@ namespace MoReFEM
const
auto
&
vectorial_test_ref_felt
=
elementary_data
.
GetTestRefFElt
(
GetNthTestUnknown
(
EnumUnderlyingType
(
TestUnknownIndex
::
vectorial
)));
const
auto
Nnode_velocity
=
static_cast
<
in
t
>
(
vectorial_ref_felt
.
Nnode
());
const
auto
Ndof_velocity
=
static_cast
<
in
t
>
(
vectorial_ref_felt
.
Ndof
());
const
auto
Nnode_pressure
=
static_cast
<
in
t
>
(
scalar_ref_felt
.
Nnode
());
const
auto
Nnode_velocity
=
static_cast
<
std
::
size_
t
>
(
vectorial_ref_felt
.
Nnode
());
const
auto
Ndof_velocity
=
static_cast
<
std
::
size_
t
>
(
vectorial_ref_felt
.
Ndof
());
const
auto
Nnode_pressure
=
static_cast
<
std
::
size_
t
>
(
scalar_ref_felt
.
Nnode
());
const
auto
Nnode_test_velocity
=
static_cast
<
in
t
>
(
vectorial_test_ref_felt
.
Nnode
());
const
auto
Ndof_test_velocity
=
static_cast
<
in
t
>
(
vectorial_test_ref_felt
.
Ndof
());
const
auto
Nnode_test_pressure
=
static_cast
<
in
t
>
(
scalar_test_ref_felt
.
Nnode
());
const
auto
Nnode_test_velocity
=
static_cast
<
std
::
size_
t
>
(
vectorial_test_ref_felt
.
Nnode
());
const
auto
Ndof_test_velocity
=
static_cast
<
std
::
size_
t
>
(
vectorial_test_ref_felt
.
Ndof
());
const
auto
Nnode_test_pressure
=
static_cast
<
std
::
size_
t
>
(
scalar_test_ref_felt
.
Nnode
());
const
auto
Ncomponent
=
static_cast
<
in
t
>
(
vectorial_ref_felt
.
Ncomponent
());
const
auto
Ncomponent
=
static_cast
<
std
::
size_
t
>
(
vectorial_ref_felt
.
Ncomponent
());
assert
(
Ncomponent
==
static_cast
<
in
t
>
(
vectorial_test_ref_felt
.
Ncomponent
()));
assert
(
Ncomponent
==
static_cast
<
std
::
size_
t
>
(
vectorial_test_ref_felt
.
Ncomponent
()));
const
auto
&
infos_at_quad_pt_list
=
elementary_data
.
GetInformationsAtQuadraturePointList
();
...
...
@@ -129,22 +129,19 @@ namespace MoReFEM
*
quad_pt_unknown_list_data
.
GetAbsoluteValueJacobianDeterminant
();
// Part in (v* p)
for
(
int
node_test_velocity_index
=
0
;
node_test_velocity_index
<
Nnode_test_velocity
;
++
node_test_velocity_index
)
for
(
auto
node_test_velocity_index
=
0
ul
;
node_test_velocity_index
<
Nnode_test_velocity
;
++
node_test_velocity_index
)
{
for
(
int
node_pressure_index
=
0
;
node_pressure_index
<
Nnode_pressure
;
++
node_pressure_index
)
for
(
auto
node_pressure_index
=
0
ul
;
node_pressure_index
<
Nnode_pressure
;
++
node_pressure_index
)
{
// FIX THAT! int dof_test_velocity_index = node_test_velocity_index;
// A test must be written for scalar div vectorial...
const
int
&
dof_pressure
=
node_pressure_index
;
// alias
const
auto
dof_pressure
=
node_pressure_index
;
// The two terms below give the same result but in a different manner. It is just here to show how to use them.
//const auto test_pressure_term = test_felt_phi(Nnode_test_velocity + node_test_pressure_index);
const
auto
pressure_term
=
pressure_felt_phi
(
node_pressure_index
);
for
(
int
component
=
0
;
component
<
Ncomponent
;
++
component
)
for
(
auto
component
=
0
ul
;
component
<
Ncomponent
;
++
component
)
{
int
dof_test_velocity_index
=
node_test_velocity_index
+
Nnode_test_velocity
*
component
;
const
auto
dof_test_velocity_index
=
node_test_velocity_index
+
Nnode_test_velocity
*
component
;
const
double
product
=
factor
*
pressure_term
*
test_gradient_felt_phi
(
node_test_velocity_index
,
component
);
...
...
@@ -157,19 +154,19 @@ namespace MoReFEM
}
// Part in (p* v)
for
(
int
node_test_pressure_index
=
0
;
node_test_pressure_index
<
Nnode_test_pressure
;
++
node_test_pressure_index
)
for
(
auto
node_test_pressure_index
=
0
ul
;
node_test_pressure_index
<
Nnode_test_pressure
;
++
node_test_pressure_index
)
{
const
int
&
dof_test_pressure
=
node_test_pressure_index
;
// alias
const
auto
dof_test_pressure
=
node_test_pressure_index
;
// The two terms below give the same result but in a different manner. It is just here to show how to use them.
// const auto pressure_term = felt_phi(Nnode_velocity + node_pressure_index);
const
auto
test_pressure_term
=
test_pressure_felt_phi
(
node_test_pressure_index
);
for
(
int
node_velocity_index
=
0
;
node_velocity_index
<
Nnode_velocity
;
++
node_velocity_index
)
for
(
auto
node_velocity_index
=
0
ul
;
node_velocity_index
<
Nnode_velocity
;
++
node_velocity_index
)
{
int
dof_velocity_index
=
node_velocity_index
;
auto
dof_velocity_index
=
node_velocity_index
;
for
(
int
component
=
0
;
component
<
Ncomponent
;
++
component
,
dof_velocity_index
+=
Nnode_velocity
)
for
(
auto
component
=
0
ul
;
component
<
Ncomponent
;
++
component
,
dof_velocity_index
+=
Nnode_velocity
)
{
const
double
product
=
factor
*
test_pressure_term
*
gradient_felt_phi
(
node_velocity_index
,
component
);
...
...
Sources/OperatorInstances/VariationalOperator/BilinearForm/Local/SourceList.cmake
View file @
d1808580
...
...
@@ -17,8 +17,8 @@ target_sources(${MOREFEM_OP_INSTANCES}
# "${CMAKE_CURRENT_LIST_DIR}/GradPhiTauOrthoTauGradPhi.cpp"
# "${CMAKE_CURRENT_LIST_DIR}/GradPhiTauTauGradPhi.cpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Mass.cpp"
#
"${CMAKE_CURRENT_LIST_DIR}/ScalarDivVectorial.cpp"
#
"${CMAKE_CURRENT_LIST_DIR}/Stokes.cpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/ScalarDivVectorial.cpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Stokes.cpp"
# "${CMAKE_CURRENT_LIST_DIR}/SurfacicBidomain.cpp"
PRIVATE
...
...
@@ -36,10 +36,10 @@ target_sources(${MOREFEM_OP_INSTANCES}
# "${CMAKE_CURRENT_LIST_DIR}/GradPhiTauTauGradPhi.hxx"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Mass.hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Mass.hxx"
#
"${CMAKE_CURRENT_LIST_DIR}/ScalarDivVectorial.hpp"
#
"${CMAKE_CURRENT_LIST_DIR}/ScalarDivVectorial.hxx"
#
"${CMAKE_CURRENT_LIST_DIR}/Stokes.hpp"
#
"${CMAKE_CURRENT_LIST_DIR}/Stokes.hxx"
"
${
CMAKE_CURRENT_LIST_DIR
}
/ScalarDivVectorial.hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/ScalarDivVectorial.hxx"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Stokes.hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Stokes.hxx"
# "${CMAKE_CURRENT_LIST_DIR}/SurfacicBidomain.hpp"
# "${CMAKE_CURRENT_LIST_DIR}/SurfacicBidomain.hxx"
# "${CMAKE_CURRENT_LIST_DIR}/VariableMass.hpp"
...
...
Sources/OperatorInstances/VariationalOperator/BilinearForm/SourceList.cmake
View file @
d1808580
...
...
@@ -17,8 +17,8 @@ target_sources(${MOREFEM_OP_INSTANCES}
# "${CMAKE_CURRENT_LIST_DIR}/GradPhiTauOrthoTauGradPhi.cpp"
# "${CMAKE_CURRENT_LIST_DIR}/GradPhiTauTauGradPhi.cpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Mass.cpp"
#
"${CMAKE_CURRENT_LIST_DIR}/ScalarDivVectorial.cpp"
#
"${CMAKE_CURRENT_LIST_DIR}/Stokes.cpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/ScalarDivVectorial.cpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Stokes.cpp"
# "${CMAKE_CURRENT_LIST_DIR}/SurfacicBidomain.cpp"
PRIVATE
...
...
@@ -36,10 +36,10 @@ target_sources(${MOREFEM_OP_INSTANCES}
# "${CMAKE_CURRENT_LIST_DIR}/GradPhiTauTauGradPhi.hxx"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Mass.hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Mass.hxx"
#
"${CMAKE_CURRENT_LIST_DIR}/ScalarDivVectorial.hpp"
#
"${CMAKE_CURRENT_LIST_DIR}/ScalarDivVectorial.hxx"
#
"${CMAKE_CURRENT_LIST_DIR}/Stokes.hpp"
#
"${CMAKE_CURRENT_LIST_DIR}/Stokes.hxx"
"
${
CMAKE_CURRENT_LIST_DIR
}
/ScalarDivVectorial.hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/ScalarDivVectorial.hxx"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Stokes.hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/Stokes.hxx"
# "${CMAKE_CURRENT_LIST_DIR}/SurfacicBidomain.hpp"
# "${CMAKE_CURRENT_LIST_DIR}/SurfacicBidomain.hxx"
# "${CMAKE_CURRENT_LIST_DIR}/VariableMass.hpp"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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