KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1k stars 244 forks source link

Is it possible to derive an element in an application from an element from another application? #8769

Closed Vahid-Galavi closed 3 years ago

Vahid-Galavi commented 3 years ago

Description I derived some elements in GeoMechanicsApplication from the elements in StructuralMechanicsApplication. If I put them in GeoMechanicsApplication, I get errors in linking such as " unresolved external symbol". But if I move them to StructuralMechanicsApplication, they are compiled and linked without any errors. So, it seems that there is no problem with the derived elements. I guess my problem is related to the build script. Now, my question is if such a thing has been done before or should I simply move the derived elements to StructuralMechanicsApplication, although they might have little use in that application.

This is related to the discussion in #8464

Scope Which areas of Kratos are involved:

loumalouomega commented 3 years ago

Yes it is possible if you add that application to the CMakeList.txt, and you compile that application (for linking) of course.

El mié., 12 may. 2021 20:17, Vahid @.***> escribió:

Description I derived some elements in GeoMechanicsApplication from the elements in StructuralMechanicsApplication. If I put them in GeoMechanicsApplication, I get errors in linking such as " unresolved external symbol". But if I move them to StructuralMechanicsApplication, they are compiled and linked without any errors. So, it seems that there is no problem with the derived elements. I guess my problem is related to the build script. Now, my question is if such a thing has been done before or should I simply move the derived elements to StructuralMechanicsApplication, although they might have little use in that application.

This is related to the discussion in #8464 https://github.com/KratosMultiphysics/Kratos/pull/8464

Scope Which areas of Kratos are involved:

  • Compilation

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KratosMultiphysics/Kratos/issues/8769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYQZAHUDMU5YUA6TV32RTLTNLA4XANCNFSM44ZDQFVA .

loumalouomega commented 3 years ago

You should link that application as well of course in the CmakeLists.txt

El mié., 12 may. 2021 21:48, Vicente Mataix Ferrándiz < @.***> escribió:

Yes it is possible if you add that application to the CMakeList.txt, and you compile that application (for linking) of course.

El mié., 12 may. 2021 20:17, Vahid @.***> escribió:

Description I derived some elements in GeoMechanicsApplication from the elements in StructuralMechanicsApplication. If I put them in GeoMechanicsApplication, I get errors in linking such as " unresolved external symbol". But if I move them to StructuralMechanicsApplication, they are compiled and linked without any errors. So, it seems that there is no problem with the derived elements. I guess my problem is related to the build script. Now, my question is if such a thing has been done before or should I simply move the derived elements to StructuralMechanicsApplication, although they might have little use in that application.

This is related to the discussion in #8464 https://github.com/KratosMultiphysics/Kratos/pull/8464

Scope Which areas of Kratos are involved:

  • Compilation

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KratosMultiphysics/Kratos/issues/8769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYQZAHUDMU5YUA6TV32RTLTNLA4XANCNFSM44ZDQFVA .

rubenzorrilla commented 3 years ago

If the element that you're deriving from is templated but no header only you may have such problems. If this is the case, I'm afraid that the unique solution is to make the base element header only (we struggled with this not long ago in the FluidDynamicsApplication).

Vahid-Galavi commented 3 years ago

If the element that you're deriving from is templated but no header only you may have such problems. If this is the case, I'm afraid that the unique solution is to make the base element header only (we struggled with this not long ago in the FluidDynamicsApplication).

Thanks @rubenzorrilla! In which element should I look?

Vahid-Galavi commented 3 years ago

You should link that application as well of course in the CmakeLists.txt El mié., 12 may. 2021 21:48, Vicente Mataix Ferrándiz < @.> escribió: Yes it is possible if you add that application to the CMakeList.txt, and you compile that application (for linking) of course. El mié., 12 may. 2021 20:17, Vahid @.> escribió: > Description > I derived some elements in GeoMechanicsApplication from the elements in > StructuralMechanicsApplication. If I put them in GeoMechanicsApplication, I > get errors in linking such as " unresolved external symbol". But if I move > them to StructuralMechanicsApplication, they are compiled and linked > without any errors. So, it seems that there is no problem with the derived > elements. > I guess my problem is related to the build script. Now, my question is if > such a thing has been done before or should I simply move the derived > elements to StructuralMechanicsApplication, although they might have little > use in that application. > > This is related to the discussion in #8464 > <#8464> > > Scope > Which areas of Kratos are involved: > > - Compilation > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <#8769>, or > unsubscribe > https://github.com/notifications/unsubscribe-auth/AEYQZAHUDMU5YUA6TV32RTLTNLA4XANCNFSM44ZDQFVA > . >

