Science topic

C++ - Science topic

C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.
Questions related to C++
  • asked a question related to C++
Question
2 answers
Rust is gaining traction in system programming due to its memory safety and modern features, with Cloudflare, AWS, and Microsoft adopting it for improved efficiency and security. However, C++ remains dominant in performance-critical domains due to its vast ecosystem, deep hardware integration, and industry inertia. While Rust’s ecosystem is growing, barriers like its learning curve and longer compile times prevent full adoption.
Answer this question
Relevant answer
Answer
Rust has a strong potential to gain control over specific domains traditionally dominated by C++ by leveraging its memory safety, concurrency guarantees, and modern language features. In security-critical areas like operating systems, networking, and cryptography, Rust’s ability to prevent entire classes of vulnerabilities at compile time makes it an attractive alternative. Companies like Microsoft and Google are already exploring Rust for system components to reduce memory-related security flaws, a persistent issue in C++-based projects.
However, Rust’s ability to replace C++ entirely is constrained by multiple factors. The vast legacy codebase, deep hardware integration, and specialized performance optimizations in fields like game engines, real-time systems, and high-frequency trading make C++ difficult to displace. Additionally, Rust's stricter ownership model, while beneficial for safety, can be a hurdle in domains requiring flexible low-level memory manipulation.
That said, Rust’s ecosystem is evolving rapidly, and with growing industry adoption, improved tooling, and continued performance enhancements, it could dominate domains where security and reliability are prioritized over raw flexibility. While C++ will likely persist in legacy systems and ultra-optimized applications, Rust has the potential to take the lead in building safer, modern software architectures, particularly in cloud computing, embedded systems, and next-generation operating systems.
  • asked a question related to C++
Question
5 answers
Rust is gaining traction in system programming due to its memory safety and modern features, with Cloudflare, AWS, and Microsoft adopting it for improved efficiency and security. However, C++ remains dominant in performance-critical domains due to its vast ecosystem, deep hardware integration, and industry inertia. While Rust’s ecosystem is growing, barriers like its learning curve and longer compile times prevent full adoption.
Relevant answer
Answer
I don't know why people aren't seeing the big picture here. Rust is not the protector, trust me
  • asked a question related to C++
Question
1 answer
With Rust's strong memory safety guarantees and modern development features, could it start controlling domains where C++ has been the dominant choice? While C++ remains essential for high-performance applications, Rust is gaining traction in areas where security, reliability, and maintainability are top priorities. This research explores whether Rust can carve out a significant role in domains traditionally led by C++, balancing safety with performance.
Read the full research paper here:
Relevant answer
Answer
The software industry is increasingly prioritizing security and reliability, creating a favorable environment for languages like Rust.
I think Rust offers a good balance of performance and safety, making it a viable alternative to C++ in many domains.
I also think that the choice between Rust and C++ depends heavily on the specific application requirements.
  • asked a question related to C++
Question
2 answers
I am a PhD student currently working on material modeling and have experience implementing material models in ANSYS using user-defined subroutines (usermat.f). I am interested in exploring the possibility of using C++ or C for developing user-defined material models in ANSYS.
Is it feasible to implement user-defined material models in ANSYS using C++/C? If so, could you provide guidance or references on how to proceed with this approach?
The same quastion is about hypela2.f in MSC.MARC.
Relevant answer
Answer
Step 1: Compile the Custom C++ File
Navigate to the directory containing Intel's oneAPI compiler and set up the Visual Studio environment variables for 64-bit compilation.
cd C:\Program Files (x86)\Intel\oneAPI\compiler\2025.0\bin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64
Then compile the C++ source file (main.cpp) into an object file (mainsub_.obj) using the Intel oneAPI compiler (icx). Include necessary libraries like Eigen for matrix operations if required.
icx -m64 -I"G:/konstructor/c_plus_plus_example/Eigen/Eigen" -c "G:\konstructor\c_plus_plus_example\example_mangling\main.cpp" -o mainsub_.obj
Notes:
  • -m64: Ensures 64-bit architecture.
  • -I: Specifies include paths for external libraries like Eigen.
  • -c: Indicates compilation only (no linking).
Step 2: Compile the FORTRAN Material Model
Extract the compilation command for the FORTRAN file from the MSC.MARC logs (e.g., Name_project_job1.log). Use the same compiler and flags as MSC.MARC to ensure compatibility.
ifort /fpp /c /DWIN32_intel -D_IMPLICITNONE /nologo /integer_size:64 -DI64 -DMKL -DOPENMP -DOMP_COMPAT -D_MSCMARC -DWIN64 /I"G:\marc\marc2019\common" /I"G:\marc\marc2019\intelmpi\win64\include" /O2 /Qip /Qvec- /Qsafe-cray-ptr /W1 /Qopenmp /Qopenmp-threadprivate:compat -DMARCHDF=HDF /I"\include\shared" -DCASI -DPARDISO -DMUMPS -DBCSGPU -DCUDA /MD /I"G:\marc\marc2019\mod\win64" -DDDM /object:"G:\konstructor\marc\NeoHooke.obj" "G:\konstructor\marc\NeoHooke.f"
Explanation of Flags:
  • /fpp: Enables preprocessing.
  • /D: Defines macros for conditional compilation.
  • /integer_size:64: Ensures 64-bit integer support.
  • /O2: Optimizes for speed.
  • /I: Adds include paths for necessary headers.
The output is an object file, NeoHooke.obj, containing your custom material model.
Step 3: Link All Object Files
To create the final executable (NeoHooke.exe), link the compiled object files and libraries. Replace the default main.obj from MSC.MARC with the newly compiled mainsub_.obj.
LINK /nologo /out:"NeoHooke.exe" ^ "G:\marc\marc2019\lib\win64i8\main.obj" ^ "G:\marc\marc2019\lib\win64i8\blkdta.obj" ^ "G:\marc\marc2019\lib\win64i8\comm1.obj" ^ "G:\marc\marc2019\lib\win64i8\comm2.obj" ^ "G:\marc\marc2019\lib\win64i8\comm3.obj" ^ "G:\konstructor\marc\NeoHooke.obj" ^ "G:\marc\marc2019\lib\win64i8\srclib.lib" ^ ... "C:\Program Files (x86)\Intel\oneAPI\compiler\2025.0\bin\mainsub_.obj"
Step 4: Ensure External Function Declaration
In the custom material model source code, declare the external function for compatibility:
EXTERNAL mainsub_
This ensures that MSC.MARC correctly integrates the custom entry point defined in mainsub_.obj.
  • asked a question related to C++
Question
3 answers
Hello, I want to estimate the energy cost of a scientific code written in C/C++. I noticed that there is a wider range of software available for high-level languages like Python compared to C or C++. What tools would you recommend as effective for addressing this question? Is there any software that can provide the energy consumption data for different architectures, such as CPUs on one side and GPUs on the other? Thank you in advance.
Relevant answer
Answer
The following info should be helpful:
there are some tools that can help you achieve this:
  1. CPPJoules: This tool is specifically designed for measuring the energy consumption of C++ code. It leverages Intel-RAPL (Running Average Power Limit) to measure energy usage and can be a great choice for your needs.
  2. Intel Power Gadget: This is a software-based power usage monitoring tool that provides real-time data on power consumption for Intel CPUs. It can be used to measure the energy consumption of your C/C++ code running on Intel processors.
  3. NVIDIA's Energy Efficiency Calculator: This tool allows you to compare the energy consumption of workloads running on x86 CPUs versus NVIDIA GPUs. It can be useful if you are looking to measure and compare the energy usage of your code on different architectures.
  4. Energy Tracker: Although primarily a Python package, Energy Tracker can track energy consumption and CO2 emissions for computational tasks on both CPUs and GPUs. It might require some integration with your C/C++ code, but it provides comprehensive data on energy usage.
These tools should help you get a better understanding of the energy consumption of your scientific code across different architectures.
  • asked a question related to C++
Question
3 answers
I wonder if there available data about fluid pressure vs tube diameter/area in elastic tubes in order to validate p-A relations.
This question is related to my paper: Revisiting the pressure-area relation for the flow in elastic tubes: Application to arterial vessels, Series on Biomechanics, vol.32, 1, 2018, 47 - 59.
For the description of the flow behaviour in elastic tubes as arterial vessels, we need a relationship between the transmural (internal minus external) pressure p_tm and the variation in the cross-sectional area A (or diameter), i.e., the pressure-area p-A constitutive relation. However, a literature review shows different relations. In this study, the method based on the linear theory of elasticity is revisited. A new pressure-area p-A relation is proposed. Results for the variation of cross-sectional area, arterial compliance C_c and distensibility D_i are presented. To define a unique threshold value for the applicability of the former equations, all results are presented in dimensionless form using the parameter β_1= E h_0/R_0 (where E is Young’s Modulus, h_0 and R_0 are respectively the vessel wall thickness and the internal radius at p_tm=0). Comparisons with the so-called linear and non-linear p-A equations show that all results are similar for p_tm/β_1 < 0.05. Our results indicate that the former equations could be used with an accepted gap until p_tm/β_1=0.1. However, the inaccuracy increases with p_tm and at p_tm/β_1=0.2, the difference is of 26.7% and 24.6% respectively for the linear and non-linear relations. Proposed equations were applied to arterial vessels with p_tm=150mmHg for radius from 0.8 to 6 mm. Results show an increase in the diameter of 4% for R_0=0.8mm while it is of 30% for R_0=6mm.
Relevant answer
Thank you Dear Dr. Rafik Absi for your interest in my Research Study about the << "Space-time" exists only for the limited Intelligence of the Human Being>>
......🌲🌲🌲🌲🌲🌲 Merry Christmas !!!!
  • asked a question related to C++
Question
6 answers
I need a C++ code for moving multiobject can be auto-anchor-boxed in video or capture.
thanks!
Relevant answer
Answer
#include <opencv2/opencv.hpp>
#include <vector>
using namespace cv;
// Function to define an anchor box based on a given bounding box (adjust as needed)
Rect getAnchorBox(const Rect& bbox) {
// Example: Expand bounding box by 10% in each direction
int offset = 0.1 * (std::max(bbox.width, bbox.height));
return Rect(bbox.x - offset, bbox.y - offset,
bbox.width + 2 * offset, bbox.height + 2 * offset);
}
int main(int argc, char** argv) {
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " <video_file>" << std::endl;
return -1;
}
// Load the video capture
VideoCapture cap(argv[1]);
if (!cap.isOpened()) {
std::cerr << "Error opening video!" << std::endl;
return -1;
}
// Object detection (replace with your chosen algorithm)
// You can use pre-trained models (e.g., YOLO, SSD) or implement your own
Mat frame;
while (cap.read(frame)) {
if (frame.empty()) {
break;
}
// Perform object detection on the frame (replace with your detection logic)
std::vector<Rect> detections; // Replace with your detection results
// ...
// Auto-anchor each detected object
std::vector<Rect> anchoredBoxes;
for (const Rect& bbox : detections) {
anchoredBoxes.push_back(getAnchorBox(bbox));
}
// Visualize anchored bounding boxes
for (const Rect& box : anchoredBoxes) {
rectangle(frame, box, Scalar(0, 255, 0), 2); // Green for anchored boxes
}
// Display or save the frame
imshow("Frame with Anchored Boxes", frame);
waitKey(1); // Adjust delay as needed
}
cap.release();
destroyAllWindows();
return 0;
}
  • asked a question related to C++
Question
1 answer
Mine is sitting here:
I wish to see someone else's.
Relevant answer
Answer
The Kolmogorov-Arnold theorem states that any continuous function on a compact interval can be represented as a superposition of a finite number of continuous functions of one variable. This theorem provides the theoretical foundation for the Kolmogorov-Arnold network, which aims to take advantage of this property. Better to develop in Java or Scala Andrew Polar
  • asked a question related to C++
Question
13 answers
Object-Oriented Programming
Relevant answer
Answer
The choice between Java and C++ for learning and implementing the principles of object-oriented programming (OOP) depends on several factors. Here are some considerations to help determine which might be better for a student:
Java
Pros:
  1. Simplicity and Ease of Use: Java is often considered easier to learn and use compared to C++. It has a simpler syntax and abstracts many of the complex details, making it a good starting point for beginners.
  2. Automatic Memory Management: Java has garbage collection, which automatically handles memory allocation and deallocation. This reduces the chances of memory leaks and pointer errors, common pitfalls in C++.
  3. Platform Independence: Java runs on the Java Virtual Machine (JVM), making it platform-independent. Write once, run anywhere (WORA) is a key feature.
  4. Rich Standard Library: Java provides a comprehensive standard library that supports many common programming tasks, which can make learning and development easier.
  5. Strong Community and Resources: Java has a vast community and a wealth of resources, including documentation, tutorials, and frameworks that support learning and development.
