arcaneframework / arcanefem

Small test application for FEM
Apache License 2.0
6 stars 3 forks source link

MSH file with Tetra, hexa, pyramids not working #142

Closed mohd-afeef-badri closed 2 months ago

mohd-afeef-badri commented 3 months ago

the mesh produces error in passmo module

*I-Internal   nb_physical_name=8
*E* Code:---------------------------------------------
*E*   ERROR (0,is244583): FatalErrorException caught in ArcaneMain::callFunctor: Exception!

Thrown in: 'void Arcane::MshMeshReader::_readEntitiesV4(Arcane::IosFile&, Arcane::MshMeshReader::MeshInfo&)'
Type: 'FatalError'

Message: NotImplemented numPhysicalTag>1 (n=2)
Fatal error occured.
Can not further proceed.

Call stack:
   734d449e0797  Arccore::Exception::_setStackTrace()
   734d449e0167  Arccore::Exception::Exception(Arccore::String const&, Arccore::TraceInfo const&, Arccore::String const&)
   734d449e156f  Arccore::FatalErrorException::FatalErrorException(Arccore::TraceInfo const&, Arccore::String const&)
   734d45e17d80  Arcane::MshMeshReader::_readEntitiesV4(Arcane::IosFile&, Arcane::MshMeshReader::MeshInfo&)
   734d45e1884a  Arcane::MshMeshReader::_readMeshFromNewMshFile(Arcane::IMesh*, Arcane::IosFile&)
   734d45e196f6  Arcane::MshMeshReader::readMeshFromMshFile(Arcane::IMesh*, Arccore::String const&)
   734d45e1ad35  Arcane::MshCaseMeshReader::Builder::allocateMeshItems(Arcane::IPrimaryMesh*)
   734d4510aeb0  Arcane::ArcaneCaseMeshService::allocateMeshItems()
   734d45103837  Arcane::ArcaneCaseMeshMasterService::allocateMeshes()
   734d452878f2  Arcane::SubDomain::readOrReloadMeshes()
   734d44527475  Arcane::CodeService::initCase(Arcane::ISubDomain*, bool)
   734d4511d61a  Arcane::ArcaneCodeService::initCase(Arcane::ISubDomain*, bool)
   734d451708c6  Arcane::ArcaneMainBatch::SessionExec::_createAndRunSubDomain(Arcane::ArcaneMainBatch::SessionExec::SubInfo*, Arccore::Ref<Arcane::IParallelMng, 1>, Arccore::Ref<Arcane::IParallelMng, 1>, int)
   734d4516fc6e  Arcane::ArcaneMainBatch::SessionExec::executeRank(int)
   734d4516e82d  Arcane::ArcaneMainBatch::execute()
   734d45124783  Arcane::ArcaneMainExecFunctor::executeFunctor()
   734d4511ef3d  Arcane::ArcaneMain::callFunctorWithCatchedException(Arccore::IFunctor*, Arcane::IArcaneMain*, bool*, bool)
   734d4511eb9e  Arcane::ArcaneMainExecInfo::execute()
   734d4511edc0  Arcane::ArcaneMain::_arcaneMain(Arcane::ApplicationInfo const&, Arcane::IMainFactory*)
   734d4511fe55  Arcane::ArcaneMain::arcaneMain(Arcane::ApplicationInfo const&, Arcane::IMainFactory*)
   734d451200e3  Arcane::ArcaneMain::run()
   734d4984a0e5  Arcane::ArcaneLauncher::run()
   5a4dd9e1e45a  main
   734d43a29d90  __libc_init_first
   734d43a29e40  __libc_start_main
   5a4dd9e1e5a5  _start

@grospelliergilles can you please have a look ? Are there other formats of mesh we can try, med, vtk ?

mohd-afeef-badri commented 3 months ago

For now I have pushed another msh file for this test which works. But it will be nice to verify why the mesh attached here was failing

grospelliergilles commented 3 months ago

I will look at it. I think it is because there is a feature not handled in the format.

mohd-afeef-badri commented 3 months ago

This was indeed a feature missing in Arcane which has been implemented here. For now only for PArallel MSH reader (ARCANE_USE_PARALLEL_MSH_READER=1).

mohd-afeef-badri commented 3 months ago

The fix is not sufficient. Now the error that I am facing is in the mesh file there are clearly 3 groups of cells (volumes)

$PhysicalNames
9
1 9 "Group_Of_All_Edges"
2 4 "Fixed"
2 5 "Group_Of_All_Faces"
2 6 "right"
2 7 "top_bot"
2 8 "interface"
3 1 "Group_Of_All_Volumes"
3 2 "quads_vol"
3 3 "Tria_vol"
$EndPhysicalNames

image

However Arcane seems to just read the quads_vol neglecting the Tria_vol and Group_Of_All_Volumes.

*I-Internal   ## Done ##
*I-Internal   Adding 136 items from block index=5 to group 'quads_vol' for family=Cell
*I-Internal   Adding 1532 items from block index=6 to group 'quads_vol' for family=Cell
*I-Internal   Adding 220 items from block index=7 to group 'quads_vol' for family=Cell
*I-Internal   Initialize variable=Rho group=Group_Of_All_Volumes value=1.000000
*I-Internal   Initialize variable=Lambda group=Group_Of_All_Volumes value=576.9230769
*I-Internal   Initialize variable=Mu group=Group_Of_All_Volumes value=384.6153846
*I-Internal   ERROR: No group named 'Group_Of_All_Volumes' exists in family 'Cell'
*I-Internal   ERROR: No group named 'Group_Of_All_Volumes' exists in family 'Cell'
*I-Internal   ERROR: No group named 'Group_Of_All_Volumes' exists in family 'Cell'
*E* Code:---------------------------------------------
*E*   ERROR (0,is244583): FatalErrorException caught in ArcaneMain::callFunctor: Exception!

Thrown in: 'void Arcane::ArcaneCaseMeshService::_initializeVariables()'
Type: 'FatalError'

Message: Variable initialization failed for option '//case/meshes/mesh/initialization/variable'
Fatal error occured.
Can not further proceed.

Call stack:
   7d72f87a8797  Arccore::Exception::_setStackTrace()
   7d72f87a8167  Arccore::Exception::Exception(Arccore::String const&, Arccore::TraceInfo const&, Arccore::String const&)
   7d72f87a956f  Arccore::FatalErrorException::FatalErrorException(Arccore::TraceInfo const&, Arccore::String const&)
   7d72f8f0c480  Arcane::ArcaneCaseMeshService::_initializeVariables()
   7d72f8f0aebc  Arcane::ArcaneCaseMeshService::allocateMeshItems()
   7d72f8f03837  Arcane::ArcaneCaseMeshMasterService::allocateMeshes()
   7d72f908816c  Arcane::SubDomain::readOrReloadMeshes()
   7d72f832784f  Arcane::CodeService::initCase(Arcane::ISubDomain*, bool)
   7d72f8f1d61a  Arcane::ArcaneCodeService::initCase(Arcane::ISubDomain*, bool)
   7d72f8f70da2  Arcane::ArcaneMainBatch::SessionExec::_createAndRunSubDomain(Arcane::ArcaneMainBatch::SessionExec::SubInfo*, Arccore::Ref<Arcane::IParallelMng, 1>, Arccore::Ref<Arcane::IParallelMng, 1>, int)
   7d72f8f7014a  Arcane::ArcaneMainBatch::SessionExec::executeRank(int)
   7d72f8f6ed09  Arcane::ArcaneMainBatch::execute()
   7d72f8f24783  Arcane::ArcaneMainExecFunctor::executeFunctor()
   7d72f8f1ef3d  Arcane::ArcaneMain::callFunctorWithCatchedException(Arccore::IFunctor*, Arcane::IArcaneMain*, bool*, bool)
   7d72f8f1eb9e  Arcane::ArcaneMainExecInfo::execute()
   7d72f8f1edc0  Arcane::ArcaneMain::_arcaneMain(Arcane::ApplicationInfo const&, Arcane::IMainFactory*)
   7d72f8f1fe55  Arcane::ArcaneMain::arcaneMain(Arcane::ApplicationInfo const&, Arcane::IMainFactory*)
   7d72f8f200e3  Arcane::ArcaneMain::run()
   7d72fd7ab0e5  Arcane::ArcaneLauncher::run()
   646aa80b045a  main
   7d72f7829d90  __libc_init_first
   7d72f7829e40  __libc_start_main
   646aa80b05a5  _start
grospelliergilles commented 3 months ago

Thanks for the report. You are right the group is ignored. I will fix it.

grospelliergilles commented 3 months ago

The PR https://github.com/arcaneframework/framework/pull/1509 should fix the problem.