FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
 All Forums
 FastFieldSolvers
 FasterCap and FastCap2
 Bug in FasterCap GetConductance
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

brodym

USA
19 Posts

Posted - Jul 02 2019 :  07:27:24  Show Profile  Reply with Quote
I think there may be a typo in the source code for the COM Automation.

When I run the "GetConductance" method from a VBScript, I get the same exact values as the "GetCapacitance" method, irrespective of the complex permittivity. However, the same LST/QUI files generate OK values when run directly in the FasterCap application. I am running Ver 6.0.0.

In the GitHub repo, file FasterCapMain.cpp, lines 1414 through 1426 read:

HRESULT STDMETHODCALLTYPE IFasterCap::GetCapacitance(VARIANT *ret)
{
	VariantCopy(ret, (LPVARIANT) (((Globals::GetApp())->GetFasterCapFrame())->m_clsCapMatrix) );

	return(NOERROR);
}

HRESULT STDMETHODCALLTYPE IFasterCap::GetConductance(VARIANT *ret)
{
	VariantCopy(ret, (LPVARIANT) (((Globals::GetApp())->GetFasterCapFrame())->m_clsCapMatrix) );

	return(NOERROR);
}


I am not sure how these are called, but they appear identical.

Thanks for any help


Brody Mahoney

brodym

USA
19 Posts

Posted - Jul 02 2019 :  07:31:44  Show Profile  Reply with Quote
With a little further digging, I am guessing m_clsCapMatrix in line 1423 should be m_clsCondMatrix?

Brody Mahoney
Go to Top of Page

Enrico

425 Posts

Posted - Jul 06 2019 :  11:51:10  Show Profile  Reply with Quote
Dear Brody,

good catch! It apparently slipped. Can you recompile and test? We'll do that as well but not immediately (we are porting FasterCap build model to CMake and will introduce the fix into this commit as well).

Best Regards,
Enrico
Go to Top of Page

brodym

USA
19 Posts

Posted - Jul 07 2019 :  01:23:21  Show Profile  Reply with Quote
Enrico,

I have compiled on Windows, but admittedly I am a bit of newb to Windows compiling. It took me a couple of LONG days to figure out how to compile with wxWidgets and CodeBlocks. While I have successfully compiled on both Linux and Windows, I am not exactly clear on how to install FasterCap so that the MS Windows automation works. I made the correction, and the executable works independent of automation, but I can't verify the GetConductance method until I figure out how to get it registered with Windows correctly. Do you have any advice?

Thanks,

Brody

Brody Mahoney
Go to Top of Page

Enrico

425 Posts

Posted - Jul 07 2019 :  10:40:59  Show Profile  Reply with Quote
If you compiled it correctly and had already the previous version of FasterCap installed, just replace the .exe and it should work. The method was already exposed in Automation, it's the content of the matrix that was wrong and in that context it does not matter.

Best Regards,
Enrico
Go to Top of Page

brodym

USA
19 Posts

Posted - Jul 07 2019 :  20:43:27  Show Profile  Reply with Quote
Ah okay. Perhaps I didn't compile correctly after all. The executable does indeed function, but depending on which wxWidgets I use (SHARED=0 or SHARED=1) I get an error when I replace FasterCap.exe. In the former case, I am required to move libgomp_64-1.dll out of the folder for it to run. In the latter case, the application looks for wx dlls and then exits. It could be that I am using the latest TDM-GCC 5.10 instead of 4.8 compiler. I tried to get version 4.8 installed, but couldn't figure it out. TDM-GCC installer only comes with 5.10 now.

Brody Mahoney
Go to Top of Page

brodym

USA
19 Posts

Posted - Jul 09 2019 :  01:33:04  Show Profile  Reply with Quote
Okay, figured out the compilation issue. I will address that in the other thread about the issue.

The good news is that the recommended change fixes the issue.

Change line 1423 in FasterCapMain.cpp to the following:

	VariantCopy(ret, (LPVARIANT) (((Globals::GetApp())->GetFasterCapFrame())->m_clsCondMatrix) );


Brody Mahoney
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
FastFieldSolvers Forum © 2020 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06