Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions modules/acoustics/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@
<description>k/c square of the material.</description>
</simple>

<!-- Mesh type used by the solver -->
<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>

<!-- Linear system service instance -->
<service-instance name="linear-system" type="Arcane::FemUtils::IDoFLinearSystemFactory" default="AlephLinearSystem" />

Expand Down
6 changes: 3 additions & 3 deletions modules/bilaplacian/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
<simple name="f" type="real" default="0.0">
<description>Source within the material.</description>
</simple>

<simple name="result-file" type="string" optional="true">
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>
<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>

<simple name = "enforce-Dirichlet-method" type = "string" default="Penalty" optional="true">
<description>
Method via which Dirichlet boundary condition is imposed
</description>
</simple>

<simple name = "penalty" type = "real" default="1.e30" optional="true">
<description>
Penalty value for enforcing Dirichlet condition
Expand Down
3 changes: 0 additions & 3 deletions modules/elastodynamics/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
<simple name="result-file" type="string" optional="true">
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>
<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>
<simple name="time-discretization" type="string" default="Newmark-beta" optional="true">
<description>Type of time discretization for the solver</description>
</simple>
Expand Down
4 changes: 0 additions & 4 deletions modules/electrostatics/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>

<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>

<simple name="matrix-format" type="string" default="DOK" optional="true">
<description>Which matrix format to use DOK|BSR|AF-BSR.</description>
</simple>
Expand Down
9 changes: 0 additions & 9 deletions modules/fourier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/meshes)
set(MESH_FILES
plancher.msh
multi-material.msh
plancher.quad4.msh
square_-2pi_to_2pi.msh
bar_dynamic_3D.msh
pipe.msh
Expand Down Expand Up @@ -67,12 +66,6 @@ if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC)
inputs/conduction.arc)
add_test(NAME [Fourier]conduction_heterogeneous COMMAND Fourier
inputs/conduction.heterogeneous.arc)
add_test(NAME [Fourier]conduction_quad COMMAND Fourier
-A,//meshes/mesh/filename=meshes/plancher.quad4.msh
-A,//fem/mesh-type=QUAD4
-A,//fem/petsc-flags=-ksp_monitor
-A,//fem/cross-validation=false
inputs/conduction.arc)
add_test(NAME [Fourier]manufacture_solution COMMAND Fourier
-A,UsingDotNet=1
inputs/manufacture.solution.arc)
Expand All @@ -83,7 +76,6 @@ if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC)
add_test(NAME [Fourier]manufacture_solution_3D COMMAND Fourier
-A,UsingDotNet=1
-A,//meshes/mesh/filename=meshes/bar_dynamic_3D.msh
-A,//fem/mesh-type=TETRA4
inputs/manufacture.solution.arc)

