Afeme C++ API 0.0.20261017
Structural finite element solver
Loading...
Searching...
No Matches
AFEME Namespace Reference

Classes

class  IAfemeCallback
 Afeme callback interface - Override this class to receive Afeme messages. More...
class  IAfeme
struct  BeamSectionProperties

Enumerations

enum  AFEME_ERROR {
  NO_ERRORS , INCORRECT_YOUNG_MODULUS , INCORRECT_POISSON , INCORRECT_DENSITY ,
  NEGATIVE_MASS , NON_EXISTING_MATERIAL , INSUFFICIENT_SECTION_COORDINATES , SELF_INTERSECTING_BEAM_SECTION ,
  LOOP_NOT_CLOSED , DEGENERATE_LOOP , HOLE_OUTSIDE_SECTION , HOLE_INTERSECTS_OUTER ,
  HOLES_INTERSECT , NEGATIVE_BEAM_AREA , NEGATIVE_INERTIA_Y , NEGATIVE_INERTIA_Z ,
  MAX_NUM_STRESS_BEAM_PROBING_POINTS_EXCEEDED , BEAM_SECTION_TORSION_NOT_SOLVED , NEGATIVE_OR_ZERO_THICKNESS , NON_EXISTING_PROPERTY ,
  UP_VECTOR_COLLINEAR_WITH_ELEMENT , ZERO_LENGTH_ELEMENT , ZERO_AREA_ELEMENT , ZERO_VOLUME_ELEMENT ,
  INCORRECT_FACE_INDEX , INCORRECT_ELEMENT_INDEX , INCORRECT_NODE_INDEX , INCORRECT_DOF_INDEX ,
  INCORRECT_LOAD_CASE_INDEX , INCORRECT_MODE_INDEX , NO_MATERIALS_EXIST , NO_PROPERTIES_EXIST ,
  NO_ELEMENTS_EXIST , CONSTRAINT_REFERENCED_NON_EXISTING_NODE , MISSING_SLAVE_NODE , MISSING_MPC_WEIGHTS ,
  INCORRECT_SLAVE_NODE , MASTER_NODE_IN_SLAVE_ALSO , NO_DOFS_IN_SYSTEM , NO_ACTIVE_TASKS ,
  PROBLEM_RUNNING_SYSTEM_SOLVER , NOT_ENOUGH_MEMORY , MATRIX_SINGULAR , TOO_SMALL_SUBSPACE ,
  NO_EIGENVALUES_FOUND , ACTION_NOT_SUPPORTED_FOR_REQUESTED_ANALYSIS , STEP_INDEX_NOT_GIVEN , NEGATIVE_FREQUENCY ,
  UPPER_FREQ_LOWER_FREQ , UPPER_EIGENVALUE_LOWER_EIGENVALUE , INCORRECT_NUMBER_OF_MODES_REQUESTED , INCORRECT_STEPSIZE ,
  INCORRECT_DAMPING_COEFFICIENT , INCORRECT_DAMPING_FREQUENCY , TRANSIENT_RESPONSE_NOT_INITIALIZED , ANALYSIS_NOT_RUN ,
  EXTERNAL_ERROR , DOF_DEPENDENT_IN_MULTIPLE_MPCS , CIRCULAR_MPC_DEPENDENCY , INCORRECT_MPC_WEIGHTS ,
  EIGENVALUES_MISSED , NUM_ERROR_CODES
}
 Defines Afeme global error codes. More...
enum  AFEME_ANALYSIS_TYPE {
  ANALYSIS_NONE , ANALYSIS_NATURAL_FREQUENCIES , ANALYSIS_LINEAR_STATIC , ANALYSIS_LINEAR_BUCKLING ,
  ANALYSIS_TRANSIENT_RESPONSE
}
 Defines Afeme analysis types. More...
enum  AFEME_STORAGE_SYSTEM { STORAGE_SYSTEM_SPARSE , STORAGE_SYSTEM_DENSE , NUM_STORAGE_SYSTEM_TYPES }
 Defines Afeme matrix storage system. More...
enum  PRESSURE_DISTRIBUTION_TYPE { PRESSURE_DISTRIBUTION_EQUAL , PRESSURE_DISTRIBUTION_SHAPE_FUNCTION }
 Defines pressure distribution types. More...