Thanks @loumalouomega! Is there any example that I can look into?

loumalouomega commented 3 years ago

Thanks @loumalouomega! Is there any example that I can look into?

@AlejandroCornejo may have some examples (not in my case)

rubenzorrilla commented 3 years ago

If the element that you're deriving from is templated but no header only you may have such problems. If this is the case, I'm afraid that the unique solution is to make the base element header only (we struggled with this not long ago in the FluidDynamicsApplication).

Thanks @rubenzorrilla! In which element should I look?

What we decided to do in the FluidDynamicsApplication was to implement the derived one not in the other application but in the FluidDynamicsApplication one to avoid making the base ones header only. We decided to do so because the formulation implemented in the derived element was generic enough to have it in the common CFD app.

Long story short, I don't know where to point you for such example... I think that the structural mechanics guys will know this much better than me.

philbucher commented 3 years ago

@Vahid-Galavi which element are you talking about? It should work, the elements in the Structural don't use the mechanism that causes the issues in the FluidElements

Vahid-Galavi commented 3 years ago

@philbucher As a starting point, I derived elements from cable element (cable_element_3D2N) and truss elements (truss_element_3D2N, truss_element_linear_3D2N)

Vahid-Galavi commented 3 years ago

If the element that you're deriving from is templated but no header only you may have such problems. If this is the case, I'm afraid that the unique solution is to make the base element header only (we struggled with this not long ago in the FluidDynamicsApplication).

Thanks @rubenzorrilla! In which element should I look?

What we decided to do in the FluidDynamicsApplication was to implement the derived one not in the other application but in the FluidDynamicsApplication one to avoid making the base ones header only. We decided to do so because the formulation implemented in the derived element was generic enough to have it in the common CFD app.

Long story short, I don't know where to point you for such example... I think that the structural mechanics guys will know this much better than me.

I have no problem to put derived elements in StructuralMechanicsApplication, if the structural mechanics guys agree.

philbucher commented 3 years ago

Hm those elements are nothing fancy in the sense of programming so the deriving should work.

since they have limited use for the StructuralMechanicsApp I would prefer not to add them if possible

do you have a branch or PR? I could help/take a look.

Vahid-Galavi commented 3 years ago

Hm those elements are nothing fancy in the sense of programming so the deriving should work.

since they have limited use for the StructuralMechanicsApp I would prefer not to add them if possible

do you have a branch or PR? I could help/take a look.

Yes, there is a branch, called GeoStructureDerivedElem.

philbucher commented 3 years ago

I tried your branch and for me it worked fine, I could also run some of your tests

Can you try with a clean build?

Vahid-Galavi commented 3 years ago

@philbucher I rebuilt the code and also did a clean checkout and build but got the same errors. Did you compile GeoStructureDerivedElem branch?

Vahid-Galavi commented 3 years ago

@philbucher I have just compiled it on Linux and it works! My previous attempts were all on Windows 10. I have no idea why it gives errors on Windows.

Vahid-Galavi commented 3 years ago

@roigcarlo do you have any clue why the code can be compiled and tested on Linux but gives "unresolved external symbol" errors for all derived functions on Windows?

roigcarlo commented 3 years ago

There are a couple of scenarios where this can happen, let me take a look tomorrow. GeoStructureDerivedElem branch right?

roigcarlo commented 3 years ago

I think the problem is that the base ThrustElement is not exposed in the StructuralApp (this one at least https://github.com/KratosMultiphysics/Kratos/blob/master/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.hpp#L36 maybe others)

We should change it to

class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) TrussElement3D2N : public Element

If it works, is it ok if we commit directly to your branch? Or if @loumalouomega preffers, I can make a PR making all the elements from the structural exposed.

