Skip to content

Commit

Permalink
correct naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mohd-afeef-badri committed Aug 22, 2024
1 parent dfb1c7a commit a9e9ce5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
12 changes: 6 additions & 6 deletions acoustics/FemModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ compute()
*
* This method follows a sequence of steps to solve FEM system:
* 1. _getMaterialParameters() Retrieves material parameters via
* 2. _assembleBilinearOperatorTRIA3() Assembles the FEM matrix A
* 2. _assembleBilinearOperatorTria3() Assembles the FEM matrix A
* 3. _assembleLinearOperator() Assembles the FEM RHS vector b
* 4. _solve() Solves for solution vector u = A^-1*b
* 5. _validateResults() Regression test
Expand All @@ -78,7 +78,7 @@ void FemModule::
_doStationarySolve()
{
_getMaterialParameters();
_assembleBilinearOperatorTRIA3();
_assembleBilinearOperatorTria3();
_assembleLinearOperator();
_solve();
_validateResults();
Expand Down Expand Up @@ -137,10 +137,10 @@ _assembleLinearOperator()
/*---------------------------------------------------------------------------*/

FixedMatrix<3, 3> FemModule::
_computeElementMatrixTRIA3(Cell cell)
_computeElementMatrixTria3(Cell cell)
{
// step 1
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTriangle3(cell, m_node_coord);
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTria3(cell, m_node_coord);

// step 2
Real3x3 UV = ArcaneFemFunctions::FeOperation2D::computeUVTria3(cell, m_node_coord);
Expand All @@ -163,14 +163,14 @@ _computeElementMatrixTRIA3(Cell cell)
/*---------------------------------------------------------------------------*/

void FemModule::
_assembleBilinearOperatorTRIA3()
_assembleBilinearOperatorTria3()
{
auto node_dof(m_dofs_on_nodes.nodeDoFConnectivityView());

ENUMERATE_ (Cell, icell, allCells()) {
Cell cell = *icell;

auto K_e = _computeElementMatrixTRIA3(cell); // element matrix
auto K_e = _computeElementMatrixTria3(cell); // element matrix
Int32 n1_index = 0;
for (Node node1 : cell.nodes()) {
Int32 n2_index = 0;
Expand Down
4 changes: 2 additions & 2 deletions acoustics/FemModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ class FemModule

void _doStationarySolve();
void _getMaterialParameters();
void _assembleBilinearOperatorTRIA3();
void _assembleBilinearOperatorTria3();
void _solve();
void _assembleLinearOperator();
void _validateResults();

FixedMatrix<3, 3> _computeElementMatrixTRIA3(Cell cell);
FixedMatrix<3, 3> _computeElementMatrixTria3(Cell cell);
};

#endif
20 changes: 10 additions & 10 deletions femutils/ArcaneFemFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using namespace Arcane;
* The class provides methods organized into different nested classes for:
* - MeshOperation: Mesh related operations.
* - FeOperation2D: Finite element operations at element level.
* - BoundaryConditions2D: Boundary condition realated operations.
* - BoundaryConditions2D: Boundary condition related operations.
*/
/*---------------------------------------------------------------------------*/

Expand Down Expand Up @@ -70,7 +70,7 @@ class ArcaneFemFunctions
*/
/*---------------------------------------------------------------------------*/

static inline Real computeAreaTriangle3(Cell cell, const VariableNodeReal3& node_coord)
static inline Real computeAreaTria3(Cell cell, const VariableNodeReal3& node_coord)
{
Real3 vertex0 = node_coord[cell.nodeId(0)];
Real3 vertex1 = node_coord[cell.nodeId(1)];
Expand Down Expand Up @@ -109,7 +109,7 @@ class ArcaneFemFunctions
*/
/*---------------------------------------------------------------------------*/

static inline Real3 computeBaryCenterTriangle3(Cell cell, const VariableNodeReal3& node_coord)
static inline Real3 computeBaryCenterTria3(Cell cell, const VariableNodeReal3& node_coord)
{
Real3 vertex0 = node_coord[cell.nodeId(0)];
Real3 vertex1 = node_coord[cell.nodeId(1)];
Expand All @@ -129,7 +129,7 @@ class ArcaneFemFunctions
*/
/*---------------------------------------------------------------------------*/

static inline Real computeEdgeLength2(Face face, const VariableNodeReal3& node_coord)
static inline Real computeLengthEdge2(Face face, const VariableNodeReal3& node_coord)
{
Real3 vertex0 = node_coord[face.nodeId(0)];
Real3 vertex1 = node_coord[face.nodeId(1)];
Expand All @@ -149,7 +149,7 @@ class ArcaneFemFunctions
*/
/*---------------------------------------------------------------------------*/

static inline Real2 computeEdgeNormal2(Face face, const VariableNodeReal3& node_coord)
static inline Real2 computeNormalEdge2(Face face, const VariableNodeReal3& node_coord)
{
Real3 vertex0 = node_coord[face.nodeId(0)];
Real3 vertex1 = node_coord[face.nodeId(1)];
Expand Down Expand Up @@ -395,7 +395,7 @@ class ArcaneFemFunctions
{
ENUMERATE_ (Cell, icell, mesh->allCells()) {
Cell cell = *icell;
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTriangle3(cell, node_coord);
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTria3(cell, node_coord);
for (Node node : cell.nodes()) {
if (node.isOwn())
rhs_values[node_dof.dofId(node, 0)] += qdot * area / cell.nbNode();
Expand Down Expand Up @@ -423,8 +423,8 @@ class ArcaneFemFunctions
{
ENUMERATE_ (Cell, icell, mesh->allCells()) {
Cell cell = *icell;
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTriangle3(cell, node_coord);
Real3 bcenter = ArcaneFemFunctions::MeshOperation::computeBaryCenterTriangle3(cell, node_coord);
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTria3(cell, node_coord);
Real3 bcenter = ArcaneFemFunctions::MeshOperation::computeBaryCenterTria3(cell, node_coord);

for (Node node : cell.nodes()) {
if (node.isOwn())
Expand Down Expand Up @@ -472,8 +472,8 @@ class ArcaneFemFunctions
ENUMERATE_ (Face, iface, group) {
Face face = *iface;

Real length = ArcaneFemFunctions::MeshOperation::computeEdgeLength2(face, node_coord);
Real2 normal = ArcaneFemFunctions::MeshOperation::computeEdgeNormal2(face, node_coord);
Real length = ArcaneFemFunctions::MeshOperation::computeLengthEdge2(face, node_coord);
Real2 normal = ArcaneFemFunctions::MeshOperation::computeNormalEdge2(face, node_coord);

for (Node node : iface->nodes()) {
if (!node.isOwn())
Expand Down
12 changes: 6 additions & 6 deletions fourier/FemModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ _assembleLinearOperator()
/*---------------------------------------------------------------------------*/

FixedMatrix<3, 3> FemModule::
_computeElementMatrixTRIA3(Cell cell)
_computeElementMatrixTria3(Cell cell)
{
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTriangle3(cell, m_node_coord);
Real area = ArcaneFemFunctions::MeshOperation::computeAreaTria3(cell, m_node_coord);

Real3 dxU = ArcaneFemFunctions::FeOperation2D::computeGradientXTria3(cell, m_node_coord);
Real3 dyU = ArcaneFemFunctions::FeOperation2D::computeGradientYTria3(cell, m_node_coord);
Expand All @@ -235,7 +235,7 @@ _computeElementMatrixTRIA3(Cell cell)
/*---------------------------------------------------------------------------*/

FixedMatrix<4, 4> FemModule::
_computeElementMatrixQUAD4(Cell cell)
_computeElementMatrixQuad4(Cell cell)
{
Real area = ArcaneFemFunctions::MeshOperation::computeAreaQuad4(cell, m_node_coord);

Expand All @@ -256,11 +256,11 @@ _assembleBilinearOperator()
{
if (options()->meshType == "QUAD4")
_assembleBilinear<4>([this](const Cell& cell) {
return _computeElementMatrixQUAD4(cell);
return _computeElementMatrixQuad4(cell);
});
else if (options()->meshType == "TRIA3")
_assembleBilinear<3>([this](const Cell& cell) {
return _computeElementMatrixTRIA3(cell);
return _computeElementMatrixTria3(cell);
});
else
ARCANE_FATAL("Non supported meshType");
Expand All @@ -273,7 +273,7 @@ _assembleBilinearOperator()
* The method performs the following steps:
* 1. For each cell, retrieves the cell-specific constant `lambda`.
* 2. Computes element matrix using provided `compute_element_matrix` function.
* 3. Assembles global matrix by addingcontributions from each cell's element
* 3. Assembles global matrix by adding contributions from each cell's element
* matrix to the corresponding entries in the global matrix.
*/
/*---------------------------------------------------------------------------*/
Expand Down
4 changes: 2 additions & 2 deletions fourier/FemModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class FemModule
void _assembleLinearOperator();
void _validateResults();

FixedMatrix<3, 3> _computeElementMatrixTRIA3(Cell cell);
FixedMatrix<4, 4> _computeElementMatrixQUAD4(Cell cell);
FixedMatrix<3, 3> _computeElementMatrixTria3(Cell cell);
FixedMatrix<4, 4> _computeElementMatrixQuad4(Cell cell);

IBinaryMathFunctor<Real, Real3, Real>* m_manufactured_dirichlet = nullptr;
IBinaryMathFunctor<Real, Real3, Real>* m_manufactured_source = nullptr;
Expand Down

0 comments on commit a9e9ce5

Please sign in to comment.