Cons:
  1. Performance: Java can be slower than C++ due to the overhead of the JVM and garbage collection.
  2. Less Control: Java abstracts away many details, which can be a drawback for students who want to understand low-level programming concepts.
C++
Pros:
  1. Performance: C++ generally offers better performance than Java, as it is closer to the hardware and does not have the overhead of a virtual machine.
  2. Control Over System Resources: C++ gives programmers fine-grained control over system resources, memory management, and hardware. This can be advantageous for students who want to learn about low-level programming.
  3. Multi-Paradigm Language: C++ supports multiple programming paradigms (procedural, object-oriented, and generic programming), providing a broader perspective on programming concepts.
  4. Industry Use: C++ is widely used in system/software development, game development, and performance-critical applications, making it valuable for students interested in these areas.
Cons:
  1. Complexity: C++ has a more complex syntax and steeper learning curve compared to Java. It includes intricate features like pointers, manual memory management, and multiple inheritance, which can be challenging for beginners.
  2. Manual Memory Management: Students must manage memory manually, which can lead to errors like memory leaks and segmentation faults.
  3. Platform Dependency: C++ code needs to be compiled for each specific platform, making it less portable than Java.
Conclusion
  • For Beginners: Java might be better due to its simplicity, automatic memory management, and rich standard library.
  • For Learning Low-Level Concepts: C++ can be more beneficial because it provides more control over system resources and exposes students to a broader range of programming paradigms.
  • asked a question related to C++
Question
2 answers
EMMS - Energy Minimization Multi-Scale
Relevant answer
Answer
EMMS drag model is as follows:
The EMMS drag model is based on the work of Chen et al. (2009) and can be expressed as:
$$F_D = \frac{1}{8} \pi d_p^2 \rho_c C_D |u_c - u_p| (u_c - u_p)$$
Where:
- $F_D$ is the drag force per unit volume of the dispersed phase
- $d_p$ is the particle diameter
- $\rho_c$ is the density of the continuous phase
- $C_D$ is the drag coefficient
- $u_c$ is the velocity of the continuous phase
- $u_p$ is the velocity of the dispersed phase
The drag coefficient, $C_D$, is calculated using the following expression:
$$C_D = \frac{24}{\alpha_c^{0.65}Re_p} (1 + 0.15 \alpha_c^{-0.687} Re_p^{0.687})$$
Where:
- $\alpha_c$ is the volume fraction of the continuous phase
- $Re_p$ is the particle Reynolds number, defined as:
$$Re_p = \frac{\rho_c d_p |u_c - u_p|}{\mu_c}$$
- $\mu_c$ is the dynamic viscosity of the continuous phase
The C++ code implementation of the EMMS drag model in ANSYS Fluent 2023 would be similar to the following:
```cpp
// Calculate the particle Reynolds number
double ReP = rho_c * dp * fabs(u_c - u_p) / mu_c;
// Calculate the drag coefficient
double alpha_c = 1.0 - alpha_p; // Volume fraction of continuous phase
double CD = 24.0 / (pow(alpha_c, 0.65) * ReP) * (1.0 + 0.15 * pow(alpha_c, -0.687) * pow(ReP, 0.687));
// Calculate the drag force
double FD = 0.125 * M_PI * dp * dp * rho_c * CD * fabs(u_c - u_p) * (u_c - u_p);
```
Good luck. partial credit AI
  • asked a question related to C++
Question
6 answers
I have a function of the form a+(b*r^u) + c*u where a, b, r and c are dependent variables and u is the independent variable.
I am trying to optimize on a, b, r and c by setting a least-squares objective function in COMSOL Multiphysics using the Nelder Mead solver.
I have specified appropriate bounds for the variables, tightening them after each trial when the solver fails to converge, with no solution in sight.
Any recommendations on why it would not converge?
Relevant answer
Answer
Thank's very lot.
  • asked a question related to C++
Question
1 answer
Amrita School of Engineering, Bengaluru campus, is currently accepting applications from highly motivated researchers who possess a strong background in mathematics, computational physics, applied physics, fluid dynamics, or a closely related field. Proficiency in programming languages such as C/C++, MATLAB, or Python is advantageous. Candidates should actively contribute to the team's research efforts. For more details, you may contact: Dr. K. V. Nagaraja - kv_nagaraja@blr.amrita.edu - +91- 98452 23844 ; Dr. T. V. Smitha - tv_smitha@blr.amrita.edu - +91- 9611107480 ; Dr. Naveen Kumar R - r_naveen@blr.amrita.edu - +91- 78296 70202
Relevant answer
Answer
Job Boards:
University Websites:
  • Many universities advertise open PhD positions on their departmental websites. Look for the department of Computational Science, Mathematics, Physics, Engineering, or a related field depending on the specific area of research you're interested in.
Additional Resources:
Tips for your search:
  • Tailor your search: Use keywords that reflect your specific research interests within Computational Science (e.g., machine learning, materials science, astrophysics).
  • Consider funding: Some PhD positions come with scholarships or fellowships that cover tuition and living expenses. Look for keywords like "funded" or "scholarship" in your search.
  • Be proactive: Contact professors directly whose research aligns with your interests. Express your enthusiasm and inquire about potential PhD openings in their group.
  • asked a question related to C++
Question
3 answers
Hello.
I got a trouble with linking c++ compiler with Abaqus.
I installed Visual Studio 2019 first,
then installed oneAPI base toolkit and HPC toolkit in order.
And I verified link status,
C++ Compiler stuck in trouble only, Linker and Fortran Compiler are OK.
The message is
"C++ Compiler : Unable to create or determine the version of a C++ compiler on this system. If a C++ compiler is installed on this system, please load vcvars64.bat file before running Abaqus".
How could I solve this problem?
I've loaded vcvars64.bat file already.
I look forward to your help from those who have experienced the same problem.
Thanks.
Relevant answer
Answer
Solar Filament Detection using Deep Learning.
Steps to Load the vcvars64.bat File
  1. Locate vcvars64.batA vcvars64.bat file is included with the Visual Studio installation. The compiler is set up with the necessary environment variables. This file can normally be found in the following directory (assuming VS is located in the default location): C:\Program Files (x86)\Microsoft Visual Studio\{version}\BuildTools\VC\Auxiliary\Build\ Replace {version} with your specific Visual Studio version, such as 2019 or 2022.
  2. On the search bar of your device, open a CMD (Command Prompt)Alternatively, you can Open a command prompt using the shortcut cmd.exe.
  3. Run vcvars64.bat: Navigate to the directory where vcvars64.bat is located. By setting these variables, the Visual C++ compiler will be able to run properly.
  4. Compiler setup should be verified as follows: Check the compiler version after running vcvars64.bat to ensure that the compiler is set up correctly:You should see output indicating the version of the Visual C++ compiler.Thus Run Abaqus from the same command prompt: The same command prompt can be used to navigate to your Abaqus working directory once the environment has been set up
  • asked a question related to C++
Question
1 answer
In C++, why is the constructor of a virtual base class called first, while the object of the virtual base class is placed last? What are the advantages of doing this?
Relevant answer
Dear Sir,
In C++, when a class inherits from multiple base classes, which are connected through virtual inheritance, there's a particular case in object construction. Let's break it down with an example:
///////////////////////////// EXAMPLE ////////////////////////////
#include <iostream>
class Base {
public:
Base() {
std::cout << "Base constructor\n";
}
};
class VirtualBase : public virtual Base {
public:
VirtualBase() {
std::cout << "VirtualBase constructor\n";
}
};
class Derived : public VirtualBase {
public:
Derived() {
std::cout << "Derived constructor\n";
}
};
int main() {
Derived d;
return 0;
}
//////////////// EXAMPLE //////////////////////////
In this example, Derived inherits from VirtualBase, which itself inherits from Base. VirtualBase is a virtual base class.
When you create an object of Derived, the constructor sequence goes like this:
  1. The constructor of the virtual base class (Base) is called first. This is because virtual base classes might be inherited by multiple paths, and C++ ensures that only one instance of the virtual base class exists. So, it's crucial to initialize the virtual base class first to avoid ambiguity in its initialization.
  2. Then, the constructor of VirtualBase (the derived class) is called.
  3. Finally, the constructor of Derived (the most derived class) is called.
This sequence ensures that the virtual base class's constructor is called only once and is initialized before any other constructors, ensuring no ambiguity or duplication of base class data.
I hope it's clear to you.
Best wishes
  • asked a question related to C++
Question
2 answers
This is a code block from nutWallFunction library in OpenFOAM where in, effective kinematic viscosity ($\nut_w$) at the wall is calculated using resolved field(in case of LES)/ mean field(in case of RANS) and $y^+_p$ (wall normal distance of the first cell center). this allows to set a new viscosity value as boundary condition at the wall using log law. Considering the first cell center is in the logarithmic layer of the universal velocity profile.
Now, in this code block of member function defined as nutUWallFunctionFvPatchScalarField::calcYPlus()
There has been iterations done for the yPlus value to reach convergence with maximum of 10 iterations. Why are these iterations needed? and why is the maximum number of iterations 10. I have given a reference of the code below;
tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus
(
const scalarField& magUp
) const
{
const label patchi = patch().index();
const turbulenceModel& turbModel = db().lookupObject<turbulenceModel>
(
IOobject::groupName
(
turbulenceModel::propertiesName,
internalField().group()
)
);
const scalarField& y = turbModel.y()[patchi];
const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw();
tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0));
scalarField& yPlus = tyPlus.ref();
forAll(yPlus, facei)
{
scalar kappaRe = kappa_*magUp[facei]*y[facei]/nuw[facei];
scalar yp = yPlusLam_;
scalar ryPlusLam = 1.0/yp;
int iter = 0;
scalar yPlusLast = 0.0;
do
{
yPlusLast = yp;
yp = (kappaRe + yp)/(1.0 + log(E_*yp));
} while (mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10 );
yPlus[facei] = max(0.0, yp);
}
return tyPlus;
}
My doubt is concerning the do-while loop at the end for yPlus iteration.
Relevant answer
Answer
CFD softwares are based on numerical methods or techniques to predict the fluid behavior for various conditions e.g. LES and RANS turbulence modelling etc. Unlike exact solutions , the numerical methods involve approximations of the governing fluid parameters which cannot be evaluated at once and thus need iterative computational solvers.
During this process several types of errors are introduced while approximating variable property e.g round off errors ( machine precision) , truncation errors depending on the type of numerical scheme used.
However , according to the nature of fluid and it's interaction with surrounding environment , ( in your e.g yplus wall function which is measure of the fluid friction resistance near wall ) the solutions obtained through numerical schemes present a significant source of error which can interpret the fluid behavior in entirely different manner.
Therefore, the solution is often tested by repeating the process using better approximations and schemes with a focus to obtain the exactness of parameter value leading to iterations.
During iteration process , the error can amplify or reduce ( which is indicative of the stability of solution ) depending on boundary conditions used to obtain solution. So, often an error tolerance is introduced as condition in numerical algorithm to make the solution more meaningful and realistic which closely approximates the fluid behavior. In your case wall shear stress is being approximated using wall units in logarithmic boundary layer.
Once that condition is satisfied, the process stops and proceeds further by evaluating the next dependent variable and so on until complete solution is obtained.
  • asked a question related to C++
Question
3 answers
In C++, many functions can have the same name, which is function overloading. It works well but I don't find any benefits. Kindly educate me on the benefits of this overloading.
Thanks
Relevant answer
Answer
Function overloading is widely used in C++ programming due to its benefits in code organization, flexibility, and readability, but specific measurements may vary depending on the context and goals of the project.
  • asked a question related to C++