enum  AFEME_EIGENVALUE_PERFORMANCE_MODE { EIGEN_MODE_SPEED , EIGEN_MODE_ACCURACY }
 Defines eigenvalue performance mode (favoring speed or accuracy). More...

Functions

const char * getAfemeCoreVersion ()
 Returns Afeme version.
const char * getAfemeCoreSubversion ()
 Returns Afeme subversion.
void getAfemeCoreBuildDate (char buildDate[9])
 Returns Afeme build date.
IAfeme * Create ()
void Delete (IAfeme *afeme)
AFEME_ERROR calculateBeamSectionProperties (int numCoords, const float *coords, BeamSectionProperties &properties)

Enumeration Type Documentation

◆ AFEME_ERROR

Defines Afeme global error codes.

Enumerator
NO_ERRORS 
INCORRECT_YOUNG_MODULUS 

Zero or negative Young's modulus.

INCORRECT_POISSON 

Incorrect Poisson's ratio.

INCORRECT_DENSITY 

Zero or negative material density.

NEGATIVE_MASS 

Negative point mass.

NON_EXISTING_MATERIAL 

Material referenced by property does not exist.

INSUFFICIENT_SECTION_COORDINATES 

Insufficient number of coordinates defining cross section.

SELF_INTERSECTING_BEAM_SECTION 

Self-intersecting beam section.

LOOP_NOT_CLOSED 

Loop defining beam section not closed.

DEGENERATE_LOOP 

Degenerate loop defining beam section.

HOLE_OUTSIDE_SECTION 

Hole outside outer section.

HOLE_INTERSECTS_OUTER 

Hole intersects outer section.

HOLES_INTERSECT 

Holes intersect each other.

NEGATIVE_BEAM_AREA 

Zero or negative beam area.

NEGATIVE_INERTIA_Y 

Zero or negative beam inertia around Y axis.

NEGATIVE_INERTIA_Z 

Zero or negative beam inertia around Z axis.

MAX_NUM_STRESS_BEAM_PROBING_POINTS_EXCEEDED 

Maximum number of beam stress probing points exceeded.

BEAM_SECTION_TORSION_NOT_SOLVED 

Torsion of beam section could not be solved.

NEGATIVE_OR_ZERO_THICKNESS 

Negative or zero shell thickness.

NON_EXISTING_PROPERTY 

Property referenced by element does not exist.

UP_VECTOR_COLLINEAR_WITH_ELEMENT 

Vector defining cross section vertical direction is collinear with element direction.

ZERO_LENGTH_ELEMENT 

Element has zero (side) length.

ZERO_AREA_ELEMENT 

Element has zero area.

ZERO_VOLUME_ELEMENT 

Element has zero volume.

INCORRECT_FACE_INDEX 

Referenced non-existing element face.

INCORRECT_ELEMENT_INDEX 

Referenced non-existing element.

INCORRECT_NODE_INDEX 

Referenced non-existing node.

INCORRECT_DOF_INDEX 

Referenced non-existing node DOF.

INCORRECT_LOAD_CASE_INDEX 

Referenced non-existing load case.

INCORRECT_MODE_INDEX 

Referenced non-existing mode.

NO_MATERIALS_EXIST 

No materials exist.

NO_PROPERTIES_EXIST 

No properties exist.

NO_ELEMENTS_EXIST 

No elements exist.

CONSTRAINT_REFERENCED_NON_EXISTING_NODE 

Constraint referenced non-existing node.

MISSING_SLAVE_NODE 

No slave nodes in MPC definition.

MISSING_MPC_WEIGHTS 

No weights in MPC definition.

INCORRECT_SLAVE_NODE 

Constraint referenced non-existing slave node.

MASTER_NODE_IN_SLAVE_ALSO 

Master node is also slave node in constraint.

NO_DOFS_IN_SYSTEM 

System contains no degrees of freedom.

NO_ACTIVE_TASKS 

No active tasks (no tasks run).

PROBLEM_RUNNING_SYSTEM_SOLVER 

Problem running system solver.

NOT_ENOUGH_MEMORY 

Not enough memory.

MATRIX_SINGULAR 

Matrix is singular.

TOO_SMALL_SUBSPACE 

Too small number of requested modes within requested interval.

NO_EIGENVALUES_FOUND 

No eigenvalues found within search interval.

ACTION_NOT_SUPPORTED_FOR_REQUESTED_ANALYSIS 

Action not supported for requested task.

STEP_INDEX_NOT_GIVEN 

Mode/case index not given.

NEGATIVE_FREQUENCY 

Negative frequency given.

UPPER_FREQ_LOWER_FREQ 

Upper frequency should be greater than lower frequency.

UPPER_EIGENVALUE_LOWER_EIGENVALUE 

Upper eigenvalue should be greater than lower eigenvalue.

INCORRECT_NUMBER_OF_MODES_REQUESTED 

Incorrect number of modes requested.

INCORRECT_STEPSIZE 

Incorrect step size.

INCORRECT_DAMPING_COEFFICIENT 

Incorrect damping coefficient.

INCORRECT_DAMPING_FREQUENCY 

Incorrect damping frequency.

TRANSIENT_RESPONSE_NOT_INITIALIZED 

Transient response analysis not initialized.

ANALYSIS_NOT_RUN 

Analysis not run.

EXTERNAL_ERROR 

External error (e.g. license error).

DOF_DEPENDENT_IN_MULTIPLE_MPCS 

Node is dependent in more than one MPC (slave node of rigid MPC or master node of average MPC).

CIRCULAR_MPC_DEPENDENCY 

MPCs depend on each other in a circle.

INCORRECT_MPC_WEIGHTS 

Sum of weights of average MPC is not positive.

EIGENVALUES_MISSED 

Eigenvalue solver did not return all modes that lie within search interval.

NUM_ERROR_CODES 

Counter of error codes.

◆ AFEME_ANALYSIS_TYPE

Defines Afeme analysis types.

Enumerator
ANALYSIS_NONE 

No active (initialized) tasks.

ANALYSIS_NATURAL_FREQUENCIES 

Natural frequencies analysis.

ANALYSIS_LINEAR_STATIC 

Linear static analysis.

ANALYSIS_LINEAR_BUCKLING 

Linear buckling analysis.

ANALYSIS_TRANSIENT_RESPONSE 

Transient response analysis.

◆ AFEME_STORAGE_SYSTEM

Defines Afeme matrix storage system.

Enumerator
STORAGE_SYSTEM_SPARSE 

Sparse matrix storage.

STORAGE_SYSTEM_DENSE 

Dense matrix storage.

NUM_STORAGE_SYSTEM_TYPES 

Counter of matrix storage system types.

◆ PRESSURE_DISTRIBUTION_TYPE

Defines pressure distribution types.

Enumerator
PRESSURE_DISTRIBUTION_EQUAL 

Pressure force equally distributed to face nodes.

PRESSURE_DISTRIBUTION_SHAPE_FUNCTION 

Pressure force distributed according to shape functions.

◆ AFEME_EIGENVALUE_PERFORMANCE_MODE

Defines eigenvalue performance mode (favoring speed or accuracy).

Enumerator
EIGEN_MODE_SPEED 

Speed mode.

EIGEN_MODE_ACCURACY 

Accuracy mode.

Function Documentation

◆ getAfemeCoreVersion()

const char * AFEME::getAfemeCoreVersion ( )

Returns Afeme version.

◆ getAfemeCoreSubversion()

const char * AFEME::getAfemeCoreSubversion ( )

Returns Afeme subversion.

◆ getAfemeCoreBuildDate()

void AFEME::getAfemeCoreBuildDate ( char buildDate[9])

Returns Afeme build date.

◆ Create()

IAfeme * AFEME::Create ( )

◆ Delete()

void AFEME::Delete ( IAfeme * afeme)

◆ calculateBeamSectionProperties()

AFEME_ERROR AFEME::calculateBeamSectionProperties ( int numCoords,
const float * coords,
BeamSectionProperties & properties )

Calculates properties of a beam cross section the same way the solver does. The section polyline is one outer loop followed by any number of holes, each loop closed by repeating its first point.

Parameters
numCoords- Number of polyline coordinates
coords- Array of polyline coordinates (x,y per point)
properties- Calculated section properties
Returns
Error code (properties are not set if the section is not valid)