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

#531 Move new inject function into GlobalVariationalOperator class...

#531 Move new inject function into GlobalVariationalOperator class (UnknownPolicy will be reformed deeply quite soon...)
parent dfd9e436
......@@ -827,6 +827,9 @@
BEA263B71A28D0FB001802B6 /* libOps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE2393141A23977700E24C84 /* libOps.a */; };
BEA263B81A28D0FB001802B6 /* libSeldon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE2393191A23978400E24C84 /* libSeldon.a */; };
BEA263B91A28D0FB001802B6 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEC37E0617DDC0210021BFB7 /* Accelerate.framework */; };
BEA3FA7E1AF10AA000D3F871 /* Recursivity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEA3FA7B1AF10AA000D3F871 /* Recursivity.cpp */; };
BEA3FA7F1AF10AA000D3F871 /* Recursivity.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BEA3FA7C1AF10AA000D3F871 /* Recursivity.hpp */; };
BEA3FA801AF10AA000D3F871 /* Recursivity.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BEA3FA7D1AF10AA000D3F871 /* Recursivity.hxx */; };
BEA9CB9F1A1E26A8003A6276 /* libCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE05B52916D238FE000E248D /* libCore.a */; };
BEA9CBA01A1E26A8003A6276 /* libGeometry.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE05B4DD16D23573000E248D /* libGeometry.a */; };
BEA9CBA11A1E26A8003A6276 /* libUtilities.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEA8A379177AD4FE009436C9 /* libUtilities.a */; };
......@@ -2167,6 +2170,9 @@
BEA3248717A7E5BA00ADEB73 /* Exception.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Exception.hpp; sourceTree = "<group>"; };
BEA355D617D0971500FB643B /* OpsFunction.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = OpsFunction.hpp; sourceTree = "<group>"; };
BEA355D717D0971500FB643B /* OpsFunction.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = OpsFunction.hxx; sourceTree = "<group>"; };
BEA3FA7B1AF10AA000D3F871 /* Recursivity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Recursivity.cpp; sourceTree = "<group>"; };
BEA3FA7C1AF10AA000D3F871 /* Recursivity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Recursivity.hpp; sourceTree = "<group>"; };
BEA3FA7D1AF10AA000D3F871 /* Recursivity.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Recursivity.hxx; sourceTree = "<group>"; };
BEA4FC2A18214B6A002B2EA1 /* TransientParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransientParameters.cpp; sourceTree = "<group>"; };
BEA4FC2B18214B6A002B2EA1 /* TransientParameters.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TransientParameters.hpp; sourceTree = "<group>"; };
BEA4FC4418214D8F002B2EA1 /* VariationalFormulation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = VariationalFormulation.hpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
......@@ -3341,6 +3347,9 @@
BE4DDE8C1AE1332900D60CCC /* GlobalVariationalOperator.cpp */,
BE4DDE8D1AE1332900D60CCC /* GlobalVariationalOperator.hpp */,
BE4DDE8E1AE1332900D60CCC /* GlobalVariationalOperator.hxx */,
BEA3FA7B1AF10AA000D3F871 /* Recursivity.cpp */,
BEA3FA7C1AF10AA000D3F871 /* Recursivity.hpp */,
BEA3FA7D1AF10AA000D3F871 /* Recursivity.hxx */,
);
path = Private;
sourceTree = "<group>";
......@@ -5236,6 +5245,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
BEA3FA801AF10AA000D3F871 /* Recursivity.hxx in Headers */,
BE90E1041A2491AE00CCAFDE /* EnumGaussQuadratureFormula.hpp in Headers */,
BE2B66481A2778C700E80864 /* TetrahedronP1.hpp in Headers */,
BEB03EB61A36056B00E99AAC /* Force.hpp in Headers */,
......@@ -5431,6 +5441,7 @@
BE2B66601A2778C700E80864 /* RefFEltInLocalNumbering.hpp in Headers */,
BE90E0B41A2491AE00CCAFDE /* Component.hpp in Headers */,
BE90E1551A2491AE00CCAFDE /* CompNA.hpp in Headers */,
BEA3FA7F1AF10AA000D3F871 /* Recursivity.hpp in Headers */,
BE4DDE921AE1332900D60CCC /* GlobalLinearAlgebraHelper.hpp in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -6366,6 +6377,7 @@
BE90E12A1A2491AE00CCAFDE /* Dof.cpp in Sources */,
BE4B47121AE108650078955C /* OneUnknown.cpp in Sources */,
BEDAC3C71AD7FBB500AA2156 /* NdofHolder.cpp in Sources */,
BEA3FA7E1AF10AA000D3F871 /* Recursivity.cpp in Sources */,
BE90E06E1A2491AE00CCAFDE /* ReduceToProcessorWise.cpp in Sources */,
BE90E0AE1A2491AE00CCAFDE /* InvariantManager.cpp in Sources */,
BE4B47051AE107730078955C /* LocalVariationalOperator.cpp in Sources */,
......
......@@ -409,6 +409,10 @@ namespace HappyHeart
AllocateGradientFEltPhi DoAllocateGradientFEltPhi() const;
void InjectIntoGlobalLinearAlgebra531(const LocalFEltSpace& local_felt_space,
LocalVariationalOperatorT& local_operator,
GlobalMatrixWithCoefficient& global_linear_algebra) const;
private:
......
......@@ -299,11 +299,9 @@ namespace HappyHeart
local_operator,
std::forward_as_tuple(args...));
UnknownPolicyParent::InjectIntoGlobalLinearAlgebra531(local_felt_space,
local_operator,
std::get<0>(linear_algebra_tuple));
InjectIntoGlobalLinearAlgebra531(local_felt_space,
local_operator,
std::get<0>(linear_algebra_tuple));
}
}
......@@ -514,6 +512,31 @@ namespace HappyHeart
template
<
class DerivedT,
class LocalVariationalOperatorT,
class UnknownPolicyT
>
void GlobalVariationalOperator<DerivedT, LocalVariationalOperatorT, UnknownPolicyT>
::InjectIntoGlobalLinearAlgebra531(const LocalFEltSpace& local_felt_space,
LocalVariationalOperatorT& local_operator,
GlobalMatrixWithCoefficient& global_linear_algebra) const
{
auto& elementary_data = local_operator.GetNonCstElementaryData();
auto& local_matrix = elementary_data.GetNonCstMatrixResult();
auto& global_matrix = global_linear_algebra.first;
const auto& unknown = local_operator.GetUnknown();
const auto& unknown_and_numbering_subset = elementary_data.GetRefFElt(unknown).GetUnknownAndNumberingSubset();
const auto& local2global = local_felt_space.GetFiniteElt(unknown_and_numbering_subset).template GetLocal2Global<MpiScale::program_wise>();
Private::ReportValuesInGlobalMatrix(local_matrix, global_linear_algebra.second, local2global, local2global, global_matrix);
}
} // namespace HappyHeart
......
......@@ -96,12 +96,7 @@ namespace HappyHeart
const LocalOperatorT& local_operator,
Private::GlobalLinearAlgebraHelper<MatrixVectorNature::matrix>& global_linear_algebra) const;
template<class LocalOperatorT>
void InjectIntoGlobalLinearAlgebra531(const LocalFEltSpace& local_felt_space,
LocalOperatorT& local_operator,
GlobalMatrixWithCoefficient& global_linear_algebra) const;
//! Same as namesake defined above when assembling into a vector.
template<class LocalOperatorT>
......
......@@ -49,25 +49,6 @@ namespace HappyHeart
}
template<class LocalOperatorT>
void OneUnknown::InjectIntoGlobalLinearAlgebra531(const LocalFEltSpace& local_felt_space,
LocalOperatorT& local_operator,
GlobalMatrixWithCoefficient& global_linear_algebra) const
{
auto& elementary_data = local_operator.GetNonCstElementaryData();
auto& local_matrix = elementary_data.GetNonCstMatrixResult();
auto& global_matrix = global_linear_algebra.first;
const auto& unknown = local_operator.GetUnknown();
const auto& unknown_and_numbering_subset = elementary_data.GetRefFElt(unknown).GetUnknownAndNumberingSubset();
const auto& local2global = local_felt_space.GetFiniteElt(unknown_and_numbering_subset).template GetLocal2Global<MpiScale::program_wise>();
Private::ReportValuesInGlobalMatrix(local_matrix, global_linear_algebra.second, local2global, local2global, global_matrix);
}
template<class LocalOperatorT>
void OneUnknown::InjectIntoGlobalLinearAlgebra(const LocalFEltSpace& local_felt_space,
const LocalOperatorT& local_operator,
......
//
// Recursivity.cpp
// HappyHeart
//
// Created by Sebastien Gilles on 29/04/15.
// Copyright (c) 2015 Inria. All rights reserved.
//
#include "FiniteElement/Operators/GlobalVariationalOperator/Private/Recursivity.hpp"
namespace HappyHeart
{
namespace Private
{
} //namespace Private
} // namespace HappyHeart
//
// Recursivity.hpp
// HappyHeart
//
// Created by Sebastien Gilles on 29/04/15.
// Copyright (c) 2015 Inria. All rights reserved.
//
#ifndef __HappyHeart__Recursivity__HPP
# define __HappyHeart__Recursivity__HPP
# include <memory>
# include <vector>
namespace HappyHeart
{
namespace Private
{
} //namespace Private
} // namespace HappyHeart
# include "FiniteElement/Operators/GlobalVariationalOperator/Private/Recursivity.hxx"
#endif /* defined(__HappyHeart__Recursivity__HPP) */
//
// Recursivity.hxx
// HappyHeart
//
// Created by Sebastien Gilles on 29/04/15.
// Copyright (c) 2015 Inria. All rights reserved.
//
#ifndef __HappyHeart__Recursivity__HXX
#define __HappyHeart__Recursivity__HXX
namespace HappyHeart
{
namespace Private
{
} //namespace Private
} // namespace HappyHeart
#endif /* defined(__HappyHeart__Recursivity__HXX) */
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