Question
10 answers
You are trying to call a function written in C++ from inside an Abaqus User subroutine.
I've looked for related material, but most of it was done in a Linux environment. Is it possible to implement this in a Window environment?
Relevant answer
Answer
The error message "can't open test16.lib file" indicates that the linker cannot find the test16.lib file in the specified location. Let's try to troubleshoot this issue step by step:
Check File Location:
Ensure that test16.lib is indeed located in the directory D:/KEB/01.k9/02.present/22.vuamp/01.test1/vuamp_vdload_C5.
Verify the spelling of the file name; ensure there's no typo like "teset16.lib" instead of "test16.lib".
Absolute vs. Relative Paths:
It's always a good practice to use absolute paths in configuration files, especially when linking libraries. The path you've provided seems to be absolute, but double-check to ensure it's correct.
File Permissions:
Ensure that you have the necessary permissions to access test16.lib. It's possible that the file is in the correct location, but the user or process trying to access it doesn't have the required permissions.
Check the Library File:
Verify that test16.lib is not corrupted. If you have a backup or another version, try linking against that to see if the issue persists.
LIBPATH Syntax:
The /LIBPATH argument specifies a directory to search for libraries. Ensure there's no typo or syntax error in this line: '/LIBPATH:"D:/KEB/01.k9/02.present/22.vuamp/01.test1/vuamp_vdload_C5"'.
Other Directories:
Check if there are other directories in the abaqus_v6.env file that are also being searched for libraries. It's possible that the linker is looking in another directory that has an older or different version of test16.lib.
Environment Variables:
Sometimes, paths and library locations can be set using environment variables. Ensure that no environment variable is overriding the settings in your abaqus_v6.env file.
Clean and Rebuild:
If you're building a project, sometimes old build artifacts can cause issues. Clean or delete any old build files and try building/linking again.
Linker Version:
Ensure that the linker version is compatible with the library you're trying to link. If test16.lib was built with a different compiler version or settings, it might not be compatible.
Consult Documentation:
Check Abaqus documentation or any guidelines you're following to ensure you've set up the abaqus_v6.env file correctly.
If you've tried the above steps and the problem persists, consider reaching out to Dassault Systèmes' support or any relevant forums where other Abaqus users might have faced similar issues.
Thats all i could think . Regards and all the best sir .
  • asked a question related to C++
Question
22 answers
Animations are known to be a fast and very efficient way of dissemination of knowledge, insights, and understanding of complex systems. Through the animations, quite complicated research can be easily shared among all scientific disciplines.
While starting with complex systems descriptions of Dynamic Recrystallization in metals about almost 30 years ago, it had become very obvious almost instantly that animations carry with themselves a huge expressive power.
This recently led to development of the GoL-N24 open-source Python software that enables to create animations effortlessly. The user just defines the input parameters and the rest is done automatically. Share your software too.
This question is dedicated to all such animations and open-source-source software, which are producing them, in the area of complex systems.
Everyone is welcomed to share their own research in the form of animations with the relevant description.
Relevant answer
Answer
This animation is depicting an array of identical emergents observed withing one specific neighborhood of GoL-N24 software. This emergent is called the frog.
See details in the review:
  • asked a question related to C++
Question
2 answers
In Fuzzy Transportation Problem, we bound to subtract fuzzy trapezoidal numbers, if we use them to define uncertain data. Then a negative distribution is raised.We know that in a transportation problem negative distribution is meaningless. A fuzzy trapezoidal number (a,b,c,d)  is said to be negative if a<0. So my question is what is the significance of the negative trapezoidal numbers or how can I explain the negative numbers or using what types of fuzzy arithmetic operations I just simply avoid negative numbers? 
Relevant answer
Answer
you can use arithmiticak law and add minimum negative value and add all value with this specefice number for att transfer numbers to positive side of axel.(right side). proportion and distinatation between every number will keep constant.
  • asked a question related to C++
Question
2 answers
What are the methods and algorithms available to accurately calculate the energy consumption of a C++ code? Please provide a comprehensive explanation including the relevant factors, metrics, and considerations that should be taken into account during the energy consumption calculation process.
Relevant answer
Calculating the energy consumption of a C++ code involves measuring the amount of energy consumed by the computer hardware executing the code. There are several methods and algorithms available to accurately calculate the energy consumption of a C++ code, including:
Instrumentation-based methods: These methods involve adding energy measurement hardware to the computer system, such as power sensors or voltage regulators. The energy consumption can then be measured directly by the hardware. This approach provides high accuracy, but it can be expensive and difficult to implement.
Simulation-based methods: These methods involve modeling the energy consumption of the computer hardware using simulation software. The software models the energy consumption based on the hardware specifications and the behavior of the code being executed. This approach is less accurate than instrumentation-based methods, but it is more cost-effective and easier to implement.
Profiling-based methods: These methods involve using profiling tools to monitor the behavior of the code being executed and estimate its energy consumption based on the hardware specifications. This approach provides reasonable accuracy, but it may not capture all of the energy consumption factors.
When calculating energy consumption, some of the relevant factors and metrics to consider include:
Processor frequency: The frequency at which the processor is running has a significant impact on energy consumption. Higher frequencies consume more energy.
Memory usage: The amount of memory used by the code can also impact energy consumption. Accessing memory consumes more energy than running instructions.
I/O operations: Input/output operations, such as reading and writing to disk or network, can consume significant amounts of energy.
Code structure and algorithmic complexity: The structure of the code and the complexity of the algorithms being used can impact energy consumption. For example, loops that execute many times can consume more energy than those that execute only a few times.
Hardware specifications: The energy consumption of the hardware being used, such as the processor, memory, and disk, can also impact energy consumption.
When calculating energy consumption, it is important to consider these factors and metrics and to choose an appropriate method or algorithm based on the accuracy required and the resources available. Additionally, it is important to validate the results of any energy consumption calculation methods by comparing them with actual hardware measurements or known energy consumption values.
  • asked a question related to C++
Question
4 answers
...
Relevant answer
Answer
#include <iostream>
struct MyStruct {
int value;
};
void modifyStructByValue(MyStruct s) {
s.value = 42; // Modify the struct
}
void modifyStructByReference(MyStruct& s) {
s.value = 42; // Modify the struct
}
int main() {
MyStruct s;
s.value = 10;
modifyStructByValue(s);
std::cout << s.value << std::endl; // Output: 10
modifyStructByReference(s);
std::cout << s.value << std::endl; // Output: 42
return 0;
}
  • asked a question related to C++
Question
4 answers
ifort -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -c gmlib2.F90
make: ifort: Command not found
Makefile:69: recipe for target 'gmlib2.o' failed
make: *** [gmlib2.o] Error 127
This is the error I get while executing the make command to install BoltzTrap for Quantum Espresso. Can anyone please help?
Relevant answer
Answer
@Ali , mine was a gfortran issue, so I reinstalled it and all was good
  • asked a question related to C++
Question
3 answers
Hi there,
I would like to understand numerical hessian calculation in molecular modelling better.
If I estimate the (semi)numerical hessian, so either using the gradient or only the energies for the displaced molecule, I get the hessian matrix. After mass weighting, diagonalisation, taking the root and some unit conversion, I end up with frequencies. In case of imaginary ones, I have a not fully optimsed structure or transition state.
After implementing all this in own code, I ended up with sometimes having imaginary frequencies for structure being in a geometrical equilibrium.
--
Eigen::SelfAdjointEigenSolver<Geometry> diag;
diag.compute(hessian);
vector = diag.eigenvalues().cwiseSqrt();
--
For smaller molecules, the results fit to the results obtained with another program (some differences due to numerical noise). For larger molecules, there are imaginary frequencies I don't understand.
I found an illustrating whitepaper at
. Why would the force constants be different if the molecule is centered and reorientated, if at all. Is there something else I have overlooked?
The WIP code is located at:
Thanks and best regards,
Conrad
Relevant answer
Answer
Understanding the differences in frequencies obtained from a numerical hessian calculation when the Eckart equation is not included is an important aspect of molecular modeling. The Eckart equation is commonly used to transform the mass-weighted Hessian matrix into normal modes by accounting for the rotation and translation motions of the molecule. Not including the Eckart equation can lead to several differences in the frequencies:
1. Translation and Rotation: The Eckart equation accounts for the translation and rotation of the molecule as a whole. Neglecting these terms can cause the frequencies to include contributions from these global motions, resulting in spurious low-frequency modes that do not represent molecular vibrations.
2. Zero Modes: Zero modes correspond to the translation and rotation of the molecule, and they should have a frequency of zero. When the Eckart equation is not included, these modes may have non-zero frequencies, leading to erroneous results.
3. Inaccurate Frequency Scaling: The Eckart equation is also used to scale the frequencies obtained from the Hessian matrix to match experimental values. Neglecting this scaling can result in frequency values that are not in good agreement with experimental data.
4. Numerical Noise: Numerical noise can also contribute to differences in frequencies, particularly for larger molecules. Small errors in the calculation of the Hessian matrix and subsequent diagonalization can accumulate and lead to deviations in the frequencies.
In your case, the presence of imaginary frequencies for structures in geometrical equilibrium could indicate issues with the optimization procedure or potential instabilities in the geometry. It's important to ensure that the optimization is performed correctly, considering convergence criteria and appropriate settings for the optimization algorithm.
I would recommend reviewing the implementation of your code, ensuring that the Hessian calculation, mass weighting, diagonalization, and unit conversions are correctly implemented. Additionally, consider checking the accuracy of the employed optimization algorithm and potential issues specific to larger molecules.
For further insights, I suggest consulting literature on numerical hessian calculations, vibrational analysis, and molecular modeling methodologies. Comparing your implementation with established methods and validating it with benchmark systems can also help in identifying and resolving any discrepancies.
  • asked a question related to C++
Question
4 answers
Performance prediction is required to optimally deploy workloads and inputs to a particular machine/accelerator in computing systems. Different predictors (e.g. AI predictors) come with different trade-offs, such as complexity, accuracy, and overheads. Which ones are the best?
Relevant answer
Answer
Performance predictors serve the captivating role of crystal balls in the realm of human endeavors, aiming to unlock the mysteries of future accomplishments. Their purpose is to peer into the enigmatic fog of uncertainty and offer glimpses of potential outcomes, providing guidance and informed decision-making. These predictors, resembling intrepid explorers of probability, draw upon a plethora of data, statistical models, and machine learning algorithms, all in pursuit of unveiling the secrets of success. While the notion of "best" remains elusive due to the ever-evolving nature of predictive analytics, the most esteemed predictors harmonize precision, versatility, and adaptability. These superlative predictors, analogous to virtuoso symphonies of foresight, dance in tandem with the idiosyncrasies of the domain, capturing intricate patterns, subtle nuances, and contextual dynamics to bestow valuable insights and empower us with the ability to chart courses towards triumph.
  • asked a question related to C++
Question
5 answers
Hello everyone
I am going to use C++ instead of Python to read Odb files of Abaqus software so that I can read Odb outputs at high speed without needing Abaqus program.
I have installed Visual Studio 2022 along with C++ compilers and Abaqus 2023 on my system.
To start working, I created a new C++ project in Visual Studio and added all the necessary libraries from the following paths according to the Abaqus guide.
  • C :\SIMULIA\EstProducts\2023\win_b64\code\lib
  • C:\SIMULIA\EstProducts\2023\win_b64\code\include
If I try to compile the project in the Visual Studio 2022 IDE, I encounter the following error:
____________________________________________________________________________
Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "SMAOdb\PublicInterfaces\odb_API.h" Abaqus Scripting with CPP C:\SIMULIA\EstProducts\2023\win_b64\code\include\odb_API.h 1
____________________________________________________________________________
Also, if I run the following command from the command line, the following error is encountered again:
____________________________________________________________________________
Abaqus JOB ABQCPPExample
Begin Compiling User Post-Processing Program
6/10/2023 11:11:53 PM
Abaqus Error: Unable to locate compiler! Please verify your PATH settings and/or for more information, see the Knowledge Base item QA00000009229 at http://www.3ds.com/support/knowledge-base/. - [Errno 2] file not found: 'cl'
The Abaqus Make execution procedure exited with errors
____________________________________________________________________________
I have not installed intel parallel studio. Does Abaqus need to install Intel Parallel Studio to access ODB files?
Please give the necessary guidance on solving program errors.
Thanks
Relevant answer
Answer
Thank you for your response.
The two cases you mentioned are exactly related to the mentioned error and I have already solved the errors.
I have already added the path of C++ compilers including VC++, gcc and g++ in windows system variables. And I produced different software with it.
Abaqus used relative paths to define the header, and I introduced the absolute path to Visual Studio. After fixing it, it showed the following error:
The code execution proceed because ABQSMABasCoreUtils.dll was not found.
This issue was previously discussed in stackoverflow, but unfortunately it was not resolved.
  • asked a question related to C++
Question
5 answers
I trained a machine learning model (such as RandomForest) in a Python environment. Now, I'm wondering how can I export the trained model and use it in a C++ environment. Already I have read some ways in this regard. However, I am looking for the simplest way that its documents are widely available.
Thanks, for your answers.
Relevant answer
Answer
To use a simple Python-trained machine learning model in C++, you can follow these steps:
1. Export the trained model: In Python, you can use a library like joblib or pickle to save your trained model as a file. These libraries provide functions like `joblib.dump()` or `pickle.dump()` to serialize your model and save it to disk.
2. Load the model in C++: In your C++ code, you'll need to load the saved model. C++ doesn't have built-in support for loading Python models, so you'll need to use a library that provides this functionality. One popular library is TensorFlow's C++ API, which allows you to load and run trained models. Another option is to use a library like XGBoost or LightGBM, which have C++ APIs for loading and using their respective models.
3. Prepare input data: Once you have the model loaded in C++, you'll need to prepare the input data in a format that the model expects. This may involve converting the data to the appropriate data types and applying any necessary preprocessing steps.
4. Make predictions: Use the loaded model to make predictions on the input data. The specific method for making predictions will depend on the library and model you're using. Consult the documentation of the library or model to find the appropriate functions or methods to use.
5. Process the output: Once you have the predictions, you can process them in your C++ code as needed. This might involve further calculations, displaying the results, or using the predictions for other purposes.
It's worth noting that integrating Python and C++ code can have some challenges, such as differences in data types and memory management. You may need to pay attention to these aspects and ensure proper data handling between the two languages.
Overall, using a trained Python machine learning model in C++ requires exporting the model from Python, loading it in C++ using a compatible library, preparing the input data, making predictions, and processing the results in your C++ code.
  • asked a question related to C++
Question
3 answers
I am trying to find information about ways of determining optimal parameters for the Holt-Winters model. I understand that I should minimize forecasting error, but I still can't find an appropriate optimization method for this purpose. Some researchers find optimal parameters experimentally, some of them use gradient method in Excel or built-in functions in R or Python. I want to implement my own function of finding optimal parameters for this model in C/C++, but I can't find any clear explanations of optimization methods algorithms on the internet. Could anybody help me with this issue?
Relevant answer
Answer
Let provide you with an overview of a commonly used optimization method called the grid search algorithm, which you can implement in C/C++ to find optimal parameters for the Holt-Winters model. The grid search algorithm is a simple but effective approach for parameter optimization.
Here's how the grid search algorithm works:
  1. Define a range of values for each parameter you want to optimize. For example, if you have three parameters (alpha, beta, and gamma) for the Holt-Winters model, you can define a range of values for each parameter.
  2. Create a grid or set of combinations by taking all possible combinations of parameter values within the defined ranges. This grid represents all the parameter combinations that will be evaluated.
  3. For each combination of parameter values, evaluate the performance of the Holt-Winters model using these parameters. Typically, you would use a performance metric such as mean squared error (MSE) or root mean squared error (RMSE) to measure the forecasting error.
  4. Select the combination of parameter values that results in the lowest forecasting error. This combination represents the optimal parameters for your Holt-Winters model.
  5. Optionally, you can refine your search by using a smaller grid centered around the optimal parameters you found in the previous step. This can help you fine-tune the parameters and achieve even better results.
Here's a pseudo-code representation of the grid search algorithm in C++:
// Define ranges for each parameter
double alphaMin = 0.0;
double alphaMax = 1.0;
double betaMin = 0.0;
double betaMax = 1.0;
double gammaMin = 0.0;
double gammaMax = 1.0;
// Define step size for each parameter
double alphaStep = 0.1;
double betaStep = 0.1;
double gammaStep = 0.1;
// Define variables to store optimal parameters and error
double optimalAlpha, optimalBeta, optimalGamma;
double minError = std::numeric_limits<double>::max();
// Perform grid search
for (double alpha = alphaMin; alpha <= alphaMax; alpha += alphaStep) {
for (double beta = betaMin; beta <= betaMax; beta += betaStep) {
for (double gamma = gammaMin; gamma <= gammaMax; gamma += gammaStep) {
// Train Holt-Winters model with current parameter values
// Evaluate the forecasting error using your chosen metric (e.g., MSE)
double error = evaluateModel(alpha, beta, gamma);
// Check if current error is lower than the minimum error found so far
if (error < minError) {
// Update optimal parameters and minimum error
optimalAlpha = alpha;
optimalBeta = beta;
optimalGamma = gamma;
minError = error;
}
}
}
}
// Print the optimal parameters
printf("Optimal Parameters: alpha=%.2f, beta=%.2f, gamma=%.2f\n", optimalAlpha, optimalBeta, optimalGamma);
In this pseudo-code, you would need to replace evaluateModel(alpha, beta, gamma) with your own function that trains the Holt-Winters model using the given parameters and calculates the forecasting error.
The grid search algorithm is a brute-force method that can be computationally expensive, especially if you have a large range and step size for each parameter. However, it is straightforward to implement and can provide reasonable results for parameter optimization.
Once you have implemented the grid search algorithm, you can apply it to find the optimal parameters for your Holt-Winters model in C/C++.
  • asked a question related to C++
Question
4 answers
Hi…is there another Library other than system.encryptographyprovider which includes IDEA encryption provider in C# and C ++…?
  • asked a question related to C++
