Commit d1808580 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1292 Stokes: 2 operators ok

parent 684f7873
......@@ -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<int>(vectorial_ref_felt.Nnode());
const auto Ndof_velocity = static_cast<int>(vectorial_ref_felt.Ndof());
const auto Nnode_pressure = static_cast<int>(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<int>(vectorial_test_ref_felt.Nnode());
const auto Ndof_test_velocity = static_cast<int>(vectorial_test_ref_felt.Ndof());
const auto Nnode_test_pressure = static_cast<int>(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<int>(vectorial_ref_felt.Ncomponent());
const auto Ncomponent = static_cast<std::size_t>(vectorial_ref_felt.Ncomponent());
assert(Ncomponent == static_cast<int>(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 = 0ul; 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 = 0ul; 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 = 0ul; 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 = 0ul; 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 = 0ul; 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 = 0ul; component < Ncomponent; ++component, dof_velocity_index += Nnode_velocity)
{
const double product =
factor * test_pressure_term * gradient_felt_phi(node_velocity_index, component);
......
......@@ -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"
......
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment