Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GILLES Sebastien
MoReFEM
Commits
53ca8171
Commit
53ca8171
authored
May 05, 2022
by
GILLES Sebastien
Browse files
#0 Run clang-format.
parent
4fb83754
Pipeline
#502983
passed with stage
in 2 minutes and 26 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Sources/FiniteElement/FiniteElementSpace/Internal/FEltSpace/FEltSpaceStorage.hpp
View file @
53ca8171
...
...
@@ -47,7 +47,7 @@ namespace MoReFEM::Internal::FEltSpaceNS { struct ReduceToProcessorWise; } // IW
namespace
MoReFEM
{
namespace
Internal
{
...
...
Sources/FormulationSolver/VariationalFormulation.hpp
View file @
53ca8171
...
...
@@ -97,7 +97,7 @@ namespace MoReFEM
* - void AllocateMatricesAndVectors()
*
* Additionally, if NonLinearSolverT is yes the following methods are expected:
*
*
* - void ComputeResidual(const GlobalVector& evaluation_state, GlobalVector& residual)
* where
* * evaluation_state is an <i>input</i> data, which is the MoReFEM counterpart of \a x in
...
...
Sources/Operators/ConformInterpolator/Lagrangian/LocalLagrangianInterpolator.hpp
View file @
53ca8171
...
...
@@ -39,7 +39,7 @@ namespace MoReFEM::Internal::RefFEltNS { class RefLocalFEltSpace; }
namespace
MoReFEM
{
namespace
ConformInterpolatorNS
{
...
...
Sources/Test/Geometry/FreeFunctions/test.cpp
View file @
53ca8171
...
...
@@ -37,7 +37,7 @@ namespace // anonymous
using
fixture_type
=
MoReFEM
::
TestNS
::
FixtureNS
::
TestEnvironment
;
constexpr
auto
space_unit
=
1.
;
...
...
@@ -48,29 +48,30 @@ BOOST_FIXTURE_TEST_CASE(jacobian, fixture_type)
{
auto
&
manager
=
Internal
::
MeshNS
::
MeshManager
::
CreateOrGetInstance
(
__FILE__
,
__LINE__
);
FilesystemNS
::
File
mesh_file
{
std
::
filesystem
::
path
(
"${MOREFEM_ROOT}/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh"
)
};
FilesystemNS
::
File
mesh_file
{
std
::
filesystem
::
path
(
"${MOREFEM_ROOT}/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh"
)
};
mesh_file
.
SubstituteEnvironmentVariables
();
manager
.
Create
(
1
,
mesh_file
,
2
,
::
MoReFEM
::
MeshNS
::
Format
::
Medit
,
1.
,
Mesh
::
BuildEdge
::
no
,
Mesh
::
BuildFace
::
no
,
Mesh
::
BuildVolume
::
no
);
manager
.
Create
(
1
,
mesh_file
,
2
,
::
MoReFEM
::
MeshNS
::
Format
::
Medit
,
1.
,
Mesh
::
BuildEdge
::
no
,
Mesh
::
BuildFace
::
no
,
Mesh
::
BuildVolume
::
no
);
decltype
(
auto
)
mesh
=
manager
.
GetMesh
(
1
);
decltype
(
auto
)
geom_elt
=
mesh
.
GetGeometricEltFromIndex
<
RoleOnProcessor
::
processor_wise
>
(
1u
);
LocalCoords
local_coords
({
0.15
});
auto
compute_jacobian_helper
=
Advanced
::
GeomEltNS
::
ComputeJacobian
(
mesh
.
GetDimension
());
const
auto
jacobian
=
compute_jacobian_helper
.
Compute
(
geom_elt
,
local_coords
);
LocalMatrix
expected_matrix
{
{
0.2
,
0.
},
{
0.
,
0.
}
};
LocalMatrix
expected_matrix
{
{
0.2
,
0.
},
{
0.
,
0.
}
};
BOOST_CHECK_EQUAL
(
jacobian
,
expected_matrix
);
}
...
...
@@ -85,12 +86,12 @@ BOOST_FIXTURE_TEST_CASE(barycenter, fixture_type)
SpatialPoint
barycenter
;
Advanced
::
GeomEltNS
::
ComputeBarycenter
(
geom_elt
,
barycenter
);
SpatialPoint
expected
(
0.2
,
0.
,
0.
,
space_unit
);
const
double
dist
=
Distance
(
barycenter
,
expected
);
BOOST_CHECK_PREDICATE
(
NumericNS
::
IsZero
<
double
>
,
(
dist
)
(
1.e-8
));
BOOST_CHECK_PREDICATE
(
NumericNS
::
IsZero
<
double
>
,
(
dist
)(
1.e-8
));
}
...
...
@@ -103,15 +104,15 @@ BOOST_FIXTURE_TEST_CASE(local_2_global, fixture_type)
decltype
(
auto
)
geom_elt
=
mesh
.
GetGeometricEltFromIndex
<
RoleOnProcessor
::
processor_wise
>
(
1u
);
LocalCoords
local_coords
({
0.15
});
SpatialPoint
global
;
Advanced
::
GeomEltNS
::
Local2Global
(
geom_elt
,
local_coords
,
global
);
SpatialPoint
expected
(
0.23
,
-
1
,
0
,
space_unit
);
const
double
dist
=
Distance
(
global
,
expected
);
BOOST_CHECK_PREDICATE
(
NumericNS
::
IsZero
<
double
>
,
(
dist
)
(
1.e-8
));
BOOST_CHECK_PREDICATE
(
NumericNS
::
IsZero
<
double
>
,
(
dist
)(
1.e-8
));
}
PRAGMA_DIAGNOSTIC
(
pop
)
Sources/Test/Tools/BareModel.hpp
View file @
53ca8171
...
...
@@ -116,19 +116,19 @@ namespace MoReFEM::TestNS
//! Manage time iteration.
void
Forward
()
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
void
Forward
()
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
/*!
* \brief Additional operations to finalize a dynamic step.
*
* Base class already update the time for next time iterations.
*/
void
SupplFinalizeStep
()
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
void
SupplFinalizeStep
()
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
private:
//! \copydoc doxygen_hide_model_SupplHasFinishedConditions_always_true
bool
SupplHasFinishedConditions
()
const
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
bool
SupplHasFinishedConditions
()
const
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
/*!
...
...
@@ -136,7 +136,7 @@ namespace MoReFEM::TestNS
*
* As there are none, the body of this method is empty.
*/
void
SupplInitializeStep
()
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
void
SupplInitializeStep
()
requires
(
!
std
::
is_same_v
<
TimeDependencyT
,
TimeManagerNS
::
Policy
::
None
>
);
///@}
...
...
Sources/ThirdParty/Wrappers/Petsc/Vector/Vector.cpp
View file @
53ca8171
...
...
@@ -33,8 +33,8 @@
#include
"ThirdParty/Wrappers/Petsc/Vector/AccessGhostContent.hpp"
#include
"ThirdParty/Wrappers/Petsc/Vector/AccessVectorContent.hpp"
#include
"ThirdParty/Wrappers/Petsc/Vector/Internal/CheckUpdateGhostManager.hpp"
// IWUI pragma: keep
#include
"ThirdParty/Wrappers/Petsc/Vector/Vector.hpp"
// IWYU pragma: keep
#include
"ThirdParty/Wrappers/Petsc/Viewer.hpp"
// IWYU pragma: associated
#include
"ThirdParty/Wrappers/Petsc/Vector/Vector.hpp"
// IWYU pragma: keep
#include
"ThirdParty/Wrappers/Petsc/Viewer.hpp"
// IWYU pragma: associated
// ============================
...
...
@@ -145,7 +145,7 @@ namespace MoReFEM
if
(
error_code
)
throw
ExceptionNS
::
Exception
(
error_code
,
"VecSetValues"
,
invoking_file
,
invoking_line
);
// Don't add UpdateGhosts here! (it would stuck parallel programs).
// SetValues() must be followed byy Assembly() call which takes care of it.
}
...
...
Sources/ThirdParty/Wrappers/Petsc/Vector/Vector.hxx
View file @
53ca8171
...
...
@@ -96,8 +96,7 @@ namespace MoReFEM
const
char
*
invoking_file
,
int
invoking_line
)
{
this
->
SetValues
(
indexing
,
local_vec
.
GetArray
(),
insertOrAppend
,
invoking_file
,
invoking_line
);
this
->
SetValues
(
indexing
,
local_vec
.
GetArray
(),
insertOrAppend
,
invoking_file
,
invoking_line
);
}
...
...
Write
Preview
Supports
Markdown
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