Question
4 answers
I should explain that I welcome any kind of help. Thanks for your cooperation.
Relevant answer
Dear Robert,
YOu can expect me as bigginer while I did not use C++ for last 10 years :(.
Thamks for your concern.
  • asked a question related to C++
Question
7 answers
Dear Colleagues, I started this discussion to collect data on the use of the Azure Kinect camera in research and industry. It is my intention to collect data about libraries, SDKs, scripts and links, which may be useful to make life easier for users and developers using this sensor.
Notes on installing on various operating systems and platforms (Windows, Linux, Jetson, ROS)
SDKs for programming
Tools for recording and data extraction (update 10/08/2023)
Tools for fruit sizing and yield prediction (update 19/09/2023)
  • AK_SW_BENCHMARKER. Python based GUI tool for fruit size estimation and weight prediction. (https://pypi.org/project/ak-sw-benchmarker/)
  • AK_VIDEO_ANALYSER. Python based GUI tool for fruit size estimation and weight prediction from videos recorded with the Azure Kinect DK sensor camera in Matroska format. It receives as input a set of videos to analyse and gives as result reports in CSV datasheet format with measures and weight predictions of each detected fruit. (https://pypi.org/project/ak-video-analyser/).
Demo videos to test the software (update 10/08/2023)
Papers, articles (update 09/05/2024)
Agricultural
Clinical applications/ health
Keywords:
#python #computer-vision #computer-vision-tools
#data-acquisition #object-detection #detection-and-simulation-algorithms
#camera #images #video #rgb-d #rgb-depth-image
#azure-kinect #azure-kinect-dk #azure-kinect-sdk
#fruit-sizing #apple-fruit-sizing #fruit-yield-trials #precision-fruticulture #yield-prediction #allometry
Relevant answer
Answer
Thank you Cristina, your work is interesting and helpful.
  • asked a question related to C++
Question
4 answers
As it is impossible to use equations here, I am posting the link to my question here.
Relevant answer
Answer
It would be better if you give an example that covers your problem more precisely. Can you share the code you used it for solving the problem?
  • asked a question related to C++
Question
1 answer
Like solve_ivp or odeint in python, which shows warning messages if there arises any discrepancy during runtime, in Boost odint we need to create observer for that. I just want to know is there any predefined observer exist to handel all kind of errors and warnings message, or we have to creat for our own?
I have checked in boost odeint there are odeint_error.hpp and exception.hpp, but they can't be used directly.
  • asked a question related to C++
Question
1 answer
I need some help with xml and c++ files for Photon Calorimeters
Relevant answer
Answer
What data should be processed ?
  • asked a question related to C++
Question
5 answers
I am absolutely new in c++ programming and facing many problems converting a simple python code in c++.
Mainly I am facing four following problems in writing python code in c++.
  1. How to write a complex matrix in c++?
  2. How to solve a complex first-order system of differential equations in c++?
  3. How to solve double integral in c++?
  4. How to do parallel processing in c++?
I generally prefer to use the libraries like 'Eigen', 'odeint' etc for reliability. But using libraries in c++ is much harder than in python. I want to convert the code from python to c++ for speed. The following code is written in parallel processing using 'pool'. For each 'Time' it takes a huge amount of time in python.
In the python code I have used 'odeintw' for solving complex differential systems of equations instead of 'solve_ivp' for better speed and 'nquad' instead of 'dblquad' for double integration to increase the 'limit: 500' from default 'limit: 50'.
It will be very much helpful if someone helps me to write the python code in c++.
Relevant answer
Answer
Debamalya Dutta Converting Python code to C++ may be difficult, especially if you are unfamiliar with C++ programming. Here are some ideas for dealing with the specific issues you mentioned:
1. In C++, how do you construct a complicated matrix?
To work with complex matrices, you may use the Eigen package in C++. Eigen includes a complex number class, std::complex, for defining complex matrices. To generate complicated matrices, you may also utilize Eigen's MatrixXcd class.
2. In C++, how do you solve a complicated first-order system of differential equations?
To solve complicated first-order differential equations in C++, utilize the odeint package. The library includes a variety of integrators capable of handling complex-valued systems. Other libraries, such as Sundials, can also be used.
3. In C++, how do you solve a double integral?
To solve double integrals in C++, utilize the Boost library. The library includes a boost::math::quadrature::gauss kronrod class for numerically integrating complex-valued functions. Other libraries, such as cubature and CQUAD, can also be used to solve double integrals.
4. How does parallel processing work in C++?
To conduct parallel processing in C++, utilize the OpenMP library. The library includes a set of directives and methods for parallelizing loops and other code blocks. For parallel processing, you may also utilize alternative libraries such as TBB and C++AMP.
It should be noted that translating Python code to C++ can be time-consuming and may necessitate considerable changes to the original code.
  • asked a question related to C++
Question
17 answers
How good is a Carbon programming language?
Relevant answer
Answer
Alfa Ba That is the intention. The language is not expected to be at 1.0 until around 2024-2025. I don't see how Carbon is an alternative to C++ at this time.
Observations:
Carbon is also intended to be bidirectionally compatlible with C++, so we'll have to see exactly how that works.
In the meantime, it appears one should stick to C++ (if you want that level of programming) and confine that usage to what Carbon will preserve. This may turn out to be about using good practices for clean C++ programs. Those will need to be tracked down. Meanwhile you will have use of libraries that are usable and suitable for use from C++.
  • asked a question related to C++
Question
2 answers
The codes to plot the cross-section vs energy curve and also the research article that might help in understanding, theoretically and mathematically, the reactions of the form: A^+ + B^- --> A^- + B^+
Where, A is an atom and B could be an atom or a molecule.
Relevant answer
Answer
read this
chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www-amdis.iaea.org/CRP/LightElement/Presentations2/RabadanTalk.pdf
  • asked a question related to C++
Question
10 answers
Hello all,
I am trying to get the band structure of a 3x3 phosphorene sheet. In nscf calculation part , I get message written in "out" file which says:
"Band Structure Calculation
Davidson diagonalization with overlap
c_bands: 2 eigenvalues not converged
c_bands: 1 eigenvalues not converged
c_bands: 1 eigenvalues not converged
.
.
c_bands: 1 eigenvalues not converged"
I want to know the reason of this message. This message wont come when I tried the same calculation for unit cell.
I am also attaching the out file. Please have a look and if there is any suggestion please let me know.
Relevant answer
Answer
In the card "&ELECTRONS", try to set diago_david_ndim=4 or 6 or 8.
  • asked a question related to C++
Question
8 answers
k-means clustering code in C++
Relevant answer
Answer
  • asked a question related to C++
Question
3 answers
Hi
I am new to microservice. I have two C++ functions which exchange data( to start with simple numerical data) among them which I want to convert as microservices.
How I can design the API so that inter communication can be achieved. Looking for any references/advice.
Thank You in advance
Sreeraj
Relevant answer
Answer
Nowdays there is a lot of hype about node.js in the micro-service field due to its productivity and the great community, and indeed node.js is really a powerful platform for cloud computing development, but don’t forget that all its productivity relays on various layers of abstraction which come with a penalty in performance and a huge stack of components to make it work. But I do not want to start here a polemic about which one is best, this article is about using modern C++ to implement a microservice where the idea is using the modern syntax to reach the level of productivity that node.js provides but with the performance benefits of C++, and if you are like me that loves C++ and its great performance thanks to its zero levels of abstractions, then this article is for you.
Regards,
Shafagat
  • asked a question related to C++
Question
6 answers
Hi,
I am thinking about Solitons modeling and would like to know which “out of the box” software products are readily available and how they compare with developing one’s own Linux/Unix based package e.g. in C/C++ or Java??
Replies from Experienced N Solitons modeling researchers with links will be much appreciated!
Open Source solutions are Always Preferred ones.
Best regards,
George Yury Matveev
Relevant answer
Answer
Many Thanks to Shima Shafiee for the links to Soliton Open Source software on Git Hub and again to the optiwave.com site!
Open Source is Really Interesting and I hope I will be able to make use of it!
Have a nice start into the week.
Kind regards,
GM
  • asked a question related to C++
Question
2 answers
# (c) Silvaco Inc., 2015
# CREATE SOLAR CELL IN ATHENA
go atlas simflags="-P 1"
mesh width=1e12
x.mesh loc=0.00 spac=0.5
x.mesh loc=1.00 spac=0.5
y.mesh loc=0.00 spac=0.05
y.mesh loc=12.0 spac=0.05
y.mesh loc=37.0 spac=0.05
#Region
region number=1 x.min=0 x.max=1 y.min=0.1 y.max=18 user.material=TiO2&Dye
region number=2 x.min=0 x.max=1 y.min=18 y.max=36.9 user.material=Electrolyte
#Electrode #1=anode #2=cathode#
electrode name=anode number=1 x.min=0 x.max=1 y.min=0 y.max=0.1
electrode name=cathode number=2 x.min=0 x.max=1 y.min=36.9 y.max=37
#Doping
doping uniform conc=1e+9 p.type x.left=0 x.right=1 y.top=0.1 y.bottom=18 direction=y
#doping uniform conc=1e+12 n.type x.left=0 x.right=1 y.top=18 y.bottom=36.9 direction=y
material material=TiO2&Dye user.default=Silicon user.group=Semiconductor
material material=Electrolyte user.default=Silicon user.group=Semiconductor
material material=TiO2&Dye permi=50 affinity=4.0 eg300=1.5 nc300=2.8e19 nv300=1.9e19
material material=Electrolyte permi=3.5 affinity=3.4 eg300=0.93 nc300=2.8e19 nv300=1.9e19
material material=TiO2&Dye sopra=Tio2.nk
material material=Electrolyte sopra=Lif.nk
material material=Electrolyte qe.exciton=1.0
material material=Electrolyte knrs.exciton=1.82694e6 lds.exciton=0.0 taus.exciton=1.0e20 rst.exciton=1.0
material material=Electrolyte a.singlet=2 s.binding=0.004
material material=TiO2&Dye mun=0.3 mup=3e-4
material material=Electrolyte mun=7.07e-2 mup=7.07e-2
contact name=anode workfunction=4.4
contact name=cathode workfunction=4.4
structure outf=solarex01_0.str
# FIRST ATLAS RUN TO FIND SHORT CIRCUIT CURRENT AND OPEN CIRCUIT VOLTAGE
go atlas
mesh infile=solarex01_0.str
# set contact material to be opaque
material material=Aluminum imag.index=1000
material material=TiO2&Dye user.default=Silicon user.group=Semiconductor
material material=Electrolyte user.default=Silicon user.group=Semiconductor
material material=TiO2&Dye permi=50 affinity=4.0 eg300=1.5 nc300=2.8e19 nv300=1.9e19
material material=Electrolyte permi=3.5 affinity=3.4 eg300=0.93 nc300=2.8e19 nv300=1.9e19
material material=TiO2&Dye sopra=Tio2.nk
material material=Electrolyte sopra=Lif.nk
material material=Electrolyte qe.exciton=1.0
material material=Electrolyte knrs.exciton=1.82694e6 lds.exciton=0.0 taus.exciton=1.0e20 rst.exciton=1.0
material material=Electrolyte a.singlet=2 s.binding=0.004
material material=TiO2&Dye mun=0.3 mup=3e-4
material material=Electrolyte mun=7.07e-2 mup=7.07e-2
material material=TiO2&Dye taun0=1e-6 taup0=1e-6
material material=Electrolyte taun0=1e-6 taup0=1e-6
# set light beam using solar spectrum from external file
beam num=1 x.origin=10.0 y.origin=-2.0 angle=90.0 power.file=solarex01.spec
# saves optical intensity to solution files
output opt.int
models conmob fldmob consrh print
solve init
solve previous
# get short circuit current
log outf=solarex01_0.log
solve b1=1
extract name="short_circuit_current" max(abs(i."cathode"))
save outf=solarex01_1.str
# get open circuit voltage
solve init
solve previous
contact name=cathode current
solve icathode=0 b1=1
extract name="open_circuit_voltage" max(abs(vint."cathode"))
save outf=solarex01_2.str
tonyplot solarex01_2.str -set solarex01_2.set
# SECOND ATLAS RUN FOR SPECTRAL RESPONSE
go atlas
mesh infile=solarex01_0.str
# set contact material to be opaque
material material=Aluminum imag.index=1000
material material=TiO2&Dye user.default=Silicon user.group=Semiconductor
material material=Electrolyte user.default=Silicon user.group=Semiconductor
material material=TiO2&Dye permi=50 affinity=4.0 eg300=1.5 nc300=2.8e19 nv300=1.9e19
material material=Electrolyte permi=3.5 affinity=3.4 eg300=0.93 nc300=2.8e19 nv300=1.9e19
material material=TiO2&Dye sopra=Tio2.nk
material material=Electrolyte sopra=Lif.nk
material material=Electrolyte qe.exciton=1.0
material material=Electrolyte knrs.exciton=1.82694e6 lds.exciton=0.0 taus.exciton=1.0e20 rst.exciton=1.0
material material=Electrolyte a.singlet=2 s.binding=0.004
material material=TiO2&Dye mun=0.3 mup=3e-4
material material=Electrolyte mun=7.07e-2 mup=7.07e-2
material material=TiO2&Dye taun0=1e-6 taup0=1e-6
material material=Electrolyte taun0=1e-6 taup0=1e-6
# set monochromatic light beam for spectral analysis
beam num=1 x.origin=10.0 y.origin=-2.0 angle=90.0
# saves optical intensity to solution files
output opt.int
models conmob fldmob consrh print
# spectral response
solve init
solve previous
solve previous b1=0
log outf=solarex01_2.log
solve b1=1 beam=1 lambda=0.3 wstep=0.025 wfinal=1.0
tonyplot solarex01_2.log -set solarex01_3.set
# The "Available photo current" accounts for absorption in semiconductor regions only.
# Users interested in the overall absorption need to calculate EQE as:
# EQE=I anode / I Source Photo Current * Absorption
extract init inf="solarex01_2.log"
extract name="IQE" curve(elect."optical wavelength", \
-(i."anode")/elect."available photo current") outf="IQE.dat"
extract name="EQE" curve(elect."optical wavelength", \
-(i."anode")/elect."source photo current") outf="EQE.dat"
extract name="EQE2" curve(elect."optical wavelength", \
-(i."anode")/elect."source photo current"*elect."Absorption") outf="EQE2.dat"
tonyplot IQE.dat -overlay EQE2.dat -set solarex01_1.set
# THIRD RUN FOR I-V CHARACTERISTICS
go atlas
mesh infile=solarex01_0.str
# set contact material to be opaque
material material=Aluminum imag.index=1000
material material=TiO2&Dye user.default=Silicon user.group=Semiconductor
material material=Electrolyte user.default=Silicon user.group=Semiconductor
material material=TiO2&Dye permi=50 affinity=4.0 eg300=1.5 nc300=2.8e19 nv300=1.9e19
material material=Electrolyte permi=3.5 affinity=3.4 eg300=0.93 nc300=2.8e19 nv300=1.9e19
material material=TiO2&Dye sopra=Tio2.nk
material material=Electrolyte sopra=Lif.nk
material material=Electrolyte qe.exciton=1.0
material material=Electrolyte knrs.exciton=1.82694e6 lds.exciton=0.0 taus.exciton=1.0e20 rst.exciton=1.0
material material=Electrolyte a.singlet=2 s.binding=0.004
material material=TiO2&Dye mun=0.3 mup=3e-4
material material=Electrolyte mun=7.07e-2 mup=7.07e-2
material material=TiO2&Dye taun0=1e-6 taup0=1e-6
material material=Electrolyte taun0=1e-6 taup0=1e-6
# set light beam using solar spectrum from external file
beam num=1 x.origin=10.0 y.origin=-2.0 angle=90.0 power.file=solarex01.spec
# saves optical intensity to solution files
output opt.int
# saves beam intensity to the log files
probe name=inten beam=1 intensity
models conmob fldmob consrh
solve init
solve previous
log outfile=solarex01_3.log
solve vcathode=-0.01 vstep=-0.01 vfinal=-1*$open_circuit_voltage name=cathode
log off
solve init
solve previous
solve b1=1
log outfile=solarex01_4.log
solve vcathode=-0.01 vstep=-0.01 vfinal=-1*$open_circuit_voltage \
name=cathode b1=1
log off
tonyplot solarex01_3.log -overlay solarex01_4.log -set solarex01_4.set
extract init infile="solarex01_4.log"
extract name="Jsc (mA/cm2)" $short_circuit_current*1e08*1e03/20
extract name="Power" curve(v."cathode", (v."cathode" * i."cathode" *(-1))) \
outf="P.dat"
extract name="Pmax" max(curve(v."cathode", (v."cathode" * i."cathode" *(-1))))
extract name="V_Pmax" x.val from curve(v."cathode", (v."cathode"*i."cathode"))\
where y.val=(-1)*$"Pmax"
extract name="Fill Factor" ($"Pmax"/($"short_circuit_current"*$"open_circuit_voltage"))
extract name="intens" max(probe."inten")
extract name="Eff" ($Pmax/($"intens"*20/1e8))
tonyplot P.dat
quit
Relevant answer
Answer
If anyone can help me with TiO2&dye nk values and graphs ?
  • asked a question related to C++
Question
5 answers
Hi, I am looking someone who is expert in ns3 and C++ to help me to modify a source code.
Relevant answer
Answer
You can send me your C++ source code so that I can modify it
  • asked a question related to C++
Question
7 answers
Hi,
I am not from C++ or Microservice background. Requirement is to to build a simple microservice using C++ and Integrate with Docker and run on Linux.
Any toolchain/tutorial recommendation will be much appreciated.
Thanks in advance
Sreeraj Arole
Relevant answer
Answer
Dear Sreeraj Arole,
You may want to review the following sources:
Shipping C++ Programs in Docker: A Journey Begins
_____
Hello Microservice Deployment Part 1: Docker
https:/www.codementor.io/@sheena/hello-microservice-deployment-part-1-docker-kw9ejpd9o
_____
Debugging C/C++ code in Docker containers with VisualGDB
_____
Building C++ containers using Docker and CMake
_____
Hello World: a Tutorial series with C++, Docker, and Ubuntu.
_____
Building A Containerized Microservice in Golang: A Step-by-step Guide
_____
  • asked a question related to C++
Question
15 answers
Hello,
I am working on a pre-analysis plan for an experiment that I want to conduct. The experiment is about productivity behaviour. Participants solve matrices and the number of matrices solved my primary outcome variable (i.e. productivity).
There are 2 groups:
1.) Treatment Group: Working under stimulus
2.) Control Group: Working without stimulus
In the beginning of the experiment, I conduct a baseline-phase to check whether potential differences in productivity may stem from differing baseline abilities.
My hypothesis states that productivity in both groups is the same.
What is the best way to investigate the hypothesis?
a) First check for differences in baseline ability and then conduct a nonparametric / parametric test?
b) Use a linear regression model, use a dummy on the treatment group and include baseline productivity as a control variable?
c) Is it even better to conduct both (e.g. Mann-Whitney U-Test and a subsequent linear regression) to arrive at more compelling results? Or would that approach even be counterproductive?
Kind regards and thanks for you help!
Relevant answer
Answer
We proposed a new dependence measure between categorical and numerical variables and consequently a new test on distribution equality among groups can be performed to test the new correlation zero. The new test has many nice properties such as consistency and high power, especially in unbalance cases. Ronán Michael Conroy
Dang, X., Nguyen, D., Chen, Y. and Zhang, J. (2021). A New Gini Correlation between Quantitative and Qualitative Variables. Scandinavian Journal of Statistics, 48 (4), 1314-1343. https://doi.org/10.1111/sjos.12490
  • asked a question related to C++