if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE)
Expand All @@ -99,7 +91,6 @@ if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC)
add_test(NAME [Fourier]manufacture_solution_3D_2p COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Fourier
-A,UsingDotNet=1
-A,//meshes/mesh/filename=meshes/bar_dynamic_3D.msh
-A,//fem/mesh-type=TETRA4
inputs/manufacture.solution.arc)
if(FEMTEST_HAS_GMSH_TEST)
add_test(NAME [Fourier]conduction_10k_2p COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Fourier
Expand Down
16 changes: 1 addition & 15 deletions modules/fourier/ElementMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/*---------------------------------------------------------------------------*/
/**
* @brief Computes the element matrix for a triangular/quad element (ℙ1 FE).
* @brief Computes the element matrix for a triangular element (ℙ1 FE).
*
* This function calculates the expression:
* a(𝑢,𝑣) = ∫∫ λ(∂𝑢/∂𝑥 ∂𝑣/∂𝑥 + ∂𝑢/∂𝑦 ∂𝑣/∂𝑦)dΩ
Expand All @@ -36,20 +36,6 @@ _computeElementMatrixTria3(Cell cell)
return area * lambda * (dxU ^ dxU) + area * lambda * (dyU ^ dyU);
}

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

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

Real4 dxU = ArcaneFemFunctions::FeOperation2D::computeGradientXQuad4(cell, m_node_coord);
Real4 dyU = ArcaneFemFunctions::FeOperation2D::computeGradientYQuad4(cell, m_node_coord);

return area * lambda * (dxU ^ dxU) + area * lambda * (dyU ^ dyU);
}

/*---------------------------------------------------------------------------*/
/**
* @brief Computes the element matrix for a tetrahedral element (ℙ1 FE).
Expand Down
4 changes: 0 additions & 4 deletions modules/fourier/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>

<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>

<simple name="matrix-format" type="string" default="DOK" optional="true">
<description>Which matrix format to use DOK|BSR|AF-BSR.</description>
</simple>
Expand Down
12 changes: 3 additions & 9 deletions modules/fourier/FemModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,20 +255,14 @@ _assembleBilinearOperator()
info() << "[ArcaneFem-Info] Started module _assembleBilinearOperator()";
Real elapsedTime = platform::getRealTime();

if (options()->meshType == "QUAD4")
_assembleBilinear<4>([this](const Cell& cell) {
return _computeElementMatrixQuad4(cell);
});
else if (options()->meshType == "TRIA3")
if (mesh()->dimension() == 2)
_assembleBilinear<3>([this](const Cell& cell) {
return _computeElementMatrixTria3(cell);
});
else if (options()->meshType == "TETRA4")
else
_assembleBilinear<4>([this](const Cell& cell) {
return _computeElementMatrixTetra4(cell);
});
else
ARCANE_FATAL("Non supported meshType");

elapsedTime = platform::getRealTime() - elapsedTime;
ArcaneFemFunctions::GeneralFunctions::printArcaneFemTime(traceMng(),"lhs-matrix-assembly", elapsedTime);
Expand Down Expand Up @@ -400,7 +394,7 @@ _validateResults()
if (allNodes().size() < 200)
ENUMERATE_ (Node, inode, allNodes()) {
Node node = *inode;
info() << "u[" << node.localId() << "][" << node.uniqueId() << "] = " << m_u[node];
info() << "u[" << node.uniqueId() << "] = " << m_u[node];
}

String filename = options()->resultFile();
Expand Down
1 change: 0 additions & 1 deletion modules/fourier/FemModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class FemModule
void _updateVariables();

RealMatrix<3, 3> _computeElementMatrixTria3(Cell cell);
RealMatrix<4, 4> _computeElementMatrixQuad4(Cell cell);
RealMatrix<4, 4> _computeElementMatrixTetra4(Cell cell);

IBinaryMathFunctor<Real, Real3, Real>* m_manufactured_dirichlet = nullptr;
Expand Down
1 change: 0 additions & 1 deletion modules/fourier/inputs/conduction.3D.arc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<fem>
<lambda>0.023</lambda>
<qdot>1.123e-2</qdot>
<mesh-type>TETRA4</mesh-type>
<result-file>check/test_conduction_3D.txt</result-file>
<boundary-conditions>
<dirichlet>
Expand Down
1 change: 0 additions & 1 deletion modules/fourier/inputs/conduction.boolean.3D.arc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<fem>
<lambda>23.5</lambda>
<qdot>1.123e-2</qdot>
<mesh-type>TETRA4</mesh-type>
<boundary-conditions>
<dirichlet>
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method>
Expand Down
1 change: 0 additions & 1 deletion modules/fourier/inputs/conduction.pipe.3D.arc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
-->
<fem>
<qdot>6.3e-2</qdot>
<mesh-type>TETRA4</mesh-type>
<boundary-conditions>
<dirichlet>
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method>
Expand Down
3 changes: 0 additions & 3 deletions modules/heat/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
<simple name="result-file" type="string" optional="true">
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>
<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>
<simple name="dt" type="real" default="0.1">
<description>Time step of simulation.</description>
</simple>
Expand Down
3 changes: 0 additions & 3 deletions modules/laplace/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<simple name="result-file" type="string" optional="true">
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>
<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>

<simple name="matrix-format" type="string" default="DOK" optional="true">
<description>Which matrix format to use DOK|BSR|AF-BSR.</description>
Expand Down
1 change: 0 additions & 1 deletion modules/laplace/inputs/L-shape.3D.arc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

<fem>
<result-file>check/test_3D_L-shape.txt</result-file>
<mesh-type>TETRA4</mesh-type>
<boundary-conditions>
<dirichlet>
<surface>bot</surface>
Expand Down
3 changes: 0 additions & 3 deletions modules/soildynamics/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
<simple name="result-file" type="string" optional="true">
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>
<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>
<simple name = "enforce-Dirichlet-method" type = "string" default="Penalty" optional="true">
<description>
Method via which Dirichlet boundary condition is imposed
Expand Down
14 changes: 7 additions & 7 deletions modules/testlab/BlCsrBiliAssembly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
Integer nbnde = nbNode();
Int64 nedge;

if (options()->meshType == "TETRA4")
if (mesh()->dimension() == 3)
nedge = nbEdge();
else if (options()->meshType == "TRIA3")
else if (mesh()->dimension() == 2)

Check warning on line 30 in modules/testlab/BlCsrBiliAssembly.cc

View check run for this annotation

Codecov / codecov/patch

modules/testlab/BlCsrBiliAssembly.cc#L30

Added line #L30 was not covered by tests
nedge = nbFace();
else
ARCANE_THROW(NotImplementedException, "");
Expand All @@ -38,15 +38,15 @@
Integer index = 1;
m_csr_matrix.m_matrix_row(0) = 0;

if (options()->meshType == "TETRA4")
if (mesh()->dimension() == 3)
ENUMERATE_NODE (inode, allNodes()) {
Node node = *inode;
if (index < nbnde) {
m_csr_matrix.m_matrix_row(index) = node.nbEdge() + m_csr_matrix.m_matrix_row(index - 1) + 1;
index++;
}
}
else if (options()->meshType == "TRIA3")
else if (mesh()->dimension() == 2)

Check warning on line 49 in modules/testlab/BlCsrBiliAssembly.cc

View check run for this annotation

Codecov / codecov/patch

modules/testlab/BlCsrBiliAssembly.cc#L49

Added line #L49 was not covered by tests
ENUMERATE_NODE (inode, allNodes()) {
Node node = *inode;
if (index < nbnde) {
Expand All @@ -66,9 +66,9 @@
Integer nbnde = nbNode();
Int64 nedge;

if (options()->meshType == "TETRA4")
if (mesh()->dimension() == 3)
nedge = m_nb_edge;
else if (options()->meshType == "TRIA3")
else if (mesh()->dimension() == 2)
nedge = nbFace();
else
ARCANE_THROW(NotImplementedException, "");
Expand All @@ -86,7 +86,7 @@
UnstructuredMeshConnectivityView connectivity_view;
connectivity_view.setMesh(this->mesh());

if (options()->meshType == "TRIA3") {
if (mesh()->dimension() == 2) {
auto nfc = connectivity_view.nodeFace();
command << RUNCOMMAND_ENUMERATE(Node, inode, allNodes())
{
Expand Down
3 changes: 0 additions & 3 deletions modules/testlab/Fem.axl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
<simple name="result-file" type="string" optional="true">
<description>File name of a file containing the values of the solution vector to check the results</description>
</simple>
<simple name="mesh-type" type="string" default="TRIA3" optional="true">
<description>Type of mesh provided to the solver</description>
</simple>
<simple name = "enforce-Dirichlet-method" type = "string" default="Penalty" optional="true">
<description>
Method via which Dirichlet boundary condition is imposed
Expand Down
12 changes: 6 additions & 6 deletions modules/testlab/FemModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ _getMaterialParameters()
f = options()->f();
ElementNodes = 3.;

if (options()->meshType == "TETRA4")
if (mesh()->dimension() == 3)
ElementNodes = 4.;

elapsedTime = platform::getRealTime() - elapsedTime;
Expand Down Expand Up @@ -683,7 +683,7 @@ _checkCellType()
Real elapsedTime = platform::getRealTime();

Int16 type = 0;
if (options()->meshType == "TETRA4") {
if (mesh()->dimension() == 3) {
type = IT_Tetraedron4;
}
else {
Expand Down Expand Up @@ -839,7 +839,7 @@ _assembleLinearOperator(BSRMatrix* bsr_matrix)
// $int_{Omega}(f*v^h)$
// only for noded that are non-Dirichlet
//----------------------------------------------
if (options()->meshType == "TRIA3") {
if (mesh()->dimension() == 2) {
ENUMERATE_ (Cell, icell, allCells()) {
Cell cell = *icell;
Real area = _computeAreaTriangle3(cell);
Expand All @@ -851,7 +851,7 @@ _assembleLinearOperator(BSRMatrix* bsr_matrix)
}
}

if (options()->meshType == "TETRA4") {
if (mesh()->dimension() == 3) {
ENUMERATE_ (Cell, icell, allCells()) {
Cell cell = *icell;
Real area = _computeAreaTetra4(cell);
Expand Down Expand Up @@ -1348,7 +1348,7 @@ _assembleCsrGpuLinearOperator()
<< " - WeakPenalty\n";
}

if (options()->meshType == "TRIA3") {
if (mesh()->dimension() == 2) {
Timer::Action timer_action(m_time_stats, "CsrGpuConstantSourceTermAssembly");
//----------------------------------------------
// Constant source term assembly
Expand Down Expand Up @@ -1394,7 +1394,7 @@ _assembleCsrGpuLinearOperator()
};
}

if (options()->meshType == "TETRA4") {
if (mesh()->dimension() == 3) {
Timer::Action timer_action(m_time_stats, "CsrGpuConstantSourceTermAssembly");
//----------------------------------------------
// Constant source term assembly
Expand Down
6 changes: 3 additions & 3 deletions modules/testlab/NodeWiseCsrBiliAssembly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@

// Compute the number of nnz and initialize the memory space
Int64 nbnde = nbNode();
Int64 nedge = options()->meshType == "TETRA4" ? nbEdge() : nbFace();
Int64 nedge = mesh()->dimension() == 3 ? nbEdge() : nbFace();
Int32 nnz = nedge * 2 + nbnde;
m_csr_matrix.initialize(m_dof_family, nnz, nbnde);

if (options()->meshType == "TRIA3") {
if (mesh()->dimension() == 2) {
ENUMERATE_NODE (inode, allNodes()) {

//Since we compute the neighbouring connectivity here, we also fill the csr matrix
Expand All @@ -65,7 +65,7 @@
}
}
}
else if (options()->meshType == "TETRA4") {
else if (mesh()->dimension() == 3) {
ENUMERATE_NODE (inode, allNodes()) {
Node node = *inode;
Int32 node_dof_id = node_dof.dofId(node, 0);
Expand Down
1 change: 0 additions & 1 deletion modules/testlab/benchmarking/TEST_TEMPLATE_3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

<fem>
<f>5.5</f>
<mesh-type>TETRA4</mesh-type>
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method>
<penalty>1.e31</penalty>
<dirichlet-boundary-condition>
Expand Down
1 change: 0 additions & 1 deletion modules/testlab/inputs/Test.L-shape.3D.arc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<blcsr>true</blcsr>
<result-file>poisson_test_ref_L-shape_3D.txt</result-file>
<f>5.5</f>
<mesh-type>TETRA4</mesh-type>
<dirichlet-boundary-condition>
<surface>bot</surface>
<value>50.0</value>
Expand Down
1 change: 0 additions & 1 deletion modules/testlab/inputs/Test.L-shape.3D.coo-gpu.arc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<coo-gpu>true</coo-gpu>
<f>5.5</f>
<result-file>poisson_test_ref_L-shape_3D.txt</result-file>
<mesh-type>TETRA4</mesh-type>
<dirichlet-boundary-condition>
<surface>bot</surface>
<value>50.0</value>
Expand Down
Loading