BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
example_user_source.cpp File Reference
#include <belfem_user_api>
#include <algorithm>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for example_user_source.cpp:

Functions

real my_current (const real t)
 Custom current source with interpolation from data file.
void MyCurrent_init (SourceFunction *source)

Function Documentation

◆ my_current()

real my_current ( const real t)

Custom current source with interpolation from data file.

Parameters
ttime (s)
Returns
interpolated current value (A)

The file is a two-column ( time, value ) text table. It is read on the first call and kept for the life of the process. Arguments outside the sampled range are clamped to the end values.

◆ MyCurrent_init()

void MyCurrent_init ( SourceFunction * source)