Question
2 answers
stderr: [13:02:17] non-ring atom 40 marked aromatic
stderr: Traceback (most recent call last):
stderr: File "/ams/ams2021.106/bin/libtcl.tcl/rdkitdriver.py", line 502, in <module>
stderr: rmsopt=float(sys.argv[8]), fixchiral=sys.argv[9])
stderr: File "/ams/ams2021.106/bin/libtcl.tcl/rdkitdriver.py", line 37, in GenerateConformers
stderr: Chem.AssignAtomChiralTagsFromStructure(m)
stderr: Boost.Python.ArgumentError: Python argument types in
stderr: rdkit.Chem.rdmolops.AssignAtomChiralTagsFromStructure(NoneType)
stderr: did not match C++ signature:
stderr: AssignAtomChiralTagsFromStructure(RDKit::ROMol {lvalue} mol, int confId=-1, bool replaceExistingTags=True)
  • asked a question related to C++
Question
2 answers
hello, I have seen some thesis cited the QP solver named Hildreth algorithm, i want to learn more details,but i cannot find a text or thesis fully explained this algorithm, could someone help me? An example or c++ code will be the best,thanks!
Relevant answer
  • asked a question related to C++
Question
1 answer
I am having linker errors while running bazle build script in tensorflow from source on windows 10 with gpu enabled. Any help or information regarding the same will be greatly helpful.
Relevant answer
Answer
Please, add a log of the occurred error
  • asked a question related to C++
Question
3 answers
Hi everyone!
I tried calling VGETVRM inside of a VUSDFLD written in c++ to get the stress
results of the analysis . It looks like the results array (rdata) has 0 values
and the jStatus is always equal to 1.
Has anyone faced the same situation?
(I have the forward declaration of the fortran subroutine and included the aba_for_c.h
extern "C" void vgetvrm(char const *var, float *rData, float *jData, char **const cData ,int *jStatus);
)
Relevant answer
Answer
Hi Eleftherios Tsivolas,
I recommend referring to the link below. In this tutorial, you will learn how to use the VGETVRM utility subroutine in the VUSDFLD subroutine. Also, it might help deal with your future problems.
Best regards.
  • asked a question related to C++
Question
4 answers
I'm starting to use Vim for C++ coding and I would like to know of some pluggins or modifications that are used by people with experience.
Relevant answer
Answer
I use a collection of plugins and maybe they can be useful for some other people:
  • vimwiki: interlinked files written in markup languages where you can take notes, organize your studies, make to-do lists, etc;
  • coc.nvim: I'd say the main features are code completion, buffer sync, code diagnostics;
  • vimtex: Fantastic for LaTeX writing in Vim, you won't have any headaches compiling your code or trying to navigate the document without some nice tools;
  • ctrlp.vim: Fuzzy finder to ease the process of finding the files you want to edit. The functionality can be extended to other tasks as well.
The best way to learn about some nice plugins is searching in the web. I hope I can give you some ideas of what you can look for when trying some new stuff in Vim. Keep it up!
  • asked a question related to C++
Question
6 answers
Hi,
I want to ask you: 'Which programming languages do you prefer to use for implementing software in Structural Engineering? (PYTHON, C++, or anything else)'
Recently I have heard about PYTHON and its application in my major, but still, I have doubts about choosing it or C++.
If you think there is a better programming language for implementing software in Structural Engineering, please share your opinion with me regarding the mentioned question. I will be more than happy to receive your suggestions.
Thanks
  • asked a question related to C++
Question
12 answers
I am specifically trying to analyze:
x_dot = a*x*(1-x)*(1-y)
y_dot = y*(1-y)*(c*(1-x)-b)
where {0<= x, y <=1}. Stability of fixed point at (1-b/c, 1)?
Relevant answer
Answer
We can not determine the stability at such an equilibrium point. There must exist a bifurcation at this equilibrium point. See the bifurcation theory when two eigenvalues are zero.
  • asked a question related to C++
Question
8 answers
Hello community,
I am working on my MSc. project that part of it consist in translating a XML extracted code into a C++ for arduino, i've been searching for nearly a month for the best options, i would like to have some of your suggestions
Thank you.
Relevant answer
Answer
Taki Eddine Seghiri , these circuits that you refer are combinations of logical operations to be implemented in software (using C++) and run in the Arduino?
If I'm correct, I recommend Xerces
  • asked a question related to C++
Question
6 answers
Hello, everyone
I have two NVIDIA VGA Cards, whose model names are identical.
When coding CUDA C++ for CNN Deep Learning,
if batchsize = 4, I can do parallel processing
so that each process runs two batches
using cudaSetDevice
But, for fully connected layers,
some codes need to do intra batch summation
In this case, how should I code to do parallel processing?
Thank you in advance and have a nice day
Relevant answer
Answer
To Mr. Bruno Martin
I am studying and developing my own deep learning engine
including backpropagation for pure research purpose.
At this moment, I don't consider fast performance or parallel training.
I just want to make my engine work properly.
Thank you and have a nice day
  • asked a question related to C++
Question
3 answers
I try to run headers files containing in the nr3 the art of scientific computing with c/c++. Is there some tips ?
Relevant answer
Answer
Anselme Russel Affane Moundounga I would recommend you look at the source code of numerical algorithms in the GNU scientific library, those contain state-of- the-art implementations in C/C++ for algorithms found in NR3, but optimized + adapted for edge/real world cases. It's a great exercise to compare your own code against it as well.
Hope this helps,
Ben
  • asked a question related to C++
Question
6 answers
The problems I am currently considering are strongly related to shape optimization, especially isogeometric shape optimization. I have implemented MATLAB code that supports multi-level shape optimization and I am wondering if there is a reference implementation using MATLAB or C++. During my search, I found that the topology optimization community does a great job on open-source implementations. By contrast, why is there so little open-source toolbox in the shape optimization community?
My questions are summarized as follows:
  1. Is there a recommended shape optimization implementation written by MATLAB or C++? (FEA-based shape optimization is OK, but isogeometric shape optimization is preferred)
  2. Why doesn't the shape optimization community share their implementations as the topology optimization community does? What's the historical reason or what?
Meanwhile, colleagues with similar research interests are very welcome to contact me.
Relevant answer
Answer
Dear Ye Li,
I recognize the attached picture as it comes from a paper of mine.
Indeed, we are sharing our iga code! There is a researchgate project dedicated to it: www.researchgate.net/project/YETI-YET-another-Iga-code
Hopefully, we are going to update the project page very soon.
You can find a git repository of the code here: https://lamcosplm.insa-lyon.fr/plugins/git/yeti/yeti
There you can find and run all the optimization examples presented in the aforementioned paper (doi: 10.1007/s11831-020-09458-6).
It is however a python code (and not matlab), but I suggest you to give it a try!
Best,
Thibaut H.
  • asked a question related to C++
Question
7 answers
Example:
For 3 bus bar system we have a following equation
C=Sum(ax^2+bx+c) for i=1 to N
Then how we can replace the cost coefficient value for a,b and c.
Are they random numbers or do we need to take from particular data sheet.
Relevant answer
Answer
I believe it can also be achieved using polynomialization
  • asked a question related to C++
Question
2 answers
I am trying to work in FLAC 8.0 (64-bit software) with User-Written Model (UDM).
1. As per the manual, I need to install Visual Studio 2015, then install 'vs_proweb.exe' (a software patch for VS2010)...however, I failed to install 'vs_proweb.exe' as Microsoft removed this software from their server.
2. Or, I need to install VS 2010, then install “FLAC800VS201xAddin.msi” and choose
the “FLAC800 Constitutive Model” project. Here, my installed 'Visual Studio C++ 2010 Express' failed to detect any Itasca FLAC C++ template due to unknown reasons.
3. Now, with the help of Itacsa FLAC support, I have tried to configure a Win32 project template for UDM (C++) in FLAC by using FLAC 7.0 manual. But, this manual is for creating 32 bit DLLs in VS2005. Instructions for creating 64bit DLLs in VS2010 are inadequate and incomplete to me.
4. Besides, I have installed SDK 4.7 to configure VS 2010 for creating 64bit files as suggested in an online forum. However, I failed to build a 64-bit project. Error msg: The "ConfigurationGeneral" rule is missing from the project.'.
Therefore, if anyone kindly sends me a detailed step-by-step guide for creating a 64 bit DLLs in VS2010 Express (C++) for loading in FLAC 8.0 or any other support material, I will be highly obliged.
Thank you in advance,
Regards,
Dipaloke
Relevant answer
Answer
  • asked a question related to C++
Question
3 answers
I am trying to write a User-defined Model in C++ for FLAC in Visual Studio Express 2010 c++. Initially, I am trying to run(debug and build) the built-in Strain-softening Model based on the Mohr-Coulomb criterion (Available in FLAC 8.0) by changing its name only from 'ssoft' to 'i_ssoft'. However, I am getting the following error msg:-
1>------ Build started: Project: i_ssoft, Configuration: Debug x64 ------
1>  modeli_ssoft.cpp
1>     Creating library C:\Program Files\Itasca\FLAC800\PluginFiles\Models\modeli_ssoft\i_ssoft\i_ssoft.lib and object C:\Program Files\Itasca\FLAC800\PluginFiles\Models\modeli_ssoft\i_ssoft\i_ssoft.exp
1>modeli_ssoft.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl models::ConstitutiveModel::getPluginName(void)const " (?getPluginName@ConstitutiveModel@models@@UEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ)
1>C:\Program Files\Itasca\FLAC800\PluginFiles\Models\modeli_ssoft\i_ssoft\\i_ssoft.dll : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
From the error code, it is clear that I need to add models::ConstitutiveModel::getPluginName library which I have tried  (a screenshot is attached), but still, I am getting the same error.
Anyone, please suggest to me any appropriate solution for my problem. Kindly, inform me if you need any further information from my end.
Relevant answer
Answer
hi,
to assign it a value in the main function, the linker doesn't find the symbol and may result in an “unresolved external symbol” or “undefined reference”. The way to fix this error is to explicitly scope the variable using '::' outside the main before using it.o fix this issue, add the /NOENTRY option to the link command. This error can occur if you use incorrect /SUBSYSTEM or /ENTRY settings in your project. For example, if you write a console application and specify /SUBSYSTEM:WINDOWS, an unresolved external error is generated for WinMain.
Kindly refer this link:
Best wishes..
  • asked a question related to C++
Question
3 answers
Hello experts,
I hope you're good.
I am trying to generate non binary (optimized) lfrs sequence on the fly with c.
But I am missing something, I don't get what ...
attached is the code ....
Relevant answer
Answer
  • asked a question related to C++
Question
6 answers
I trying to install vina using pip and get this error(see file). I think the problem is that boost is not added to path. I have tried various tips posted on stackoverflow threads, read the boost docs for working with python and even watched the videos about how to install boost, but have not been able to solve this problem.
Apart from using pip I tried to install via conda following this manual:
Error not fixed. How i can add boost to path? After installing boost via bootstrap.bat and then .\b2 i get 2 links, but if i add it to PATH variable it doesn't solve this problem. I want to try use Vina scripts in python file
Has anyone been able to install Autodock Vina via pip or conda?
Brief output:
...
ValueError: Boost library location was not found!
Directories searched: conda env, /usr/local/include and /usr/include.
Relevant answer
Answer
I have described how to solve this problem on stackoverflow if anyone gets this error.
  • asked a question related to C++
Question
7 answers
I am trying to use GPU Accerlation for GROMACS 2020.3.
I have installed cuda 11.0 and my NVIDIA graphics card driver is gt-force mx130
and i am running ubuntu 20.04
but when i run the command : gmx -version
I got this
GROMACS version: 2020.3
Verified release checksum is c0599e547549c2d0ef4fc678dc5a26ad0000eab045e938fed756f9ff5b99a197
Precision: single
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: AVX2_256
FFT library: fftw-3.3.8-sse2-avx-avx2-avx2_128
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /usr/bin/cc GNU 9.3.0
C compiler flags: -mavx2 -mfma -fexcess-precision=fast -funroll-all-loops -O3 -DNDEBUG
C++ compiler: /usr/bin/c++ GNU 9.3.0
C++ compiler flags: -mavx2 -mfma -fexcess-precision=fast -funroll-all-loops -fopenmp -O3 -DNDEBUG
how would i make GPU support: enabled?
Relevant answer
Answer
Use this command while installing gromacs if you already installed CUDA
sudo cmake .. -DGMX_BUILD_OWN_FFTW=OFF -DREGRESSIONTEST_DOWNLOAD=OFF -DMAKE_C_COMPILER=gcc -DGMX_GPU=ON -DGMX_MPI=OFF -DREGRESSIONTEST_PATH=/your/pwd/path/here/Downloads/regressiontests-2020.3
  • asked a question related to C++