Vahid-Galavi commented 3 years ago

Thanks @roigcarlo! I will modify the elements and then make a PR.

Vahid-Galavi commented 3 years ago

@roigcarlo I added KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) to the StructuralApp elements but I still get similar errors. I committed the updated code to the branch.

roigcarlo commented 3 years ago

Ok let me check in my computer

roigcarlo commented 3 years ago

Ok problem in my machine seems to be because of the CalculateReferenceLenght3D2N function.

It seems that you are calling the one from the StructuralMechanics, (which is not exported hence the problem). I noticed that there is a copy of that class and specifically that particualr function in the GeoMechanics app which, to the best of my knowledge, is identical.

So either we need to call it from the implementation of the GeoMechanics (changing the namespace in the geo_cable_element_3D2N and geo_truss_element_3D2N) or we export it from the structural and delete the duplicated methods / class in the geo.

I think the second solution is better but I don't know if toy have changed some details in the GeoStructuralMechanicsElementUtilitites so I leave it for you to decide.

Vahid-Galavi commented 3 years ago

It does not help. I still get errors for all derived functions. I committed my changes.

roigcarlo commented 3 years ago

Ok, let me see

roigcarlo commented 3 years ago

It compiles just fine to me. I will make a PR to upload the changes in the Structural so they can be merged in your branch

roigcarlo commented 3 years ago

If it does not compile with this, can you send me the compile errors?

Vahid-Galavi commented 3 years ago

geo_truss_element_linear_3D2N.obj : error LNK2019: unresolved external symbol "public: cdecl Kratos::TrussElementLinear3D2N::TrussElementLinear3D2N(unsigned int64,class std::shared_ptr<class Kratos::Geometry<class Kratos::Node<3,cla ss Kratos::Dof > > >)" (??0TrussElementLinear3D2N@Kratos@@QEAA@_KV?$shared_ptr@V?$Geometry@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@@std@@@Z) referenced in function "public: cdecl Kratos::GeoTrussElementLinear3D2N::GeoTru ssElementLinear3D2N(unsigned int64,class std::shared_ptr<class Kratos::Geometry<class Kratos::Node<3,class Kratos::Dof > > >)" (??0GeoTrussElementLinear3D2N@Kratos@@QEAA@_KV?$shared_ptr@V?$Geometry@V?$Node@$02V?$Dof@N@Kratos@@ @Kratos@@@Kratos@@@std@@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2019: unresolved external symbol "public: cdecl Kratos::TrussElementLinear3D2N::TrussElementLinear3D2N(unsigned int64,class std::shared_ptr<class Kratos::Geometry<class Kratos::Node<3,cla ss Kratos::Dof > > >,class std::shared_ptr)" (??0TrussElementLinear3D2N@Kratos@@QEAA@_KV?$shared_ptr@V?$Geometry@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@@std@@V?$shared_ptr@VProperties@Kratos@@@3@ @Z) referenced in function "public: cdecl Kratos::GeoTrussElementLinear3D2N::GeoTrussElementLinear3D2N(unsigned int64,class std::shared_ptr<class Kratos::Geometry<class Kratos::Node<3,class Kratos::Dof > > >,class std::share d_ptr)" (??0GeoTrussElementLinear3D2N@Kratos@@QEAA@_KV?$shared_ptr@V?$Geometry@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@@std@@V?$shared_ptr@VProperties@Kratos@@@3@@Z) [D:\src\Kratos\build\Release\applicati ons\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2019: unresolved external symbol "public: virtual cdecl Kratos::TrussElementLinear3D2N::~TrussElementLinear3D2N(void)" (??1TrussElementLinear3D2N@Kratos@@UEAA@XZ) referenced in function "in t `public: cdecl Kratos::GeoTrussElementLinear3D2N::GeoTrussElementLinear3D2N(class GeoTrussElementLinear3D2N::dtor$0 const &)'::`1'::dtor$0" (?dtor$0@?0???0GeoTrussElementLinear3D2N@Kratos@@QEAA@AEBV01@@Z@4HA) [D:\src\Kratos\build\Re lease\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual cdecl Kratos::TrussElementLinear3D2N::~TrussElementLinear3D2N(void)" (??1TrussElementLinear3D2N@Kratos@@UEAA@XZ) [D:\src\Kratos\build\Release\a pplications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual class Kratos::intrusive_ptr cdecl Kratos::TrussElementLinear3D2N::Create(unsigned int64,class std::shared_ptr<clas s Kratos::Geometry<class Kratos::Node<3,class Kratos::Dof > > >,class std::shared_ptr)const " (?Create@TrussElementLinear3D2N@Kratos@@UEBA?AV?$intrusive_ptr@VElement@Kratos@@@2@_KV?$shared_ptr@V?$Geomet ry@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@@std@@V?$shared_ptr@VProperties@Kratos@@@5@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual class Kratos::intrusive_ptr cdecl Kratos::TrussElementLinear3D2N::Create(unsigned int64,class std::shared_ptr<class Kr atos::Geometry<class Kratos::Node<3,class Kratos::Dof > > >,class std::shared_ptr)const " (?Create@TrussElementLinear3D2N@Kratos@@UEBA?AV?$intrusive_ptr@VElement@Kratos@@@2@_KV?$shared_ptr@V?$Geometry@V ?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@@std@@V?$shared_ptr@VProperties@Kratos@@@5@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual class Kratos::intrusive_ptr cdecl Kratos::TrussElementLinear3D2N::Create(unsigned int64,class Kratos::PointerVecto r<class Kratos::Node<3,class Kratos::Dof >,class Kratos::intrusive_ptr<class Kratos::Node<3,class Kratos::Dof > >,class std::vector<class Kratos::intrusive_ptr<class Kratos::Node<3,class Kratos::Dof > >,class std ::allocator<class Kratos::intrusive_ptr<class Kratos::Node<3,class Kratos::Dof > > > > > const &,class std::shared_ptr)const " (?Create@TrussElementLinear3D2N@Kratos@@UEBA?AV?$intrusive_ptr@VElement@Kra tos@@@2@_KAEBV?$PointerVector@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@V?$intrusive_ptr@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@2@V?$vector@V?$intrusive_ptr@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@V?$allocator@V?$intrusive_ptr@V?$Node@$ 02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@@std@@@std@@@2@V?$shared_ptr@VProperties@Kratos@@@std@@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual class Kratos::intrusive_ptr cdecl Kratos::TrussElementLinear3D2N::Create(unsigned int64,class Kratos::PointerVector<cl ass Kratos::Node<3,class Kratos::Dof >,class Kratos::intrusive_ptr<class Kratos::Node<3,class Kratos::Dof > >,class std::vector<class Kratos::intrusive_ptr<class Kratos::Node<3,class Kratos::Dof > >,class std::al locator<class Kratos::intrusive_ptr<class Kratos::Node<3,class Kratos::Dof > > > > > const &,class std::shared_ptr)const " (?Create@TrussElementLinear3D2N@Kratos@@UEBA?AV?$intrusive_ptr@VElement@Kratos@ @@2@_KAEBV?$PointerVector@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@V?$intrusive_ptr@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@2@V?$vector@V?$intrusive_ptr@V?$Node@$02V?$Dof@N@Kratos@@@Kratos@@@Kratos@@V?$allocator@V?$intrusive_ptr@V?$Node@$02V? $Dof@N@Kratos@@@Kratos@@@Kratos@@@std@@@std@@@2@V?$shared_ptr@VProperties@Kratos@@@std@@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateRightHandSide(class boost::numeric::ublas::vector<double,class boost::numeric::ublas::u nbounded_array<double,class std::allocator > > &,class Kratos::ProcessInfo const &)" (?CalculateRightHandSide@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas @numeric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateRightHandSide(class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbou nded_array<double,class std::allocator > > &,class Kratos::ProcessInfo const &)" (?CalculateRightHandSide@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@num eric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateLeftHandSide(class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::b asic_row_major<unsigned int64,int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator > > &,class Kratos::ProcessInfo const &)" (?CalculateLeftHandSide@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$matrix @NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateLeftHandSide(class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::basic _row_major<unsigned int64,int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator > > &,class Kratos::ProcessInfo const &)" (?CalculateLeftHandSide@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$matrix@NU? $basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateOnIntegrationPoints(class Kratos::Variable<class Kratos::array_1d<double,3> > const &,c lass std::vector<class Kratos::array_1d<double,3>,class std::allocator<class Kratos::array_1d<double,3> > > &,class Kratos::ProcessInfo const &)" (?CalculateOnIntegrationPoints@TrussElementLinear3D2N@Kratos@@UEAAXAEBV?$Variable@V?$array _1d@N$02@Kratos@@@2@AEAV?$vector@V?$array_1d@N$02@Kratos@@V?$allocator@V?$array_1d@N$02@Kratos@@@std@@@std@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateOnIntegrationPoints(class Kratos::Variable<class Kratos::array_1d<double,3> > const &,class std::vector<class Kratos::array_1d<double,3>,class std::allocator<class Kratos::array_1d<double,3> > > &,class Kratos::ProcessInfo const &)" (?CalculateOnIntegrationPoints@TrussElementLinear3D2N@Kratos@@UEAAXAEBV?$Variable@V?$array_1d@ N$02@Kratos@@@2@AEAV?$vector@V?$array_1d@N$02@Kratos@@V?$allocator@V?$array_1d@N$02@Kratos@@@std@@@std@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateOnIntegrationPoints(class Kratos::Variable<class boost::numeric::ublas::vector<double,c lass boost::numeric::ublas::unbounded_array<double,class std::allocator > > > const &,class std::vector<class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator

,class std::allocator<class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator > > > > &,class Kratos::ProcessInfo const &)" (?CalculateOnIntegrationPoints@TrussEleme ntLinear3D2N@Kratos@@UEAAXAEBV?$Variable@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@numeric@boost@@@2@AEAV?$vector@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@nume ric@boost@@V?$allocator@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@numeric@boost@@@std@@@std@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanic sCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::CalculateOnIntegrationPoints(class Kratos::Variable<class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator > > > const &,class std::vector<class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator > >, class std::allocator<class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator > > > > &,class Kratos::ProcessInfo const &)" (?CalculateOnIntegrationPoints@TrussElementLi near3D2N@Kratos@@UEAAXAEBV?$Variable@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@numeric@boost@@@2@AEAV?$vector@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@numeric@ boost@@V?$allocator@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@numeric@boost@@@std@@@std@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCor e.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual class boost::numeric::ublas::bounded_matrix<double,6,6,struct boost::numeric::ublas::basic_row_major<unsigned int64,int64> > cdecl Krat os::TrussElementLinear3D2N::CreateElementStiffnessMatrix(class Kratos::ProcessInfo const &)" (?CreateElementStiffnessMatrix@TrussElementLinear3D2N@Kratos@@UEAA?AV?$bounded_matrix@N$05$05U?$basic_row_major@_K_J@ublas@numeric@boost@@@ubla s@numeric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual class boost::numeric::ublas::bounded_matrix<double,6,6,struct boost::numeric::ublas::basic_row_major<unsigned int64,int64> > cdecl Kratos:: TrussElementLinear3D2N::CreateElementStiffnessMatrix(class Kratos::ProcessInfo const &)" (?CreateElementStiffnessMatrix@TrussElementLinear3D2N@Kratos@@UEAA?AV?$bounded_matrix@N$05$05U?$basic_row_major@_K_J@ublas@numeric@boost@@@ublas@nu meric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::WriteTransformationCoordinates(class boost::numeric::ublas::bounded_vector<double,6> &)" (?Write TransformationCoordinates@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$bounded_vector@N$05@ublas@numeric@boost@@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::WriteTransformationCoordinates(class boost::numeric::ublas::bounded_vector<double,6> &)" (?WriteTran sformationCoordinates@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$bounded_vector@N$05@ublas@numeric@boost@@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2019: unresolved external symbol "public: double cdecl Kratos::TrussElementLinear3D2N::CalculateLinearStrain(void)" (?CalculateLinearStrain@TrussElementLinear3D2N@Kratos@@QEAANXZ) reference d in function "public: virtual void cdecl Kratos::GeoTrussElementLinear3D2N::CalculateOnIntegrationPoints(class Kratos::Variable<class Kratos::array_1d<double,3> > const &,class std::vector<class Kratos::array_1d<double,3>,class std:: allocator<class Kratos::array_1d<double,3> > > &,class Kratos::ProcessInfo const &)" (?CalculateOnIntegrationPoints@GeoTrussElementLinear3D2N@Kratos@@UEAAXAEBV?$Variable@V?$array_1d@N$02@Kratos@@@2@AEAV?$vector@V?$array_1d@N$02@Kratos@@ V?$allocator@V?$array_1d@N$02@Kratos@@@std@@@std@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::UpdateInternalForces(class boost::numeric::ublas::bounded_vector<double,6> &,class Kratos::Proce ssInfo const &)" (?UpdateInternalForces@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$bounded_vector@N$05@ublas@numeric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vc xproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::UpdateInternalForces(class boost::numeric::ublas::bounded_vector<double,6> &,class Kratos::ProcessIn fo const &)" (?UpdateInternalForces@TrussElementLinear3D2N@Kratos@@UEAAXAEAV?$bounded_vector@N$05@ublas@numeric@boost@@AEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxpro j] geo_truss_element_linear_3D2N.obj : error LNK2019: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::FinalizeSolutionStep(class Kratos::ProcessInfo const &)" (?FinalizeSolutionStep@TrussElementLine ar3D2N@Kratos@@UEAAXAEBVProcessInfo@2@@Z) referenced in function "public: virtual void cdecl Kratos::GeoTrussElementLinear3D2N::FinalizeSolutionStep(class Kratos::ProcessInfo const &)" (?FinalizeSolutionStep@GeoTrussElementLinear3D2N@ Kratos@@UEAAXAEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void cdecl Kratos::TrussElementLinear3D2N::FinalizeSolutionStep(class Kratos::ProcessInfo const &)" (?FinalizeSolutionStep@TrussElementLinear3D 2N@Kratos@@UEAAXAEBVProcessInfo@2@@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2019: unresolved external symbol "private: virtual void cdecl Kratos::TrussElementLinear3D2N::save(class Kratos::Serializer &)const " (?save@TrussElementLinear3D2N@Kratos@@EEBAXAEAVSerializ er@2@@Z) referenced in function "private: virtual void cdecl Kratos::GeoTrussElementLinear3D2N::save(class Kratos::Serializer &)const " (?save@GeoTrussElementLinear3D2N@Kratos@@EEBAXAEAVSerializer@2@@Z) [D:\src\Kratos\build\Release\ap plications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "private: virtual void cdecl Kratos::TrussElementLinear3D2N::save(class Kratos::Serializer &)const " (?save@TrussElementLinear3D2N@Kratos@@EEBAXAEAVSerializer@2 @@Z) [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_truss_element_linear_3D2N.obj : error LNK2019: unresolved external symbol "private: virtual void cdecl Kratos::TrussElementLinear3D2N::load(class Kratos::Serializer &)" (?load@TrussElementLinear3D2N@Kratos@@EEAAXAEAVSerializer@2@@ Z) referenced in function "private: virtual void cdecl Kratos::GeoTrussElementLinear3D2N::load(class Kratos::Serializer &)" (?load@GeoTrussElementLinear3D2N@Kratos@@EEAAXAEAVSerializer@2@@Z) [D:\src\Kratos\build\Release\applications\G eoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] geo_mechanics_application.obj : error LNK2001: unresolved external symbol "private: virtual void cdecl Kratos::TrussElementLinear3D2N::load(class Kratos::Serializer &)" (?load@TrussElementLinear3D2N@Kratos@@EEAAXAEAVSerializer@2@@Z) [ D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore.vcxproj] D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\Release\KratosGeoMechanicsCore.dll : fatal error LNK1120: 16 unresolved externals [D:\src\Kratos\build\Release\applications\GeoMechanicsApplication\KratosGeoMechanicsCore. vcxproj]

roigcarlo commented 3 years ago

Seems that the TrussElementLinear3D2N was still missing, can you pull and try?

Vahid-Galavi commented 3 years ago

It work! Thanks @roigcarlo for your help!

Vahid-Galavi commented 3 years ago

I close the issue