Question
2 answers
I was wondering how could I apply OOP (C++) in computational biosciences? I want my semester project of OOP to link with it somehow, innovatively.
Relevant answer
Answer
OOP is a process. It's a process of making the program more structured through code reuse, inheritance and polymorphism. As such, when programming comes into the need, computational bioscience, healthcare applications, bio medical applications all can be very well written in OOP languages like Java, C++, Python etc. When language choice comes into picture, then perhaps built-in library available in that language comes into dominance in decision making. Otherwise, in absence of library function, the function has to be hand crafted according to the need.
  • asked a question related to C++
Question
5 answers
can anyone suggest the best way to find the accurate execution time of math.h library functions such as sqrt(), log(), log10(), sin(), cos() e.t.c?
Relevant answer
Answer
Although this qs is little old, I have some answer to contribute:
Here's a code snippet (time.h and math.h need to be #included):
clock_t start = clock();
double x = sqrt(125.0); // or any other function
clock_t finish = clock();
double exec_time = (double)(finish - start) / CLOCKS_PER_SEC;
If you are using the Unix variant, then from command prompt within the shell, we may run as:
$ time ./myexec
where myexec is the name of the executable file.
Unix time command prints time spent by the executable as real-time, user mode CPU time and system mode CPU time.
  • asked a question related to C++
Question
5 answers
I'm a PGRs student, I would like to implement a new clustering algorithm using NS3, I have basic information in programming skills and I read about the object oriented c++ and NS3, I tried to create my network and deploy the node and the sink, is anyone has a good idea on how I can do this is NS3 or how I can start this, i'm so confused and do not know what can one do. Thank you for helpingv.
Relevant answer
Answer
Did you find anything that can help me, too?
  • asked a question related to C++
Question
4 answers
I would like to remotely trigger capture start and stop in Vicon using MATLAB on an external laptop, so that I can synchronise a code I have that records Radar data with motion capture data from Vicon. Many sources online, including Vicon, suggest that that this can be done by using UDP packages. These packages need to be sent via a script which I create and then they sent via a network cable to the Vicon System PC from the Matlab PC. Vicon support has provided me this link (https://docs.vicon.com/pages/viewpage.action?pageId=133824766) which gives a C++ example on how to do this (this is from the Shogun software but the details here are the most up to date and will work with Nexus). Any ideas on how to do this in a MATLAB script?
Any help is much appreciated.
  • asked a question related to C++
Question
3 answers
I am working on grain growth model. I have to assign each grain having different orientation. How can I write C++ code of it?
  • asked a question related to C++
Question
8 answers
I am looking for open-source algorithms to detect plagiarism in programming languages like python, java, c, c++, javascript, etc
Relevant answer
Answer
Languages belonging to the same family (functional, procedural) are not dissimilar. MOSS creates a language-independent description (such as a graph) for a particular program and then compares such representations for numerous programs. It keeps track of how many variables are used in your program, which variables are dependent on which, and how values are calculated, among other things. The names of variables and functions, the nuance of language keywords, the order of replaceable lines, and other such details are irrelevant. These widely used approaches enable the comparison of programs written in various languages.
  • asked a question related to C++
Question
5 answers
I am working on an AI project where I am using C++ and Tensor flow functions. Is there a way to combine them together using Edge impulse?
Relevant answer
  • asked a question related to C++
Question
4 answers
Hi All,
I have to compare performance of two algorithms in context of their time complexity. I have developed the C++ code for those algos and they output desired results but when I use Chrono to measure the delta time, it comes out to be zero, even tried other way to measure delta clock time but no success. I know with powerful window machines, it's sometimes extremely fast to process thousands of loops/instructions but when the measured time is zero, it doesn't provide any useful info on the time complexity of those algos.
Is there a suggestion to deal with this? I greatly appreciate all the help.
Thanks!
Relevant answer
Answer
To elaborate, Time complexity measures the time taken to execute each statement of code in an algorithm. If a statement is set to execute repeatedly then the number of times that statement gets executed is equal to N multiplied by the time required to run that function each time.
Regards,
Shafagat
  • asked a question related to C++
Question
6 answers
hi
i am good in programing c# c++ and python
now I'm going to start image processing please give me some information about which language and library i have to be come deep in it and some reference for study,
thank you
Relevant answer
Answer
This article might be good for you incorporating deep understanding and learning at the beginner's level of image processing, have a look: https://towardsdatascience.com/11-steps-to-start-with-image-processing-9f88f16b170c
Kind Regards
Qamar Ul Islam
  • asked a question related to C++
Question
6 answers
Hello everyone,
I'm trying to model the motion of a cylinder in both CF and IL directions, but the UDF code that I have only can move the cylinder in the CF direction. Sadly I have never had the chance to learn to code UDF. Can someone please help me?
I will share the code below.
I really appreciate any help you can provide or at least promote this question to find the best answer to my issue.
FYI, this code is for Vortex-Induced Vibration of cylinders
####################################################
#include "udf.h"
#include "dynamesh_tools.h"
#include "unsteady.h"
FILE *fout;
static real v_prev;
DEFINE_SDOF_PROPERTIES(stage,prop,dt,time,dtime)
{
Thread *t;
Domain *d=Get_Domain(1);
real x_cg[3],force[2],moment[3];
real cg; /*Center of gravity position*/
real vel; /*Cylinder velocity*/
real Fy; /*Lift Force*/
real mass=8.88; /*Cylinder mass*/
real fn=1.06; /*System frequancy*/
real wn=2*M_PI*fn; /*System angular velocity*/
real z=0.002; /*Damping coefficeint*/
real k=mass*wn*wn; /*System stiffness*/
real c=2*mass*wn*z; /*System damping*/
/*Get the thread pointer for this which motion is define*/
t=DT_THREAD(dt);
prop[SDOF_MASS]=8.88; /*System mass of the 6DFOF*/
prop[SDOF_ZERO_TRANS_X]=TRUE;
prop[SDOF_ZERO_TRANS_Z]=TRUE;
prop[SDOF_ZERO_ROT_X]=TRUE;
prop[SDOF_ZERO_ROT_Y]=TRUE;
prop[SDOF_ZERO_ROT_Z]=TRUE;
cg=DT_CG(dt)[1];
vel=DT_VEL_CG(dt)[1];
prop[SDOF_LOAD_F_Y]=-k*cg-vel*c;
fout=fopen("results.txt", "a"); /*Open file*/
/*Wrtie data into file*/
fprintf(fout, "%g %g %g\n",time,DT_CG(dt)[1],DT_VEL_CG(dt)[1]);
fclose(fout);
}
Relevant answer
  • asked a question related to C++
Question
3 answers
I want to know how to write the C++ code after calculating the sheet resistance of the grain growth in polycrystalline thin film.
Relevant answer
The sheet resistance is Rs= roh/ d where roh is the resistivity and t is the thickness of the film.
It remains only to express d in terms of growth tome t
assuming the deposition rate is constant and equal r then d= rt
Finally we have Rs= roh/ rt.
I assumed that roh is consatnt.
Best wishes
  • asked a question related to C++
Question
3 answers
I am working on C++ code. I need help to make code of reflective boundary condition in my simulation.
Relevant answer
Answer
C++ code for different boundary conditions can be found here:
  • asked a question related to C++
Question
3 answers
The ability to inspect the code in the system and see object types is not reflection, but rather Type Introspection. Reflection is then the ability to make modifications at runtime by making use of introspection. The distinction is necessary here as some languages support introspection, but do not support reflection. One such example is C++.
Can anyone please elaborate on this using Java coding examples.
Thank you
Relevant answer
Answer
I never made a distinction between introspection and reflection in that way. Though the way it is described in the post points out that there are two different capabilities - one is just to see the object metadata and the other is to be able to manipulate it.
One example of this is when you want to list all the properties of an object. Let's say you have a class Person and you got it from some library you have not created. if you want to know about all the properties that are exposed by this class you can either rely on documents or source code for manual check or you can use reflection (introspection as per the above definition ) to list it. Modern editors are able to show you these using IntelliSense which they implement using reflection(introspection).
A tricky example of the ability to manipulate these properties using reflection is to set the value of a private variable from outside the defining class. Though unnecessary and a bad programming practice it demonstrates capabilities of reflection in java.
  • asked a question related to C++
Question
8 answers
If anyone working on C++ coding of thin film growth let me know because I am new in this field. Thank you
Relevant answer
Answer
For microstructure studies maybe look at our code, OpenPhase: http://www.icams.de/content/software-development/openphase/
Here is a paper to begin with:
With topics like grain growth, precipitation, recrystallization in thin films this is a great powerful tool already examined in several cases
  • asked a question related to C++
Question
1 answer
One laptop runs the virtual network constructed by NS3, and the other two laptops are connected to two nodes of the virtual network constructed by NS3, and can communicate with each other. What should I do?
  • asked a question related to C++
Question
5 answers
Is there any open source code (C, C++, Python or Matlab) for discrete dipole approximation for scattering problems in a complex dielectric medium ?
Relevant answer
Answer
Indeed, if you have a complicated environment around a finite particle, than your best choice is a direct discretization of a large chunk of this environment (with any DDA code, like DDSCAT or ADDA).
The only available option to avoid this is for a semi-infinite substrate - ADDA can account for it analytically (discretizing only the scatterer itself). See https://github.com/adda-team/adda and the paper
  • asked a question related to C++
Question
4 answers
I was going through a presentation on NS-3 network simulator and discovered that both C++ and Python were used in creating the tool. Do I need to know both Python and C++ to use the tool or knowing Python alone is enough? I am familiar with Python but for C++ I need to go and re-learn it again. Thank you.
Relevant answer
Answer
Not necessary all. it depends on which language you prefer to use in writing your scripts. However most of the inbuilt tutorials in ns3 are written in C.
  • asked a question related to C++
Question
3 answers
I'm working on the simulation of thermal behavior of Ionanofluids, which is an ionic liquid-based-fluid in which nanoparticles were suspended to enhance the thermal performance. Multiple researches in the matter are taking in consideration more physical propreties to help predict these newly introduced fluids' thermal performance. Despite the rarety of experimental studies, they are credible and have very convincing models based on experimental observations and interpretations. In most cases a model for the thermal conductivity or for heat capacity was introduced to help predict the thermal performance. So in order for me to carry on a sophisticated numerical study i'm trying to introduce these models into Ansys Fluent as UDFs in order to compare or confirm with the experimental studies. This will enable me also, throw parametric studies to try multiple combinations of the ionic liquids+nanoparticles and compare their performance and cost effectiveness.
Thank you so much for your help and any advice in the matter will be helpful also.
Relevant answer
Hi there,
  • asked a question related to C++
Question
3 answers
Hello everyone,
what is the problem on this program plz,
tnx
#include<iostream>
#include<thread>
#include<chrono>
#include <array>
using namespace std;
void threadFn(int value, std::array<int,6>& a2, std::array<int,2>& a3 ) {
int sum = 0;
for (int i = 0; i < 8; i++) {
sum = sum + a2[i];
std::cout << value << "";
}
std::cout << std::endl;
a3[0] = sum;
//cout << "I am inside a thread function"<<value << endl;
}
int main() {
std::array<int, 6> a2 = { 1, 2, 3,4,5,6 };
std::array<int, 2> a3;
//t(id, bArray, begin, end, sArray)
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
thread t0{ 0,a2 ,0,3,a3 };
thread t1{ 1,a2,3,6,a3 };
for (int i = 0; i < 8; i++)
{
int sum1 = 0;
sum1 = sum1 + a3[i];
}
t0.join();
t1.join();
std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
std::cout << "Time difference = " << std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count() << "[µs]" << std::endl;
return 0;
}
Relevant answer
Answer
Here is the simple code, you can add required functionality accordingly.
vector<thread> mythreads; int i = 0; for (i = 0; i < 8; i++) { mythreads.push_back(dostuff, withstuff); } auto originalthread = mythreads.begin(); //Do other stuff here. while (originalthread != mythreads.end()) { originalthread->join(); originalthread++; }
  • asked a question related to C++
Question
6 answers
Dear all;
I am trying to simulate non-Newtonian fluid flow in porous media with the help of Palabos software. Palabos is a C+++ open-source library that solves flow problems with the lattice Boltzmann method. I am not familiar with object-oriented programming and I want to extract a value from a template that is used in every iteration. To be more precise; I want to print Omega (which is an (Nx-1)*(Ny-1) dimensional matrix) in every 250 iterations in the form of gif or data to validate my result. I added pcout to print variable in this function and it works but it is repeated every iteration which generates too much data ( imagine 200*200 lattice and 10000 iterations!).
I will be really glad if you could help me through this. the code is provided below. also, I uploaded
.h and .hh file to this message
Many thanks;
Elahe;
template<typename T, template<typename U> class Descriptor,int N>
T CarreauDynamics<T,Descriptor,N>::
getOmegaFromPiAndRhoBar(Array<T,SymmetricTensor<T,Descriptor>::n> const& PiNeq, T rhoBar) const
{
T nu0_nuInfoverCs2 = (global::CarreauParameters().getNu0()-global::CarreauParameters().getNuInf())*Descriptor<T>::invCs2;
T nuInfoverCs2 = global::CarreauParameters().getNuInf()*Descriptor<T>::invCs2;
T nMinusOneOverTwo = (global::CarreauParameters().getExponent() - (T)1)/(T)2;
T lambdaOverCs2sqr = global::CarreauParameters().getLambda()*Descriptor<T>::invCs2;
lambdaOverCs2sqr *= lambdaOverCs2sqr;
T piNeqNormSqr = SymmetricTensor<T,Descriptor>::tensorNormSqr(PiNeq);
T alpha = lambdaOverCs2sqr * piNeqNormSqr *(T)0.5
*Descriptor<T>::invRho(rhoBar)*Descriptor<T>::invRho(rhoBar);
T omega = carreauDynamicsTemplates<T,N>::fromPiAndRhoToOmega(alpha, nu0_nuInfoverCs2, nuInfoverCs2, nMinusOneOverTwo, this->getOmega());
T tau=(T)1/ omega;
T visco=((T)2 * tau - (T)1)/(T)6;
pcout << "" << visco << std::endl;
return omega;
}
Relevant answer
Answer
Dear all;
I searched among some examples and I figured out that an output image for omega could be easily generated by adding these few lines to the writeGifs function in the CPP file.
imageWriter.writeScaledGif(createFileName("omega", iter, 6),*computeOmega(lattice , Box2D(0,nx-1, 0,ny-1)),
imSize, imSize );
Thank you for your contributions and precious answers.
Regards;
Elahe
  • asked a question related to C++
Question
3 answers
Hello
I want to start working on Reinforcement learning in Unmanned Vehicles or Self Driving Cars. This project needs something which is listed below:
1) I need an experienced Master to co-work with each other.
2) A good reference for Studying.
3) Python or C++ or MATHLAB ???? which one????
I need some help with 1 & 2 . If you are ready for an interesting co-work, please contact me by the below email address mahdiihashemi@yahoo.com.
Sincerely
Relevant answer
Answer
Our team members are conducting relevant research. You can pay more attention and communicate.
  • asked a question related to C++
Question
2 answers
Dear all,
I would like to update the yield strength value in a UMAT subroutine in Abaqus. This would happen when a load is applied on an element, the deformation strain would be queried from a meta-model database, and depending on the deformation strain combinations returned by abaqus, the yield strength of the material in the function PROPS() would be updated from the database. I am very new to writing subroutines in ABAQUS. I was wondering if there is a way to implement such an algorithm to update the material properties in each time step. If so, how can I start tackling this issue?
Any help is greatly appreciated. Thanks.
Relevant answer
Answer
the material properties in props array of a umat are constant for the whole analysis and are defined in the material card at the preprocessing stage. If I understand correctly, you have developed a user material that calculates the stress update and the material Jacobian for each increment. In that case the material properties that are needed for your calculations would be retrieved from the meta database (you need to have access of this database in the umat) and not from the props array that is passed as argument in the umat. Then you can proceed with the calculations using the correct value of your material properties.
  • asked a question related to C++
Question
3 answers
Hello All,
I came across an additive manufacturing heat transfer FEM problem. In this problem, in each time step, a material is added to the current geometry. So, an amount of mass with a defined temperature is added to the whole geometry.
I heard about the Abaqus AM tool, but I would like to develop my own code. So I am wondering about the best method to solve this FEM? How can I define and update the stiffness matrixes? How can I reduce computational costs?
I appreciate any help or tip!
Relevant answer
Answer
About the stiffness matrix size: you can do it, but it is just a purely numerical solution (no science behind) if you make your steps independent (I mean if you move from step n to step n+1 and between those 2 steps there is a dimension change, export results from step n and make a transfer to a new model corresponding to your step n+1 putting zeros wherever there is no data from the previous step results and add whatever you want to add in the formulation of the initial state of your new calculation, ie the n+1) however, about adding mass, yes you would be infringing the fundamental law of mass conservation if you consider your system at step n and step n+1 the same, this is why I propose to numerically separate the model into one corresponding to step n and one other to step n+1. I hope I explained well my point
  • asked a question related to C++
Question
3 answers
I'm developing a computer vision using python. Is it a good idea to use python for image processing in production? or it's better to write my tests in python and for production use c++?
and can I compile python?
Relevant answer
Answer
Yes, MATLAB and Python are the most effective tools for image processing : https://www.youtube.com/watch?v=Fil-QlCERDo
  • asked a question related to C++
Question
8 answers
I have written a code in network simulator 3, which is based on C++. It is simulating a new protocol within a 5G network. I have another code in Google Colab, by using one of the well-known deep learning libraries called TensorFlow. Now I have my code in network simulator 3 and my trained neural network in Google Colab. I want to send some parameters from the Network simulator 3 (C++) to Google Colab and then return the output based on the neural network to the network simulator 3, and make some decisions based on the output of the neural network. How can I establish a connection between these two platforms?
Thanks in advance
Relevant answer
Answer
you can run the code in the python shell using cython package.
  • asked a question related to C++
Question
3 answers
What is the difference of performance between Cuda C/C++ and CuPy (python wrapper of CUDA)? if I need to do operations on array size 1 million which one will be good in terms of scalability and effort to code?
  • asked a question related to C++
Question
13 answers
I am currently learning C++ and python in (anaconda)
Relevant answer
Answer
I personally suggest using Python GUI(Graphical User Interface) to create a user interface. It will be best to start with OOP(Object Oriented Programming) for the backend. As you are learning python. I would like to suggest you two tutorial in case you need them.
  • asked a question related to C++
Question
3 answers
The EXFOR data is often needed, especially if we would like to compare our measured data with the previous experiments, and it would be great to do it in some automatic way. Find and load sql database with the EXFOR database is easy (from https://40.68.46.107/cdroms/ , for example), but correct parsing of the EXFOR file is quite sophisticated task. Maybe there is any C++ code which can do that?
Relevant answer
Answer
The C++ interface for ExifTool provides the source code for a set of objects that allow C++ applications to easily leverage the full power of the exiftool application through a simple interface. This interface handles all the hard work of launching, monitoring, controlling, and communicating with an external exiftool process.
Regards,
Shafagat
  • asked a question related to C++
Question
4 answers
Hi RG-community,
I currently struggling with finding a proper heart rate and heard rate variability lib in C++ for my project. The reason why I chose Cpp over python is the fact that we want to sample live HR data and compute the variability live. The gathered data is supposed to be used for adaptive assistance experiments in our aircraft simulator. There is a lot of libs/ modules for python, but I struggle to find something properly working which is based on c++. Maybe somebody has a suggestion :)
Thanks in advance!
Relevant answer
  • asked a question related to C++
Question
4 answers
Hi,
Can anyone please help me that how i can see the connections between all the Src file as i am very new to Geant4 and also know very less knowledge of C++.
so how can i proceed ?
Thanks in advance !
  • asked a question related to C++
Question
7 answers
Hello!
namely that I will implement a vehicle in node A and will then use dijkstra's algorithm to reach the shortest route. Example A is going to B, I would like to make a timer that shows me how long it takes to go from A to B. How can I implement a timer on java?
Relevant answer
Answer
i mean in which class? Wang Ting Dong
  • asked a question related to C++
Question
2 answers
I need to implement a code that can calculate the time between 2 points ( see the pic)
I have a network and I will let a vehicle go from A-B with a dijkstra's algorithm to find the shortest way but I would like a timer to calculate how far it has delayed until it arrived from A to B.
Relevant answer
Answer
Use the Jaccard distance formula or one of the competing methods from network analysis. For speed can you use average along each leg or is acceleration required? will the model be inaccurate if you use a constant?
  • asked a question related to C++
Question
9 answers
hello dear @all! I have tried to plot Pd Vs SNR using adaptive threshold for simple energy detection and it came out as I wanted, but when I go to plot Pd Vs SNR using fixed(conventional) threshold I got an error says "Undefined function or variable 'Pf'." and I have defined Pf=0.01, but still matlab says I have not defined it. please help me. the formula am using for fixed threshold is thresh_c = (qfuncinv(Pf)./sqrt(N))+ 1;
thanks
Relevant answer
Answer
@ Uwimbabazi Deborah plz send correct one code
  • asked a question related to C++
Question
10 answers
I'm trying to solve a possible issue by combining some header files written in C++ and the main program in Matlab, but I got many errors due to an unknown Matlab association. I'm opening to your tips.
Relevant answer
Answer
This link explains how to call C++ code in Matlab:
  • asked a question related to C++
Question
2 answers
For computational methods in FEA/FVM and Partial DIff Eqn's using C++.
Also, some guidance with the learning path (how to get along) will be appreciated.
Relevant answer
Answer
Mr.Shibajyoti,
I suggest you to read the following text book for finite element method;
1. 'A first course in the finite element' (2012), authored by Daryl L. Logan, published by Cengage Learning
200 First Stamford Place, Suite 400
Stamford, CT 06902
USA
2. 'Concepts and Applications of finite element analysis', (2002), authored by Robert D. Cook et al. published by John Wiley & Sons INC..ok all the best..
  • asked a question related to C++
Question
4 answers
after making input file
c--- begin input file ---
h2o # The label of the system, as in SIESTA SystemLabel
bader # the task viz rho, toch, bader drho, ldos, vh or vt (in lowercase!!).
4.0 6.0 5.0 # a shift of the origin of coordinates (in bohr).
2 #an integer (nskip) that specifies the density of grid points in the output. F
unformatted
c--- end input file ---
give me error
At line 124 of file grid2cube.f (unit = 5, file = 'stdin')
Fortran runtime error: Bad integer for item 1 in list input
Relevant answer
Answer
  • asked a question related to C++
Question
6 answers
The OTA (Single Ended) is an amplifier consisting of a current mirror, controlled sources and a differential pair. It is advised to study / implement the different structures separately before making the complete design of the OTA. Explain the type of structure you choose for your design (topology)
This OTA must have:
to. Gain in tension> 70 dB
b. Gain band width> 100 dBMHz
c. CMRR> 110 dB
Emphasize in the specifications:
- Slew Rate
- Gain
- Power dissipation
- Common Mode rejection rate (CMRR)
- Power Supply Rejection ratio (PSRR)
- Band pass
- Total harmonic distortion
- Distortion of the 3rd harmonic
- The transconductance
- The power of supply
- Polarization current
- Offset
Thanks a lot
Relevant answer
Answer
The first step for OTA design is by using the power constraint to find the tail current. After that, using the bandwidth criteria you can calculate gm of the first stage. Then simulate the design to check the gain. in case you need to increase gain, you can enlarge the length of the output devices and run again until you achieve the gain. Be careful about the phase margin which can always cause fluctuations. You can always increase the phase margin by compensation. In fact, Slew rate and power have strict trade off, therefore, satisfying both may be impossible which may force you to change the topology.
  • asked a question related to C++
Question
5 answers
Hello researchers, Hello Castalia 3.2 simulator users
I’m a phD student I am a beginner with Castalia 3.2, I work on optimization of RFID systems used in wireless body networks (WBAN). I simulated a WBAN with 10 nodes and one coordinator under Castalia 3.2 using the standard modules of Castalia , just i have defined the necessary parameters (omnetpp.ini) like the example BANtest in Castalia.
Now, i want to know how to on the improve and make a new implementation of the “BaselineBANMAC module (BAN protocol)” and the radio module to find good results for latency, consumed energy and Throughput (Received Packet).
My goal is to know how to implement the BaselineBANmac protocol and to have a source to understand the content of « BaslineMAC module » and « radio module » to make modifications on C++ code of the protocole which is under the MAC module (knowing that Castalia manuel does not contain explanation of C++ code of the file BaseLineBANmac.cc and baseline BANmac.h and the other files).
I will be very grateful if you can help me by a source that I can use to start modification and implementation especially to understand the content of the « Baseline BANmac » written on C++ and to start the improvement and implementation.
Best Regards
Relevant answer
Answer
Please visit the following link below: